What is Firmware

Firmware is software that is programmed into a circuit board that is designed to control hardware (lighting control, temperature regulation, motor speed, etc.). The “brain” on these circuit boards is often referred to as a microcontroller. Unlike software that runs on your desktop or laptop computer or apps that run on your phone, firmware is updated much less frequently, if ever. Your smart TV, front loading washing machine and lightgun you want to build all have firmware.

Sensor vs. Emitter

IR LEDs emit invisible infrared light, similar to how a flashlight shines visible light. Technically, IR LEDs are “emitters”. An infrared detecting camera is mounted inside and is technically a “sensor”. However, most people will refer to infrared LEDs as “sensors”, such as the “Wii Sensor Bar” which has two groups of infrared LEDs at a known distance apart. When you see someone mention “sensor”, they are most likely referring to the infrared LEDs you will need to place somewhere around your screen and not the infrared sensing camera mounted inside the lightgun.

Flat Screen Compatible Lightgun Technology

Flat screen compatible lightguns use a variety of methods to determine where the lightgun is aiming at the screen. Most use multiple sources of infrared light (either 2-points or 4-points) mounted on top, below or around the screen and an infrared sensing camera mounted in the lightgun. Other new lightgun technologies use visible light cameras mounted in the lightgun which “see” the screen. There has even been an attempt to use an infrared laser mounted in the lightgun and a sensing camera pointed at the screen to detect the aim of the lightgun. As the renewed interest in lightgun gaming continues to increase, more technologies may become available in the future. The information provided on diylightgun.com primarily focuses on the technology which uses infrared light emitters mounted on the screen and an infrared sensing camera mounted in the lightgun.

Available Firmware

The infrared sensing camera mounted inside the lightgun will need to be connected to a microcontroller (typically also inside the lightgun). Firmware programmed into the microcontroller reads the position of the infrared dots, calculates where the cursor should be positioned on the screen and sends that position information to the host device (computer, Raspberry Pi, game console, etc). Most of the microcontrollers used are able to emulate a USB mouse.

The following firmware versions are available to the DIY lightgun builder:

SAMCOSAMCO
Prow Enhanced
OpenFIREGUN4IR
# of LED Emitters2 or 4444
Firmware CostFreeFreeFree30€
Source CodeOpenOpenOpenClosed
Additional Buttons101013+10
Solenoid FeedbackNoNoYesYes
Rumble Motor FeedbackNoNoYesYes
RGB FeedbackNoNoAnalog RGB & NeoPixelAnalog RGB
Accepts Serial CommandsNoNoYesYes
Stores Settings in LightgunYesYesYesYes
Firmware Download LinkGithubGithubGithubSent via email
GUI Download LinkGithubSent via email
Additional Information LinksGithub
YouTube
Githubopenfirelightgun.orggun4ir.com
arcadecontrols.com
The information in this table is believed to be accurate. Use the Contact Us form to let us know if something missing or is incorrect.

All of these firmware versions require an infrared positioning camera, either the SEN0158 Gravity IR Positioning Camera (commonly available at DF Robot) or an infrared sensing camera salvaged from a genuine Wii Remote. The SEN0158 camera is ready to plug into a microcontroller and is compatible with 3.3v and 5v microcontrollers. The Wii camera is 3.3v only so additional circuitry is required to operate the Wii camera on 5v microcontrollers. Most aftermarket Wii remotes contain infrared cameras which are only able to sense two infrared points and have not been confirmed to work with any of the above firmware.

So which firmware should you choose?

For the most immersive gaming experience, you will most likely want solenoid, rumble and/or RGB LED feedback. If you want to start gaming as quick as possible, SAMCO sells conversion kits that that make converting GUNCON1 and GUNCON2 lightguns very easy. GUN4IR does sell plug-and-play pre-converted lightguns (rpegelectronics.com in the U.S. and gun4ir.com elsewhere) and similar conversion kits. Without a conversion kit, converting a lightgun will be substantially more complicated but don’t let that scare you. Most makers find the process extremely rewarding and end up making more than one lightgun. The JB Gaming (GUN4IR) and OpenFIRE discords are very active and users are happy to answer any question you might have.