DC Motor Control
For the first part of the lab, we had to control a DC motor using an H-bridge. I built my circuit according to the schematic below. I included a switch that could switch the direction of the motor, and a potentiometer to control the speed of the motor.
I added a potentiometer to my circuit that I then used along with analogWrite() to control the speed of the motor. It worked only moderately well, it was hard to control the actual speed because the motor would stop if it was too slow. In the video below, I show how the motor can change directions with the switch, and tried to show it changing speed with the potentiometer, but it was a bit tricky.
stepper Motor Control
For the secondĀ part of the lab, we had to control a stepperĀ motor using an H-bridge. I built my circuit according to the schematic below. The code allows for the stepper to make a full rotation one way, and then the other.
Back to Top