5. Electronics and Software - WCC

Due to the decision that the input link would not rotate a full 360°, the motor would have to alter direction (clockwise to counterclockwise and vice versa) when it reaches the desired position. Therefore, a potentiometer circuit was used such that rotating the potentiometer will alter the direction and speed of the motor. The circuit and code that was used was found from https://www.circuitbasics.com/controlling-servo-motors-with-arduino/.

This circuit collects a voltage input provided by the potentiometer for the Arduino, and outputs a pulse for the motor. The motor then collects this pulse and outputs a rotation based upon the pulse. Basically, the Arduino accounts for both the speed of the motor as well as the direction, and informs the motor based upon what input voltage the potentiometer outputs.