This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

how to coast while using Speed Controller?

Wondering if anyone has any thoughts on how to approach coasting within a speed controller, and then smoothly re-engage. I dont want to completely disable the controller, since I assume that would mean it would stop sending PWM and so stop tracking the motor angle.

My method till now has been that if speedRef is zero or less than actual speed, I set CTRL_setSpd_max_pu a to a low value like _IQ(0.1), and otherwise keep it at _IQ(1.0)

This has worked fairly well. The controller keeps track of the motor angle and the resistance isnt too bad. Certainly could be better but acceptable. The problem is that when SpeedRef is raised above actual speed,  the skateboard shortly but dramatically decelerates, which is unpleasant to ride, before accelerating up as it should.

Thanks

  • FAST can track the angle even with PWMs disabled. As long as the controller is running.

    I think what you want to search for is "flying start" on this forum. There are some posts by Jorge Zambada. What is described is used in fan applications when airflow may cause the fan to already be spinning, so you need to engage smoothly....you should be able to do something similar for your application where the motor may already be spinning due to momentum or gravity.
  • Was able to implement Jorge's code. Works great. Thanks very much