Main > Lightguns
GUN4IR - The Ultimate 4 Points Lightgun System
<< < (20/227) > >>
JayBee:

--- Quote from: thet0ast3r on December 29, 2019, 09:17:52 am ---Have you tried with putting something infront of the led that makes it more wide-angle? like maybe just a thin sheet of paper or similar?

the wii remote sensor bar and my ems topgun sensor bars seem to have pretty uniform brightness, mostly independent of viewing angle.

--- End quote ---
That's a good suggestion, I might try to see how it will react with a kind of half sphere filter.
Zebra:

--- Quote from: JayBee on December 29, 2019, 10:33:16 am ---
--- Quote from: thet0ast3r on December 29, 2019, 09:17:52 am ---Have you tried with putting something infront of the led that makes it more wide-angle? like maybe just a thin sheet of paper or similar?

the wii remote sensor bar and my ems topgun sensor bars seem to have pretty uniform brightness, mostly independent of viewing angle.

--- End quote ---
That's a good suggestion, I might try to see how it will react with a kind of half sphere filter.

--- End quote ---

That probably won't help (although it's worth trying). It's not possible to spread out a beam of light without reducing it's brightness. Diffusers waste a lot of light by sending it in all directions. The problem is somewhat solved in the projector screen business with dual micro-lens layers. A fresnel lens focuses light while a lenticular lens sends it left and right but not up or down (as nobody sits on the ceiling). Luckily, there are simpler solutions for IR guns...

When you bend LEDs to face the camera better, you don't have to bend all of them. You can place two or three in each position and face them in different directions (like on the Guncon 3). Then a slightly smokey plexiglass shield would stop the camera seeing three different LEDs (without over-diffusing).

Another option would be to place the LEDs closer together. The Guncon 3 seems to work just as well on my 77" TV where the LED cable isn't long enough to position them at the screen edge.

Or some kind of wide angle lens on the camera itself.

Personally, I think this issue is best solved by replacing the camera with an IR sensor like the Sega and Namco arcade guns. Having used their gun set-up at home for a few weeks now, I can see that it would make a far easier diy project than a camera solution. It's incredibly simple and effective. The LEDs mark the screen edge and the sensor measures proximity from that edge. Then it outputs 5v when facing one edge and goes down to 0v at the opposite edge. It may even be possible to hack a pair of 5 channel IR line follower sensors.
Howard_Casto:
I don't think an ir-sensor based solution is out of the question... the problem seems to be that nobody can find the sensors other than just buying the arcade guns.  If a robust avr, say a teensy, was used to build the kit it should be fairly trivial to blink some leds in sequence and read the values as they are turned on.  The thing is.. what kind of equation are they using to get the x/y?  I'm sure it's some kind of triangulation, but could any of us code something good enough to get a similar result?
JayBee:

--- Quote from: Howard_Casto on December 29, 2019, 08:44:56 pm ---I don't think an ir-sensor based solution is out of the question... the problem seems to be that nobody can find the sensors other than just buying the arcade guns.  If a robust avr, say a teensy, was used to build the kit it should be fairly trivial to blink some leds in sequence and read the values as they are turned on.  The thing is.. what kind of equation are they using to get the x/y?  I'm sure it's some kind of triangulation, but could any of us code something good enough to get a similar result?

--- End quote ---
I surely could code that, with the triangulation calculations I made for the 4 led system, adapting the logic to an IR sensor shouldn't be that hard.
But like what you said, I have no idea where to get those for cheap, neither how to interface them with a teensy.
Zebra:

--- Quote from: Howard_Casto on December 29, 2019, 08:44:56 pm ---I don't think an ir-sensor based solution is out of the question... the problem seems to be that nobody can find the sensors other than just buying the arcade guns.  If a robust avr, say a teensy, was used to build the kit it should be fairly trivial to blink some leds in sequence and read the values as they are turned on.  The thing is.. what kind of equation are they using to get the x/y?  I'm sure it's some kind of triangulation, but could any of us code something good enough to get a similar result?

--- End quote ---

I'm fairly confident I understand how the Sega type 2 guns work now. The most important thing is that the BD gun sense board does not calculate coordinates or employ any sort of complex algorithm that is beyond our capabilities. Aside from the digital buttons, the only output is a variable voltage (0-5v).

If you connected the X or Y and ground output to a small light bulb, moving the gun's aim from the left to right of the screen would act like a dimmer switch. Matching that voltage to a screen position is all done in Windows (or the arcade PCB) and accuracy is dependent on how well you (manually) calibrate. All the work required to translate voltage to screen coordinates has already been done for us. Our challenge is how to make a device output 0v when you aim at one screen edge and gradually rise to 5v as you move your aim to the opposite edge.

The next part is understanding how the Sega and Namco gun sensor (AKA light receiving unit) works. You can see the original design and description on their website (use Google translation):

http://www.ohmic.co.jp/cat/zahyou-01.html

Note how the original design used just 4 IR led boards. Not sure why it became 12 and then 10.

If you remove the IR shield from the Sega and Namco guns you see this type of sensor:



I've been trying to identify what sensors like this actually do and as far as I can tell, they reflect the IR light from the LEDs and measure how long it takes for it to return so they can calculate distance, speed or proximity. Similar tech used by police to catch you speeding.

I can't pretend to understand how IR proximity or distance sensors work. I can just see that, with Sega and Namco guns, the X Y voltage reads 0v, 0v, when I aim towards LED board 5 (top left corner). When I move the gun's aim across to board 9 (top right), the needle on my analog volt meter rises to 5v. If I stop at board 7 or 2 (the center), it reads 2.5v.

I think a good place to start for research is the 5 channel IR Arduino line-followers with analog and digital output options (so they can work as an analog joystick or an optical mouse). Check out this video and imagine hacking that device to space the IR channels evenly across the screen and possibly having a second 5 channel array for the Y axis.



Navigation
Message Index
Next page
Previous page

Go to full version