Automatic Catapult
Automatic Catapult
1
Contents
Part list .......................................................................................................................................................... 3
Electronics: ................................................................................................................................................ 3
Mechanic parts: ........................................................................................................................................ 5
Shooting mechanism..................................................................................................................................... 5
About the parts ............................................................................................................................................. 7
Arduino Nano ........................................................................................................................................ 7
Servo motor .......................................................................................................................................... 8
DC motor and L298N driver .................................................................................................................. 8
HC-SR-04 Ultrasonic distance sensor .................................................................................................... 8
Designing mechanical parts .......................................................................................................................... 8
3D-Modelling ............................................................................................................................................ 8
First side and second side ..................................................................................................................... 9
Arm...................................................................................................................................................... 10
Place for improvements .......................................................................................................................... 10
3D-Printing .................................................................................................................................................. 10
Electric Wiring ............................................................................................................................................. 14
Powersource ........................................................................................................................................... 14
Wiring diagram........................................................................................................................................ 14
Soldering the components ...................................................................................................................... 15
Programing.................................................................................................................................................. 15
Code ........................................................................................................... Error! Bookmark not defined.
Place for improvements ............................................................................. Error! Bookmark not defined.
Casing .......................................................................................................................................................... 16
Place for improvements .......................................................................................................................... 16
Place for improvements ............................................................................. Error! Bookmark not defined.
Finishing the catapult.................................................................................................................................. 21
2
PART LIST
ELECTRONICS:
1x Arduino Nano https://www.partco.fi/fi/arduino/arduino-mallit/17657-
arduino-nano.html
1x 3pin-switch https://www.partco.fi/fi/saehkoemekaniikka/kytkimet/li
ukukytkimet/7283-kyt-liu15.html
3
1x HC-SR-04 Ultrasonic distance sensor https://www.partco.fi/fi/robotit/robottielektroniikkaa/1
9362-hc-sr04.html?search_query=HC-SR&results=24
4
1x Prototyping board https://www.aliexpress.com/item/86036-Free-shipping-
10pcs-Double-Side-Prototype-PCB-diy-Universal-Printed-
Circuit-Board-
4x6cm/32656277833.html?spm=2114.search0104.3.15.
3f75852aNuvjK3&ws_ab_test=searchweb0_0,searchweb
201602_5_10065_10068_10890_319_10546_317_1054
8_10696_10084_453_454_10083_10618_10304_10307
_10820_537_536_10902_10059_10884_10887_321_32
2_10103,searchweb201603_57,ppcSwitch_0&algo_expi
d=ce85c8d1-578a-46f7-94c6-1b8970bd38ee-
5&algo_pvid=ce85c8d1-578a-46f7-94c6-1b8970bd38ee
MECHANIC PARTS:
Parts can be found at K3 or Design factory
Plywood
4x M5 60mm bolts
4x M5 nuts
4x M5 washers
2x M3 10mm screws
Hot glue
Foam rubber
Rubber band
SHOOTING MECHANISM
The idea for the shooting mechanism of the automatic catapult was innovated from traditional torsion
catapults. Arm of catapult is attached on a spring mechanism which is loaded to launch projectiles from
bucket of arm. The arm is locked with a restraining mechanism to keep the spring mechanism loaded,
easy!
5
The automatic catapult uses a DC motor and a servo motor to operate locking, reloading and shooting. A
rubber band is used as spring mechanism for the catapult. In addition, an ultrasound distance sensor is
used as a trigger for the reloading and shooting mechanism. This means that when an object is brought
near the sensor catapult reload and shoots.
1. When an object is brought near ultrasound sensor DC motor starts to reel and stretch the
rubber band while servo motor is at lock-position.
2. servomotor undocks arm and spring mechanism is released. The arm hits beam of the catapult
throwing projectiles away.
6
3. DC motor unreels the rubber band and the arm goes back to resting position.
4. Servo locks the arm of the catapult. Catapult is back to its starting position.
7
SERVO MOTOR
Servo Motor operates as a locking unit for the catapult. There are two main reasons why servo motor is
perfect for the task. Firstly, servo motors are rather easy to control with help of Servo library in Arduino
Ide. Only a position angle command must be sent to servo’s signal pin and the servo will rotate to that
position. Non-continuous servo motors can only turn 90° in either direction for a total of 180° which is
more than enough for a locking mechanism. Secondly, servo motors have an absolute position. This
means that servos move back to the same position every time when servos are switched on. For this
reason, resetting position of the locking mechanism is easier.
Catapult parts were modelled with SolidWorks 3D-modelling software. Parts can be saved as .STL files in
SolidWorks which can be compiled to machine language with Ultimaker Cura software. Since catapult
parts were designed for 3D printing, parts had to model which has minimal amount of sharp edges.
Filament is used in case where edges exceeds 45 degrees. This is problematic because filaments must be
manually removed from 3D print.
3D-MODELLING
8
2D model of the catapult. Made with SolidWorks
At start, size of the catapult had to decided. The height and width of the catapult was determined to be
only 10.5cm and 7.46cm and thickness 1cm. The catapult parts were designed small because 3D printing
bigger parts would take too much time.
Afterwards holes were extruded to sides for axle of the arm. Diameter of axle of the arm was designed
to be slightly smaller than axle holes of the sides so that axle can rotate without rubbing against the
holes.
Then the beam of catapult was extruded on the second side of catapult to cut the amount of parts.
Diameter of hole for attaching beam was designed to be slightly bigger than the beam so the beam
could fit inside the hole.
Curvature of sides is made for minimizing 3D printing time and material. In addition, a bottom
attachment point is for supporting catapult from vertical force.
9
Both sides of the catapult. Unit of measure is centimetres.
ARM
Diameter and length of the arm’s axle was concluded while designing the sides of the catapult.
The bucket of the arm was placed above the beam of the catapult, so the bucket nor projectiles won’t
hit the beam.
Tumbler of bucket was designed as a docking point for locking mechanism. Thirdly, the arc is made as
rubber band holder.
The arc had to be in right place on the arm, so it won’t hit the beam.
3D-PRINTING
3D printing a 3D-model comes in X steps:
10
3. Open .STL files.
4. Select parts you want to print and click “open”. Multiple files can be opened at same time if
parts are printed at same time.
11
5. Place and rotate the parts on the print platform. Note that 3D printers print 3D models from
bottom to top. For this reason, orientation of models matters.
6. Adjust the printing settings. The catapult was printed with default settings with 40% infill
12
7. Click “Slice” button at bottom right corner
8. Check the preview to see how filaments are made. Finish the process by clicking “Save to file”
button to export g.code file.
13
9. Move the g.code file to a 3D-printer with a USB-stick or via Wifi
ELECTRIC WIRING
POWERSOURCE
A power source is needed to power up Arduino Nano, servo motor and DC motor. Ultrasonic sensor is
powered by Arduino Nano’s 5V output pin. Arduino Nano can be powered with 6-20V unregulated input
voltage to Vin pin (pin 30). The servo motor’s operating voltage is 4.8-7.2V and the DC motors operates
with 6 volts. At first a 9V battery were chosen for powering all the components but the 9V battery
couldn’t power DC motor efficiently enough for reloading task. For this reason, 8 AA batteries were used
instead (12V in series). However, it is not advised to use a voltage supply without regulation to power up
components
WIRING DIAGRAM
Wire according to the diagram.
14
SOLDERING THE COMPONENTS
Use a prototyping board to solder the components. Wires and pins are connected with solder bridges in
matrix prototyping board as seen in picture.
PROGRAMING
Code can be found in attachments.
15
CASING
Start by printing the stretches of catapult’s casing parts on a paper. Cut the paper into right parts and
stretch parts on a piece of plywood. Cut the plywood with a bandsaw.
Cut a hole to a top piece for the servo motor. Use bandsaw to cut a right piece.
16
Drill a hole for DC motor’s wires. 5mm hole is more than enough for the wires.
2x Catapult’s attachment holes must be drilled and filed to correct sizes to fit the attachment points of
the catapult.
17
A hole for power switch must be made on one side of the casing.
2x holes for the ultrasonic sensor must be made on front face of casing. Diameter for the holes is 17mm.
18
The holes for ultrasonic sensor was drilled with a step drill head. Holes must be filed to correct sizes.
Test size of the holes with the ultrasonic sensor.
Lastly, 4x holes with must be drilled for the M5 60mm bolts for attaching the bottom. diameter of holes
is 5.1mm. Hole is slightly bigger than the bolt to make fitting bolts through the holes easier. The holes
are not precisely measured. Drill the holes where you think they fit at the 4 corners.
19
When the pieces are ready, glue the finished pieces together with hot glue. Hot glue catapult parts on
the right attachment holes. Place the DC motor so that the reel of rubber band is in front of the catapult.
Glue the DC motor on the defined place and position.
Finish the casing by drilling holes for the bottom part for the M5 bolts.
Place the components inside the casing and attach the bottom part with washers and M5 nuts.
20
FINISHING THE CATAPULT
There are few things what must be done after every component and part is on place.
Firstly, stoppers must be glued on the sides of the arm’s axle holes to prevent the arm from slipping.
Secondly, another stopper can be glued on the beam of the catapult to soften the impact. The stopper
also defines the launching angle for the catapult.
Lastly, attach the servo motor with pair of screws to the casing using a drill set.
21
There you have it, a complete catapult. Now you just must tune the timers right to make the catapult
shoot automatically.
22