Go Down

Topic: H-Bridge + motor speed control (Read 1 time) 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):

http://itp.nyu.edu/physcomp/Labs/DCMotorControl

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,
Kyle

Daniel

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

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.

brainfart

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