A lot of precision controlled elements in the world are moved using stepper motors. Stepper motors are pretty complicated when compared to simple DC motors. This complexity is where their precision originates. And in order control something that is complex, you need a controller that is also complex: an H-bridge circuit board.
Stepper motors are very precise.Stepper motors have copper coils like DC motors do, but instead of being wrapped around a shaft, they are grouped into clusters around the shaft. Fitted to shaft is a gear with teeth. When each coil of copper is fed an electric current, it produces a magnetic charge that pulls the nearest teeth of the gear towards itself. If they are fed electricity in sequence, the shaft will rotate in a smooth motion. This requires a bit of computation to make sure they are switched on in order, at the right speed etc. This is where the H-bridge makes its entrance into this conversation.
An H-bridge is essential two pairs of transistors that are wired together. Transistors are essentially switches that are activated by a small charge which can be sent by an Arduino. When wired correctly, often in an H-bridge configuration, transistors can be used to reverse the direction of current in a circuit. As a result, they are often used to control DC motors giving them the ability to go both forwards and backward without rewiring. H-bridges can be made with 4 transistors and a breadboard, but it’s much more convenient to use a fully assembled H-bridge that is the size of Jolly Rancher. The model I used in this assignment was a Texas Instruments L293DNE. The L293DNE (and most other models) have 4 logic pins, 4 ground pins, 4 pins to send voltage to the motor, 3 voltage in pins, and 1 pin for the motor’s power source. By sending charges to each of the different logic pins at different times, the 4 voltage-out pins are activated one by one, sending current to the two different copper coils in the stepper motor in either forwards or backward directions.
Using this lab as a guide, we got to work on prototyping our circuit boards with breadboards. I managed to fry my Arduino Uno by wiring one of my Arduino’s pins to a live voltage pin. I switched to my Arduino 101, and found out after plenty of trial and error that it didn’t work with an Arduino 101.
I actually started over completely from scratch with a new breadboard and even new jumper wires to make sure there was no problem there.
Final H-Bridge Circuit
After disassembling each part numerous times and reassembling over and over, I knew the entire wiring layout by heart. I used that knowledge to draw a quick sketch of what I wanted my final H-bridge circuit to look like.
I wanted to make sure it was really clean-looking, so I chose to bend all my wires at 90 degrees. This was a great exercise to hone my soldering skills as well, which I only started doing last semester.
The final result turned out better than I expected. I only had to use the solder sucker once to fix a wire meant of hole 6 in hole 7. Some of the solder is still visible.
Fortunately, unlike with the breadboard prototype, the H-bridge worked on the very first try.