What's new

DIY LED Sensor Light Gun

For my initial test I was just going to write some code on my PC and communicate via bluetooth.

For a final solution though it could work with a Raspberry Pi3
It has built in Bluetooth for communication with the Wii Remote and the processing speed is going to be a lot better than the Arduino for not much difference in cost.

The drawback with the Pi is that it doesn't have any native analog outputs so you'd need an external D/A converter if you were planning on plugging this into an existing JVS board.

OR, if the Pi was programmed to run as a JVS I/O itself you would just need an RS485 interface
https://www.sparkfun.com/products/13706
 
For a final solution though it could work with a Raspberry Pi3
I'm curious to know if a single RPi3 is up to the task for calculating 2 guns, reading a couple digital switches, and replying to JVS commands. It may very well be able to do it quite well. I'm not personally that experienced in their potential to do this kind of thing. It would probably need to be handled in a way that it isn't spending all its time calculating a gun's position and not replying to JVS commands in time.
 
Thanks @twistedsymphony for directing me here, for context we where having a similar discussion about a reproduction light gun system.

Although I'm sure you've already perfected your method for calculating the position, I thought I might as well describe what I would do just to get it down on paper. If you individually flash all of the LEDs in turn, then you have the positions of each of the ones you can see. You can then extrapolate those into the 4 points at the edge of the screen, as you know the distance between each IR LED and how many there are around the screen.

You would then take those 4 points, and calculate the projection matrix to map the 4 out of perspective, skewed points, to a 4:3 or 16:9 perfect rectangle (depending on your monitor). This is explained in the link here: https://math.stackexchange.com/ques...atrix-from-4-projected-points-with-javascript. Although calculating the matrix is complex, you could plug in algebraic variables and compute the entire process into a few calculations and plug in your real numbers into the variables afterwards on an Arduino to speed it up. You would then apply this projection transformation to the middle point of your screen (width/2,height/2) and that would give you where you are pointing taking into account perspective and distance.

You can purchase a £5 Arduino + £25 Arduino IR camera + IR LEDs for a few pounds, plus a MAX485 chip and so could probably get the whole setup working for well under £40.

- This however leads me onto my real point:

I don't see much discussion of the technique used in the RAYS PCB on any forums. This simply has a static camera pointing at the screen, and shines an IR dot from the gun onto the screen that the camera can see. In a mirror cab the camera is placed on top viewing the mirror, and in a projection cab (like crisis zone DX) the camera is placed into the gun pedestal. There is no reason the camera couldn't be mounted to short throw projector though, or even probably from the back in a back projection setup.

This has the benefits that:

- Its much less processor intensive
- It only requires you to wire 1 LED
- You can use any webcam with an IR filter over it.
- The board would be almost exactly the same as one in any photo CRT light gun, and so repros boards could be made easily to fit guns such as the Namco Recoil one.
- If the camera image was skewed, you would only have to compute 1 perspective projection matrix (as the camera is static) to skew the image strait and this could be stored in memory and so would be much faster

I think this would be a really good route to go down, and it baffles me that they didn't use it more, however I cannot for the life of me work out how the guns managed to make a small focused IR LED dot. I don't believe they've used lasers, due to the health hazards related with little children looking down the gun barrel- not sure if anyone on here who is more technical than me, could explain how I might go about creating this focused dot. I think I may have to buy some LEDs and some lenses and have a go myself...

http://www.ukvac.com/forum/identify...nsor_topic368035_post1074854.html?KW=#1074854. In this thread there are some pictures of the original LED dot emitter from a Vampire Night DX, and some suggestions as to how I might achieve what I want.
 
Although I'm sure you've already perfected your method for calculating the position ...
Hardly, as I mentioned in post #20 my calculations in posts #14 and #15 are problematic because I was using the wrong projection system, really they need to be thrown out and redone, but the theory in post #5 I think is still the best way to go.


I don't see much discussion of the technique used in the RAYS PCB on any forums.
While this requires much easier calculations and less complex electronics, the rest of the hardware is much more difficult to make work.

You need a specialized screen surface to reflect the dot off of, something that a normal CRT or an HDTV wont have, and then you also need permanent mounting position in relation to that screen to mount the camera. This again will be difficult for most home setups and for even most generic cabinets.

I get the impression that this system also gets upset with outside light sources and reflections, which is why most of the cabs that use it are also designed in such as way as to block outside light from the screen surface.

So while the camera and LED are cheap I think getting a good screen surface and to make this system work might make it prohibitively more challenging than a gun mounted camera with LEDs around the parameter of the screen.
 
Last edited:
If it is for use on a PC, it might be easier and quicker for someone technical to finish these Guncon 3 drivers for Linux:

https://www.beardypig.com/2016/01/06/guncon3/

The Guncon 3 is noticeably more accurate that other home IR guns. It's not quite as good as the TC4 arcade gun but it's not far off. You can (just about) use them with line of sight aiming. Something you can not do with an Aimtrak, PS Move and certainly not with a Wii remote.

