I'm running a BLDC motor and I'm working on my own Software. I want to run the BLDC Motor with field oriented control, that's why I need a precise electrical angle. I'm using three hall sensors in the motor for angle and speed measurement. I'm running at 30Hz electrical frequency for example in open loop control d-voltage (q-voltage=0) setting and I'm alinging the Hall sensed on the angle that I'm actually using for the open loop control. So it's a perfect alligment. When I'm then going to 100Hz, my angle alligment or my angle offset is not right anymore. I have a difference of around 10%. When I'm looking at my hall states I also can see that there is a slight shift with higher or lower frequency of hall state detection. Does somebody have a explanation for this behaviour?


Edit: Phase Angle are being detected with reading out GPIO Pins. The Change of these Pins (falling edge or rising edge) are detected with a timer modules running at 200MHz

Edit2: Added some photos of my scope readings. enter image description here HallState Angle 20Hz

enter image description here HallState Angle 30Hz

enter image description here Interpolated Angle 30Hz

enter image description here Interpolated Angle 20Hz

  • \$\begingroup\$ How much phase delay? And is it a fixed time delay? Or does it somehow scale with RPM? \$\endgroup\$
    – DKNguyen
    May 2, 2022 at 18:58
  • \$\begingroup\$ My Offset is a fixed value I calculate on the HallStates. But just looking at the hallstates you also wil find an offset thats changing with rpm. So my hallstates are dedected earlier, respectvely later with changing rpm. Is that a common behaviour with "cheap" hall sensors or bldc motors? \$\endgroup\$
    – xone
    May 2, 2022 at 19:13
  • 1
    \$\begingroup\$ @xone Telling me that your offset is changing with RPM does not help me when I am asking if the delay is a fixed time interval. A fixed time delay will be a phase angle delay that varies with RPM while a fixed phase angle delay will be a time delay that varies with RPM. \$\endgroup\$
    – DKNguyen
    May 2, 2022 at 19:27
  • \$\begingroup\$ "I'm alinging the Hall sensed on the angle that I'm actually using for the open loop control." - exactly how are you aligning them? \$\endgroup\$ May 3, 2022 at 7:08
  • \$\begingroup\$ You can actually find some pictures here: imgur.com/a/S9ZYfGI - Its the interpolated angle and its the actual Angle refering to the six hall states. In green its the angle I use for open loop control and spin the motor (using d-axis). Yellow is my anlign angle. I do the alignment when the green angle changes from 2*pi to zero and check the offset of my interpolated angle. But you can see that also the Hallstates have an offset when going from 30Hz to 20Hz \$\endgroup\$
    – xone
    May 3, 2022 at 17:34

1 Answer 1


Looking at your oscilloscope waveforms, it looks to me the Hall sensors are not placed at equal intervals in your motor.

The reason you don't see that effect at lower RPM is that the timer count values are very high for every Hall change.

Thus, small variations are not significant, but at high RPM, the timer count value is smaller and irregularities will be obvious.


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.