Go Down

Topic: Splitting AC-DC wall-adapter power supply to power arduino and stepper motor (Read 928 times) previous topic - next topic

kotnico

Hi,

Its my second message on this forum, i hope it is in the good section, also english is not my native language so sorry in advance !

So i want to use an AC-DC 12 Volts 1.7A to power a stepper motor and an arduino UNO so i can plug my project using only one cord.

The stepper motor will use an h-bridge (IC driver L293D) controlled by the arduino. I have readed alot in others topics about it, and what i found are sometime contradictory. Some people said that i can only splitt the circuit in parralel so i will got bot 12 volts for the L293D and 12 volt entering the arduino using the jack port, other said i cant. In one topics it said that i need to use transistor with a parralel circuit, but it didnt said where to put it and which type to use.

I know that there are better way to power it and having two supply will be best.

But with the current crisis, getting stuff is really hard for me and i want to continue my projet with stuff that i already have. So basicaly basics electronics stuff.

So is a parralel circuit good enought ? Should I protect the circuit going to the Arduino in case there is a sudden change in voltage due to the motor and how to do it?

i hope i'm clear enough, if not , please ask i will give more detail.

Link for stepper motor:

https://www.digikey.ca/product-detail/en/sparkfun-electronics/ROB-09238/1568-1105-ND/5318747

Link for the L293D h-bridge:

https://www.banggood.com/5pcs-L293D-L293-L293B-DIP-SOP-Push-Pull-Four-Channel-Motor-Driver-IC-p-944989.html?rmmds=myorder&cur_warehouse=CN

SteveMann

The Uno typically draws one amp, and the spec for the stepper motor says it takes 330 mA.

If your power supply is of good quality, then you are probably OK.

While you can power the Uno with 12V into the barrel jack, the on-board regulator has to drop that to 5V.  This regulator is not heat-sinked.  You can run it this way for a few hours (I have) but if you plan to have this running 24/7 then the Arduino should have its own 5V supply.

Fritzing pictures are NOT schematics. I don't speak Fritzing.

Please do not ask for help by PM. I will not respond. If you need help, post a question on the appropriate forum.

Click on Add Karma if I helped you.

kotnico

While you can power the Uno with 12V into the barrel jack, the on-board regulator has to drop that to 5V.  This regulator is not heat-sinked.  You can run it this way for a few hours (I have) but if you plan to have this running 24/7 then the Arduino should have its own 5V supply.


thank you for the answer, if i understand corectly, i can split my power suply in parralel circuit, one branch will go for the L293D to power the stepper directly with no other component on this part of the circuit and the other  branch will go into the arduino using the barrel jack.

What you are saying is if my arduino will be plugged 24/7 ( thats the case) i need to put a voltage divider on the branch going to the arduino to drop the voltage to 5V, that way i will not have any issue ?

thank you again !

Paul__B

the other  branch will go into the Arduino using the barrel jack.
As Steve says, not a good idea!

What you are saying is if my Arduino will be plugged 24/7 ( that's the case) i need to put a voltage divider on the branch going to the Arduino to drop the voltage to 5V, that way i will not have any issue ?
Not a "voltage divider"; a switchmode "buck" converter feeding the 5 V into the "5V" pin on the Arduino and any other device requiring 5 V.

kotnico

Not a "voltage divider"; a switchmode "buck" converter feeding the 5 V into the "5V" pin on the Arduino and any other device requiring 5 V.

thank you, but as i said in my first message, with the ongoing crisis, i'm not able to buy any other equipment that i already have. I dont have any buck converter and i've look and i think i dont have all the component to made one by myself.

Why cant i use a voltage divider, is that not its purpose to drop voltage ? can i use a potientometer ?

And why the arduino can take up to 12V if there is not heat sink that can support it when it dropped voltage to 5V ?

SteveMann

thank you, but as i said in my first message, with the ongoing crisis, i'm not able to buy any other equipment that i already have. I dont have any buck converter and i've look and i think i dont have all the component to made one by myself.

Why cant i use a voltage divider, is that not its purpose to drop voltage ? can i use a potientometer ?

And why the arduino can take up to 12V if there is not heat sink that can support it when it dropped voltage to 5V ?
A resistor voltage divider is also a current limiter.  It's good for high-impedance inputs, but not for a power supply.

Why are you not able to buy a bucking voltage converter?  Amazon.com doesn't work where you live?

But to your last question.
Arduino was designed as an educational tool and expected to be used for brief periods, say a classroom.  The voltage regulator was included to give the new user a lot of flexibility to power the board. Most development kits come with a 9V battery to plug into the barrel connector.

How brief? I don't know.  I have a project that is powered by a 12-V wall-wart into the barrel jack of an Uno that has run for a few hours without a problem.
Fritzing pictures are NOT schematics. I don't speak Fritzing.

Please do not ask for help by PM. I will not respond. If you need help, post a question on the appropriate forum.

Click on Add Karma if I helped you.

kotnico

A resistor voltage divider is also a current limiter.  It's good for high-impedance inputs, but not for a power supply.

Why are you not able to buy a bucking voltage converter?  Amazon.com doesn't work where you live?

But to your last question.
Arduino was designed as an educational tool and expected to be used for brief periods, say a classroom.  The voltage regulator was included to give the new user a lot of flexibility to power the board. Most development kits come with a 9V battery to plug into the barrel connector.

How brief? I don't know.  I have a project that is powered by a 12-V wall-wart into the barrel jack of an Uno that has run for a few hours without a problem.
I understand for the voltage divider thx :)


