2013-06-10 08:34 AM
i have a stm32 discovery kit , and i am sensing the back emf of sensorless motor which is driven by other kit. i am using adc with one channel and a timer. the main aim to calculate the period while reading the adc->dr register and starting the counter of timer, i am getting the values while debugging but still not able to think the right code which can calculate the period and ultimately the rpm.... i am starting the counter when adc reads non-zero value and stops at zero. am i doing right.........plz help...
#adc #board #discovery #stm322013-06-10 02:12 PM
The ADC reading will have noise and offset, so getting a reliable zero value will be impossible. You need to assess what tolerances need to be applied to ''zero'' and ''non-zero''. And the results may need to be averaged over several cycles to filter noise.
Calculating RPM is simple math based on timer counts per second, EMF transitions per revolution, etc. Cheers, Hal