Introduction: Real-Life Waterbending!
Salvete, dispiculi machinarum! Hello, students of machines! As a student of Latin, I have an obligation to use it like any other language (it's not dead!). Anyway, here is my second Arduino project: WATERBENDING!!! If any of you loved to watch Avatar as a kid, you should understand why I had to make this project. This was a must especially after watching Sufficiently Advanced and his fire bending gauntlets. I wanted to do some kind of variation of the fire bending but due to my parents' objections, I ended up taking apart a water gun and making water bending gauntlets (even though fire is arguably cooler). A cool thing about my project is that if you press the button the side, it will go into AVATAR MODE and the water will just be continuously be shooting. This was an extremely simple and straightforward project. It works by giving a strong and solid punch and then a stream of water comes out! It's made with an Arduino Nano, motorized pump, and accelerometer all stuck on a breadboard that conveniently fits on your wrist. So, enough of this boring description and let's get to it!
DISCLAIMER: Images and characters/terms are owned by their respective companies or creator.
Step 1: The Materials
Let's gather the materials together:
Jumper Cables/Breadboard Cables
Box that fits on your Wrist (preferably water resistant)
This Motorized Water Gun or any other that pumps water with a DC motor
ADXL 345 Accelerometer - using this accelerometer will allow you to use the code as is
L293D Dual H-Bridge Motor Driver for DC or Steppers - control the pump
9 Volt Battery with snap connector- power the Nano and motor driver
Two 220 ohm Resistors
These Tools are necessary:
Hot Glue Gun
3D Printer (for the barrel)
Step 2: Basics for Arduino
If you are an experienced Arduino user just skip this slide. If not, keep reading. In order to control the Arduino you will ned to download the Arduino IDE. To download, click here for a full tutorial on how to use Arduino IDE. Next, in order to use your Arduino Nano you will need to download a driver. The link should be provided with the kit, but if not go back to the material slide and click "driver." Now that you got the connection set up, I will explain some of the code that I used. Most likely if you are new, you haven't heard of boolean. Boolean is a statement that can either be true or false. From there, you will be able to assign different two functions: one when the statement is true and one when it is false. In this case, I let the button be the means by which I toggle between true and false, turning the AVATAR MODE on and off. If I you still need clarification, visit this website for more information. The other thing that I used was the accelerometer. The code works through conditional statements where if the punch acceleration on the x-axis is greater than a certain number, water will be shot for a second or two. This accelerometer has many other capabilities but we will be only using the basics: speed in one direction. Luckily the pump from the water gun is operated by a motor, so I simply controlled it as such through the L293D H-bridge motor driver. More info on accelerometers click here and for more using the h-bridge click here.
Step 3: Taking Apart the Water Gun
This part took some brute force. First take out all the screws. The front of the gun should become lose and then insert your fingers inside of the crack and pull apart. This is where it gets tricky. The back won't come apart, so just bend and crack it off. Once that's done, you should have the compartment for the batteries, pump, circuit board, and now useless motor and buttons. You should have a circuit board like the one above. Find the wires that are connected to the pump's motor, which should be green and yellow. Using a soldering iron, take them out of the circuit board along with the power wires from the battery container. There is some kind of wax covering but your solder iron should melt it and get the job done. You could do whatever you want with the leftover stuff, but keep the pump and water container.
Step 4: Electronic Components
If you have a large enough breadboard, you should be able to stick all the components onto it ,keeping everything prim and proper. The resistors in the diagram should the 220 ohm resistors which would be connected to the accelerometer from the SCL and SDA pins to the power. Also, make sure the motor isn't spinning backwards. If it is, simply switch the two wires from the motor which are connected to the H-bridge. The motor represents the the pump which is operated in the same way. Use the soldering iron to connect wires to the buttons and the the 9 volt to the switch. If you don't know to solder or use the switch click this, skipping the part for the box, for the switch and this website to solder.
Step 5: Upload the CODE
Now using the compatible USB cable, upload the code into your Arduino Nano. Any problems refer to the basics slide.
Step 6: Time to Mount!
Using the hot glue gun or whatever kind of glue you prefer start placing the parts within and onto your box. You should cut out a space for the AVATAR MODE button and the switch for easy accessibility. Lead the wires for the pump through the back of the box so they do not get caught in one of your punches. Once everything is secure and in place. Do a test run. Upload the code, and with no water press the AVATAR MODE button. If you here a loud buzz from the pump that means it is working. If not, check your wiring or replace your 9 Volt. Now make sure the motor would actually shoot out water by placing your hand in front of the pump. If you feel a breeze, then it works. If not, simply swap the two motor wires; it just means the pump is sucking in year instead of shooting it out. Now for the grip/handle. I just made this part from scrap lying around: metal rods, a plastic handle, and some rubber bands. You should definitely look for a more secure way to hold it but this works for me. For holding the water, I first used a whole water bottle but that did not work. It was way too heavy and whenever I punched the water would slosh around causing it to slip off my arm. So, I decided to use the original canister. In order to use it, I cut off the top part of the water bottle with the cap and glued it to the top of the canister. Then I poked a hole in the cap so the tube could go through and sealed the sides with glue to make it watertight. It's kept in place with rubber bands, but you should find a better way to mount it.
Step 7: Final Product
Now if you have a 3D printer handy, you should got on TinkerCad and design some kind of barrel for the spray so that it doesn't leak out onto the box, especially if your box is not water repellant. Once you're done, enjoy spraying your friends or family with this gun, but certainly don't give it to them, because they will relentlessly chase after you, which will ultimately end up with your project damaged (I speak from experience). Any questions or concerns don't hesitate to post int the comments!
Participated in the
Outside Contest 2017