Software speed control
November 21, 2010
Okay, here's the deal. I am trying to think of a way, to control the speed and acceleration of my robot.
Firstly, what data I will have would be form the encoders and I am also able to control the pwm to the motors. With these I have to tackle two things. Knowing the actual speed and controlling it. andd controlling the acceleration. Details on the gearing and encoders first.
I have a 12 tooth pinion gear on the motor shaft which interlocks with a 48 tooth spur gear with the 30mm wheel infront. As for the encoders, they are 512 clicks per revolution (Faulhaber 1717) . I know the gearing will affect the encoder counts etc, but idk how.. hope you guys can help with that.
So on to speed.
I have a very very very VERY rough idea on how to... wait. i dont. hence i need your help :)
As for acceleration. I have a better idea on how to. Using the formula accel = (finspd - initspd)/time taken
say i want accel to be 5000m/s/s and i know the final and initial speed. Thus I am able to find the time taken. And with that. I divide the increase in pwm (to whatever speed i want) evenly. Will it work or is there a better and more efficient way?