Automatic Rubber Band Catapult
by CreativeLabs in Circuits > Arduino
6271 Views, 41 Favorites, 0 Comments
Automatic Rubber Band Catapult
Tired of these office fights? Grab your tools and build the most powerful automatic catapult in the whole building! Defeat your colleagues or classmates and enjoy the power released with a single click on the button!
In this Instructable I will show how to make a rubber band powered catapult. It can reload automatically and is always there when you need it.
Let's get started!
Supplies!
Tools:
- 3D-printer
- Screwdriver
- Pliers
- Hot glue gun
- Soldering iron & solder
- Saw
Parts:
- Rubber band
- M1.4 Bolt and nut
- Arduino uno
- 2x Micro servo SG90
- Push button
- 10k Resistor
- Breadboard
- Paperclip
- Wire
- 3mm plywood sheet
- USB cable
- Tape
Printing the Parts!
3D print the STL files attached. I used the Creality Ender 3 with 1.75mm white PLA.
These are the settings I used:
- Infill: 20%
- Layer height: 0.2mm
- Nozzle temperature: 200°C
- Bed temperature: 60°C
The full printing process took about an hour with the above settings. If you don't have a 3D printer you can use cardboard to make it!
Downloads
Assembling the Catapult!
After you're done printing you should have two parts. In this step we're going to assemble the catapult.
- Take the bolt and use the screwdriver to put it in the middle hole of the part that looks like a spoon.
- Grab the rubber band and secure it around the bolt with the nut. Use a bit of hot glue if necessary.
- Use pliers to straighten the paper clip and cut it in half.
- Put one half of the paperclip into the holes of both 3D printed parts and bend the ends to make sure everything stays in place.
The Circuit!
The servos:
We start off with the servos. Connect the yellow wire of the first servo to pin 5. This will be the servo to shoot the catapult. Connect the yellow wire of the second servo to pin 9. This will be the lock servo. Connect the red wires of both servos to positive side of the breadboard and connect the brown wires of both servos to the negative side of the breadboard. I used some jumper wires to connect the servos but any other wire will work too.
The button:
Solder the resistor to the button and solder a wire to the other end of the resistor. Solder two wires to the button as shown on the pictures. Connect the yellow wire to pin 7 on the Arduino, connect the red wire to the positive side of the breadboard and the blue wire to the negative side of the breadboard.
Connect the positive side of the breadboard to 5v and connect the negative side of the breadboard to the ground (GND pin).
Strip the USB cable to get a cable where one end is an USB input and the other end are two wires. Connect the red wire of the USB cable with the VIN pin on the Arduino and the other one with the ground (GND pin). The circuit is done and we can start coding!
The Code!
In this step we're going to write the code to control the servos. We'll be using an Arduino uno to do so. Lets get started!
Open the Arduino IDE and import the .ino file I provided.
Explanation of the code:
We start with the setup. In the setup there are a few lines. The Serial.begin(9600) is to set the communication speed. In this case it is set to 9600 bits per second. pinMode(buttonPin, INPUT) sets up a pin for the button.On the next two lines you'll see servo.attach(5) and servoLock.attach(9). These are the pins where the servo is attached to, in this case the servos are attached to 5 and pin 9. Finally you'll see resetCatapult(), this calls the resetCatapult function.
If we go to the loop you'll see buttonState = digitalRead(buttonPin). This reads the state of the button (button pressed or not). If the button is pressed the catapult will fire and reset to be able to fire again.
The shooting function ensures that tension is applied to the rubber band After this, the lock servo opens and the catapult will fire.
The reset function takes all the tension off the rubber band, causing the arm to fall down. After this, the lock servo locks the arm and the catapult is ready to be fired again.
With the knowledge of how the code works you can now adjust everything to your liking.
Upload the code to the Arduino.
Downloads
The Casing!
For the casing we'll be using 3mm plywood. I cut out 5 pieces with the following dimensions:
- 8x6 cm (1 piece)
- 8x5.4 cm (1 piece)
- 6x12.7 cm (2 pieces)
- 8x13 cm (1 piece)
Drill a hole in the center of the 8x6 and 8x5.4 piece (make sure it's big enough for the 3 wires of the servo). Drill a hole of 1.1 centimeters in the piece of 8x13 cm as shown in the picture.
The 8x13 cm piece will be the top, the other pieces are the sides. Use the glue gun and glue all the pieces together to make a box.
Finishing the Catapult!
You're almost done! just one more step and you can enjoy your homemade catapult!
Put everything in the casing, but make sure the servos and power cable are on the outside. Glue the button to the hole on top of the casing and you're almost done!
Turn the casing to get the top facing towards you and glue the servo which is used to fire the catapult to a side (doesn't matter which side). Make sure the servo has an angle of 0° and is pointing towards the box like in the picture.
Take the other half of the paperclip (from step 3), use pliers to bend it to an angle of almost 180 degrees and cut it in half again. Grab the bended piece and secure the rubber band of the catapult to the servo arm.
Glue the base of the catapult to the top. Make sure there is no tension on the rubber band! Finally glue the lock servo to the other side of the casing. Make sure the servo has an angle of 180° and is blocking the arm of the catapult.
To ensure that the arm will fall back we're going to put a piece of tape on the base of the catapult. When the arm hits the tape it will bounce back to its original position and you'll be able to fire again. You are finally done! Let's test it!
Testing!
Enjoy your catapult!