Electronics and Software - SF

In the first prototype of the mechanism, the gear driving the four-bar mechanism was rotated by hand. In the final prototype, I wanted the process to be hands-free once the mechanism got started, thus necessitating the use of electric motors. Two motors were used to drive the mechanism, one geared DC motor to drive the geared five-bar linkage itself, and a NEMA 17 stepper motor to rotate the platter that the paper was fixed to. The speed of each motor would remain fixed for each test of the mechanism. To drive the DC motor, I initially planned to use PWM and an Arduino to control the speed of the motor. However, after adding the stepper motor to the design, I decided it was too complicated and costly to have two motor drivers running from a single Arduino. Therefore, in the final prototype, a DC lab bench power supply was used to power the DC motor, with the speed of the motor varied by changing the input voltage. A L298N motor shield and Arduino Uno were still used to drive the stepper motor. In the end, this method was satisfactory, as the DC motor's speed varied roughly linearly with input voltage. Due to the large gear reduction built into the gearbox of the motor, torque was also not an issue, even though the mechanism was run at reduced voltage. When running the prototype, I tried to keep the input voltage fairly constant between trials for consistency. The speed angular speed of the stepper motor was varied manually in the Arduino program between tests.

Figure 19. Wiring diagram for the stepper motor.

To wire the stepper motor, I followed a guide from lastminuteengineers.com. I also adapted the Arduino code found in the guide to suit the needs of my mechanism. A 12v AC power adapter was used to power the stepper.