Catapult¶
A small rubber-band catapult on a turntable. By the end, you press one button and it does the rest: it sweeps the room with its ultrasonic sensor, finds the closest cup, turns to face it, sets how far to throw, beeps a countdown and fires.
You don't build the catapult itself from scratch. It's a kit (or a printed design), so your time goes into the electronics and the code. Something flies on the first day, and every class ends with a shot at a cup.
How it works¶
flowchart LR
A[Arming switch<br>+ LED] --> D
B[Fire button<br>Auto button<br>Aiming knob] --> D
S[Ultrasonic sensor<br>on the turret] --> D
D{Arduino Uno} --> T[Stepper motor<br>turns the turret]
D --> R[Stop-bar servo<br>sets the range]
D --> F[Latch servo<br>lets the arm go]
D --> K[Speaker<br>countdown beeps]
You cock the arm by hand. A latch servo holds it down and, when you fire, pulls the latch out of the way. The servo doesn't throw anything; the rubber bands do. A stepper motor under the turntable turns the whole catapult left and right. A second servo moves a stop bar: the arm hits it sooner or later, and that decides how far the ball flies.
Nothing fires unless the arming switch is on, and the arming LED tells everyone it is.
The six classes¶
| Class | By the end, your catapult... |
|---|---|
| 1 · Fire it | fires from a button, only when armed, and hits a cup 1 m away. |
| 2 · Turn it | turns on a turntable that you aim with a knob, never past ±90°. |
| 3 · Range | throws shorter or farther on command, from a table you measured. |
| 4 · Find the target | sweeps like a radar and points at the closest cup. |
| 5 · Automatic | finds, aims, sets the range, beeps and fires by itself. |
| 6 · Tournament | takes on hand-aimed shooters in a tournament. |
Safety, every class¶
- Soft ammo only: pom-poms and ping-pong balls. Nothing hard, nothing pointed.
- Never aim at people, not even "just to see". Before you arm it, look at what's in front of it.
- Disarm before you touch the arm. Cock it, load it and adjust it with the arming switch off.
- The countdown is not optional. Every automatic shot beeps first, so anyone nearby has time to step away.
Before Class 1¶
- If you're using a printed catapult instead of the kit, ask Dr. Alvear to start the print now. It needs to be ready on day one.
- Make a
catapultproject in PlatformIO (board: Arduino Uno) so you're not waiting on that in class. - Find a tape measure and a few plastic cups. You'll use them every class.
Credits¶
Name the catapult kit or printed design you used, and its maker, in your build log and on your poster. The Servo and Stepper libraries are by Arduino.