Monday, September 12, 2016

T-shirt Cannon


CLICK ON THE PICTURE FOR DOCUMENTATION

Addendum... The T-shirt cannon now has an airhorn!


I figured this would be a good addition both for the impact and also for safety.  I purchased a couple kits from Amazon, this one and this one, the first as the original and the second when the plastic horns from the first kit broke.  The kits come with three parts... the horns, an electronic compressor, and a relay.  I thought the kit was broken because when I wired the compressor to 12V through a momentary switch and pressed the switch, no sound came out.  The compressor made a weak noise like it was a small outboard motor, but that was it.  The wires also got very hot.

I wired up the product in the manner instructed which uses a relay activated by a momentary switch to drive the compressor.  This diagram in Figure 1 shows how this wiring is done (taken from a video on youtube)
Figure 1
Figure 2
This worked well.  Next, I wanted to remove the human from the equation and automate the air horn.  I used a transistor in place of the momentary switch to turn on the relay.  A 2N2222A NPN transistor with a 220 Ohm resistor wired to the base is driven by the output of the Arduino Mega 1280 "brain" of the T-shirt cannon.  I fabricated a custom PCB board, the layout of which is shown below in Figure 2.  A diode, an LED/resistor, and the relay (pins 85 and 86 of the automotive relay) are in parallel between 12V and the transistor.  When the transistor is turned on, the relay is activated, and the LED turns on.  The flywheel diode takes up any reverse EMF generated when the magnetic field of the relay collapses, and thus protects the transistor.  Eagle CAD files for the PCB are available here.

Figure 3 shows the actual automotive relay and the pins labelled for reference/troubleshooting.
Figure 3
Figure 4 shows the layout of wiring on the actual T-shirt cannon (again for reference).
Figure 4