Catapult¶
Examples of catapults¶
Pro’s:¶
- Design is simple.
- Launches the ball far enough.
- Doesn’t require a lot of time to build it.
Cons:¶
- Design doesn’t look minimalistic.
- All the wires are still visible.
- It still requires power through a cable.
Pro’s:¶
- Launches the ball far enough.
- Can rotate horizontal.
- Can store multiples balls that you want to launch.
- It has a reload feature.
- It has a LED that shows the status of catapult (Red = ready, Green = reloading)
Cons:¶
- Design doesn’t look minimalistic.
- Need a 3D printer to replicate the product.
- Makes use of to many servo motors.
- All the wires are still visible.
- It still requires power through a cable.
First prototype¶
Thought process¶
The first prototype was based on the first example above because it’s a simple design and doesn’t require much time to build. It consists of 5 wooden bars, some tie-wraps to keep it together and velcro to stick it to the cardboard platform. There were no glue or other permanent solutions used so we could change the design easily and/or reassemble the catapult if needed.
It works with only two servo’s. One of the servo’s has a rubber band attached to it and turns 180 degrees to add tension to the rubber band while the other servo holds the wooden arm in it’s place. Then the servo that holds the wooden arm turns 90 degrees and the arm will be released and moves/snaps to the other side launching whatever is on the wooden arm. Then the servo with the rubber band moves to it’s original position loosening the rubber band, and the wooden arm will fall back in place.
Choices we made¶
- Using servo motor instead of stepper motor: the servo motor is used instead of the stepper motor, because the servo motor rotates faster than the stepper motor. Even though the stepper motor can rotate 360 degrees, which the servo motor can’t, it is not a necessity to use it for the launch function of the catapult.
- The first prototype of the catapult is made with simple cheap materials, because this way we can test the functionalities of the catapult more efficiently.
- The servo with the rubber band can be placed at different distances from the rest of the catapult so it’s possible to adjust the strength of the catapult and how far the projectile will launch.
Blockly features¶
The catapult itself need to execute certain steps that is only for the catapult.
To do that there are certain Blockly blocks made for these features.
The first version of these features are visible down below.
There is a separate sub menu made for it called “Catapult”.
The features are:
- Shoot:
turns the elastic servo and then turns the holder servo that will launch the ball on the catapult.
After that both the servo’s will reset to their original position.
- Turn holder servo to 90 degrees:
this will release the holder from the arm of the catapult that will allow it to launch the ball.
- Turn elastic servo to 90 degrees:
this block will turn the servo with the elastic which put tension on the arm of the catapult,
so that you can launch the ball.
Second prototype¶
Thought process¶
We came up with alternative ways we could make the catapult shoot. The first idea was to use an elastic band to make the arm launch, the only thing we needed was one servo or stepper motor to make the arm go down using a wire. But the problem with this idea is the motor would need to be able to rotate freely which no motors we use could do. Our second idea was to use a single motor to rotate the arm, but no motors we had at our disposal are strong enough and can rotate fast enough. To save costs and time we decided just to iterate on the first prototype.
Choices we made¶
- For this prototype cost was important, the materials used cost around €2,-. The pingpong balls cost €2,50 for 6.
- The way the prototype is assembled should be easily accessible for primary schools. So we didn’t use methods like lasercutting. Instead the prototype is fully made with glue and tie rips.
Catapult assembly process¶
This catapult is made completely by crafting sticks, tie rips, glue and of course the electronics. First, I made the arm that is used to launch. This arm consists of 3 layers of craft sticks glued and tie ripped together for strength.
Then, I made 2 bases with little holes in them for the round stick that gives the arm the ability to rotate.
After that, I combined the parts with the use of extra crafting sticks and glue. I slid the white stick through the holes of the bases and glued it to the arm. I added 2 half crafting sticks with a rubber band between them to the front of the catapult, so that the arm cannot go further forward, and it will always fall back in its place. I also glued a bottle cap to the other end of the arm to hold the ammunition and got a little strip of 3D tape to cushion the arm falling back down. This part is also elevated so that the rubber band (added in the future) will pull the arm to correct way up.
The servo’s are connected to half a crafting stick using tie rips, then that crafting stick is glued on top of another half. This is done so no glue has to be used on a servo and they can be re-used.
The entire catapult is glued to a cardboard platform for stability and the ability to add the servo’s without them having to be attached to the catapult itself. The first servo is placed next to the arm, this servo is the guard that holds the arm in place and moves to make the arm shoot.
The second servo holds one end of a rubber band, the other end is attached to the arm. This servo rotates 180 degrees to create tension in the rubber band. The arm does not move yet as the other servo holds the arm in place.
At last the servo’s are connected to the Wemos, the Wemos runs the code below. The button is used to make the catapult shoot. When pressed the servo with the rubber band rotates 180 degrees to create tension. Then the servo that holds the arm in place moves out of the way which will make the arm shoot.
Blockly Arduino¶
With use of a Blockly website that works with arduino I made 2 servo’s work. This is what the Blocks look like. Using this website we can get children to code their own Arduino’s without them knowing how to code.
Code that is generated:
#include <Servo.h>
Servo S1D1;
Servo S2D2;
void setup() {
S1D1.attach(5);
S2D2.attach(4);
}
void loop() {
S1D1.write(180);
delay(2000);
S2D2.write(180);
delay(2000);
S1D1.write(0);
delay(2000);
S2D2.write(0);
delay(2000);
}
The code that is used for the second catapult prototype:
#include <Servo.h>
Servo servoShoot;
Servo servoGuard;
Servo servoReload;
int ShootPin = D5;
int ReloadPin = D7;
bool PressOnce = false;
void setup() {
Serial.begin(9600);
servoShoot.attach(D1, 500, 2500);
servoGuard.attach(D2);
servoReload.attach(D4);
pinMode(ShootPin, INPUT);
pinMode(ReloadPin, INPUT);
servoShoot.write(2500);
servoGuard.write(180);
servoReload.write(45);
}
void loop() {
CheckForButtonPress();
}
void Shoot() {
servoShoot.write(10);
delay(2000);
servoGuard.write(0);
delay(2000);
servoShoot.write(2500);
delay(2000);
servoGuard.write(180);
}
void Reload() {
servoReload.write(0);
delay(150);
servoReload.write(45);
}
void CheckForButtonPress() {
if (digitalRead(ShootPin) == HIGH && PressOnce == false) {
Shoot();
PressOnce = true;
}
if (digitalRead(ReloadPin) == HIGH && PressOnce == false) {
Reload();
PressOnce = true;
}
if (digitalRead(ShootPin) == LOW &&
digitalRead(ReloadPin) == LOW) {
PressOnce = false;
}
}
Catapult Components design¶
For this product there are certain parts made to be used by it. Most of the designs had a few versions, because there were not well designed.
Servo holder¶
Here you can see the different versions that were made for the holder of the servo motor. The order is from left to right. Each version had there own mistakes. The first one was made to small for the servo motor to fit in. In the second version there was a hole added for the cables of the servo to go through, and the walls were made thinner, but the walls were made to thin en the hole for the cables were too small. In the third version the walls were made thicker and the hole for the cables were also made bigger, but in this version the hole made for the servo was to big and the servo was loose inside of it. In the fourth and final version we fixed those mistakes. Now the walls are thick enough, the hole for the cable is thick enough, and the servo fits perfectly inside the holder.
Arm holder¶
For the arm holder we made two versions, because with the first version we made the hole for the stick to go through not big enough.
With the second version we made the hole big enough and now the stick fits through it.
Arm Axe¶
The arm axe was made in one version, because this model looks a lot like the arm holder.
Ammunition holder¶
With the ammunition holder we wanted to make a holder that was deep and big enough to fit any type of ammunition in it. So that’s why we went with this design.