I am a learner. I love robotics, but I’m still fumbling my way through it, learning as much as I can and doing my best to pass that knowledge on. That’s why it wasn’t really surprising to me when my Motor Controllers for Cheap Robots tutorial on Instructables started getting some comments that pointed out how badly designed my circuit was.
Of course, they were right! I had thought the solution was obvious, so I threw together a circuit based off what I knew, and ended up doing it wrong. No shame in making mistakes, it’s how we move forward from there that matters. Here’s what I did wrong, and how I fixed it…
There were a whole bunch of things that I did wrong during this tutorial. My circuit diagram was wrong, I’d picked bad transistors, and I’d failed to properly protect them. I didn’t even know that I didn’t know these things, but that’s what happens when you start exploring!
Thankfully, Instructables has a thriving community of more experienced individuals who are eager to help out guys like me! I got a couple of comments from users Nate Ocean and nqtronix that helped me understand what I’d done wrong and helped me improve!
This was probably the most glaring mistake that I’d made. Motors are kind of the big ugly thugs of the electrical world. If you’re not careful when dealing with them, they can fry your other, weaker electronics.
In part, you can think of a motor (or anything with a coil, really) as a sort of electrical flywheel. Once you get them spinning, they don’t really want to stop! If you’ve got something trying to get in the way of their current (like, say, a transistor that’s just broken the circuit), the energy stored in the motor (as electromagnetic and mechanical energy) can fry your poor little component.
With a flyback diode, you can route that energy right back into the motor, where it’ll continue to spin for a while more before dissipating. Brilliant thing is, they don’t affect normal operation, because diodes only let current flow one way!
Old and Feeble Transistors
The other thing I’d done wrong, electrically, was picking the wrong transistors. If you hook up a motor to a multimeter, and measure how many amps it pulls from a battery, you’ll find that the more you resist the motor’s movement, the more amps it pulls. The whole point of using a motor controller instead of powering the motor directly from the microcontroller, is that the microcontroller can only handle so many amps. Thing is, my transistors couldn’t handle much more than my microcontroller could!
When I’d gone looking for transistors, I’d found a couple of tiny BJTs that we had lying around. I thought they were perfect! Their small size made them easy to fit onto the board, and they worked! What more could I want? Well, unfortunately, they were only rated up to 0.32 A, and when I measured the maximum draw of my motors, I found that was more like 1 A…
Now, this didn’t necessarily mean that my motors would burn out my transistors, because my wheels didn’t have enough grip to stop themselves, but it did mean I was closer to my boundary than I really wanted.
Circuit Diagrams have Standards!
Just the way that words have definitions, electrical components have standard symbols. This was probably my most embarrassing mistake, because I apparently forgot the polarity of the motors, drew the battery backwards, and made up my own symbol for a transistor… Normally I would use Fritzing to make my circuit diagrams, but this one was so simple, I thought I could get away with a simple sketch.
How I Fixed It
I did some research, and then even more research. Then I fiddled with transistors on a breadboard for a while. I got confused, and solved what I thought was the problem, and then got even more confused! I learned as much as I could until I felt like I knew how to redesign the circuit properly, and then I made a new Instructable.
My goal with these Instructables is to pass on knowledge. I want to see people learn so that they can go out and make mistakes for themselves! If I learned something by making mistakes, I’d like to showcase that knowledge and pass it own, which means owning my mistakes.
Communities are built on feedback, because otherwise you’re just typing into the void. Sometimes the feedback is positive, sometimes it’s negative, but a good community will always strive to give constructive feedback. I learned a whole bunch about transistors and motors because I posted this project online, and I’m grateful for that!
What I took away from this was more than just how to build a better motor controller, or how to shield electronics from electrical surges. This was a practical lesson on the value of taking (and giving) constructive feedback and on using my mistakes to build myself up. Keep that in mind when someone is criticizing your work, and especially when you’re criticizing the work of someone else.