You are here

RPM measurement.

3 posts / 0 new
Last post
Roger Wolff
Offline
Last seen: 1 year 10 months ago
VESC Original
Joined: 2017-05-24 12:27
Posts: 202
RPM measurement.

Hi, 

Does the firmware somehow keep track of the RPM separately with the HALL sensors? Any idea on how to implement that?

 

My motor COULD turn faster than the battery allows. So when that is almost happening I will set the current to 0, and command three relays to disconnect the motor (two would be enough in theory, but I want to keep the current paths symmetric) But I want to know when it is safe to reconnect the relays again. So it would be nice to use the hall sensors to keep track of the speed of the motor. 

 

 

benjamin
Offline
Last seen: 3 days 19 hours ago
VESC FreeVESC OriginalVESC Platinum
Joined: 2016-12-26 15:20
Posts: 490

While the RPM is below the sensorless threshold the hall sensors will be used for keeping track of speed. If only hall sensors are connected and the RPM is high I think it will jump between using the hall sensors and sensorless in an unreliable way, so the only way right now is to increase the sensorless ERPM to a high value to never go to sensorless. One possible way to fix this is to add a condition to the hall correction to always use the sensors if the BEMF magnitude is below a certain value, for example here:

https://github.com/vedderb/bldc/blob/master/mcpwm_foc.c#L2591

Roger Wolff
Offline
Last seen: 1 year 10 months ago
VESC Original
Joined: 2017-05-24 12:27
Posts: 202

Sounds like a plan.... Btw: a comment say the hysteresis is 5%, while the code does 20....