Hello I'm struggling with calculation of BLDC motor current. I'm using MP6540 driver for controlling BLDC. I can measure voltage (adc) and after using appropriate formula from datasheet I got current results in all 3 phases. But I'm not sure that results are fine. Adc give new voltage every ~714nS. My question is what I missing, how to calculate current of the BLDC motor when I have 3 reading from 3 phases? I need idea how to calculate current in BLDC motor when I have 3 reading from 3 phases general. Any idea is welcome
1 Answer
You do need to set an ISR for each analog input. The correct timing sequence is subject to PWM pulse driving sequence, amplifier settling time, analog input settling time, sample/hold settling time,...
You may find some articles from STM32, TI, Freescale, using SPWM and similar modulation, when exactly you should take samples, also formulas for computing phase currents.
TI example FOC - (not six step BLDC !!)
Microchip FOC phase currents measurement
If you have a six step commutation, then only one upper and one lower transistor is conducting. 1st ISR is starts when both transistors are on, this enables 2nd ISR a delay time, so that current and amplifier have settled, at 2nd ISR you do take a sample from corresponding phase ADC, this enables the 3rd ISR - conversion end. At 3rd ISR the conversion is finished and you store the value.
-
\$\begingroup\$ After researching on internet I find that FOC is much better then just 6 phases commutation, so your advice is to learn FOC algorithm for controlling BLDC? \$\endgroup\$ Commented Jan 29, 2021 at 10:42