WARNING! This project contains extremely flammable combustibles.
Even though I have taken extra precautionary measures, this project
is NOT recommended to try at home. Please proceed at your own risk.
Want to spice up your Halloween this year with a little explosive fun? What's more fun than a remote controlled flamethrower pumpkin? How about 4 flamethrower pumpkins that plays Simon Says! In this Instructable I will show you the steps to create the circuitry, modifying an automatic Glade Air Freshener, the Android App, and the Arduino code.
Step 1: Supplies
For this project we will need: (I add the supplies needed for 4 flamethrower pumpkins. This can be done with 1 - many)
- Arduino (I used Uno R3)
- Bluetooth Module (I used a BlueSMiRF Silver)
- 2x H-Bridge Motor Controller (I used a L9110 Dual-Channel)
- Female to Female wires
- Header Pins
- Android Phone
- 4x Automatic Glade Air Fresheners
- 4x Cans of Starting Fluid
- Duct Tape
- Hex Screwdriver
- Soldering Iron
- Electrical Tape
- Misc Supplies
Step 2: Modifying the Air Fresheners
The Glade Air Fresheners come with a motor, gears, a circuit board, a push button, and a switch. Since we will be controlling the motor with our motor controllers all we need is the motor. Open the air freshener and remove the front casing. The gears and company will be screwed on by some very unique screws (a triangle bit?). I found that a small hex or star bit will work just fine. Unscrew the cover and cut all of the wires from the circuit board. There is a push button on the back that can be removed to snake the wires in the back. I added some extra wire to lengthen the motor wires. Screw the gears back into place.
Duct tape the cans of starting fluid so the hammer on the gear box touches the top of the aerosol can. Rinse, wash, and repeat until you have the desired number of flamethrowing units.
Place a candle in front of each air freshener. This will be the ignition for the flamethrower.
Step 3: Making the Circuit
This is a fairly easy circuit as everything is pretty much plug-and-play. The Arduino will accept incoming command through the bluetooth module and turn on/off the motors respectively.
The bluetooth module will be connected to pins 0 and 1 on the Arduino.
(Bluetooth) Rx -> Tx (Arduino)
(Bluetooth) Tx -> Rx (Arduino)
(Bluetooth) Vcc -> 5v/Vin (Arduino)
(Bluetooth) Gnd -> Gnd (Arduino)
(Bluetooth) Rts -> Cts (Bluetooth)
The H-Bridge's A-IA, A-IB, B-IA, and B-IB all need to be connected to the digital I/O pins on the Arduino.
The H-Bridges can be controlled with PWM using AnalogWrite(PIN, 0-255) to control the speed of the motor, but for this project we don't need to worry about PWM and can be connected to any I/O pins on the Arduino. Take note of which pins you connected on the H-Bridge to the Arduino, as we will need to reference these pins in the code in the next step. I used a breadboard's power rails to distribute power between the Bluetooth Module and the H-Bridges and was also able to connect LEDs as well.
To learn more about how H-Bridges work I suggest these links:
Step 4: Arduino & Android Code
This code uses a really neat library called Amarino. You will need to download a separate apk to connect and pair your phone to the Bluetooth Module. The apk can be found here.
This application is still a work in progress but it enables you to individually turn on/off each pumpkin as well as play a full game of Simon Says. The Amarino library works by sending a pair to the Bluetooth Module. I simply send a char/flag (a, b, c, d) with a value of 1 or 0 to turn the motor on/off respectfully. Simon Says works in a similar fashion. Each turn I generate a random number between 1 and 4 and add it to an array and send the array to the Arduino. The Arduino code iterates through the code and turns on/off the specified pumpkin. All of the logic is handled in the Android device, it just sends the data to the Arduino. There is a Android Wear module in the Android code as well, but no guarantees it works.
The code can also be found on Github and will be receiving updates soon.
Step 5: Additional Safety
The very first rendition of this project I simply used a switch to toggle the H-Bridges. This was very dangerous because I was less than a foot away from the flamethrowing devices. I added the bluetooth module so you could operate the flamethrowers at a safe distance. This protects you, but not other people who could wander in front of the flamethrowers. One option is to add a simple distance sensor so the devices will not trigger if it senses an object a given distance in front of it.
I've found the HC-SR04's work quite well. I've added the NewPing Library as well as some sample code from another project.
Please feel free to post any comments/questions below and I will be happy to address them.
Enjoy and stay safe this Halloween!