interfacing dc motor using l293d

hi there
i want to interface dc motor of rating 12v 1amp with my arduino
i have surf some of the related post.but i am still confused how can deliver 12v with my arduino.
can i power up arduino with 12v externally?
i want to use only single power supply for both
is it possible?
howmuch of voltage do i need to provide to l293d in its vcc?
thanx in advance to all

Hi,

I was wondering the same ... If you already figured out how to interface L293D to Arduino please let me know how to do that. I need to control multiple stepper motors and wondering if I need to use one L293D per motor.

Thanks,
RO

hi
i hav referred this link i think this will be helpful to u too.check it out

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

but my confusuin starts when i read the sentence

"Change your Arduino's power jumper from USB to EXT so that your Arduino runs off 12V power supply"

i just dont get the point.

but i think this link will be realy helpful to you
thanx

There is a good guide here:

The Arduino has a 5V regulator so you can plug anything between 7 to 12 volts into the front DC jack and it should work just fine.

According to the 293D datasheet, you should probably use 5V for VCC1.

Please note a single 293D can only supply 600mA per output so a 1A motor will overheat or burnout the chip if you run it at full blast.

but my confusuin starts when i read the sentence
"Change your Arduino's power jumper from USB to EXT so that your Arduino runs off 12V power supply"
i just dont get the point.
thanx

Arduino can be powered either by connecting it to USB port of your pc or external power source. What this means is connect it through an external power source (12V battery or 12V power adapter) instead of USB as power-through-USB cannot give you 12V to drive your motor.

Thanks,
RO

Try to think of the L293D as having two parts which run at different voltages.
One part connects to the Arduino, and runs at 5V, powerd through the pin called VCC1. Connect this pin to the Arduino's 5V.

The other part of the L293D connects to a power source that can go upto 36V. The pin is called VCC2. This drives the two motors.

The input pins are called 1,2EN, 1A, 2A, 3,4EN, 3A, 4A and connect to the Arduino (or ground or 5V if the Arduino doesn't need to control them).

One motor can connect to 1Y & 2Y.
Anther motor can connect to 3Y & 4Y.

There is no requirement to put the 12V power source into the Arduino's power socket. The 12V can be connected directly to the L293D. The rest of the Arduino can be powered from the USB socket. If you do this you must connect the 12V power source's ground to the Arduino's ground.

The advantage of putting the 12V into the Arduino's power socket is it can power the Arduino too. If you do put 12V into the power socket, and want to power the Arduino (for example so that it can be disconnected from the USB cable) and your Arduino has a little 3 pin header with EXT and USB next to it, you'll need to move the jumper to the EXT position, otherwise the Arduino will not be powered.

In this arrangement, there is still no need to connect the L293D's VCC2 pin to the Arduino's power. It is better not to because the Arduino can supply less than 1A, so the motor you are describing might actually damage the Arduino's voltage regulator.

So the 12V power should run directly to the L293D, and can also run to the Arduino's power socket. Again make sure Arduino ground is connected to the 12V power source's ground.

You can connect the two motor drives inside the L293D in parallel, and hence drive one motor at 1.2A.

HTH
GB

Hi GB,

Can one L293d be used to control two stepper motors (not DC motors) ? Does it have enough pins for it do this ?

Thanks,
RO.

What type of stepper motor have you got?
(If unsure look at Stepper motor - Wikipedia
If it has 4 wires, it is bipolar, if it has 6 it is unipolar.)

One L293D has 4 outputs, so it can control one Bipolar stepper motor.
An L293D has two H-Bridges, which is enough to drive both ends of each phase of a bipolar motor.
[edit]If the power is low enough, you could drive multiple stepper motors off one L293D, but they would all move exactly in phase, which probably isn't what you mean. [/edit]

It could also be used to drive the 'ends' of the phases of a unipolar motor, as if it were a bipolar stepper (I can't remember doing that, but might have, in which case it worked perfectly)

There is no need to use H-Bridges to drive a unipolar motor, it can be driven with transistors/MOSTFETs.

HTH
GB

Hi,

What I have are couple of bi-polar and one uni-polar (which I will end up using as bi-polar motor, mostly) motors. I have looked at various URLS that describe how to do drive a stepper motor using L293D but it looks like if I implement those circuits (http://arduino.cc/en/Reference/StepperBipolarCircuit) what I will end up having is a separate board like here:

http://slscope.co.uk/electronics_projects/arduino/projects/dual_stepper_motor_controller/Motor_Driver_Board/dual_stepper_motor_controller_driver_board.html

I was hoping to buy a stepper motor controller that can drive two stepper motors. I looked at Arduino motor shield

but its kind of expensive (considering Arduino itself is $30 USD) and has more than what I need.

Thanks,
RO.

What is the current consumption of the motors? An L293D might be fine, or it might be too little power.

If each H-bridge of an L293D has enough current drive capability, then I'd suggest you use an L293D/motor.

If you need a bit more current, you could try SN754410 if you protect it from the back-EMF (when the motor acts as a generator) with diodes. It can supply 1A/H-bridge, and is sometimes cheaper (even allowing for some 1A diodes).

Yes, you will end up with something like http://slscope.co.uk/electronics_projects/arduino/projects/dual_stepper_motor_controller/Motor_Driver_Board/dual_stepper_motor_controller_driver_board.html

Look carefully at Ladyada's motor shield. She uses a shift register to effectively increase the number of pins available for controlling motor direction, which might be helpful.

HTH
GB

It's worth reading Ladyada's Motor Shield FAQ. It describes how to drive a stepper, and also mentions soldering a second L293D's on top of each one to increase (double) the current carrying capacity.

If you are making a board yourself, there is no need to actually solder L293Ds on top of each other, you can just wire them up, pin-for-pin.

Anyway, I think Ladyada's advice is helpful.

GB