Arduino Controlled Catapult
Arduino Controlled Catapult
I. I NTRODUCTION
A. Purpose
For our project we are modeling the behavior of a catapult
and constructing it according to the design shown in Figure
1. The system we are creating is able to take a user input
distance and projectile mass and determine what launch angle
is appropriate. We are building this catapult as an exercise
in combining mechanical and electrical components into a
working system and are using a physical catapult to validate
our analytical physics model and computer simulation. The
work were doing can be useful to any one considering the construction of an Arduino controlled catapult, which has potential
educational applications, such as an introduction to embedded
systems (Arduino) or experience in system integration.
Our goals are to gain a better understanding of physics by
going through the process of creating a computational model
based off of our analytical model of the system, and then
actually creating the catapult to see how well we can model
the physical system both analytically and computationally.
B. Rationale and Approach
We began by studying what examples of Arduino controlled
catapults we could find online and decided to model our
catapult on the predominant design we found[10] , displayed
in Figure 1. None of the documentation we have encountered
measures the accuracy of the final product, so we intend to
report on the performance of our catapult by comparing it
to our simulations of the system. Another improvement we
C. Assumptions
The model ignores all forces that take energy from the
system. There is no air drag on the projectile post-release in the
model. We ignore friction in the catapult system, and assume
that the spring is linear. We also assume that the spring does
not hit itself when contracting. In reality, the spring is long
enough that, depending on the rotation of stop arm, it can hit
itself when contracting. We assume that the projectile hits the
ground and remains there instead of bouncing. The stop arm
and tension arm are presumed to not deflect or move in any
way once locked in place.
II.
A. Catapult Design
Our catapult design is based on a pre-existing Arduino
powered catapult[10] . The catapult is constructed out of laser
cut micro-density fiberboard (MDF). The stepper motor will
have an attachment to hold the swing arm down made out
of bent metal. All motors will be controlled by an Arduino.
We are using servos to adjust the angle of the stop arm and
tension arm and to hold the swing arm down. We chose servos
because they provide angular feedback. The tension arm allows
for auto-reloading. It can reduce tension in the spring and allow
the swing arm to be easily reset. See Figure 3 for a list of parts
used. The spring and the piece that holds down the swing arm
are both missing from the rendering, and the mounting plate
is missing.
spring 1 and spring 4 would suit our needs the best. We put
N
.
them in series to make a spring constant of 68.265 m
Mass
1.148 Kg
1.148 Kg
1.148 Kg
1.148 Kg
1.72 Kg
Spring
1
2
3
4
5
Rest Length
.0912m
.072m
.071m
.091m
.16m
Extended Length
.1743m
.1038m
.1118m
.1760m
.20m
TABLE II.
III.
Force Constant
N
138 m
N
367.9 m
N
323.83 m
N
135.06 m
N
425 m
S IMULATION
A. Software Design
Fig. 2.
Part
1
2
3
4
5
6
7
8
9
10
11
n/a*
n/a*
Description
Base plate
Bottle cap
Swing arm
Mounting plate
Servo motor
Stopping arm
Bar
Support beam
Tension beam
Eye screw
Side supports
Spring
Z bar
Material
MDF
Plastic
MDF
MDF
Steel
MDF
MDF
MDF
Steel
TABLE I.
Quantity
1
1
2
1
4
2
1
4
1
2
2
1
1
Notes
Servo underneath rotates this
Holds projectile
2 glued together
Clamped to a table
Arduino-controlled
Holds bar up, attached to servo
Halts progress of swing arm
2 on each side of base plate
Attached to servo, spring tensioner
On tension beam and swing arm
Servo located between the supports
Connects swing arm to tension arm
Holds swing arm down
* NOT PICTURED
B. Specifying Materials
The first task in designing the catapult was determining
what spring constant would be appropriate for the scale of our
project considering what servos we are using. We made several
assumptions in our model. We assumed that the springs we are
using are linear. The catapult incorporates two springs in series,
and we assumed that the two springs have a motion equivalent
to one longer spring but with half the spring constant. The
model was built on the assumption that the spring does not
deflect. According to Hookes Law we can derive that
k = F/x
We checked and validated the spring constants of several
springs that we were considering. First, we labeled each of
our springs 1-5 in order to keep track of which was which
during the test. We found a projectile that weighs 1.148 kg to
test the springs with. Then we measured the rest length and
extension length of each spring using this known mass. At one
point, we had to increase the mass because one spring did not
extend using the first mass. See Table 2. Once this constant
was defined, we could model the rest of our system around
it. After experimentation, we decided that a combination of
B. Analysis
The Python program calculates how much the tension beam
rotation changes the spring length. We validate the model by
testing the actual trajectory versus the predicted trajectory.
We can predict the projectiles path based on the angle of
release and the force applied to the swing arm. Figure 5
shows the angular velocity over time. We derived this velocity
from angular acceleration. We solved for angular acceleration
using the moment of inertia and torque (see Appendix A).
We can find tension using Hookes law. The angle of release
is the angle between the stop arm and ground. Comparison
of the calculated landing distances and experimental landing
distances will show whether the model is accurate.
IV.
R ESULTS
We found after testing both the model and catapult, that the
two show minor discrepancies. See Fig 3.
3.5
Predicted
Experimental
3.0
2.5
2.0
1.5
1.0
0.5
0.0
0.51.4
1.6
1.8
2.0
2.2
2.4
2.6
2.8
3.0
3.2
The difference between our predicted results and experimental results can be attributed to a few major factors. Primarily,
our model doesnt account for many retarding forces. The
model doesnt factor in drag, acting on either the projectile or
the catapult during its movement, friction between the catapult
arm and its axle, or the force absorbed by the stop arm as the
swing arm collides with it. All of these factors act to decrease
the energy of the projectile. If these forces were implemented
in the model, it would decrease the magnitude of the distance
the projectile would travel making the model more realistic.
Human error in experimental data collection, and the small
data set, could also attribute for the asymmetric shape of the
the experimental data.
A. Statistical Analysis
We measured a series of data points from our catapult and
compared it to our computer generated model. Our projectile
was a nylock nut weighing .003kg. Below is a table detailing
these measurements with the angles of the stop arm and tension
arm as well as the predicted distance and measured distance.
Stop
90
180
170
160
150
140
130
120
110
100
Tension
90
90
90
90
90
90
90
90
90
90
Predicted
1.65m
-.35m
-.089m
0.64m
1.68m
2.65m
3.21m
3.25m
2.79m
2.24m
Measured
2.06m
0m
-.24m
-.07m
.32m
1.18m
2.38m
2.88m
2.66m
2.13m
Difference
5.9%
-28.9 %
-787%
33%
93 %
25 %
14%
19 %
26%
6%
V. C ONCLUSIONS
This project was meant to describe the accuracy of our
computational model when considering a system such as our
catapult. As we can see, there is a slight difference between
our modelled distance and our actual distance. Our predicted
and experimental results are well within an order of magnitude
of each other. It seems likely that this discrepancy is due to
h2 + w2
+ mr2 + mR2
3
Substitute force for torque. D here is the distance from the
from the projectile to the location of the applied force.
I=
h2 +w2
3
F DSin
+ mr2 + mR2
h2
3kxdsin
+ w2 + mr2 + mR2
A PPENDIX B
C ODE
A link to our code on github:
https://github.com/jagreene/SmartCatapult
A PPENDIX C
ACKNOWLEDGMENT
Zhenya, Thank you for being an awesome professor. We had
laughs and physics and honestly, what more is needed. Brian,
you are a pretty chill Ninja.
We would also like to thank the machine shop workers who
laser cut our pieces for the catapult. The turn around time was
magnificent and for that, we thank you.
R EFERENCES
[1]
[2]
[3]
[4]
[5]
[6]
[7]
[8]
[9]
[10]