The first stage of the project was mechanical design. The project requirements specified that a truss design was to be used to minimize material costs and the weight of the system.
A truss was modelled and analyzed using SolidWorks static and topology studies to design a truss that was well under the weight limit whilst being reinforced in areas experiencing maximum deflection (Figure 1). This design was then manufactured using 3D printing techniques and iterated three times as part of the rapid prototyping process. The truss passed static load tests (of less than 10 mm of deflection under a 5 N load) and moment of inertia tests to determine stability (as shown in Figure 3).
The truss is fitted with two brass plates which sandwich the shaft driven by the motor, as seen in Figure 2. Two screws are used to align the brass plates. Nuts (invisible) are also used to sandwich the shaft in place to prevent lateral wobbling. The ball sits in its conical holder at the end of the truss.
A circuit board was required to drive the motor and provide a PWM signal to the motor (Figure 6). This circuit board worked in conjunction with the Arduino Mega 2560 microcontroller (not shown). Additionally, push buttons were also connected to the electrical system to provide easy switching from operation mode and non-operation mode. An appropriate heat sink was chosen and verified to be adequate for cooling the motor driver (Figure 4). MATLAB code via USB was used to control the logic of the system.
A control system was designed from the ground up using MATLAB and Simulink. This involved modelling the system using differential equations, developing the control system block diagram, performing root locus analysis (Figure 8), building the control scheme in Simulink, and extensive PID tuning in both position (Figure 9) and velocity control methods.
Ensuring that undesirable electrical shorts did not occur from stray solder during perfboard soldering was a challenge. The first board was deemed unsuccessful, but the second attempt at soldering the circuit was a success.
Another challenge came from sending waveforms to the MCU. Given that the end goal is to be launching projectiles a custom distance, a trapezoidal waveform must be used such that the catapult releases the ball while rotating at a constant angular velocity. Getting the motor to follow a trapezoidal wave properly, with the implemented linear controller, was not as simple as using a couple gains to fully solve the system’s dynamics. Introducing a derivative gain, for example, made the system behave erratically, as discussed, which led to its non-inclusion decision. Investigations into the effects of each controller's gain constant and spending extensive time fine tuning the control system proved successful.
This project was completed with three other lab partners. This project achieved an A+ grade and was able to score bonus points by landing the ball in a "bullseye" target within 3 tries.
Figure 1: Static Study with a 5 N load at the ball holder, both before topology optimization was applied (top), and after (bottom).
Figure 2: 3D printed truss installed onto test jig.
Figure 3: Static load test.
Figure 4: Heat sink simulation
Figure 5: Electronical schematic
Figure 8: Circuit board
Figure 7: Root locus graphs for stability analysis
Figure 8: Tuned PID position control curve
Figure 9: Final product