How to control the RPM of DC motor on Gopigo


#1

how to control the RPM of DC motor on Gopigo? Do you guys already have function to control the RPM of DC motor with feedback loop?
Please help me…Thanks!


#2

Hi yuangao,
I am not really sure if you can control the RPM precisely of the GoPiGo motors especially when its moving, what we do right now is to increase/decrease the voltage on the motors to control the speed. What you can do is to use the encoders to find out the current RPM and use that to increase/decrease the motor speed.

You can use enc_read() function to read the encoder counts: https://github.com/DexterInd/GoPiGo/tree/master/Software/Python and set_speed(speed) function to set the speed between 0-255.

-karan


#3

Hi,

You should have a look at this awesome tutorial DC Motor Speed Control using Arduino in which they have controlled the speed of Dc Motor using arduino and have also shown how to control its direction.

Thanks.