Tackling the Brushless DC Motor Experience

I have been called the stepper expert at work. Although I have been developing stepper hardware and software for the last 10 years, I am hardly an expert at all. But when compared against Brushless DC Motors, or BLDC, then I am like a GOD! Not because of all I know about steppers, but because how much I don’t know about BLDC’s.

So I want to develop my own BLDC drives and the knowledge required to pursue this effort. If you are like me, ignorant with regards to this very interesting topic, then you are in luck! Because I plan on deriving all that we need, but in baby steps. So lets go!  

The BLDC Motor  

First thing we need to understand is that a BLDC is a motor like any other. In this case, a permanent magnet based motor like any other. Well, like any other, except it does not have brushes. As such, it does not have a mechanical means to cause commutation. The brushed DC motor has a mechanical means to achieve said commutation, which is why after applying a voltage it just goes and at a speed directly proportional to the applied voltage. However, on BLDC, applying a voltage does not do much, other than moving the motor to a position and it staying there. But like I said, a BLDC is a motor like any other and as such it needs:  

  1.  A revolving magnetic field which fights the developed magnetic field across the electromagnet.
  2. A means to generate said revolving magnetic field.

The Brushed DC motor has its needs met thanks to the commutator and the brushes. The BLDC has none! So we will need to cause the commutation ourselves. In the BLDC, the commutator is then electronic, which is why we need more complex drivers to move our BLDC. But it does not need to be too hard. In fact, a quick glance at our BLDC shows that there are not that many options…  

Three Phase Brushless DC Motor


Here is the motor. In this case, the picture above shows a three phase BLDC. It could have been a single phase BLDC, but that is not even a challenge. Or it could have been a two phase BLDC, but believe it or not that is pretty much a stepper motor! I already know those ones… I want BLDC, baby!   

A Y 3 phase motor is kind of a scary thing, but if we assume that only one phase is energized at one time, it becomes easier to digest. Because one phase enabled means 1 current flow. This is extremely easy to achieve by ignoring one of the three legs on the motor (also known as tri-stating, left floating or high impedance) and just energizing the other two. Per example, if I energize legs A and B, I get a current flow from A and B. I could do the same with the other pairs and I get three combinations: AB, BC and CA. However, it is crucial we understand that current could flow in both directions!  


Six Possible Current Flows on a Three Phase BLDC motor


Notice on the picture above, I can have a current on AB if I make A HI and B LO, where in this case HI means High Voltage such as VM= 24V, and LO means GND. I can also have the very same current, except that with total opposite flow direction if I make B HI and A LO. Again, if we repeat the same exercise with the other combinations we get a total of 6 possible currents. Iab, Iba, Ibc, Icb, Ica and Iac. That’s it!!! That is all the possible states I can see on my 3 phase BLDC! On a stepper, there are 4 states that I can see with my two phases. On my BLDC, there are 6 states. Just one tinsy bit more complex, but definitely, not the end of the world as we know it.  

So what can I do with this? Actually, if I were to utilize the right pattern and sequence the six current flow combinations in the right order, I could step the BLDC motor like if it was a stepper motor. WHAT? Really? As it turns out, both steppers and BLDC are in fact BLDC motors. Except that the stepper is optimized to step, whereas the BLDC does not. If you step a BLDC motor you will get a very coarse motion and a superbly low torque response. Still, it proved to be crucial during my development as it allowed me to understand the Hall Effect Sensor structure. But I am going too fast. Let’s back up and discuss the proper sequence for stepping the BLDC motor as this sequence is actually the exact order we will eventually need to close the loop and properly commutate our motor.  

The six currents I just showed you are the only six combinations you will ever see while commutating our 3 phase BLDC. However, the order you see above is not the right one. What we need to do is pass one of the six currents and then change to a subsequent current so that only one of the inductive elements change state. The other inductive element will maintain the current. Why we do this? Because changing the current on both inductive elements would cause too much torque ripple. If you maintain one of the currents while allowing for the other to decay, motion will be soft. But what am I talking about when changing the current across one inductive element while maintaining the other? The following picture makes it clearer. I hope…  

Three Phase Brushless DC Motor Stepping States


Imagine you start with current Iac as I portray on the previous figure. This means current is flowing into inductive element A, then out of inductive element A and into element C, and then out of element C. Element B has been left hanging and un-energized. If we energize B now, there are four possible combinations. We either leave hanging A or C, and we either make B HI or LO. But what we want to do here is leave the current flowing in the same direction on one of the elements A or C. I have chosen the combination in which B is made LO, A is maintained HI and C is switched to high impedance. I could also have selected the state in which C is made LO, A is made high impedance and B is made HI. In either of the two scenarios, only one inductive element would have changed, while the other would have maintained the current flowing in the same direction. I chose the first arbitrarily, but as I will show later, the other option is equally viable and I will then explain why.  