Personally, I don't think that the Sega arcade IR guns are worth replicating. I haven't found them to be much better than an Aimtrak. With that said, I haven't tried slightly newer games like ghost squad. My experience is based on Jurassic Park and House of the Dead series which both have terrible guns.

I picked up a GC3 recently for TC4. I was pleasantly surprised by how well they worked. I'm thinking about using it's electronics to put inside a TC4 arcade gun shell with a solenoid. It's not as good as the Namco brand GC2 but it is the best available for flatscreen home use currently.
 
Your findings are interesting there - the guncon3 actually uses exactly the same technology as the Wii remote (biangulation) and so it should not be that much better; but if it is that is definitely something to look at. Are you able to move position and still get line of sight aiming with it? How close / far away can you go with the guncon3? Seeing as there are only 2 reference points, you'd need both of them in the screen at the same time for it to work, so as you get closer to the screen it'll probably stop tracking?

I'm unsure what Sega IR guns you've used in arcades, but they where probably old and broken. A properly calibrated Sega IR gun will have complete mathematically correct line of sight aiming, using 10 reference points, not just 2 like the guncon3.

I wounder if the fact that the guncon3 allows you to put the markets on the far side of the screen makes it much better than the aimtrak?
 
Your findings are interesting there - the guncon3 actually uses exactly the same technology as the Wii remote (biangulation) and so it should not be that much better; but if it is that is definitely something to look at. Are you able to move position and still get line of sight aiming with it? How close / far away can you go with the guncon3? Seeing as there are only 2 reference points, you'd need both of them in the screen at the same time for it to work, so as you get closer to the screen it'll probably stop tracking?

I'm unsure what Sega IR guns you've used in arcades, but they where probably old and broken. A properly calibrated Sega IR gun will have complete mathematically correct line of sight aiming, using 10 reference points, not just 2 like the guncon3.

I wounder if the fact that the guncon3 allows you to put the markets on the far side of the screen makes it much better than the aimtrak?
All IR guns use the same tech but that does not mean they are all equally accurate. The Guncon 3 uses more sensors and is accurate enough to use line of sight.

The Wii remote uses a single sensor bar like the Aimtraks and is nowhere near accurate enough to use without crosshairs on screen. Out of all of them, the Wii remote is the least accurate and responsive.

Incidentally, most Sega gun games have crosshairs on-screen and it feels more like playing with an Aimtrak. Accuracy becomes irrelavent if you have on-screen crosshairs. I never understood why Sega and others chose to use IR guns instead the more accurate light gun tech at a time when all cabs used CRT displays.
 
All IR guns use the same tech but that does not mean they are all equally accurate.
not really. I can think of at least 3 completely different IR gun technologies used by the different guns discussed in this thread.

The Guncon 3 uses more sensors and is accurate enough to use line of sight.
The Guncon 3 uses 1 sensor, in the gun, just like the aim-track, just like the Wii remote and just like the Sega IR guns.

Incidentally, most Sega gun games have crosshairs on-screen and it feels more like playing with an Aimtrak.
What Sega IR gun game uses crosshairs on screen?
The Lost World
HOTD2
Confidential Mission
Lupin the Shooting
The Maze of the King
HOTD3
Virtua Cop 3
Ghost Squad

That's an exhaustive list of every Sega IR Gun game that ran on a CRT and NONE of them have crosshairs on screen during gameplay. The only time I've seen cross-hairs on any of them is during calibration and menu screens like high score name entry.

-----------
In order to have accurate line-of sight tracking you need 3 points of light that are not in a straight line.
Guncon doesn't do this, Aimtrack doesn't do this and Wii Remotes don't do this... the Sega IR system is the only one that does.

If you move the location of the gun after calibration it is mathematically impossible to calculate the line of sight trajectory without a 3rd point of light that is not in-line with the other 2.
 
  • Like
Reactions: nem
By sensors I’m assuming you mean it uses more points of reference (leds on the screen)? Regardless, it uses 2 IR led clusters in exactly the same way as the Wii. The only way I think it’s better is it probably has a wider lense so you can stand closer but it’s not more accurate.

Completely agree with twisted.
 
IR guns or CCD guns as some call them, use an IR camera to reference position against IR sensors positioned around the screen. If the gun does not use IR sensors then it is a different technology. There are a number of variations of this. The PS move, for example, has the sensors in the gun and the camera instead of a sensor bar. It's still the same tech though.

Arcade IR guns have more sensors but it is also the same tech. The TC4 arcade uses the same tech as a Wii remote but that does not mean it is equally accurate. No matter how many times someone says "oh it's basically a Wii remote".

The number of LED lamps is not that important. What matters is the number of points of reference and the quality of the camera (and lens). The GC3 having two points covering both sides of the screen makes a huge difference over the ones that use a single bar at the bottom. It's a fact.

Anyone who has tried a GC3 and Wii remote knows that there performance gap is huge.

This point that using the same tech makes it the same is nonsense. IR guns can be implemented fairly well or very poorly just like any other optical tech. Projectors, cameras, light guns using the same tech vary tremendously.
 
