This is my first post,
I’m building a DC motor controller. I’m using an H-Bridge (model L293DN, the one included with the arduino) to control the direction of the motors and PWM to control the speed of the motor. I’ve read around the forums and it seems that PWM is tricky to get right (determining right resistors/transistors).
To avoid having to build additional circuits I plugged digital pin 9 and 10 to the enable(1,2/3,4) input in the
Is this recommended? If not is there a better way to do it?
In the program I put
0 <= motorSpeed <= 255
However, with a 6V (4x1.5V) battery, at motorSpeed < 50, the motor emits a high pitched sound and doesn’t move. As motorSpeed increases the sound disappears and the motor works fine.
Why is this happening? (This also happened when I used the PWM circuit using diode and transistor outside, so it’s not just the H-Bridge fault, maybe it’s the transistors?)
What happened with the H-Bridge, differently from the external circuit, is that the rotation of the wheel is uneven. As if the floor was bumpy causing the car to speed and slow down, this uneven rotation happens is also visible when I lift it.
Any ideas why?