If we continue with the same exercise we find the right sequence. Notice all I am doing is rotating which inductive element is maintained. I started with A, then moved on to B, and then to C. And then repeated a second time, A-B-C, except in this instance I get the other three combinations where the current is flowing in the opposing direction as in the first three steps. And then it all repeats again! Forever and ever, and this tells us something very important… If I keep switching these current combinations in this sequence forever, the motor will move… well FOREVER! This is electronic commutation at its best and this is how we make a 3 phase BLDC move. Well, almost. There are still some elements you must be asking.
But before I go on, let me point out that we can easily assign a state to each one of these current combinations and if I were to code in a microcontroller some easy app to continuously sequence from state 0 to state 5 on an infinite loop, we would get the motor moving like a stepper. If I change the frequency at which each one of the states are updated, the motor speed would change. This is what I did, and it actually worked, but the motion quality was awful! Like I said, a BLDC is not optimized to step.
Now, I decided to change my phases so that I obtained a sequence going from state 0 to state 1 and so on. But what if I had chosen the other possible combination in which instead I moved from state 0 to state 5? Would that be bad? Actually, this would be very good as this is precisely how we control motor rotation direction! In other words, if I make a table with the six combinations in this order, and I move up into the table, the motor moves say clockwise. But if I know move down on the table, then the motor must move counterclockwise. So there was not much arbitrary choosing how I was going to modify which inductive element was going to change and which one would stay with the same current direction. Either way, each possible combination would have eventually being used as direction of rotation is a very important aspect of motion control.
The H Bridge:
All this theory is gorgeous but I bet you actually want to make the motor move. How can we do this? What is all this business about leaving a winding disconnected while energizing the other two with VM or Ground? In other words, how do I do this?
Well, this is an electronics commutation motor, so we need some electronics here! I could suggest an H Bridge, but this motor is a little bit weird so an H Bridge will not cut it. What in fact works is three half H-Bridges so that by articulating which two out of the three H Bridges are enabled (and how they are enabled), then a full H Bridge emerges. Let’s take a look at the basics:

Three Half H Bridges Power Stage



 What do we have in here? Isn’t this too scary already? Don’t panic. This is simpler than it looks. What we need to do is coordinate which FETs are ON and which FETs are OFF. Only two FETs will be ON at any given time, with the other four remaining OFF. I do realize this already looks like instant hysteria but let me map one familiar scenario so that you see this is not as nightmarish as it seems. But before we go into the next picture let me explain a little bit about these half H Bridges, namely, the BTN7960. I used two of my AE-MDL-BTN7960 modules which have two BTN7960 half H Bridges each. Hence, one of the half H Bridge is sitting unused, which is not mega efficient, but that is why I will be working on a triple BTN7960 version later on. Or maybe some other power stage with three half H Bridges.  

On the BTN7960 there are two control signals we need to understand: INHIBIT and IN. INHIBIT specifies whether the H Bridge is enabled or not. If the half H Bridge is enabled (INHIBIT = HI), then IN chooses which FET is enabled. If IN is HI, then the high side FET is enabled. If IN is LO, then the low side FET is enabled. It really can not be any easier. But if INHIBIT is LO, then the half H Bridge is disabled. This pretty  much means no FET is conducting, which is in other words our high impedance mode. These give the three states we know we need. VM, GROUND or high impedance. Again, could not be any easier! The result?  

Half H Bridge Polarization for State 0


I am imagining you recognize State 0 from our previous discourse. I had detailed State 0 as the configuration in which winding A is made HI or VM, winding B is left floating, and winding C is made LO or GND. Notice this is easily achievable if I take BTN7960 half H Bridge A and enable it HI by making INH HI and IN HI. BTN7960 half H Bridge B I want to left floating so INHB is made LO. It does not matter what INB is, as the bridge is disabled anyway. On BTN7960 half H Bridge C I want to connect the C winding to Ground, so INH is still enabled by making it HI, but INC is made LO. This will make a current flow from VM and into winding A, and into ground through winding C. Isn’t this a piece of cake?  

All we need to do know is find the combinations for all the INHx and INx pins on a per state basis and WHAMO! Right there we have the commutation control for our BLDC motor. But this post is already getting ridiculously long, so I promise to get back with the goodies on my next one.  

