Motor circuit

This is the latest motor circuit design. I’ll link to it on EasyEDA and post a PNG of it here.


(EasyEDA rocks, by the way, for the hobbyist like me. It’s free for most of what I want to do, it has schematic and package definitions for lots of real-world components, and you can even order little PCBs directly from them.)

Here’s the image:

Update (2021/11/11): This image was lost, but the updated motor circuit can be found in a more recent post.

So, here’s the idea. I’ll explain the mechanics of how this all makes the rotor spin at the end of this post.

The 74LS chip (U1) is an S-R latch chip. I use it to remember which Hall-effect sensor was last triggered, allowing the motor to stay in that state until another sensor changes the state. Otherwise, the motor would only be in a given state as long as the rotor was near a sensor, and this is only a fraction of the time needed.

One sensor sets the latch, while the other resets it. The output of the latch goes into U4, a logic buffer, and U5, a logical inverter, which then passes its output into the logic buffer U4. The inverter gives us an output that is always the opposite of what the latch (U1) is currently remembering, which is important later. The logic buffer (U4) just ensures we have the desired voltage level after all the latching and inverting.

The outputs from U4 are GA and HB, and these two are understood to be opposites of one another thanks to the inverter (U5). GA and HB each go to a power P-channel MOSFET, which does the heavy lifting of switching the several amps of current. The MOSFETS–Q3 and Q4–act as high-side switches for the coil pairs, which are represented by R1 and R2. Each coil pair has a diode (D1 and D2) connected across it to safely discharge the back-EMF the coils inevitably present when you switch off their current.

And that’s it! This is the circuit in use in the latest video, “The motor, revived.”

So how does all this make the rotor spin?

As I mentioned, the motor uses Hall-effect sensors to detect where the rotor is located. This allows the circuit to switch one pair of coils off and the other on to keep pulling the rotor around in a circle like a horse trying to get a carrot on a stick. The rotor is made up of four groups of little neodymium magnets whose outward-facing poles are arranged like this:

S     S

This means opposite coils turn on or off together; they’re paired up.  When a given coil is ON, it attracts the nearest arm of the rotor going clockwise and repels the nearest arm of the rotor going counter-clockwise. The very same thing happens on the opposite side of the motor, with the paired coil. While this is happening, the other coil pair is simply off.

When the rotor gets far enough around that the active coils would start slowing it down–because if the power situation doesn’t change, the rotor will at some point just be locked in a position aligned with the  active coils and stop moving–a Hall-effect sensor detects this situation and triggers the circuit to switch off the active coils and switch on the inactive coils, starting the whole thing over again. This happens many times per second (76 times, in fact, lately) and results in the spinning motion. The S-R latch remembers which sensor was last seen so that the coils can keep pulling the rotor even when the sensor is no longer triggered.

There are some inefficiencies here. Ideally both pairs of coils would be on at all times because that should deliver more power to the rotor. But that requires actually switching the current direction through the coils instead of just turning it on and off, and that proved challenging in my early attempts. Schmitt triggers may help with this problem, however, by discretizing the turn-on/turn-off characteristics of the MOSFETs. Or it may require matched transistor pairs.

It would also be nice to not have like magnetic poles opposite each other. There is likely some power leakage here as the inward-facing poles work in opposite to the outward-facing poles.

One thing at a time, though.

Leave a Reply

Your email address will not be published. Required fields are marked *