Candy Launcher for Kids
This is a fun project to keep kids occupied at either a party or just over the summer because what ever you can put in the 3in barrel will be launched if enough pressure is put into the tank. Some things that work well are candy, water(be careful with this because it will enter you tank if held down too long), and water balloons if the pressure is low enough but candy works best. I created a basic part of the project which will take about 2 hours to create and glue then check for leaks, and then their is an advanced challenge with makes it a lot more fun because it adds a countdown effect and sounds plus makes it more fun to use. When I was growing up as a kid I was interested in how different things worked so this project allows you and your kids to learn about STEM in a fun and exciting way while actually teaching them about different basic aspects of circuits and construction.
WARNING- This project uses compressed air as a firing device but proper safety precautions should still be put in place such as safety glasses, hearing protection, and wearing gloves. Never point or direct this at any living things and should only be pointed at the sky or a wall. Never exceed 120psi, for higher psi you might need a higher rated trigger so its able to fire. Adult supervision is required.
Supplies
~Orbit 1-in Plastic Electric Inline Irrigation Valve
~VALVE PVC SCH 40 1/2-in Socket PVC Ball Valve
~1-in dia Cap PVC Fitting
~1-in x 2-ft 450-PSI Schedule 40 White PVC Pipe
~1/2-in x 2-ft 450-PSI Schedule 40 White PVC Pipe
~PVC Pipe 1 1/2-in dia x 10-ft Schedule 40 Pipe (2x)
~1 1/2-in dia 90-Degree Schedule 40 Elbow (4x)
~1 1/2-in x 1 1/2-in x 1-in dia Tee PVC Fitting
~1 1/2-in x 1 1/2-in x 1/2-in dia Tee PVC Fitting
~1 1/2-in x 1 1/2-in x 1 1/2-in dia 90-Degree Tee PVC Fitting (2x)
~1-1/2-in x 1-in dia PVC Fitting
~1-1/2-in x 3-in dia Schedule 40 Coupling
~Kobalt Steel Industrial Plug
~pressure gauge
~Pack of 8-fl oz PVC Cement and Primer
~16-Gauge Audio Speaker Wire - 50 Feet
~electrical tape
~9volt battery
~Spray paint if wanted
ADVANCED
~heat shrink tubbing for speaker wire
~Basic Arduino kit (with solder board and relay and if not these must be bought separately)
~10 Pack 9V Battery Clip Connector
~Hot Glue
Tools-Basic
~Some way to cut pvc pipe(hacksaw, chop saw, pipe cutters)
~Tape measure
~Wire cutters
~Wire strippers, knife Tools
Tools-Advanced
~Soldering iron
~Lighter
~tweezers
~Hot Glue Gun
Planning for Candy Cannon
1. While planning for the cannon build we must take a few things into consideration, this being said you first want to create a basic plan of what you want it too look like, how much power you want it to have, how much you want it to cost, and lastly how much time do you want to put into it.
2. After we have these things in mind we will began to make a sketch of what we envisioned in step 1. I am going to be using graph paper to allow me to have basic lines preprinted. this sketch doesn't have to be perfect because it is just so you know what things you need to buy from the store because my supply's list will vary from yours just because of available supplies. Things to think about are-how are you going to fill the tank with air(air compressor, bike pump)- next you want to think about how the air will stay in the tank(manual valve/automatic valve)- lastly you want to think about how many shots you want it to be able to shot before refilling the tank because this will change the total tank size you will want.
3.After you make your plan, you need to now make a parts list and determine which places have the parts you need, I recommend Lowes/Home depot/Menards for all piping supply's and then use Amazon for all electronics and wires.
Shopping Trip Plus Challenge Shopping
In the photo above it shows all of the supplies that I ended up buys from Lowes, the final price for these basic materials adds up to about $75. Yes this is a steep price for a project that you are making but you will be able to change the price depending on deals or variation in parts. This a just a fun project that you can make with you kids and you can launch almost anything out of it.
In the second photo shows a list of parts in an amazon shopping cart, these are only if you are doing the challenge part of this build. The total price for all of the extra parts adds up to about $50 unless you already have an Arduino, in this case it should only cost $10-$20.
Construction of Candy Cannon
Testing and Challenge Introduction.
Testing
While testing the cannon I noticed that the candy wasn't launching out properly so I tried increasing the pressure that the candy would launch at, Yes this did make a difference but still not exactly what I wanted to happen. I though about why this might be happing and then it hit me "The candy doesn't have a large surface area so the air was able to mostly flow around the candy. I was able to fix this issue by placing a small plastic ball into the barrel to act as a plug. This allowed the air to push on the ball which was then able to propel the candy out of the barrel more then doubling the total height.
Challenge Introduction
To make this a little more fun or to challenge yourself more then you already have then this is for you. The added challenge is to make a 5 second countdown after a button is pressed(LED countdown) to make it so your candy cannon doesn't launch right away. This is a cool effect and will work better then just touching a 9 volt battery to speaker wire. Not only will this add cool lights to the cannon but will also add a sound for when it launches.
Planning Your Circuit (Challenge)
Photo #1.The first thing that you want to do is gather all of your components for the circuit, this should include 7 resistors, 6 LED's (5 of which are one color), 1 9 volt battery, 1 push button, 1 electric low power DC relay, 1 Arduino, 1 break board for testing, 1 solder board for final design, lastly you need a lot of small wires to connect everything together. try and color code your wires depending on what they do. Below is a small list of what I recommend each color wire should be for.
Red-Power Black-Ground Yellow-Signal wires Blue-Feed back from button Purple-Outputs
Photo #2. The second step is to connect your power from your Arduino to your bread board.
Photo #3. The third step is to place the LED's, the resistors and lastly the button (aka your trigger for the launcher) This step also allows you to start building a housing to be able to hold your full trigger mechanism. At this point you do not want to solder anything together just so you can test your final product before making it final.
Photo #4. The forth step is to connect the LED's and your trigger bottom to your Arduino. I personally recommend that your 5 countdown LED's should be in slots 0-4 and then port 5 will be your output to your launcher/LED. Then port 6 will be your push button and lastly your Busser will be in port 7. In this diagram I connected the Arduino ports to one side of the resistors which allows the current to be reduced to allow the LED's to not be over voltage(the process of feeding too much current to an LED which causes the diode to bust and no logger emit light. LED's have a longer and shorter sides which both do different things. The longer one is where you connect your positive side while your shorter side is for the negative connection/ground. By doing this you are completing a circuit so power can flow. For your push button you should attach power and ground to the bottom connectors and then the top connector to your trigger port.
Photo #5. The fifth step is to connect your buzzer to port 7 and make sure you connect this to the positive side of the buzzer then connect the negative side to ground.
Photo #6.The last step is to attach your relay to your launcher, In this diagram I am using a motor to represent the sprinkler valve, the relay acts as a switch but is needed because the Arduino can only output 5 volts of power and the sprinkler valve requires at least 9 volts of power to activate but prefer a higher voltage to operate. Since all relays tend to be different you should check the instructions on your relay to make sure you wire it properly and also now is the point to make sure you have the correctly sized relay that is capable of switching your current needs.
Programming Your Arduino (Challenge)
To start off I am still learning myself how to code using Arduino but I did try and make it as simple to even beginners can understand. I am going to leave my code as a download so if you don't want to try to code you don't have too. I will describe it from the top and work my way down. I will be describing the basic block code but I have the actual code on the far right because this is what it will look like when you download it.
1. First we are going to add in the button control to start and stop the code I use an (If-Else) block which allows the code not to run unless the button is pressed. To make the code realize what we want it to do with the button you have to have it set to when the button is pressed we can have it be two different things that mean the same thing (Button pressed = 1) so we can have it so when the button is pressed 1>0 or we can have it so 1=High. Both of these things do the same thing
2.Second we are going to add in the count down effect which is just a 1 second wait after each light that is turned on. The LED's are determined by which port you plugged your LED's into, so in my case I used ports 0-5 During this we are also going to add in our speaker(buzzer) effect into the code. When the speaker(buzzer) is triggered it will produce a sound at the frequency that we can decide. I also added a wait into the code after this to allow the trigger and speaker to be active for 1 second after they are turned on.
3. Third we will add blocks that will turn everything off and to keep it off until the button is pressed again. This will be added into the (else) block which means when the criteria isn't met it won't run anything.
4.After your code is done try and test it in something like tinker cad. This allows you to get an understanding of how it might run and this also allows you to plan out your circuit before actually creating it. After you know it works you can download the code into the Arduino. (Plug your Arduino into your computer using a USB port and download the code you wrote using the Arduino software) I added a video of how to get your software from tinker CAD to your Arduino.
Soldering Your Circuit/Trigger Box (Challenge)
I am first going to explain what soldering is, then I will say a few tip and tricks on how to get the best soldering joints or your project. Soldering is the process of using metal with a lower melting point which likes to join with flux(is used in both extractive metallurgy and metal joining) or wires to create a solid joint to flow power. This will be used in this project to connect your speaker wire to your trigger. you will able be using this to connect your LED's and resistors to your board. This is helpful since you don't want things to move or disconnect.
Tip's and Tricks
1. Always remove the solder before the iron to prevent your solder from remaining attached.
2. Hold your iron at an angle to allow you to feed solder in more easily.
3. Learn what temperature your solder melts at so you don't over heat it. This also helps you know how long you need to hold components before you can let go.
4. Find someway to hold your components so you don't accidentally burn yourself.
5.Practices Practices Practices -You won't do amazing your first time but the more you do it the better you will get.
6.Check the direction that components are supposed to be placed in, Some things like LED's and buzzers require a set direction to be able to work properly.
Final Setup/Testing (Challenge)
Final Setup
The things that still need to be finished/assembled include wiring the trigger box to the air cannon by attaching your wires and using some form of wire connector. In this project I will be using wire crimps, this allows for the best connection possible, I will then wrap them in electrical tape to prevent them from being able to come apart.
Final Testing
For the final testing my Arduino ended up breaking so I wasn't able to get a final video but I ended up just using the push button setup like you would use for the non challenge part of this. Overall this was a fun and simple project to make and it will last as long as you want and take care of it.
Thoughts for Next Time
A few thought for next time would be just trying to find a way to make it cheaper, this total project costed about $100 by the end of it not including the sprinkler valve because I already had that. The other thing that I would change is I would probably paint it because I didn't have a lot of time to design this and document everything. A nice coat of black spray paint might happen in the weeks to come so it stands out more and you don't have to see the purple PVC cleaner. The other thing for myself is since I am more advanced in the designing of circuits and I have experience with Autodesk eagle, I could design a custom PCB board and then I would just have to solder everything to it rather then using a blank soldering board.
One problem I had was I believe my Arduino ended up dying during my final testing so I wasn't able to us the count down for the actual launches but it worked in test.