LASERS

To create the two laser guns for our game, we wanted to mount red lasers into some kind of modifiable toy guns that players could hold and shoot with. Fortunately, we found small red lasers from Fry's that the target photocells can consistently successfully read as a hit, and a set of toy guns from Walmart that nicely accommodate the lasers, as well as small "vibrator motors" to provide tactile feedback for a successful hit.

All wiring was done with phone cable, so one cable (surrounded by additional tubing for stress relief) runs between the console and the guns and is split into its separate wires to complete the various circuits.

The "guts" of a finished gun

Click here to see the software setup of the Lasers

This is the circuit for our gun lasers. After taking apart a laser pointer, we discovered that its outer casing is wired high, and the spring inside is wired low. We soldered two wires to these two points and connected the outer casing to power. The spring is wired to the drain of an N-channel transistor and its source to ground. The gate is controlled by our C32 board.

When the C32 input is high, the transistor allows current, turning on the laser pointer. Otherwise, the transistor is off and the laser does not turn on.

Circuit schematic of our gun laser pointer

The guns came with a trigger switch already wired into them. We dismantled the switch wires and attached them to our C32 board. A resistor was used to pull down the voltage, so that when the trigger switch is open the C32 ports reads low. When the switch is closed, the circuit is complete and the C32 ports read high.

Note that we added a capacitor between the C32 ports and ground because of noise from our target motors. Before this addition, the motors caused significant noise when on, resulting in our C32 ports to read false gun trigger pulls. This value of capacitance is just right - large enough to reduce the noise, but not too large as to make the response too slow.

Circuit schematic of our gun trigger

In order to add another sense for players to enjoy, we added vibrator motors to our guns. Whenever a player successfully hits a target, the vibrator motor briefly pulses, giving some tactile feedback along with the score increase. This setup is quite simple, with the vibrator motor's negative terminal connected to a N-channel transistor.

Like the lasers, whenever the controlling C32 port is high, the N-channel turns on, allowing current through and turning the motor off. When the C32 port is low, the transistor is off, and the vibrator motor stays off. The addition of a diode ensures that no back current can unexpectedly turn the motor on.

Circuit schematic of our gun vibrators