Control different motors at same speed

Hi, I'm currently controlling three motors with encoders (they are all same in specifications) through L298n for each motor, and I need them to run at the same speed, but when I used attachInterrupt() to measure velocity, they are always different to each other despite of having provided the same PWM.
I don't think this is related if PID is applied or not, they weren't rotate at same speed at anytime ( 0- 10 minutes).
I really need some advices. Thank you.

Choose one of the motors as the master then read the rpm of all three and adjust the PID parameters of the two slaves so that they match the RPM of the master

1 Like

Let's take 2 motors that drivethe wheels of a car. When your code determines that one motor rotates faster than the other one, either increase the PWM of the slower rotating motor or decrease the PWM of the faster turning motor.

Even with the same specifiction, they will never rotate at exactly the same RPM.

2 Likes

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.