I got the idea that it’d be fun to make an IR driven toy gun, and sensors that you can put on your body. Then make 10 of them and run around shooting each other. There are several commercial versions of these devices, and its quite a common team building exercise for companies. But it should be easy to make something like this DIY.
So I designed a simple circuit based on the MSP430 value line using the TI Launchpad. It’s a cheap MCU that’s relatively easy to program. Maybe not as easy as Arduino, but much cheaper.
But then I started wondering about the ‘moral’ implications of this. I don’t really want my kids running around shooting each other. I’m not the kind of father who wants to buy gun toys for my children. But is it OK to make it? It sure is fun, but is it right? I’ve got a working prototype of it, but I’m not sure I’m going to proceed making it. I was planning on printing the gun itself on my plastic printer. Maybe I could find some alternative, less agressive angle to the project. But I’m not quite sure what it should be. I certainly could make it look different from a gun, but would that help?
I’ve got C-code for the MSP430 that receives coded IR signals and plays the buzzer. When the button/trigger is pressed, it sends out a coded C signal and plays a short lower tone. The pipe is used to concentrate the IR light, and seems to work ok. The IR receiver is from Sparkfun, and works REALLY well. But it’s a bit expensive, so I’ve ordered some cheaper ones to try out. I’ve only tried it indoors. I guess it might not work outdoors.
Note: I’ve now also tried it with the IR RX Vishnay TSOP31238, which also works well. It’s a through-hole component and costs a couple of dollars. You need a pull-up resistor on it, and preferably an extra capacitor + resistor to filter the power.
The parts list is:
- MCU: MSP430G2211IN14 (part of MSP430 Launchpad)
- IR Receiver: VISHAY SEMICONDUCTOR TSOP31238
- Transistor: FAIRCHILD SEMICONDUCTOR BC337-25
- 5K ohm resistor between MCU’s pin P1.0 and the base of the transistor
- IR diode. Use one that’s got at least 100mA current, with more in bursts. As low angle as possible.
- Push button
- Power switch
- Alu tube (for directing the IR ray). Without it, the IR isn’t as directional.
Below is a picture of the components soldered together. In the end I decided not to make it look like a gun, but more like a remote control. It probably makes it more acceptable. The box is 3d printed with my thing-o-matic, and it has an integrated battery holder.