Hi, i want to drive a motor with PWM and have connected it to two pins 10 and 11 on my Arduino UNO.
When i give 0 to 10 and 255 to 11 it runs let's say clockwise with full speed. When i give 255 to 10 and and 0 to 11 it runs counter-clockwise with full speed.
Everything's fine so far.
The problems start when i want to make it move slower by supplying a lower value to the PWM pins. If i give anything less than 255 to 10 (while giving 0 to 11) it doesn't run. However 11 works as it should driving the motor at different speeds.
I tried the other PWM pins and even if i'm not sure i tried all the combinations apparently only pin 11 gives me the desired and predicted result.
Its a 3-die device, controller plus two power MOSFETs in a single epoxy
case.
What value of Rsr is being used? It should probably be quite low to allow
PWM to be most efficient. How are you driving all three digital signals, IS, IN
and INH?
How have you decoupled the motor supply?
It takes 4 inputs for each motor. Ground, 5V and two control signals (that come from the arduino's PWM ports). I explain how we drive it in the first port i think. (one port gives 0 and the other a value which will define the speed)
@MarkT unfortunately i am not sure how to answer your questions. Maybe explain a little more what exactly you are asking, for a beginner like me. :}
The strange thing is that only ONE of the ports works exactly as it supposed to (so we successfully drive the motor, there is no coding error) regardless where we connect it to, but the rest don't.
I can't make any sense of you lovely colourful picture. Could you provide a photo of a drawing of how everything is wired up. That would probably answer @MarkT's question also.
When you say one of the ports works as it is supposed to it would also be helpful to see that in the context of the wiring arrangements. Are you saying that you can move one pair of motor control chips to a different Arduino connection and it still works properly whereas the other pair won't work properly regardless of where they are connected. (That sounds like a fault in how the pair is wired up - is it possible one of the mosfets has blown?).
alright, the first it's our drawing, where M is the motor. we actually connect the arduino to the ports in the bottom socket. (IN1 & IN2). Excuse one mistake in the registers' resistance (4.7K instead of 470?), the actual wiring and design is exactly the same as in the second picture. Hope that sheds some light!
P.S. We tried driving the motor with an stc12c5a microcontroller and it worked as it should, so there's no hardware error on that side.