about the other subject, the arduino uno faq page said:

'' The board can operate on an external supply from 6 to 20 volts. If supplied with less than 7V, however, the 5V pin may supply less than five volts and the board may become unstable. If using more than 12V, the voltage regulator may overheat and damage the board. The recommended range is 7 to 12 volts. ''

so why can i put into it 5V? the board will not be unstable ?

How many hours is ''few hours ? I may need to power it 3-4 hours in the morning after what it will not run till 5PM for 2 hours for every day. Is that too much for the arduino on the long term ?

thank you

SteveMann

I understand for the voltage divider thx :)


about the other subject, the arduino uno faq page said:

'' The board can operate on an external supply from 6 to 20 volts. If supplied with less than 7V, however, the 5V pin may supply less than five volts and the board may become unstable. If using more than 12V, the voltage regulator may overheat and damage the board. The recommended range is 7 to 12 volts. ''

so why can i put into it 5V? the board will not be unstable ?

How many hours is ''few hours ? I may need to power it 3-4 hours in the morning after what it will not run till 5PM for 2 hours for every day. Is that too much for the arduino on the long term ?

thank you
The Arduino is a five-volt device.  If you have a well-regulated 5V supply, then you can put that into the +5V pin. No more, no less.  If you put 5V into the Vin pin, the power still has to go through the regulator, and the regulator needs a minimum of 7V to work. I really don't know how long is too long. There is no spec. I just know that I have a project that is powered by a 12V wall-wart for three or four hours without problems. YMMV.

Fritzing pictures are NOT schematics. I don't speak Fritzing.

Please do not ask for help by PM. I will not respond. If you need help, post a question on the appropriate forum.

Click on Add Karma if I helped you.

WattsThat

An Uno with no external loads should draw approximately 100mA from the 5 volt supply. As mentioned, you should be able to power the Uno from 12 volts into the barrel jack without difficulties if and only if the 5v supply has no additional loads on the 5 and 3.3 volt outputs.

How do you know if 12 volts input is okay? Simple. So long as the large three terminal 5 volt regulator between the usb and barrel jacks is only warm to the touch, everything is fine, carry on. If it gets too hot to touch (>45-50C), you'll need to reduce the 12 volts going into the barrel jack to lower the  power being dissipated by the 5 volt regulator. One method that doesn't involve buying a buck regulator is to place about six 1N400x series diodes in series with the supply - as each diode will drop the voltage by approximately 0.6 to 0.7 volts each. 7.5 to 8 volts input to the barrel jack is the ideal voltage for the regulator.

If you have an Uno clone, there may be two regulators, a  5 volt  and a 3.3. They both should only be warm to the touch, too hot to hold your finger on it requires a fix of some kind.
Vacuum tube guy in a solid state world

wvmarle

The stepper motor will use an h-bridge (IC driver L293D) controlled by the arduino
Another terrible idea.

First of all the L298 and family should be retired, there are far better H-bridges out there nowadays. It's from a bygone era, when a 3-4V loss on your H-bridge was simply part of the game and considered normal. Not any more, modern H-bridges do more current in a smaller package without the need of a heat sink. Then the resulting 8-9V your stepper sees may be way too much for it: steppers are supposed to be current driven, not voltage driven.

