Electronic – How to make two motors spin at the same speed

dc motormotorroboticsspeed

I am currently using two identical motors to drive a robot. The motors are both controlled using relays but one of the motors is spinning faster than the other. How can I slow down the faster motor to turn the same speed as the slow one?

Best Answer

The motors are mechanically different, so you can not get them to move at the same speed at the same voltage. This is a problem if you're driving them with relays since relays tolerate a very slow frequency, so they can not be PWM'ed.

However, if you're willing to change your design and switch to power mosfets you can basically split the problem in three:

  • Measure the speed of each of the motors
  • Determine which of the two is moving faster
  • Adjust their speed accordingly.

For the first part, you will be needing a rotary encoder. There are plenty of types and can be home made.

If you're using an Arduino, reading the information from the rotary encoder and determining which is faster and which is slower should not be a problem.

Lastly, you can adjust the speed of the motors using PWM.