Motors for Makers — Part 1: Adafruit Kit Solves Moving Head Problem

I have to admit that I currently find myself in a bit of a pickle. This is because I’ve decided to add movement to a couple of my hobby projects, but I’m a bit of a newbie when it comes to selecting and deploying the various sorts of motors and actuators that are available. I also don’t know the ins and outs of determining things like torque, gearing ratios, and other items of this ilk.

I do remember attending lectures on this sort of thing as part of my university degree, but that was back in the dark ages we used to call the late-1970s, which is now more than 40 years ago in the rearview mirror of my life. I’m reasonably confident that my professors taught me all sorts of useful things, but I’m afraid my little grey cells are falling on the job.

As I always say, “Show me a flashing LED, and I’ll show you a man drooling” (call me “old fashioned” if you will). Thus, the first of my hobby projects involves a robot head with tricolored LEDs for eyes. When I started, I was looking to create a cheap-and-cheerful (some may say quick-and-dirty) platform to play with, so I just whipped something up out of wood and cardboard, all held together by hot glue.

For a while, all was good and right in Max’s World (where the butterflies are bigger, the flowers are brighter, and the birds sing sweeter). But then one of my friends said that things would be even more awesome if I were to add movement to the proceedings. Specifically, he suggested having the eyes be able to pan from side to side and tilt forward and backward. Also, for the entire head to be able to pan, tilt, and lean from side to side.

All of which returns us to the fact that I’m a bear of little brain when it comes to choosing between the various types of motors and actuators that are available. I’ll give myself some credit for understanding the high-level differences between brushed DC motors, brushless three-phase motors, stepper motors, servos, and linear actuators, but I’m not so hot on which ones to use for various applications, such as a robot head.

Starting with servos

All of this is going to require some research, which will doubtlessly result in a future blog. In the meantime, to give me something to start playing with, I just ordered two of Adafruit’s 1967 Mini Pan/Tilt Robotics Kits (Figure 1).

Figure 1: Supplied fully assembled, the 1967 pan-and-tilt kit is equipped with two micro servos (SG-90 or SG-92 type) allowing it to pan 180° from side-to-side and tilt 150° up and down. (Image source: Adafruit)

Now, I know that I can use pulse-width modulation (PWM) to control these servos directly using a microcontroller’s digital output pins, but I’ve always preferred to maintain some form of isolation between my microcontroller and the outside world, even if that isolation is little more than a field-effect transistor (FET).

Assuming I decide to use servo motors in my final implementation, then—in the fullness of time—I’m going to need to control at least two servos for each eye and at least three or four servos for the main head. Thus, I decided to invest in one of Adafruit’s 815 16-channel, 12-bit PWM driver boards (Figure 2).

Figure 2: By means of its I2C interface, using only two microcontroller pins, this 16-channel PWM board can be used to control both LEDs and servo motors. (Image source: Adafruit)

The great thing about this board is that it’s controlled using an I2C interface, which therefore requires only two of the microcontroller’s digital output pins. Each of the 16 PWM outputs can be used to drive either an LED or a servo motor.

Brushless DC motors

By some strange quirk of fate, I also recently started pondering another project that requires motor know-how. This all started three or four years ago when a friend gifted me with an awesome variable capacitor from yesteryear (Figure 3).

Figure 3: This variable capacitor uses one set of metal plates to form the fixed stator, interleaved with a second set of plates that form the movable rotor, with air as the dielectric. (Image source: Max Maxfield)

I just had a quick Google while no one was looking to discover that the variable capacitor with air dielectric was invented by the Hungarian engineer Dezső Korda, who received a German patent for his invention in 1893.

Occupying a cubic region approximately 30 x 30 x 30 centimeters (cm), this device is beautiful to behold. The main structure is formed from different metals, and the structures forming the capacitor are electrically isolated from the frame by means of insulating glass separators. I don’t know if they still make these (I somehow doubt it), but if they do, I tremble to think how much a new one would cost.

Before giving it to me, my friend had mounted the capacitor on a wooden base (which I intend to replace with something more spectacular), removed its end-stops so that it can continuously rotate through 360°, and added a motor and drive belt (seen in the lower right-hand side of the photo).

I’m embarrassed to say that this bodacious beauty has spent the past few years sitting on top of one of the bookshelves in my office gathering dust. I happened to glance at it a couple of weeks ago and thought, “I really ought to do something with that.”

To be honest, I didn’t think this was going to be much of a problem until I looked at the motor inside to see it has three wires. “Oh dear,” I thought. I called my friend who confirmed that this is a 12 volt, three-phase brushless motor. He says he used this type of motor because it’s extremely quiet, both audibly and electrically. So, now I need to find some way to control the speed and rotational direction of this little scamp.

Conclusion

Knowing the way in which I tend to leap into things, and betting that motion is going to play a part in more of my future hobby projects, I’m going to start learning more about motors and actuators. Adafruit’s 1967 pan-and-tilt kit and 817 PWM board proved very useful for starting out, and will most likely be for future projects.

I also just ordered a copy of the book “Motors for Makers: A Guide to Steppers, Servos, and Other Electrical Machines” by Matthew Scarpino.

I will report further in a future blog. In the meantime, do you have any thoughts you’d care to share? As always, I welcome your comments, questions, and suggestions.

About this author

Image of Max Maxfield

Clive "Max" Maxfield received his BSc in Control Engineering in 1980 from Sheffield Hallam University, England and began his career as a designer of central processing units (CPUs) for mainframe computers. Over the years, Max has designed everything from silicon chips to circuit boards and from brainwave amplifiers to steampunk Prognostication Engines (don't ask). He has also been at the forefront of Electronic Design Automation (EDA) for more than 30 years.

Max is the author and/or co-author of a number of books, including Designus Maximus Unleashed (banned in Alabama), Bebop to the Boolean Boogie (An Unconventional Guide to Electronics), EDA: Where Electronics Begins, FPGAs: Instant Access, and How Computers Do Math. Check out his “Max’s Cool Beans” blog.

More posts by Clive "Max" Maxfield