I Built My Own Light Gun for my PC & Arcade Machine
Peter Donnell / 8 months ago
If you’re an older gamer like myself, you’ll remember a time when a shooting game involved an actual gun. However, outside of the now rather rare arcades, light gun games are all but gone. The main issue is those modern TVs don’t work in the way old tube TVs did. They can’t use the same IR scanning technique for instant target location from the guns sensor. That’s a real shame, and the dominance of modern TVs wiped out the light gun market pretty much instantly… or did it?
You may remember a few weeks back, early in lockdown, I built an arcade machine with my kids. We play it daily, and nightly, and it’s right beside me as I type. But there’s one thing missing, a light gun.
I Built My Own Light Gun for my PC & Arcade Machine
There are actually quite a few options to do this. Sinden light-bar free gun launched this week, but at £80 for the basic model, it may be a bit much for some and there’s a waiting list. There are two competing methods for this type of mod though. Samco and JayBee went down similar routes. However, I pulled away from the JayBee lightgun technique as it required difficult to acquire IR LEDs and a power delivery system that rapidly over complicated the project and would have gone wildly over budget in my opinion. Samco, on the other hand, relies on knock-off USB Wii Lightbars… that’ll do me nicely. Check out the video below.
The Right Gun?
Getting the gun is the first and most important part. There’s no shortage of them though, a quick look on eBay will turn up a wide range of used lightguns.
The GunCon 1 and 2 are great options, but for me, I chose the GunCon 1 from the PlayStation 1 era. The Saturn, Dreamcast and a bunch of other guns are viable too though. Heck, I even considered making mine from a Nerf gun!! Just get something with space for the hardware.
- Arduino – £5
- DFRobit IR Camera – £25
- USB Wii Bar – £3.99
- A slim and tall momentary switch £2.65
- A long micro-USB cable – £4
- Basic soldering equipment
- Hot glue gun or similar adhesive materials
- A drill
- Standard screwdriver set
What You Don’t Need
All those lovely PlayStation cables and that TV cable, it’ll be removed.
As per the Samco guide, you’ll need to cut the wires on the interior of the gun. However, you’ll be keeping the button for the trigger switch. Or will you? More on that towards the end. That long PCB is no good though, so that’ll come out too.
I didn’t use the Samco PCB to complete my project, and I even opted for a much cheaper Arduino than he recommended. Boy do I wish I spent the extra ten quid on one though, as I had to learn more about Arduino than I thought I would have to. All things considered though, it wasn’t that hard. Once you know about the stupid Bootloader timing at least. That and having my friend Stephen explain all of it to me, thanks buddy!
Plus the pins had a different name but you’ll find a board map on their site telling you how to translate the Samco guide to your board. Don’t forget to add the boards to your Arduino IDE install too, so it knows what it’s communicating with. The DFRobot has a sticker on it telling you which pins it needs too, straight forward enough. Upload the appropriate code from the GitHub. I strongly suggest you download the test code and upload that. This will allow you to test the orientation of the DFRobot camera.
There’s a very annoying issue with DFRobot cameras where they’re not aligned properly. There’s a sticker that says “top” but that turned out to be 90-degree off. The true “top” was actually where you see the VCC/GND on the side. It fits in the GunCon without modification too, and the clamp screws will secure it. However, I suggest a few dabs from a hot glue gun on the camera and the USB cables, etc, to keep it all from coming loose.
You could measure up your wires, even trim down some of them to make it fit better. I didn’t feel the need to do either so it’s a little messy in here. However, all we’ve really done is wire up a USB camera, and connect all the standard buttons of the gun to a USB interface.
An additional button was soldered to the PCB to act as the calibration button. There’s a little problem though, where will it go?
We drill a hole in the gun, obviously! It went easier than I expected too, I was really worried about doing more damage to an otherwise brilliant gaming relic. Phew!
The gun now looks pretty legit, I think you’ll agree. The only thing I haven’t done is that I could wire another long cable to the Arduino for an external footswitch. I think I’ll save that for another rainy day though.
The USB lightbar is simple enough, just give it power from a USB port, phone charger, power bank, or whatever. As you can see, a phone camera can see the IR lights, but they’re otherwise invisible to the human eye. Secure this above your screen, place another below the screen if you’ve purchased two and are using the 4-LED code. Use the 2-LED code with a single light bar.
2 or 4?
I have one lightbar right now and I have to stand 6-feet back from the monitor. Not too bad if I’m honest, but when we move this over to the arcade machine, it’ll be too far. Thankfully, the 4-LED bar system halves the distance needed for tracking accurately.
You can follow some other projects to add things like a solenoid or motor to add feedback. It put the gun out of my timeframe and budget, and frankly, my skill. There’s not a lot of room in the GunCon 1 for this. However, you could convert a gun that already has space or even a solenoid for kick back and work around that. There’s a LOT of choices out there.
My main modification was swapping out that pokey little switch for the trigger. The trigger is on a tension spring, with a lot of travel to it, then a little button at the back with a bit of a dull click. I found Magic Trashman on twitter who 3D prints all kinds of kick-ass trigger mods. He may be in the US but it was less than two weeks to get it to the UK via USPS and only $13.50! Obviously, his prices are variable and to your requirements, but I think it’s a great deal either way.
Simply snip the wires out and solder them onto the new switch. I actually ditched the old wires completely and replaced them with brand new ones.
The new 3D printed component sits much further down in the gun and uses the existing gun shape to secure its self. I’ll use a little hot glue to keep it fixed though. The end result is a trigger with no travel, just a short and snappy mechanical “click” and it’s bloody fantastic.
So as you may have figured, the light gun basically emulates a mouse. With the trigger as left-click and so on. This is fine, as that’s what most emulators like MAME understand for those roms. Plus Retroarch has an option to set the gun as GunCon, meaning PlayStation 1 games like Point Blank work perfectly with it. I’d have done a video on this, but once again, Samco did a great job and credit where credit is due. Don’t worry, you can hide your mouse cursor too, so it’s not going to look or feel like dragging a pointer around, it’s aim and shoot as you would expect.
Well, now I go and play my gun games. I’ll be installing the lightbars on the arcade machine and adding a holster very soon. Beyond that, I don’t want to go much further into where to get the games and how to tinker with those, as there are far better guides already out there and we all know the grey area of acquiring games to emulate. Will you be building a light gun now? What could I build with the kids next? Hmmm.