Go Down

Topic: H-Bridge + motor speed control (Read 2400 times) previous topic - next topic


Hello, I am relatively new to Arduino, I just finished the tutorial on controlling the direction of a motor using an H-bridge (L293E or SN754410):


Everything worked out fine, but now I am hoping to use the same or similar circuit to control the speed of the motor.

Using the existing set-up/tutorial is there way to do this by using Arduino + photocell/pot, etc?

Thank you,


Feb 26, 2007, 12:08 am Last Edit: Feb 26, 2007, 12:10 am by Daniel Reason: 1

the logical thing to do would be:
- set enable pin high
- set one control pin low/high depending on direction
- pulse other control pin with analogWrite(controlpin, value) for speed control.

You might also just be able to leave the control signal as is, and pulse the enable pin with the analogWrite PWM signal.

Watch out for heat. With all that swtiching going on, the motor will throw a lot of back emf into your driver chip and the protection diodes.
Don't be surprised if it gets really hot or self-destructs as a result. The solution to this is good bypass capacitors and sometimes even low-value inductors in series with the motor.  A big wheelchair-type motor will take some careful design for the switching noise. Small hobby-type motors will be no sweat.


I seem to remember that servos can be modified for continuous rotation, and speed can then be controlled by the position signal duration.


Thank you, I was able to control the motors speed with the analog PWM function. The chip isn't getting too hot either. the help was much appreciated.

Go Up

Please enter a valid email to subscribe

Confirm your email address

We need to confirm your email address.
To complete the subscription, please click the link in the email we just sent you.

Thank you for subscribing!

via Egeo 16
Torino, 10131