Introduction: LEGO Catapult
The LEGO Catapult is made for kids who don't like taking a pill. I want to make the unwilling behavior more enjoyable for the kids. I love LEGO and Arduino, so I create a project by combining them together. You can launch a pill by pressing a button.
NOTE: I won't provide a perfect A to Z LEGO instructions. Create your own design with LEGO.
Step 1: Go Get Stuff
You will need:
- Materials
- (x1) Arduino nano (V3.0 ATmega328P)
- (x1) Tactile button (12 x 12 mm x 4.3 mm Panel)
- (x1) Standard Servo motor (Futaba S3003 Standard Servo)
- (x1) 9V Battery Case Holder (Case Holder With ON/OFF Toggle Switch)
- (x1) 9V Battery (Duracell Procell Alkaline Batteries)
- (x1) PCB Board (Double Sided Prototype Kit)
- (x1) 10KΩ resistor
- (x1) Normal rubber band (just normal)
- (x1) LEGO (Architecture Studio + Angry Birds 75822)
- Tools
- Soldering kits
Step 2: Solder
- Servo motor connects to D3, 5V, and GND.
- Button connects to D5, 5V, and GND (Connect 10K resistor between one leg of button and GND).
Use the PCB board as a little of a PCB board as possible to put the whole materials in the enclosure. Attach the Arduino Nano to the bottom of the PCB board. And turn over the board and attach the button to the third image.
1.Servo motor
The servo motor has three wires. The red wire connects to 5V pin, The black wire connects to GND pin, The yellow wire connects to a digital pin.
The servo motor connects to... Red: 5V, Black: GND, and Yellow: D3 (Digital pin).
2. Button (Refer to first image)
The button has four legs. Solder one leg to a 10KΩ resistor and connect the wires to GND pin. Another leg connects to D5 pin with a wire. and connects to 5V pin. The other leg connects to 5V pin.
3. 9V battery case
It has two wires. The red wire is for "+" and the black wire is for "-". Connect the red wire to VIN pin of Arduino and connect the black wire to GND pin of Arduino.
Step 3: Code
Download the file and upload the code to the Arduino Nano through Arduino program. If you don't have the program, follow the Tips below.
The code is like...
- Press a button to rotate the servo wheel to 30 degrees.
- Press a button again to rotate the servo wheel to 100 degrees.
Tips:
- You need to download the Arduino program on your computer first. You can download here.
- Download and click the "*.ino" file.
- Connect the Arduino Nano to the computer with a USB cable.
- Change settings: "Tools > Board: Arduino Nano."
- Press "->" button to upload the code to your Nano.
Attachments
Step 4: Glue: Servo Wheel
Connect the "C-shape" steel wire and 180-degree servo wheel with the glue gun. After gluing, insert the wheel on the motor (just like a red line of the third picture).
Step 5: Build the Lego
Get a 16x16 plate at shop.lego.com for the bottom. I don't have a full building Instructions. Be creative!
Tips:
1. Big box: 10x12x7 (Brick size) to insert the Arduino stuff.
- Tactile button hole: 2x2 (Brick size).
- Servo motor hole: 5x2 (Brick size).
2. Frame tower (x2): 4x2x11 (Brick size).
3. Lever: 20x2x1 (Brick size).
4. Put a rubber band on the lego block (See the last image).
Step 6: Done
Play it with your kids or friends!
Tips:
- Press the button to hang the lever, and press again to release it.
- Turn off the battery when you don't play.