How to calculate RPMs of a BLDC e-bike motor using its controller?

MisterBill2

Joined Jan 23, 2018
28,490
OK, if the motor does in fact use hall effect sensors and if the sensors do really have the described signals, then it seems that soehow the drive signal is getting into the measurement connection. That is probably due to a problem with the common connection to he hall sensors. It would certainly not be the first time that has happened.
So once again I am going to suggest a capacitive connection with a wire wrapped around one of the motor's three coil drive wires and referenced against the supply negative line. The sweep rate should be slow enough to display a repeating variation in the duty cycle of the PWM frequency, rather than synchronizing on that PWM frequency.
 

Ya’akov

Joined Jan 27, 2019
10,353
Exactly !
And one RPM would be the multiple pole count of the motor .
There is literally no way that a fixed frequency signal could be produced by a magnetic sensor being triggered by a magnet on a rotor that moves at variable speed. This doesn't even address the duty cycle aspect.

The signal being measured can't be the Hall sensor's output, it has to be either an input to the speed control circuit or an output from a circuit using the Hall sensor as input. (Of course, there is still the problem of why you would ever want a PWM output from the motor. The only thing I can imagine, and this is pure groping for meaning, is a signal designed to cascade the speed control to other motors... whatever that would buy you...)

I think there is something basically wrong here that needs to be identified.
 

MisterBill2

Joined Jan 23, 2018
28,490
The explanation by "Y" backs up my statement that there is a flaw in the measurement scheme. Somehow the motor drive voltage is getting into the scope connection, and because that voltage is much greater than the hall device signal, the motor drive signal is all that is displayed.
Because we are given no information about ho the scope connection is made we have no way of suggesting how to avoid the fault.
So all that the TS will get is random guesses.
 

MaxHeadRoom

Joined Jul 18, 2013
30,869
This is one good explanation of PM rotor motors. https://www.digikey.ca/en/articles/how-to-power-and-control-brushless-dc-motors
The only issue I have with the article, is that they use the same term, BLDC, for both AC 3ph and BLDC, of which the later has just two windings only energized at any one time, as opposed to the 3ph with all three windings engaged.
The last half of the article, however, does address the BLDC version.
 

Thread Starter

Mario Marquina

Joined Mar 1, 2023
23
Maybe a daft idea but could you look at the difference between two hall sensor lines on the oscilloscope?
So, I did various tests and the issue, for some reason, was the oscilloscope. After changing it I have a square wave with variable frequency. Knowing the number of poles and the frequency of the square wave, how can I calculate the RPM?
 

MaxHeadRoom

Joined Jul 18, 2013
30,869
See post #8 in order to count the # of poles.
Or use a 'scope to count the number of pulses/rev of one of the feedback/commutation sensors.
 

ericgibbs

Joined Jan 29, 2010
21,622
Hi MM,
Consider the Integer part of the 1-minute count

Say count =8 in 1 minute
= 60Sec * 8 = 480
= 480/5per Rev = 96rpm
.
Say count =9 in 1 minute
= 60Sec * 9 = 540
=540/5per Rev =108rpm
Difference of 108-96 =12rpm
.
Say count =10 in 1 minute
= 60Sec * 10 = 600
=600/5per Rev =120rpm
Difference of 120-108=12rpm

Is a resolution of 12rpm sufficient for your project?

E
 

Thread Starter

Mario Marquina

Joined Mar 1, 2023
23
Hi MM,
Consider the Integer part of the 1-minute count

Say count =8 in 1 minute
= 60Sec * 8 = 480
= 480/5per Rev = 96rpm
.
Say count =9 in 1 minute
= 60Sec * 9 = 540
=540/5per Rev =108rpm
Difference of 108-96 =12rpm
.
Say count =10 in 1 minute
= 60Sec * 10 = 600
=600/5per Rev =120rpm
Difference of 120-108=12rpm

Is a resolution of 12rpm sufficient for your project?

E
Hi Eric! I don’t understand what do you mean for “count”
 

Thread Starter

Mario Marquina

Joined Mar 1, 2023
23
Exactly, if 5 pulses occur/rev for each sensor, then 500 pulses will be registered at 100RPM.
Since the motor has a max velocity of 270rpm, the maximum frequency should be (270*5)/60=23Hz, but the square wave that I observe has a frequency of 90Hz (more or less) even if the motor is running quite slowly
 
Top