# L293D voltage

Discussion in 'General Electronics Discussion' started by Giorgos, Apr 20, 2015.

1. ### Giorgos

28
1
Apr 6, 2015
Hello people! I need a little bit help about L293D. I am about to connect a 12v DC motor on a l293d ic like the image below..

I am connecting the Input 1 on an Arduino board which gives +5v signal and Vcc to a +12v power supply.
My dummy question is what voltage does the Output 1 gives? 12v or 5v?

Thank you!

2. ### Supercap2F

550
150
Mar 22, 2014
The High level output voltage for the chip is typically Vcc2 - 1.4V (see VOH in the data sheet). And you shouldn't hook Vcc1 up to 12V - In the data sheet it has a maximum rating of 7V. Vcc2 is where you would hook up 12V, and I would hook up Vcc1 to 5V since that is going to be your logical high voltage (just remember not have a high voltage of more than 5V or you might damage the chip).
Dan

3. ### Giorgos

28
1
Apr 6, 2015
It is may be my fault, but i read in the datasheet that "The L293 is designed to provide bidirectional drive currents of up to 1 A at voltagesfrom 4.5 V to 36 V."
I noticed later that (as you said) the range is 4.5 to 7..!
So, what am i supposed to do, that i can take 12v from Output 1 and Output 2?

Thank you!

4. ### Supercap2F

550
150
Mar 22, 2014
Hook Vcc1 up to 7V or less, and hook Vcc2 up to 12V.

You won't actually get 12V at the outputs if you use 12V at Vcc2, because in the data sheet it says the high level output voltage is Vcc2-1.4V. So you'll really get about 10.6V (Which should be fine since motors are usually pretty forgiving ).
Dan

5. ### Giorgos

28
1
Apr 6, 2015
I think 10.6v is good enough.
What I am trying to do is to use a DC motor as a stepper one by giving delays betwwen Highs signals, if you know what i mean! I tested it via arduino and worked perfectly, although arduino gives 5v.
So i decided to use L293D just to give the 12v which is needed for the motor.
I am wondering if this is the right way to do it.

6. ### Supercap2F

550
150
Mar 22, 2014
Unfortunately, you won't be able to get repeatable accuracy by using a motor like that instead of a stepper (i.e. If you pulse it five times forward, and then five times backwards, it won't be anywhere near where it started). If you need repeatable accuracy, then it would be best just to go with a stepper motor.

Do you have any information on the motor? If it draws less current then the arduino is capable of sinking/sourcing then you might be able to directly drive it from the arduinos outputs with some diode protection.
Dan

7. ### BobK

7,682
1,686
Jan 5, 2010
That will work about as well as using a hammer as a screwdriver.

Bob

Last edited: Apr 20, 2015
Supercap2F likes this.
8. ### Giorgos

28
1
Apr 6, 2015
Thank you for the answers! The....... hammer and the screwdriver example..! Oh! I'll have it in mind Bob!

I started developing the following CNC plotter from old optical drivers, but as a begginer, I didn't have in mind the difference between dc and stepper motors..

So now, as you can almost see I have 2 dc motors and one stepper motor!

The part with the pen has a dc motor-no problem..! l293d output1=HIGH, pen is down.. output2=HIGH, pen is up!

The part with the (lets say) x axis has a stepper motor! ok with that, i will handle it just like steppers.

BUT the part with the (lets say) y axis has a DC motor! What i supposed to do?? Now the construction is already finished! My idea was to use the motor as a stepper (as i said before), using delays.
Any suggestions for a good solution without changing the whole part??

9. ### BobK

7,682
1,686
Jan 5, 2010
The only way you can make a DC motor position something accurately is by using feedback. The simple way to do this is to have the part it is moving move a potentiometer geared such that the range of motion of the platform corresponds to the range of the pot. Then you use the pot as a voltage divider, read the voltage and that tells you where the platform is. This would still be unlikely to be as accurate as a stepper motor, but this method was used on plotters for a long time, so it might work for you.

Another way to do it is with an encoder on the motor, this is a device that will send a pulse for each fraction of a rotation, say 16 pulses per rotation. You count pulses to determine the position. If the encoder is before the gearing down, then it can be quite accurate.

Still, the easiest way might be to replace the motor with a stepper!

Bob

Supercap2F likes this.
10. ### Giorgos

28
1
Apr 6, 2015
Searching for a stepper motor to replace the dc motor on the part, with exactly the same dimensions is like looking for a toothpick in the heart of Sahara..! Usually every company has special requipments for their products.

Another technique i thought is that while x axis is moving step by step, y axis (the one with the dc motor) is moving really slow and so the pen has the time to go up and down when is needed. But the difficulty here is how to let the motor move so slow.. By giving low voltage it will not have the power to move the whole device.

SOS!! HELP!!

11. ### BobK

7,682
1,686
Jan 5, 2010
Well, if you cannot fit a stepper there, and you don't like my other two suggestions, I will give you a third one.

Take out the motor and connect a stepper through a flexible shaft.

Bob

12. ### Giorgos

28
1
Apr 6, 2015
Bob I am about to try the suggestion with the encoder..! It is a pretty good idea.

Thank you all!