Need some help please. I am using PWM output to control a motor driver. I am having trouble with reversal of the motor direction. I have an Arduino UNO hooked up to the IN1 and IN2 pins for motorA using PWM pins 3 and 5 as output. When I set IN1=255 and IN2=0 everything runs smoothly. When I set IN1=0 and IN2=255 the motor does change direction but it feels like its getting some kind of interference and "skips" until it eventually stops dead. If I remove the cable to IN1 while IN2 is at 255 everything runs perfectly. It kind of feels as though there is some signal "creeping" into IN1 even though it's set to 0. I've included a photo of the motor driver I am using. Any help is greatly appreciated.
So please give a link to the data sheet of your driver. Help us to help you ![]()
I have searched for this myself and I cannot find it anywhere ![]()
Next time only buy products coming with data sheet and Arduino library and sample programs.
Perhaps this discussion can help you?

I agree - my bad. I do know the pinout and how to activate all the motors in each direction. The sample is very close to what I have implemented already. Using EN as the analog speed and setting the IN pins to HIGH/LOW to control the direction or stop entirely. The only thing I am having issues with is this weird skipping when both IN pins are connected.
Thank you, I have the pinout and this is exactly how it's wired.
Try it using pin 11 instead of 5, you will have to change the program of course.
This may have something to do with it...and hence the preceding suggestion to switch pin 5 to 11...
The PWM outputs generated on pins 5 and 6 will have higher-than-expected duty cycles....This will be noticed mostly on low duty-cycle settings (e.g. 0 - 10) and may result in a value of 0 not fully turning off the output on pins 5 and 6.
I will give that a bash tonight. Thank you
Hil
What motors are you using? (specs)
How are you powering your project?
Can you please post a circuit diagram, a drawn image will be fine.
A Fritzy will not be fine!!
Have you some test code you use?
Can you post your code, please?
Thanks.. Tom...
![]()
Let me check the previous posters suggestion of changing the pins. If this fails I will do my best to get all of that answered.
Thanks!
I think this did the trick. I actually moved pin 6 to 11 and it seems to be working well. I wonder if it's just an issue if you use 5+6 together. If I use either pin with 11 it works flawlessly.
Thank you for the suggestion!
This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.
