UPDATE: Issue Hall Sensor getVelocity always return 0.00


First of all, thank you for SimpleFOC library. A very interesting project and I’m keen to explore it further.

I am having some issues with my setup. While testing on the sensor_test->hall sensor example, I can get the angle from the sensors but the velocity remains 0.00.


So i tried to check further on every other parameters for HallSensor.h. I could get the full sequence of hall_state (seq 1 > 5 > 4 > 6 > 2 > 3 > 1) and full electronic_sector. However, the getVelocity is still 0.00.

Does anyone have any experience with this?

Thank you.

The issue was with false interrupts due to noise from the hall sensor. It was solved by adding a decoupling capacitor before the input to MCU. It working well now.