For the first part of this lab, we were tasked with driving a DC motor in both directions. When the circuit is given power (plugged into the computer), the motor turns on. When the switch is pushed, the motor changes the direction it spins. This happens so fast its hard to see in the video, so you have to look hard! The hardest part of this lab was getting the motor to spin in both directions. I was having a lot of issues getting the motor to respond to my switch, but realized eventually after checking my circuit and code over multiple times, that the problem was my code. I used the analogWrite() and analogRead() functions instead of digitalWrite() and digitalRead(). Once I switched this in my code, the circuit worked perfectly! It was also interesting and a new challenge working with the H-bridge. I got the H-bridge hooked up correctly the first time which was exciting, but I had to make sure I looked at and follow the schematic closely and build the circuit slowly to make sure I didn't mess anything up. I liked this part of the lab, it was exciting driving a motor for the first time!
Part 2 of this lab seemed much more manageable after getting through part 1. The hardest part of this lab was building the circuit as there were so many connections to make and a lot of wires to deal with. The circuit got quiet confusion quiet fast. Once I got all the connections together, I wrote my code pretty easily and connected the Ardunio to my computer. It didn't work at first because I forgot to include the stepper library, but once I added this to my code, the stepper motor worked correctly right away!
Welcome to my progress blog for my Object course at the University of Colorado, Boulder. Enjoy watching my process as my ideas become a reality.