One of the questions that I get the most is how to select a motor driver (AKA Power Stage) from the ocean of available units out there. I am a big fan of TI’s offerings, or a family of devices I like to call the DRV88xx. Two years ago, selecting a driver from this family was a quite simple endeavor as there were really not that many devices to choose from. These guys, however, have been quite busy and as if trying to emulate your favorite savior’s feat of multiplying bread and fish, what was two devices is now much more than 20! As far as I know they are not stopping any time soon, which makes me believe the task to choose a motor driver will not get any simpler. But to be honest, it does not have to be hard, awkward, complex, annoying, or anything like that. In this article I plan on demystifying some of the aspects of motor drive selection which makes people stick to their 100% antiquated 1950’s tube based solution when any of the DRV88xx devices would make your life way much more easier!
Let me start this article by confidently stating I will not even dare to mention the L293, but only to please implore you to let this piece of Flintstone technology finally rest in peace down at the Smithsonian where it belongs today. Yes, it was a cool device shortly after we stopped painting in caves (circa 1986), but there is no reason to downgrade our brain’s potentials by succumbing to such an old contraption. I could write an entire article detailing why I think this way, but I don’t know… Just the fact that L293 is from 1986 should tell us something. Or do you still play King’s Quest in that PC Junior? OK, giving away too much aging information here…
Oh no! Whenever I want to get a motor moving I look into the DRV88xx family of devices as it offers almost any possible driving capability I can think of. Now, I am thinking here about brushed DC motors and steppers. If you are looking for 3 phase BLDC, AC Induction Motors, or Permanent Magnet Synchronous machines (PMSM), we would need to expand the family down to the DRV8xxx and that would take much more than this article. Hence, I want to focus on the two aforementioned motor topologies.
If you need battery voltage, or higher voltages, there is a device. If you need little current or higher current, there is a device. If you need to regulate current or just let current run wild, there is a device. If you want to control speed on a DC motor by PWMing the ENABLE or the PHASE control inputs, there is a device. Or perhaps you prefer the older style, IN1 and IN2, in which you control each H Bridge’s half independently. Well, guess what? There is a device! If you want full step, integrated microstepping, or your own microstepping. If you want bipolar stepper or unipolar stepper. If you want to drive relays, solenoids, lamps, LED’s, the resistor at the hot end melting ABS plastic on your 3D printer hot end… OK, if I were speaking this I would already be losing my breath, so let me just say as you just guessed it: THERE IS A DEVICE!!!!
What you will not see on the DRV88xx devices is the ability to drive motors with more than 60V. But the great majority of our projects do not operate above this range anyway, so not to worry. The only other feature you will not find on any of the DRV88xx is a protection against over voltage. As it turns out, hardly any device offers this protection, due to the increased cost of adding the inherently large block. On the other hand, you will get protection against under voltage (AKA Under Voltage Lock Out or UVLO), Over Temperature Shutdown (AKA OTS) and Over Current Protection (AKA OCP). Notice none of these protection blocks would be present on your beloved L293. Darn it! I promised I wasn’t going to mention that old fossil…
The DRV88xx family is then basically a large collection of H Bridges with some form of control logic to make our lives easier. I will detail the family’s subdivisions and what devices you may encounter within.
Basically every single DRV88xx device is an H Bridge of some sort. The exception would be the DRV8803/04/05/06 which are basically quad low side drivers. You would use any of these four devices to drive your unipolar stepper, or any load requiring low side actuation. Every other device will fall under the category of H Bridges. That is DRV8800/01/02/11/12/13/14/18/21/23/24/25/28/29/30/32/33/34/35/37/40/41/42/43/44, etc.
Single H Bridges:
This would be the DRV8800/01/28/29/30/32/37/40/42. What you get is the ability to drive either one brushed DC motor, or half of a bipolar stepper.
Dual H Bridges:
This would be the DRV8802/11/12/13/14/18/24/25/33/34/35/41/43/44. You can now drive either two brushed DC motors or a stepper motor, depending on the device. Some devices will only be able to drive steppers (e.g. DRV8811/18/24/25), whereas other devices can drive either topology.
Quad H Bridges:
This would be the DRV8821/23. With these puppies you can drive either two bipolar stepper motors or four DC motors.
The number of H Bridges tell us how many motor windings we can drive. However, the device’s internal logic will tell us which motor topology we can drive. For example, the DRV8811 has two H Bridges but we cannot use this device to drive two DC motors as it is configured to drive stepper motors by using what is called an internal indexer. What this logic does is coordinate all the functions necessary to regulate current across both stepper motor windings applying a sine/cosine waveform which in turn results in microstepping commutation. Or you can do full step which still uses some sort of coordinate quadrature encoding which simply cannot be used to drive DC motors. The internal indexer, however, makes driving a bipolar stepper motor supremely easy! All you need is a square wave at the STEP input, and the stepper will move with a stepping rate directly proportional to the STEP frequency. A logic level at the DIR input will define direction of rotation. It simply cannot be any simpler. This is the topology most CNC machines out there will use, so it is a straight through connection without needing any kind of interpreter in between.
In this subsection of the family you will find: DRV8811/18/21/24/25/34
PHASE/ENABLE H Bridges:
My favorite control style is to apply a PWM control signal at the ENABLE input of an H Bridge and then use a logic level at the PHASE input to define direction of rotation. What then happens is that as I increase the PWM duty cycle, the motor moves faster and vice versa. H Bridges with PHASE/ENABLE interface allow for this control methodology and make it really easy to code PID loops or simple RC to PWM interpreters.
Another implementation you can follow is to add the PWM into the PHASE input and then leave the ENABLE set as to allow for current flow. In this case, you are now controlling both direction and speed with a single signal. This makes it even simpler to code PID loops as whether the error is positive or negative, all you need to do is add it to the PWM and VOILA! No need to commutate direction.
H Bridges with PHASE/ENABLE interface would be DRV8800/01/12/13/14/28/29/34/35/40
Before we were packing lots of logic on our driver chips, we needed to skimp as much as possible on features. Hence adding an interface as simple to use as the PHASE/ENABLE was not customary. Instead, we had to deal with the IN1 and IN2 interface in which each H Bridge half is controlled independently. The reason why this interface style is not my favorite has nothing to do with the increased level of complexity as it is really not that hard to deal with it. What bugs me the most is that now you need two PWM channels and I am always running out of real PWM outputs. Some microcontrollers have recognized this problem and they offer the availability of a single PWM resource on two different GPIO outputs. This represents a saving in resources, although you still need to articulate which outputs holds the PWM output.
Where the INx interface is in the application of matched PWM’s. I am not knowledgeable enough to tell you why this PWM style is better than the other, but I have heard the response is just awesome. One of these days I will experiment with it and relay my findings on this blog, In the meantime, however, do notice some people will not even want to deal with the PHASE / ENABLE topology, which is why they are mostly interested in devices such as the DRV8833/34/35/37/41/42/43, etc.
Sometimes it makes sense to control a fairly large number of power stages. If this is the case, there is no doubt the number of microcontroller resources will be greatly halved. That is true unless we can reuse the same resource over and over with all of these power stages. The only way to accomplish this is by the usage of a serial interface such as SPI or I2C. In this case, multiple devices can be interconnected to the same serial communication lines, but only the one with the correct address responds. Some DRV88xx devices are designed around a serial interface implementation. For example, DRV8804/06 are quad low side drivers with an SPI like protocol. It is basically a shift register which can be indefinitely cascaded to add as many outputs as you deem necessary with a single SPI port.
DRV8823, on the other hand, is a quad H Bridge driver with an SPI port. In this case, you could have many devices hooked to the same SPI port, but you would need a Slave Select per device. Still, the CLK, MISO and MOSI signals can be shared.
DRV8830 is a single H Bridge with an I2C interface. In this case, you can hook up to 9 different devices to this I2C port.
When we control the current, we are basically controlling the torque. Some people confuse current with motor speed because regulating current is done by applying a PWM, which is the same as controlling the voltage. Now, controlling the voltage does control speed! To make matters more confusing, some drives actually take advantage of this concept with speed being controlled by regulating the current giving the impression that current and speed are one thing. No need to trouble our minds with this now, just rest assured that whether you want to control torque or speed, current can be regulated with a good number of the DRV88xx devices. It is easier for me, however, to mention which devices do not have the current regulation engine. These would be DRV8800/01/03/04/05/06/30/32/35/37/44.
Now, when it comes to current regulation, there are two variants. There is the variable current regulation and the fixed current regulation. The variable current regulation devices will have a VREF input which lets you set the actual current trip point (AKA ITRIP). These devices would be DRV8802/11/12/13/14/21/23/24/25/28/29/34/40/41/42/43.
The fixed current regulation devices contain a current regulation engine which you configure by selecting a SENSE resistor. Once you do this, however, the ITRIP cannot be changed in real time. The only device with this definition would be the DRV8833.
There are two devices which offer the ability to regulate voltage instead of current. The reasoning behind this venue only makes sense if we think of battery based applications. Think of a toy using 4 D batteries, or 6V. When the batteries are fresh, the toy moves fast. However, we all know that batteries will not remain fresh forever, so we will eventually feel depression as we see our toy moving slower and slower. To avoid this problem, you could build the toy to operate at 3V. If we still use a 6V battery pack and regulate the voltage down to 3V, then the toy will operate at rated conditions much longer.
In real life you would obtain this behavior if you were looking at motor speed and applying a PWM signal to regulate the duty cycle accordingly. There are two DRV88xx devices which do this internally resembling a buck converter where the motor is the inductor. These two devices are the DRV8830 and DRV8832.
People would want H Bridges to operate from 0V to 600V but that is in essence impossible with today’s technology. Or at least with the cost effective one. When an H Bridge is designed, a voltage range must be selected as the internal components must be rated accordingly. There is no such thing as a 0V to 600V FET as far as I know. Hence, when dealing with battery voltage, we will need to design the H Bridge with battery voltage in mind.Batteryvoltage is anywhere in between 1.5V to 12V. This range is not that easy to obtain either, but DRV88xx offers good compromise and a fairly large number of H Bridges to work on any voltage in between this range.
For example, DRV8830/32 are only rated from 2.75V to 6.8V, whereas DRV8837 can go from 2V to 11V. If you need 12V, you will need to use any of the non battery voltage devices which start working at 8V or above. The battery voltage based devices are: DRV8830/32/33/34/35/37.
Brushed DC Motor H Bridges:
In essence, any of the aforementioned H Bridges can be used to drive DC motors. Do note, however, that one important aspect of driving a DC motor is the capability of braking or applying a short to the motor winding as to stop the shaft as soon as possible. Some DRV88xx devices may seem suitable to drive DC motors, but since they were optimized for stepper motor commutation, the brake feature could not make it in. These devices are the DRV8812/13/28/29. Luckily all of them (except DRV8828) have an identical counterpart which do holds the braking feature. For example, DRV8802 and DRV8812 are 99.9% identical. The only difference? DRV8802 has brake, whereas DRV8812 does not. The same applies to DRV8813/14 (14 has brake, whereas 13 does not) and DRV8829/40 (40 has brake whereas 29 does not).
Stepper Motor H Bridges:
This can be extracted from the previous discussion. DRV8812/13/28/29 are H Bridges optimized to drive stepper motors as they do not have the braking capability. Why is this important on a stepper? Because when you go to zero current and the H Bridge is enabled on brake, the shaft would cog (i.e. it would be harder to move as it is on brake). This may seem like a trivial detail, but some users would mind. Hence, the difference was implemented in order to give the option.
Well, I think this blog posting is already long enough. I have tried to offer a decoding ring for which DRV88xx device to use under which particular situation. We could of course go on and on and on… But at least this list gives you a few pointers as to which device you should be looking into as you delve into your next motor application!
PS This table should give a little bit better vision as to all the mambo jambo I just typed.
|# H Bridges||Min Voltage (V)||Max Voltage (V)||Max Current Per
|8803||Quad Low Side||8||60||1||NO||NO||NO||YES||NO|
|8804||Quad Low Side||8||60||1||NO||NO||NO||NO||YES|
|8805||Quad Low Side||8||60||1||NO||YES||NO||NO||NO|
|8806||Quad Low Side||8||60||1||NO||NO||NO||NO||YES|