An Interview With The DRV8833 (PART II)


EBLDC : Hi again and thanks for tuning to the second part of this interview. Mr DRV8833, we are already experts in how to use you to drive two DC motors. But we hear there is so much more we can do with you, so we want to focus this next installment in what to use you for. Other than driving two DC motors, what else can you propose?

DRV8833: Well, driving two battery operated DC motors is what I was designed for, but as an extra an special feature was build into me which allows the driving of a single DC motor, albeit with twice the current. This is what we call parallel driving and the idea is to connect all the respective input driving signals as well as the respective output signals together, like this:

DRV8833 in Parallel Mode
DRV8833 in Parallel Mode

Notice there is now a IN1 and an IN2 signals. At the same time, there is an OUT1 and an OUT2 outputs. The same relationship applies. IN1 coordinates OUT1 whereas IN2 coordinates OUT2. Hence, we have in essence transformed the dual H Bridge driver into a single H Bridge driver.

EBLDC: Got it! But what would we want to do this?

DRV8833: Because some applications may need more current than others. For example, while on dual DC motor driving, I can only supply an absolute maximum current of 2A per H Bridge. What if your DC motor stall current is something like 2.5? This current simply can not be reached under these circumstances. If instead we run in single H Bridge mode, I can now supply up to 4A of current peak, provided that all the thermal aspects of the design have been taken care of.

At the same time, this gives you a larger current regulation capability. Whereas on dual DC mode you can not regulate current to much more than 1A to 1.5A per phase and depending on thermal impedance, with the single H Bridge mode it is considerably easier to reach a current regulation of something like 2A to 3A. Have in mind that the I^2R equation still holds, but since we have in essence halved the resistance (the power FETs are basically connected in parallel and their resistances must be equal to half of what they would be) this helps for the power dissipation factor.

EBLDC: Could you then drive a stepper motor while operating in parallel mode?


DRV8833. With two devices this could be definitely done. But battery operated steppers rarely require that much current so I do not anticipate a lot of people going this route, if any.

EBLDC: OK, so we have been talking about driving steppers, but what is the trick behing doing so?

DRV8833: It is actually not as hard as you would think. Since I already have a current regulation engine, as we detailed before, I can drive inductive loads who lack the effects of an existing BACK EMF such as those found on a stepper moving at slow speeds. The trick is to determine what is the current we want the stepper to see on its windings. For example, is it 500 mA? Or is 1A per phase? Whatever it is you would use a SENSE resistor sized to obtain this current by using the equation VREF = 0.2V/RSENSE. So if you want to drive a 500 mA stepper, you would use a SENSE resistor equal to 400 milli ohms.

Now, at the inputs I need to see the phasing information the stepper will require to cause commutation. This is often current flow in one direction per phase and then change the current direction in only one phase at a time. Ooops! I realize a picture is way much more than a terizillion words, so something like this:

DRV8833 Stepping Signals

DRV8833 Stepping Signals


There are a few things we can easily discern from this diagram, but first let me show you what we are looking at. The top red graph is the phase A current while the blue graph is the phase B Current. Note both of these currents go from ITRIP to -ITRIP. In other words, the H Bridge is polarized so that current flows from the xOUT1 to xOUT2 terminals which we call positive current or ITRIP, and then we switch the polarity so the current flows from the xOUT2 to xOUT1 terminals which we call negative current or -ITRIP. I will always regulate to ITRIP whereas the current flows from right to left or left to right.

We can also see that PHASE B is nothing else than PHASE A but with a 90 degree out of phase angle. We will later see this is how we control the stepper motor rotation direction.

If we take this four state pattern, we have deciphered the entire two phase bipolar stepper commutation scheme because there are only two windings and two possible states. Hence, all we have to do is repeat the sequence and off the motor goes. But how do we transfer the phasing information into input information? At the bottom I have a table that relates what are the input requirements to obtain the needed output. If you read that table from left to right you will see the passage of steps as the motor moves. But if you read the table from top to bottom you will see what the inputs need to be in order to generate the outputs. We can then combine the inputs into a nibble which we can allocate into a lookup table. Our microcontroller code can then fetch data from the table in a sequence from 0 to 3 continuously, and the motor will move equally!

Now, it may seem that if we want to move the motor in the opposing direction we may need a different table. However, that is not the case. We can indeed use the same table; all we need to do is count backwards! Hence, if you move on the table from 0 to3 the motor moves ClockWise (CW) but if you move on the table from 3 to 0, then the motor runs CounterClockWise (CCW). I have seen some code on how to do achieve all of this, and here is how it looks:

