Maker Pro
Maker Pro

Help with BLDC SENSORLESS motor control

MoHo98

Dec 6, 2022
3
Joined
Dec 6, 2022
Messages
3
Hey there!

we tend to drive a specific bldc sensorless motor using two different algorithms.

both of them are based on zero crossing detection, a vey simple approach.

the algorithm one detects ZCs by analog comparators and of course its corresponsive interrupts to apply the next step of commutation.

the algorithm two detects ZCs using ADC and then comparing the BEMF to VBus/2.
Let me explain how this algorithm works.

firstly, an arbitrary number of steps applies to the motor in order to drive it in open loop mode. After that the algorithm switches to the closed loop mode. then speed is estimated using a timer

the speed is estimated by measuring the time between the point of ZC detection and the instant of the previous commutation step.

here is my broblem. the max speed achieved by algo.1 differes from algo.2 while the applied duty cycle is the same(for both almost 100%)

how could it be possible? I know that the speed is related to duty cycle so I tought the max speed would be the same no matter which algo I used.

I would be grateful if you could help.
 

kellys_eye

Jun 25, 2010
5,296
Joined
Jun 25, 2010
Messages
5,296
What speed does your ADC work at - it probably isn't 'instantaneous'.
 

MoHo98

Dec 6, 2022
3
Joined
Dec 6, 2022
Messages
3
What speed does your ADC work at - it probably isn't 'instantaneous'.
Thanks for your reply
The cpu frequency is 8MHz and the ADC prescaler is 8 so its clock is 1MHz.
The maximum speed I wanna reach is almost 3000RPM.
My Microcontroller is STM8s if it helps.
I use the single mode of its adc for sampling.
Could you please be more specific?What do you mean by "instantaneous"?
I suppose it's not possible to use the continuous mode of the ADC because of the way the algorithm works(avr444 application note)
 

kellys_eye

Jun 25, 2010
5,296
Joined
Jun 25, 2010
Messages
5,296
What do you mean by "instantaneous"?
It takes a finite amount of time to deliver a conversion - it may be that even the slightest delay will affect speed. Try using the ADC in it's fastest conversion mode and see what difference it makes.
 

MoHo98

Dec 6, 2022
3
Joined
Dec 6, 2022
Messages
3
It takes a finite amount of time to deliver a conversion - it may be that even the slightest delay will affect speed. Try using the ADC in it's fastest conversion mode and see what difference it makes.
Hey again.
Based on what you said I tried using the adc in it's fastest conversion mode. For instance I changed its clock from 1MHz to 2MHz
as a result the conversion takes a shorter amount of time(14 * 1/2 us) but it doesn't improve the performance it even escalated.
the motor goes into stall mode and is unable to start rotating.
the same happened when I decreased its clock! it seems that 1MHz is the optimized value.
I'm wondering if the low pass filter used for filtering phase BEMF voltage can cause a delay.
could it be the reason why I detect ZC points inaccurately?
Do you have any idea that can help me compare the true zero crossing point with the point I assume as zcp?
 
Top