Secondly, a stepper runs much better (easier control, smoother running, higher torque at speed) with a proper stepper driver. Lots of different drivers out there, A4988 comes to mind as a cheap one that will handle a 350 mA stepper just fine. The stepper driver will make sure the stepper gets the current it needs, regardless of input voltage - in fact higher supply voltage is better (subject to the driver's limit).
Quality of answers is related to the quality of questions. Good questions will get good answers. Useless answers are a sign of a poor question.

kotnico

An Uno with no external loads should draw approximately 100mA from the 5 volt supply. As mentioned, you should be able to power the Uno from 12 volts into the barrel jack without difficulties if and only if the 5v supply has no additional loads on the 5 and 3.3 volt outputs.

How do you know if 12 volts input is okay? Simple. So long as the large three terminal 5 volt regulator between the usb and barrel jacks is only warm to the touch, everything is fine, carry on. If it gets too hot to touch (>45-50C), you'll need to reduce the 12 volts going into the barrel jack to lower the  power being dissipated by the 5 volt regulator. One method that doesn't involve buying a buck regulator is to place about six 1N400x series diodes in series with the supply - as each diode will drop the voltage by approximately 0.6 to 0.7 volts each. 7.5 to 8 volts input to the barrel jack is the ideal voltage for the regulator.

If you have an Uno clone, there may be two regulators, a  5 volt  and a 3.3. They both should only be warm to the touch, too hot to hold your finger on it requires a fix of some kind.
the only other thing that will be powered by the arduino is a esp8266-01 on the 3.3V and the pin 1,9 and 16 of the L293D on the 5V.

i will wire everything and will see if the voltage regelator get too hot.

i may need help about the wiring though. Do i need a common ground for everything? i mean i split  the vcc of the wall-wart and put one branch into the L293D pin 8 the other one goes to the barrel jack but what about the ground? do i cut it or the ground only goes to the barrel jack and everything will be fine ?

i'll try to do a diagram so it will be more clear if i'm not

kotnico

Another terrible idea.

First of all the L298 and family should be retired, there are far better H-bridges out there nowadays. It's from a bygone era, when a 3-4V loss on your H-bridge was simply part of the game and considered normal. Not any more, modern H-bridges do more current in a smaller package without the need of a heat sink. Then the resulting 8-9V your stepper sees may be way too much for it: steppers are supposed to be current driven, not voltage driven.

Secondly, a stepper runs much better (easier control, smoother running, higher torque at speed) with a proper stepper driver. Lots of different drivers out there, A4988 comes to mind as a cheap one that will handle a 350 mA stepper just fine. The stepper driver will make sure the stepper gets the current it needs, regardless of input voltage - in fact higher supply voltage is better (subject to the driver's limit).
I know that L293D are not the best choice arround, but i have 3-4 of those that i want to use and not only throw them in the garbage because other chip is better, maybe this driver will work  just fine for that specific project. I know that the voltage will drop and that the stepper wont get 12V but i also think that the torque i need will be enough for my project. i'll test with it first and changes it if needed. The stepper will only work for about 2 times a days and running for less than 30 secs each time.

what do you propose for a cheap stepper driver if the stepper need more than 350 mA ?

wvmarle

Check your stepper's specifications as the voltage it gets may simply burn it for giving it too much current.

The A4988 is cheap and can do just over 1A or so.

You have to be more specific as "more than 350 mA" is a really big range!

i may need help about the wiring though. Do i need a common ground for everything? i mean i split  the vcc of the wall-wart and put one branch into the L293D pin 8 the other one goes to the barrel jack but what about the ground? do i cut it or the ground only goes to the barrel jack and everything will be fine ?
You always need a common ground, and you always have to connect both wires of a power supply to whatever you want to power.
Quality of answers is related to the quality of questions. Good questions will get good answers. Useless answers are a sign of a poor question.

kotnico

Check your stepper's specifications as the voltage it gets may simply burn it for giving it too much current.

you really lost me here, i dont understand, if the L293D get the 12V down to 9V how can it burn the stepper if its rated for 12V?

L293D let pass more current that the motor need ?!

thanks for your help :)

wvmarle

A stepper motor is normally characterised by rated current & coil resistance, not voltage.

In your case that's 330 mA and 32.6Ω. That'd indeed give you some 250 mA after L298N losses. Note: the L298N does NOT regulate current, at all. That's part of the problem of using it for steppers.
Quality of answers is related to the quality of questions. Good questions will get good answers. Useless answers are a sign of a poor question.

Go Up