5. Electronics and Software Design

List of Parts: 

  • Arduino Uno
  • Male to Male connector wires
  • Continuous servo motor
  • 9V battery
  • Battery adapter clip

We used an Arduino Uno to control the speed and direction of the continuous servo motor. The servo motor was connected to our 3D printed crank which had gear teeth and rotated it 360 degrees clockwise continuously. The Arduino code (Appendix C) was programmed to allow us to control the speed and direction of the servo. We were able to control the speed and direction by changing the PWM signal. We chose the PWM value to be 80, allowing the servo to move slowly and in the clockwise direction. Initially, the servo would hold its position for 4 seconds, then it would begin rotating clockwise for 60 seconds or until the Arduino Uno was powered off. Additionally, we connected a 9V battery to the Arduino Uno using a battery adapter clip that had two leading wires. The negative junction was connected to the ground pin and the positive junction was connected to the Vin pin. This enabled us to keep our final prototype compact and not have to be connected to our laptop to function. Below is a schematic of the Arduino to servo connection.