IR guns or CCD guns as some call them, use an IR camera to reference position against IR sensors positioned around the screen. If the gun does not use IR sensors then it is a different technology.
IR guns is an umbrella term that covers a range of different tracking technologies. "CCD" guns are just 1 type of such technology.

it's like saying "beverages" and "soda" all soda's are beverages but not all beverages are soda. Similarly all CCD guns are IR but not all IR guns are CCD. And not all IR guns use a camera either.
IR sensors positioned around the screen
...
You keep saying this but I don't know of a single IR gun tracking setup that uses more than 1 sensor....
Aim Track - Has 1 sensor in the gun, and multiple LED clusters around the screen
GunCon - Has 1 sensor in the gun, and multiple LED clusters around the screen
Wii Remote - Has 1 camera in the remote, and multiple LED clusters around the screen
Sega IR - Has 1 sensor in the gun, and multiple LED clusters around the screen
Namco CCD - Has 1 camera on the cab and tracks and LED in the gun
MS Move - Has 1 camera near the screen and tracks an LED cluster in the remote

What they all have in common... only 1 sensor per person.

The PS move, for example, has the sensors in the gun and the camera instead of a sensor bar. It's still the same tech though.
NOPE. PS Move doesn't even use IR at all. It's nothing more than the camera tracking the bright glowing (not IR) colored ORB on the end of your remote. The only sensor in the remote is an accelerometer.


The TC4 arcade uses the same tech as a Wii remote but that does not mean it is equally accurate. No matter how many times someone says "oh it's basically a Wii remote".
NOPE. TC4 is actually the same exact tech as the Sega IR... they even use the same friggin part numbers and it's not even close to Wii Remote tech.

TC4 and Sega IR both license their IR tracking technology from a company in Japan called OMZ.

Don't believe me? lets compare the PCBS:
Time Crisis 4: http://forum.arcadecontrols.com/index.php?action=dlattach;topic=149019.0;attach=344637;image
Sega IR: http://triplemoonstar.brinkster.net/theshed/images/838-14465R.jpg
They use the same number of the same addressable LEDs around the monitor and the use the same sensors in the guns (albeit the connector and mounting bracket is different).

They DONT use cameras but rather a proprietary sensor that's more like a motion detector. How do I know this? here's a photo... that I took myself of one of these sensors:

images.jpg



The sensor is setup in 4 quadrants and the screen has Addressable LEDs around the parameter and it takes readings of each LED one at a time in each of the 4 quadrants of the sensor to calculate the position. How do I know this? Because I've read the technical documentation on their website: http://ohmic.co.jp/cat/zahyou-01.html

The Wii doesn't use a "sensor" at all, it uses a camera. We know this because there are about a billion tear-down videos of these things:
68747470733a2f2f616c7461782e6e65742f696d616765732f7079495243616d6572612f7769696d6f74652e6a7067.jpg


not only that, but the Wii itself has a calibration screen where you can see what the camera sees:

settingsSensorSensitivity.gif



The Wii also doesn't even use addressable LED... how do we know this because the improperly named "Sensor Bar" can be replaced with ANY IR light source... like fucking candles:

The only thing these two tracking devices have in common is that they both have IR LEDS... other than that they're completely different. saying they're the same technology is like saying the NES and the Sega NAOMI use the same technology because they both have cartridges... it's not even comparable.

I don't know where you're getting you're information about how these tracking systems work but it is very VERY wrong.
 
Last edited:
@twistedsymphony What a beautifully comprehensive explanation! I think @Zebra might be getting confused with the terminology we use, seeing as everything is advertised as a Sensor; for example the Wii Sensor Bar, so it is understandable to get muddled up. Hopefully your post will act as a good reference point for the terminology to use when talking about these things in the future...
 
Aganyte great but we cant get all the parts here namely the programed PIC16F876A. since its only available thru you and you swore me away when i tried to do that project. so you releasing it?
 
This project is old now.

When i'll finished my current Memory Card Project i'll want do a new Gun2Naomi Arduino based version.

The code will be open source and i'll just sell plug n play board for people want it (like the Pwm2m2 and the Pwm2Happ)

Soo yes, i'll share the new version.
 
thank you. what time frame we looking at im curious
 
Last edited:
Why don't you just use a Wii Remote instead?

You can buy them cheaply, and buy a plastic gun surround for it. No wiring is required, and can all be run from a raspberry pi?

I've done it before and its pretty easy to do, obviously accuracy isn't amazing - but it's going to be no worse than this. OpenJVS at some point will support Wii remotes as standard, but not sure when yet.
 
Yeah that's my point, instead of de-soldering and re-soldering the camera onto another board, just connect to the Wii remote with bluetooth and save yourself lots of trouble! Although I do get that it's not a quite as polished solution, as it wouldn't be powered up with the machine etc and you'd see the Wii remote instead of an arcade gun with kick back. Kick back could be emulated using the Wii remotes rumble though which would be quite cool!
 
Back
Top