const int TABLE[4] = {0x09, 0x05, 0x06, 0x0A};
//Somewhere in a timer subroutine
if (Direction)
P1OUT = TABLE[TableIndex];  //Next Step Is Taken

Notice that for this to work, AIN1 would be mapped to the P1OUT.0, AIN2 would be mapped to the P1OUT.1, BIN1 would be mapped to the P1OUT.2 and , BIN2 would be mapped to the P1OUT.3.

It is then a matter of controlling how quick the timer is being called and this is directly proportional to how fast the stepper is moving. For example, if the timer is being called every 1 ms, then the motor is moving at 1000 Steps Per Second (SPS).

EBLDC: Well, I’ll be darned! That was quite a tutorial! We just received a question from a caller who wants to know what happens when the SENSE resistors are not used for both DC motor and steppers. Should we do a third part?

DRV8833: Heck no! We are just getting started! Like I said on the first part, there is no need to use SENSE resistors, but the user must be warned there are implications as following this step in essence removes the current regulation.

This is usually not much of a problem for DC motors, but for steppers it may not be the best idea. So let me start with DC motors, which by definition only use the current needed on a per load basis. When your DC motor is unloaded you may see a current spike caused by parasitic capacitance and the need to break the inertia and friction on the system. However, current starts to decrease to almost zero once the motor starts moving and the speed is high enough, the BACK EMF approaches the power source voltage. At this time, then only changes in load will require a change in current. If the load is large, then the current will be large. So if you know your current under load is less than my absolute maximum per phase, then not using a SENSE resistor is completely harmless.

Now, if the current has even the slightest chance of going above my absolute maximum (e.g. 2A per H Bridge on dual H Bridge operation), then there is a pretty big chance that an OCP will be triggered. This is not necessarily the end of the world for the application, but motion quality will be compromised as I will disable the H Bridge for about 1.2 ms. If you can live with this, then so be it! If not, I would either consider single H Bridge mode or the utilization of a SENSE resistor.

This is why on steppers this is pretty much a dead idea. Because steppers move rather slowly, their BACK EMF is pretty low. Hence, current will go as high as VM/MR where MR is the Motor Resistance. This does bring an interesting point. What if the stepper motor resistance is so large that the resulting current is not too large? For example, what if the power supply is 12V and the stepper resistance is 24 ohms. In this case, the system is pretty much working like an LR drive with the motor resistance being the current limiting resistance and there should be no need for a SENSE resistor either. Do note this is true for the H Bridge but may not be true for the motor. For example, on the previous example we got a resulting current equal to 500 mA which is excellent for me, but that does not mean the stepper will actually like the 500 mA. Everything must be taken into consideration and if everybody is happy, well… then everybody is happy!

Do note, that in the same fashion that the stepper resistance could be used as the current limiting entity, you can also add power resistors in series to limit the current if the stepper resistance is not large enough. But this is in essence a bad idea since then lots of power will be lost in the form of heat. You might as well make good use of the SENSE resistor which efficiency will always surpass that of an LR drive.

There is one caveat to the previous statement that driving steppers without a SENSE resistor may be pretty much a dead idea and I do not mean the LR equivalent technique. You could also PWM the phases in open loop and as long as the duty cycles are not big enough to cause currents larger than the maximum, it should work as well. There are of course other problems associated with this technique, not to mention this technique can become quite complex depending on what you want to accomplish. But that is definitely an entire article by itself, so I will let that one fly for another future.

EBLDC: Gosh Mr DRV8833, we can not tell you how much we appreciate you taking the time to tell us about you and how we can best employ your features. I do hope you are a smashing success out there in the field and users are able to make a gazillion neat projects with you!

DRV8833: Well, I wish for that too, so if there is anything else that you want me to clarify, do not hesitate to contact me. I happen to love trilogies 😉

3 comments for “An Interview With The DRV8833 (PART II)

  1. Tigran
    May 7, 2015 at 10:29 am

    Thank you very much for the nice interview.

    My question is about 0.01 uF and 2.2 uF capacitors.
    Can I use bigger values here?
    For example 0.1 uF instead of 0.01 uF and 10 uF instead of 2.2 uF.

    • avayan
      May 7, 2015 at 3:51 pm

      I would try to keep those two caps with the values as suggested by the datasheet. If it had been the input power supply capacitor, then yes, it would be OK to use a little bit more capacitance. In fact, depending on your load and motion control dynamics, you may need to!

      Why are you trying to change them? Because of cost?

  2. Tigran
    May 8, 2015 at 8:14 am

    Thank you very much.
    Yes, the only reason is to reduce the cost.

Leave a Reply

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