Society of Robots - Robot Forum

Electronics => Electronics => Topic started by: Trumpkin on June 14, 2008, 03:59:47 PM

Title: l293 motor driver
Post by: Trumpkin on June 14, 2008, 03:59:47 PM
I should be able to use this diagram for controlling motors with the $50 robot, and other microcontrollers, right?
Title: Re: l293 motor driver
Post by: Admin on June 18, 2008, 09:34:24 AM
So you decided to ditch the servos, eh? :P

Yeap, that diagram will work.
Title: Re: l293 motor driver
Post by: Webbot on June 18, 2008, 01:28:12 PM
You need to add 4 diodes as well to prevent the motor frying the chip!! If your current requirements are low (say 500mA) then use the L293D instead - this has got the diodes built in.  Check the datasheets and you will see the L293 can provide higher current but you will need to add the diodes yourself - in which case look at the L293D datasheet to see how the diodes are connected.
Title: Re: l293 motor driver
Post by: Trumpkin on June 18, 2008, 02:57:21 PM
Okay! thanks 
Quote
So you decided to ditch the servos, eh?
No, I haven't, it just seems like I always have dc motors laying around that I would like to use. Here is a new schematic I found http://www.freewebs.com/isuru-c/motor_driver.htm but I'm not sure what pins go to the microcontroller.
Title: Re: l293 motor driver
Post by: Trumpkin on June 20, 2008, 03:24:10 PM
It seems like there should be 3 pins per motor that go to the microcontroller but I only see 2 pins per motor.
Title: Re: l293 motor driver
Post by: Webbot on June 20, 2008, 06:07:18 PM
Not quite sure what you mean. The circuit diagram you attached showed 2 connections per motor - where does the '3 connections' come from?
Title: Re: l293 motor driver
Post by: izua on June 20, 2008, 06:27:36 PM
there are three pins on input, each pair of push-pull drivers has an enable (pwm) signal :P
Title: Re: l293 motor driver
Post by: Trumpkin on June 21, 2008, 07:47:34 AM
Quote
Not quite sure what you mean. The circuit diagram you attached showed 2 connections per motor - where does the '3 connections' come from?
It seems like there should be negative, positive, and signal wires that go to the microcontroller for each motor, like a servo, but I only see 2.
Title: Re: l293 motor driver
Post by: Webbot on June 22, 2008, 07:44:00 AM
Quote
Here is a new schematic I found http://www.freewebs.com/isuru-c/motor_driver.htm but I'm not sure what pins go to the microcontroller.

The diagram should show that pins 1 and 9 are input 'enable' pins. These give you the third input from your microcontroller and can be pulsed (PWM) to change the speed
Title: Re: l293 motor driver
Post by: ixarka on June 22, 2008, 10:21:15 AM
Quote
Here is a new schematic I found http://www.freewebs.com/isuru-c/motor_driver.htm but I'm not sure what pins go to the microcontroller.

The diagram should show that pins 1 and 9 are input 'enable' pins. These give you the third input from your microcontroller and can be pulsed (PWM) to change the speed

Alternatively, if you want to save an output pin from your microcontroller, you can wire the enable to +5V and use PWM on either of the other two pins to control speed. To turn the motor off, set both pins either high or low.
Title: Re: l293 motor driver
Post by: izua on June 22, 2008, 10:43:00 AM
enable = pwm
:P