PDA

View Full Version : Back-emf to RPM (math problem)



totalnoesmio
- 30th August 2015, 15:30
Hello everyone,
I am developing a speed control for brushless DC motor and I need to convert the Back-EMF voltage into RPM.
In the application note AN893 (equation A-8) from microchip is the equation, but I can not understand how to solve it with PBP.


RPM = (1- (ADRESH: ADRESL / 1024)) x RPMmax


I appreciate if someone can help me.


Best regards
Marcos.
(Excuse me for my bad english)

7987

HenrikOlsson
- 30th August 2015, 17:21
All the formula does is convert the ADC result into a value ranging from 0-1 then multiply that by the maximum RPM. When ADC reads 0 you get 0 RPM when the ADC reads 1023 you get max rpm, whatever that is. The formula is great - on paper....

There are several ways of doing it with PBP, the best/easiest way depends on
A) What's the maximum RPM of your motor
B) What's the ADC Reading (back EMF) at that speed?

Example:
If the maximum speed is 5000rpm and the ADC returns 1023 (full scale) at that speed then RPM = ADC_Reading */ 1251 should work. So, what's that */ 1251 I hear you ask.....

We want to scale the ADC value (1023) to 5000, to do that we need to multiply the ADC value by 4.8876. We can think of the */ operator as multiplying by units of 1/256 and 4.8876 * 256 = 1251.

/Henrik.

Acetronics2
- 30th August 2015, 17:46
RPM = ((1024 - ( ADRESH:ADRESL))* RPMmax) /1024

depending on the processor used, you'll need to use or PBPL(ongs) or DIV32 ...

Alain

towlerg
- 30th August 2015, 18:52
as 1024 and RPMmax are both constants, do that math at compile time.

George

totalnoesmio
- 30th August 2015, 20:58
Thank you all for responding,
********************
Henrik you are right ... I asked * / 1251?

George RPM monitoring is continuous, therefore I can not do it at compile time.

They all seem to be correct but the easiest way for me is the response of Alain.

If possible I would like Alain explain to me how I get to that equation.

I'll do some tests

Excuse me for my bad english
Best regards

Marcos.