Electronic – arduino – 2 DC motors connected in parallel to H-bridge move with different speed

arduinoencodermotorparallelspeed

First of, since I come from web programming world, I'm pretty new into electronics and maybe some of the things I'm doing are wrong or could be done better, so any hint is highly appreciated.

I'm building a robot/crawler with 4 wheels. Each wheel is directly connected to a 6V 210RPM Motor DC with encoders.

I have a dual-way motor driver with 2 H-bridges

The driver is powered from an LiPo 2S battery 7.4 V

enter image description here

2 right motors are connected in parallel to one H-bridge and 2 left motors to the second H-bridge of the driver.

I'm controlling the motors through an arduino UNO by sending PWM signals to the PWMs of the driver.

Since the motors have encoders, I could read the rotations of one encoder from each side (one from left and one from right) and adjust dynamically the PWM for the other side, by taking the slower side as a master and the faster one as a slave, to force them move in sync.

The problem I have is that the motors which are connected in parallel move with different speed, although they receive the same voltage / PWM signal. Also their specs are identical.

I understand that mechanically they are not identical and different factors can affect their performance, but how to solve this problem? Is it possible?

Here are my ideas:

  • Does it make sense to read the encoder values from both motors connected in parallel? I think not, because if I'd try to lower/increase the PWM – both would be affected and the faster motor would still be faster.
  • Maybe attaching a resistor to the faster motor and trying to find a good value for the faster motor to slow it down up to the moment when it rotates in sync with the other one. But then this would work only if their speed difference is also proportional.
  • Last idea is to match them by the least speed difference and to connect in parallel those pairs which are closest to each other.

Maybe there are other proper ways to solve the problem which I have no idea of. But from the big amount of similar projects I found in internet, I guess they have a solution for this. Or maybe nobody cares that the front wheel of the right side would rotate slower than the back wheel from the same side?

Best Answer

DC Motors will always run at different speeds.

If you have two motors in parallel on one driver and are only sensing speed from one of them then the other motor's speed will be unpredictable if and when the motors are not mechanically connected. There is no real way to correct that using electronics without adding separate drivers and feedback for each motor.

If the motors are driving wheels that touch the ground and the torque difference between them is not great enough to cause the "tires" to slip this may not be a problem since the contact with ground will act as a mechanical coupling between the motors. Note: That is how the drive wheels on your car stay at the same speed despite going through a differential gearbox. Loss of ground contact can cause some odd effects though.

Otherwise it is prudent to run a timing belt, or other mechanical linkage, between the motor shafts to keep them together. If your crawler has tracks this is a non-issue.

In some cases it may be possible to share the driver over both motors. That is, have a switching arrangement that channels power to each motor a percentage of the time, giving more percentage to the slower motor. However, that would of course reduce the performance of each motor by 50% when both are at speed. But that gets complicated and does not buy you much compared to having individual drive to all four motors.