I'm trying to drive a BLDC with a microcontroller, a discrete inverter and a sensorless network for feedback. Here's the model I'm using and what ultimatly is my PCBA:

enter image description here

I'm driving this thing open loop right now, just to sanity check the waveforms, etc. Here' what I get when I drive the motor with an 18kHz, 30% duty cycle:enter image description here

Since I expect the commutation sequence to happen like this: enter image description here, this looks correct...So I think I've got that working right.

My question is, why does the floating phase look like it's carrying alot of extra baggage with it? And if that's how it's supposed to be, then at what point would you say the zero crossings are occurring? I was hoping it would look a little cleaner, like from this application note from Microchip http://ww1.microchip.com/downloads/en/AppNotes/01160b.pdf enter image description here See how there's a clear, linear ramp? I'm not seeing that on mine..

Also, I should point out that I'm only PWMing one leg, while the other is tied to a DC voltage (GND in these pictures, althought I have played with leaving VDC connected and PWMing the GND leg, but it didn't make anything into a nice ramp..It just changed the polarity of what I showed in my first pictures).

Also, just for completeness, I've added some closer views of the waveforms...Again, remember, they're running open loop, so there's no feedback...I just switch commutation state on a timer rollover that I was happy with for debug.

Here's a closer look at commutation sequence:

enter image description here

And here's a rising floating phase:

enter image description here

And here's a falling floating phase...I think it's falling...the bottom is rising, though, so maybe I'm wrong...:

enter image description here

Is this right, or am I doing something wrong?


Thanks to the answer below, I am now getting the motor up to speed for 100ms to get the BEMF cooking, and then I'm keeping an eye on the moment my low side of the PWM goes above zero. I then wait a certain amount of dead time and then pull the trigger on commutation advance. This is much better... Before, the motor would run slowly at around 112mA@12V, but now it can easily run up to 7200rpm at 40ma@12V. Loading the motor (by pinching the shaft on the rotor with my fingers) doesn't slow it down at all, it simply increases the current draw as expected.

Pics or it didn't happen :

enter image description here

enter link description here

  • \$\begingroup\$ That looks like it is transformer action between coils. You will always pick up that. Check the phase currents instead of voltages. \$\endgroup\$
    – Trevor_G
    Oct 20, 2017 at 16:15

1 Answer 1


Yes, the plots are making sense, but your imposed PWM is not 'in phase' with the BEMF voltage.

As you stated, you are driving this open loop, which is much more like a stepper motor, so your 'positive' will not line up with the BEMF positive. When you start using your sensor feedback, then your BEMF will look much more like the example.

Keep in mind that the linearity of the BEMF is strongly dependent on the motor. Don't be alarmed to see some curvature:

BLDC waveform

Notice that this waveform is 'in phase', meaning that the drive is applying a high to this phase as the phase is peaking. That is what you want. Right now, you are applying it at a different time, so you are out of phase.

  • \$\begingroup\$ Thanks, that's good to hear. When you say PWM is not in phase, you're talking about the high frequency pulses, not the commutation frequency, right? And can you clarify the last Sentences? Not sure by "the drive is applying a high to this phase as the phase is peaking." thanks for taking the time to help me out \$\endgroup\$ Oct 20, 2017 at 16:32
  • \$\begingroup\$ No problem. On the waveform that I linked, the drive applies power to the phase about 1/3 through the pic. Notice that the waveform has a very sudden discontinuity between the curved area and the hard on. That is the drive applying a high state to the phase, albiet tempered through PWM action. \$\endgroup\$ Oct 20, 2017 at 16:34
  • \$\begingroup\$ Ok, so if I'm reading you right, it looks like I have to wait for the Bottom of the waveform to stop going below zero (sample during pwm off) and then, wait a prescribe period of time and then change commutation state? Lather, rinse, repeat? And you also are telling me that I can't see these right now, but they're there somewhere? Can you suggest what parameters for the inverter driver you would change to at least be able to see them, open loop? If I could get the right waveform to appear, even if it's contrived, that would make debugging the feedback code a heck of a lot easier! \$\endgroup\$ Oct 20, 2017 at 16:40
  • \$\begingroup\$ @testname123 I was on the road when you wrote this, sorry for the late response. Transitioning from open-loop to closed-loop is always difficult the first time. You can measure BEMF at the top of the PWM or at the bottom, doesn't matter, so long as you do it at the same place both times. I prefer the top. When you detect zero crossing (when BEMF > Vbus/2), then wait a time based on the speed and then commutate. For debugging, the motor will run just fine without the timed wait, it just won't be as efficient... just commutate when you detect a zero crossing. That should help! \$\endgroup\$ Oct 24, 2017 at 2:09
  • \$\begingroup\$ Thanks for the feedback! One question, however... If you notice the second downward BEMF waveform, it never gets above Vbus/2...is that a failure of the open loop? I've tried playing with the open loop commutation-advance speed and the duty cycle, but I have to go impractically slow and at a huge duty cycle to get the tail end of the top of the BEMF to go over Vbus/2. \$\endgroup\$ Oct 24, 2017 at 2:52

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.