Simplify Your Motor Drive Solution

Driving medium-voltage motors, especially stepper and brushless dc (BLDC) motors, can be a control engineering nightmare. As these motors become more popular in everything from radio-controlled cars, electric razors, and car water pumps, itís a challenge that must be met with minimal cost, board area, and complexity.

Stepper motors also can be found in everyday products like video surveillance products, micro-printers, and cash machines. In addition, stepper motors are a hobbyistís dream for pursuing a variety of home projects like computer numerical control (CNC) machines or 3D printers. Todayís integrated circuits have accepted the challenge with highly integrated control engines that reduce development time, cost, and board area.

At the heart of a stepper motor is an H-bridge for directing bi-directional current across the motor windings. For stepper motor applications requiring some degree of microstepping, itís necessary to implement some sort of current control to accurately and smoothly step the motor from one position to the next. In a discrete solution, you implement this with a gate driver, some MOSFETs in the bridge, current sense resistors in series with the low-side MOSFETs across the winding, an operational amplifier (op amp) to measure the voltage across the sense resistor, and finally a microcontroller (MCU) capable of measuring this voltage (integrated analog-to-digital converter, or ADC) and acting upon it. Close the loop with a proportional-integral controller in a microprocessor with high-resolution pulse-width modulation (PWM) outputs, and youíre done. This sounds expensive, area-consuming, and most certainly time-consuming -- unless you stayed awake during all those control-theory classes. And we havenít even begun to include protection on the MOSFETs for shoot through, thermal run-away, and over-current.

Figure 1: Example of a stepper motor driver system block diagram.

The good news is that thereís an easier way. Integrated solutions are available that can simplify all of the above to a simple pulse input from a microprocessor when you want your stepper motor to take a step. Letís take a look at the interface (Figure 1).

The Step and Direction pins can be connected to standard general-purpose input/output (GPIO) pins on your processor. A rising edge on the Step input indexes one position into the logic table and increases (or decreases) the current in each phase, as needed to commutate with the motor. An example of this lookup table is shown in Table 1. The resulting current in the winding for a given step input depends on the microstepping mode you chose for the device. Speed is determined by how fast you issue the step pulses. The Direction pin is simply set high, or low, depending on which way you want to move.

Finally, Vref is a voltage that can be derived from a simple voltage divider to set the maximum, or full-scale, current in each phase. This is the reference for the internal DAC that dynamically changes the voltage on the internal comparator. By comparing this voltage with the voltage across the external sense resistor, current is regulated at each step per Table 1. This technique is commonly referred to as current chopping. Choose your microstepping mode with a set of high-low digital input pins and you are spinning in record time! It really is that easy, and evaluation boards with a graphical user interface (GUI) makes it that much easier.

BLDC Motor Drive
Moving to a more complicated beast, the BLDC motor requires all of the previously mentioned discrete components necessary for a stepper motor, plus a way to detect back electromotive force (BEMF). This is commonly done with zero-crossing comparators to detect when the trapezoidal voltage waveforms of each phase cross through a zero voltage point. After all the discrete blocks are in place, itís time to delve into the dark world of firmware development in your MCU. Hereís where you generate 120-degree phase-shifted PWM bursts to move the electric field precisely around the stator of your motor to lead the rotor around at the speed you desire. Simple enough, if you have done it before, and have time to tune the loop to your motor parameters to avoid miscommutation on every cycle.

Ryan--Excellent post. My company recently installed a Cartesian robotic system that uses steppers for positioning a dispensing head providing a bead of RTV. I definitely wish I had your post prior to investigating this project. Being a mechanical engineer, there always seems to be some "magic" relative to electrical engineering and certainly electronics. Topics such as this one really gets to the basics in quick fashion. Again, good post.

Thank you for your positive comments. These solutions not only save time, but save money with a high level of analog integration and just enough digital integration to take the burden off the MCU. Two things we all wish we had more of: time and money!

Excellent post. Thanks for the entertaining explanation for how integrated motion solutions play out with steppers and BLDC motors. It's easier to simplify when motion control can be reduced to the component level and integrated capabilities. Thanks for the update.

Industrial workplaces are governed by OSHA rules, but this isnít to say that rules are always followed. While injuries happen on production floors for a variety of reasons, of the top 10 OSHA rules that are most often ignored in industrial settings, two directly involve machine design: lockout/tagout procedures (LO/TO) and machine guarding.

Load dump occurs when a discharged battery is disconnected while the alternator is generating current and other loads remain on the alternator circuit. If left alone, the electrical spikes and transients will be transmitted along the power line, leading to malfunctions in individual electronics/sensors or permanent damage to the vehicleís electronic system. Bottom line: An uncontrolled load dump threatens the overall safety and reliability of the vehicle.

While many larger companies are still reluctant to rely on wireless networks to transmit important information in industrial settings, there is an increasing acceptance rate of the newer, more robust wireless options that are now available.

To those who have not stepped into additive manufacturing, get involved as soon as possible. This is for the benefit of your company. When the new innovations come out, you want to be ready to take advantage of them immediately, and that takes knowledge.

Focus on Fundamentals consists of 45-minute on-line classes that cover a host of technologies. You learn without leaving the comfort of your desk. All classes are taught by subject-matter experts and all are archived. So if you can't attend live, attend at your convenience.