Introduction: Arduino One Powered Catapult
Before starting this Instructable, I would like to say that english is not my native lenguage, for that reason, if you do not understand what i write, please let me know and I'll do my best to correct it.
No mistery here, I will be showing you how to build a catapult that works with an Arduino Uno
Step 1: Materials Part One
Now, in order to build he catapult you would some basic materials:
A small saw.
One or two springs.
Some electrical tape.
Step 2: Materials Part Two
In this step i will detail the electronic materials you'll need in order to make the catapult work:
1 Arduino One.
2 Servo motors.
15 Jumpers (at least).
1 9v Battery.
2 250k Potentiometers
Step 3: Cutting the Balsa Wood and Building the Catapult
The mesurements I'm going to give you are an approximate of the one´s i used. Depending on the size or the style you want to give to your catapult, these measurements may vary.
All measurements are given in the metric system:
36x13 cm for the catapult base.
23 cm for the platform holding down the lever.
34x7 cm for the side covers of the catapult.
12x12 cm for the back lid (made with task board)
7 cm for the holder of the servo motor that liberates the catapult lever.
8x13 cm for the second servo motor (the one that gives the catapult it's throwing power)
There will be other balsa wood parts for the catapult as you'll see in this and the next steps. Unfortunately I'm not able to give aproximate measumerents for those parts, but it's not hard to do. All you have to do is calculate accordingly to the size of your catapult.
Now, using the balsa wood and the wood glue (use some putty if you need to), build the structure seen in the image above. I used a big nail to put together the two columns where the catapult lever is located; I also put a long piece of wood in the upper part of the columns, in order to keep the lever from flying away. The third column is where the servo motor in charge of setting the launching power is gonna go. Last but not least, I put a small metal ring on the center of the lever in order to put the springs later.
Step 4: Putting the Two Servo Motors
It's time to put the servo motors in their place!. As I said in the last step, the third column of the catapult is where the servo in charge of setting the launch power is gonna go. In order to set that launch power, I attached a small piece of wood to the servo which will be then attached to the springs and to the metal ring in the lever. I also covered the servo with some more balsa wood to keep it from being seen.
In the second picture you can see i changed the desing of the catapult a little. I tilted the it and built a bigger base in order to put the electronic components below it, so it would look aesthetically better later. You will also see that the second servo motor is already put in place. It has to go very close to the lever in order for the servo to hold it properly.
Step 5: Connecting the Arduino, the Servos and the Potentiometers
The first thing you need to know is that the Arduino Uno won't be able to power both servo motor, but don't worry, that's why we have the 9v battery. First connect the Arduino to the breadboard, putting the ground and the 5v pins with jumpers. Connect the ground and energy pins of the potentiometers to the breadboard as shown above. The data pins should go in the A0 and A1 analog pins of the Arduino. Make sure you connect the data pins of the servos in digital pins 9 and 8 of the Arduino (you can edit this later in the code if you want to). Now, the energy pin of one of the servos is gonna go to the breadboard as normal, for the second one, connect the energy pin to the battery red wire. The last thing you need to do is put the black wire of the baterry into the ground area of the breadboard. The ground pin of the second servo motor should also go to the breadboard.
Step 6: Coding
The code for this project is actually quite simple. I just used one of the examples given in the Arduino IDE and modified it in order to use two potentiometers and two servo motors. You can see the skecth in the attached file.
Step 7: Putting De Potentiometers in Place and Hiding All the Electronic Parts
We're almost finished with the catapult! The only thing left to do is put the potentiometetrs in each side of the catapult and then hide the breadboard and the Arduino Uno.
As you can see in the first image, I took out the potetiometers from the breadboard and used the male-female jumper wires in order to extend the pin connections. I made a small hole in each side of the catapult so in can be easily controlled.
In the last image, you can see how i managed to hide all the electronics components of the catapult right beneath it's structure. I also went ahead and painted the catapult.
Step 8: Enjoy!
There you have it! a weapon of mass destruction with an Arduino One! You can check the video and see what was the final result
I hope you find this instructable useful enoug. If you have any questions, please let me know.
Note: i also added an extra piece of balsa good to cover the servo motor in charge of liberating the lever, just so it would look a little better.
Note 2: i made a small basket on the lever so I can throw small objects. You can do the same or just glue a plastic botlle lid to make it easier. It's completely up to you!