17 comments for “Tackling the Brushless DC Motor Experience

  1. Ken Thompson
    January 13, 2011 at 3:36 am

    Very interesting and informative.I could understand, especially with the pictures. I would very much like to be informed of any other posts on this subject. Thanks and kind regards.

  2. kripanand
    April 5, 2012 at 10:50 am

    Hello sir
    This is kripanand .I am building a miniature aerial vehicle.there I want to use Atmega16 as a micro-controller for controlling brush-less dc motor using ESC. I tried various code for this but none of them worked is there any idea where I going wrong…

  3. avayan
    April 11, 2012 at 2:45 pm

    Hi Kripanand,

    Sorry I will not be able to offer too much useful information but this is too broad of a question. I would make sure to check a few things, though: 1) the logic from hall effect sensors is crucial. If you commutate into the wrong state, the motor will stall. 2) I do not know if your implementation is sensored or sensorless, but regardless it is crucial to understand when the commutation is taking place versus when it “should” be taking place.

    BLDC motors are a fairly complex beast so don’t think that you will get too far by skimming as much as possible on knowledge. Try to understand the topology as much as possible before trying to undertake it. Playing with it to gather knowledge may result in better understanding or even more confusion, so be mindful of what is going on. There is tons of information on the web on how BLDC motors work, so I would try to submerge myself on all of these writings before trying to actually make a BLDC motor work.

    I wish you success on your project!

  4. Yaroslav
    July 13, 2012 at 8:07 pm

    Thanks for all info which you provide. Can you repaint image of BTN7960(like in datasheet ) because it consist with one P-type FET and one N-type FET. It’s little confusion me.

  5. avayan
    July 18, 2012 at 12:40 pm

    Hi Yaroslav,

    Thanks for the catch! Will try to either rework the images or change the documentation to use a device like the DRV8301 which in fact uses six N Channel Mosfets.

  6. dutzy12
    November 26, 2013 at 7:34 pm


    I’m using BTN8962 , almost the same as BTN7960 and I am trying to run a BLDC motor. Can you tell me how to put the inputs for each H-bridge ? I need PWM ? I don’t know what kind of signals to put and how to make the motor run

    • avayan
      December 10, 2013 at 6:42 pm

      Hi Dutzy12

      I am actually generating a series of tutorials which will detail all of the aspects of 3 Phase BLDC motor commutation. Included will be a topic on the 3 Phase H Bridge which would give you an idea of how to wire up your motor to the power stages in question. It is tough to explain with words, but basically you need 3 Half H Bridges. Each one will drive one of the phases. Then you need to use a lookup table or the logic necessary to actuate the FETs such that one of the six possible currents is generated. You must sequence the currents in the right order, or the motor will not move. All of this will be detailed in the upcoming weeks.

  7. Ahm
    March 20, 2014 at 9:55 pm

    Thank you! this has been very informative. can you describe modifying teknik to drive a 2 phase bldc motor using a 3 phase driver?

    • avayan
      March 21, 2014 at 12:41 pm

      When you say two phase bldc motor, do you mean a bipolar stepper? I know there is a way to do this, but it is highly convoluted and I don’t even bother with it considering the alternative, to use two full H Bridges, is way easier to implement. Or do you mean a single phase BLDC, perhaps?

      • Ahm
        March 21, 2014 at 3:43 pm

        Hi Avayan,

        I have some BLDC step motors, some of which are bipolar and rest are unipolar.All are 2 phase and most are having 4 wire with a few having 6 wire with a center from each coil. the following link shows the data sheet of the motors.





        • avayan
          March 21, 2014 at 4:18 pm

          OK, these are stepper motors. To call them BLDC is in essence correct as steppers are by nature (e.g. construction) brushless. However, they operate differently than BLDC motors. For example, the commutation on a stepper is mostly open loop, whereas BLDC motors are always closed loop (whether with or without sensors). Also, a stepper is manufactured to move in steps (hence the name) whereas a BLDC motor can hardly do the same. They are just two different topologies.

          Like I said before, to drive a stepper with a 3 phase inverter is doable, but I do not recommend going that route. Any reason why you must use a three phase inverter and not a dual full H Bridge? If you told me you had half a million dollars worth of three phase inverters gathering dust then I may see some sort of a justification, but even then I would recommend getting yourself an integrated stepper driver.

          There is a gazillion of them out there! TI, Allegro micro, ST, etc has plenty to choose from. Also, all of the motors you have are “tiny” in size, with the hungriest of them all asking for as much as 2A. A single chip solution can EASILY tackle any of these motors. I wouldn’t even dare to try and use a three phase inverter when I can get a $3 chip to get the job done in seconds. Try looking into DRV8818 and you will be able to control either of the four motors with maximum torque. If you need more microstepping, go with a DRV8825 and you will be set.

          Hope this helps!

          • Ahm
            March 21, 2014 at 5:58 pm

            Thanks Ayan,

            I have a DRV8312 somewhere around. I will try experimenting with that to see the behaviour.

            Thanks again for your help.

  8. Aemika
    July 28, 2017 at 3:08 am

    Dear Ayan,

    Have you any idea about the two phase inverter driving the three phase BLDC motor, with 2 dc link capacitors connected to one of the three phases? Especially the flow of current in the windings and the PWM with the same concept as six step commutation?

    • avayan
      July 28, 2017 at 6:51 am

      Hi Aemika,

      I must admit I have never heard of this concept. Sounds quite interesting, although it is my impression the complexity may not justify saving on a half H Bridge. Of course everything is about cost, but three phase inverters have come down un price quite considerably! Sorry I wasn’t able to offer more information on the matter.

  9. Aemika
    July 31, 2017 at 3:24 am

    Dear Ayan,

    Thank You for the response though.

Leave a Reply

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