Introduction: Fire, Music and Lights Sync
We All Know Electronics Are Used For Many Important Tasks in Hospitals, Schools ,Factories. Why Not Have A Little Fun With Them As Well.
In this Instructable I'll Be Making Bursts of Fire and Lights (Led's) Which React To Music to Make Music A little More Fun Of An Experience.
We'll Be Using Isopropyl Alcohol as the Main Component of A Sanitizer which Evaporates Very Quickly and does not leave such a powerful smell behind compared to other fuels and the air is clear of any remnants after just a minute or two.
The servo's actuate a spray bottle filled with isopropyl to make a burst of fire/flame which is triggered by an injection syringe which has butane flow coming out of it.
Step 1: Materials Required
Gather Up Some Servo's , Led Strips And Other Electronics to get started with this build to be precise all the components needed are
1. MG995 180 Degree Servo's* 8
2. Arduino Nano *1
4.Spray Bottles *4
6. Circular/ Rectangular Plywood
7. Metal Rods for Support
8. Aquarium Pipes
10. PCA9685 Servo Driver
11. Perf board
12. Male to Male Header Wires
13. Breadboard Power Supply
14. 5 Amp Power Supply 5-12 Volts
15. Injection Syringe's
16. IRFZ44N Mosfet *3
17. Fishing thread
19. NEMA 17 Stepper Motor
Step 2: Servo's
Let's agree that the servo is the main component of the project as it is what actuates the firing or producing bursts of fire. To Use a MG995 Servo Plugging it in an arduino works in general you can find plentiful references to control a servo using arduino. We'll be using a PCA9685 Servo Driver in addition to the servo's to make the controlling Easier, Faster and Efficient.
Since Two Servo's Actuate One bottle therefore controlling both of them at once with the same control/pwm (pulse width modulation) signal is more efficient therefore this presents a problem that both rotate clockwise or anticlockwise at the same time. So to overcome this we need to modify all the right sided servo's.
This Can be done by opening by the servo and reversing the wires leading up to its motor and the potentiometer extreme left and right leads. This Tricks the servo into making it move clockwise for an anti-clockwise given signal and vice-versa.
Now, Both the servo's for a given bottle rotate clockwise and the other anticlockwise so as to press on the spray bottle trigger through a strong fishing line.
Step 3: Mounting the Servo's
The Servo's after successful modification (4 out of the 8) now need to be mounted. I found it easy to cut holes with a drilling machine with a circular saw drill bit attached. The servo edge is around 2 cm hence cutting it with a circular saw drill bit is the most efficient. Make Sure there's a gap of 8-10 cm between each servo so as to have easy threading , triggering and placing of the bottle. Now, After cutting the holes I found it best to glue gun the top of the servo with a good glue gun dab and sliding the edge of the servo into the cut edge. This cutting and mounting process is a bit dependent/ Trial And error process.
The Yellow Paper Marks the Spots where the hole's need to be cut so that the servo's edges slide in. The drilled whole can be made Smoother with a ordinary small drill.
Step 4: Makeshift Perf Board Servo Shield
Making this servo shield makes the wiring and powering a lot easier and also easy to troubleshoot.
Take eight , sets of 3 header pins and solder them on a small perf board making sure to give equal space in between. Short the Voltage and ground through wires or small metal pins for the entire Eight Servo's. Short 2-2-2-2 sets of the PWM pins in a way that the first 2 servos receive the same PWM signal the next two and so on.
Making this perf board is crucial as well because although the PCA9685 Servo driver provides excellent IO for connecting the servo's the Driver is limited to 5V And supposedly has current restrictions. To Overcome this this perf board shield/PCB is a very good option. Also the other reason is that the servo's operating in this project are operating at their max voltage capacity for higher torque and clean spray bottle pressing hence We'll be providing 8V Through this makeshift Servo Shield. Also Add / Connect a Male Header Wire to The First set of servos and so on so as to connect it to the driver later on.
Step 5: The Butane Flame
To Light up the Isopropyl a small flame directly in front of the bottle is necessary. I tried experimenting with nichrome to trigger the alcohol but sadly it does not work and even if it did there were problems I experienced with it. Moving on with the butane idea we need four small syringes and aquarium pipes. Connect all four of them to a single pipe through special adaptors / Pipe fittings. The Part Left now Is Holding the butane such that gas flows into the syringes. To Accomplish This I have made a wooden box/ Housing so that a stepper motor with a threaded screw/rod can push against the butane and keep the gas flowing.
Cut two Plywood sheets about the size 1.25 Times the Size of your butane can, the extra wood below is for the stepper motor's and rod which will push against the can. Take Two small plywood's about the diameter of the butane can and drill/ nail them so that the butane can fits snug between the plywood sheets taken earlier. Now for the bottom part of the can , I found it best to take a square/ rectangular piece of plywood the size of base of the butane. Drill a centered whole and sealant /silicone a nut so that a threaded rod goes through it. Slide the Butane can into the Assembly and put an acrylic top with a centered whole drilled as well so that the nozzle of the butane can will pass / Touch it. Slide a Syringe or something similar in the top part of acrylic so that if the can presses against it the gas comes out the syringe. Connect this to the four pipes going to the four different syringes placed before the bottles. For the bottom part of the housing use screws which pass through spring 's and connect it to the wood assembly so that if the screw is tightened by the stepper the housing goes towards the stepper and makes the pressing of the Butane Can Easy.
Your Assembly here for the butane can is done.
Now, We need to bring the pipes up through the plywood which holds the servo's , Just drill holes the size of radius of the aquarium pipes bring them up through neatly and connect the syringes. Also thread the fishing line from the servos up the bottle and down to the other servo such that when the servo's actuate the bottle is pressed. You can cut small groves in the press part of the spray bottle so that the fishing line does not slip of occasionally.
Step 6: Lights
To Make any Project visually Appealing lights are a crucial part, Take Strips of RGB Led's and Cut 4 strips of 9 Led's these will wrap around the bottles containing the isopropyl so as to bring the intended effect. Wire Them up in series and bring out the final wires. You'll have Red, Green and Blue and a positive lead With you. They power up if you provide 12V to the positive lead and ground the color you want. Grounding Two colors at the same time gives rise to a different color that can be referenced anywhere through a color chart on the internet.
Toggling them On and Off with an Arduino/ STM32 gets tricky as the Arduino/STM32 microcontroller cannot Switch On and Off 12 Volts. So We''ll be using 3 IRFZ44N Mosfet's here so as to switch the Led's on and off corresponding to the music. Take the Mosfet and wire up the middle terminal to the corresponding color and its extreme right towards the ground and its left terminal to the Microcontroller. Repeat this for the Other Two Colors as well.
Testing them once with a simple arduino blink sketch is always a good idea just change the pin number in the blink sketch to the one you have connected the mosfet.
Glue the RGB's Led's in a circular formation by keeping the spray bottle as an indent. I suggest a tight wrap around the bottle and hot glued to the wood base/plywood. This also makes a spot so that the bottles do not move or fall when the thread actuates pressing on the bottle.
Step 7: Electronics and Wiring
The wiring is pretty simple I also attached a circuit diagram down below for your reference. Basically PWM wires from the Servo Driver are attached to the 8 servo Motors in Which 4 of them are reversed. I have used an arduino and a STM32 As the microcontroller. The arduino is for controlling the spraying and the STM32 is for controlling the lights. I have used an STM32 so that The color mappings for particular music are better as an STM32 has better specs and can perform better fourier transforms resulting in a better Light's. Using an arduino also would not pose a problem but might look a little bad compared to using an stm32 which can perform better calculations.
Step 8: Code
As any Part of a Project with a microcontroller the code is the most important part. Given below is the code 's for this project. Feel Free to Tweak or make Changes to Suit Your Needs. Pin Number's Corresponding to the code are mentioned in the code itself.
The spraying ''Code'' Is basically an Arduino programmed by a computer to trigger a spray when something in the Arduino's serial monitor is typed , we have combinations from ''a'' - ''p'' where ''a'' triggers one spray/ Burst of Fire and ''o'' triggers all Four Bottles to Spray, ''p'' is a delay of 500 seconds. The Bursts can be controlled by giving a string of these characters in the serial monitor (continuously).
The other code is for the toggling of Led's by the STM32. It performs Fourier Transforms to React to a given Music and Produce the intended beautiful color changing effect.
The Last Code is for the Butane Stepper Motor Which uses DRV 8825 Stepper driver to turn a Screw which Pushes Up Against the Can to turn on the gas. Although you can also turn the screw/ Coupler manually to push the can Against the Upper acrylic which triggers / Opens the Gas to the syringes placed in front of the bottles.
Step 9: Success
Our Project Is Finally Done.
Attached is the Video Which Shows its Demonstration :)
Step 10: Tips, Tricks and Suggestions
Caution: Since this project involves actual Fire both as the main intended effect and also has butane please take caution. Isopropyl alcohol is also a dangerous chemical and must be taken caution.
1. This Project although reacts to the Fire is actually not automated completely as a person has to give input to a serial monitor to actually trigger the flames. This can be easily improved with an python/ any algorithm which can map out an entire song from input ''a'' to ''p'' and present it to the Arduino to make it automated.
2. Add a Kapton Heat tape to the Bottle's containing the Isopropyl just in case to avoid heating the Bottle Caps/ Damaging the Spray of the Bottle.
3.Sometype of Safety Sensor can be added to the entire build Such as the HC-SR04 Or the Proximity sensor to stop the flow of gas and the spraying process when a person is standing near the Project and it is dangerous to trigger a flame.
4. Power supply 's used Can be minimized with Buck or Boost converters to have the 8V (5A) (For the Servo's), 23-40v (For the Stepper Motor), 5v (For the Arduino and the Stm32) and 12V (For the Lights).
5. I have not presented schematics of the Stepper Motor or the DRV8825 as its a fairly simply Driver which drives the motor and also plentiful resources on the internet are available to connect it to the stepper and a microcontroller. Although I have provided the corresponding code .I used two buttons to control the clockwise and the anticlockwise rotation of the stepper motor such that pushing the clockwise button pushes the screw against the can and pushing the anticlockwise button lowers the can in the housing so that gas is reduced/ Cutoff.
6. Ensure Proper Grounding across the power supply's to avoid any unintended outputs and hiccups in the build, You can also design a PCB to mount the Microcontroller's and the Electronics to make it easier.
7. This Project can also be used as a Sanitizer dispenser as well as the bottles have Isopropyl in them which can provide fair bit of sanitation.
8. The Fire Has to be actually ignited by a lighter , to avoid this we can use nichrome wire to make the lighting process even simpler and computer/ microcontroller operated.
Participated in the
Make it Move Contest 2020