Electronics
We used two Arduino Uno microcontroller boards connected to a 9V battery to power our two servos. The servo used to create the linear motion was a 360º servo while the servo used to create the rotary motion was a 180º servo. Both the linear and rotary motions required less than the 180º which is reflected in our code below. Additionally the code for the linear motion includes a delay between the up and down motion to allow for the rotary motion. Similarly, the code for the rotary motion includes a delay in the beginning to allow the knife to move down before rotating.
Components
- 2 Arduino Uno R3
- TowerPro MG995 Servo Motor
- Tiankongrc TD-8120MG 360º Servo Motor
- EBL 9V Rechargeable Ni-MH Battery
- Jumper wires
Figure 14: Electronics
Software
(a) (b)
Figure 15: Arduino code for servos (a) linear motion, (b) rotary motion