Why do the DC motor with the same PWM block in Arduino giving an output of different direction of motor rotation
Show older comments

I have set both dc motor the same value of pwm, but i kept getting the output different in terms of rotation of the motor. how can i get both dc motor moves forward with the same value of pwm?
3 Comments
Mathieu NOE
on 7 Apr 2023
Are you sure the motors are wired with same polarity to the driver ?
if not, you can simply flip one motor wires and here you are turning in the opposite direction
Noor Amira Ilyanie
on 10 Apr 2023
Mathieu NOE
on 11 Apr 2023
have you tested the motors for example with a simple lab power supply before connecting it to your board ?
maybe the motor supplier has made a mistake on the polarity
Answers (0)
Categories
Find more on Embedded Coder Supported Hardware in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!