Pages: [1]   Go Down
Author Topic: Supplying power to Arduino with transformer?  (Read 1390 times)
0 Members and 1 Guest are viewing this topic.
Texas
Offline Offline
Jr. Member
**
Karma: 1
Posts: 97
Eso es lo que es
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I'm trying to power my board after going through a transformer.  In the system, I have things that need 12 VDC, but I'd like to plug into a 120 AC socket.  So I was going to plug into my box with 120 AC, go through a 120/12 transformer, bridge rectifier and filter cap.  I'd like to power the Arduino with 9 volts.  I am fairly familiar with how voltage division with resistors works, but I don't understand what size resistors to use.  I know it's the ratio of the resistors that determines what voltage I get between them, but how does this affect the current in the 9 volt leg, or does it?
Thanks.
Also, I don't know how to size for the filter cap.
Logged

St. Leonards-on-Sea, E. Sussex, UK.
Offline Offline
Sr. Member
****
Karma: 2
Posts: 301
Ancient developer
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

1000 uF or 2,200 uF should be plenty. Get a 16V one.

Use a regulator like an LM317 to get your 9V, resistors won't work properly.
Logged

Leon Heller
G1HSM

Texas
Offline Offline
Jr. Member
**
Karma: 1
Posts: 97
Eso es lo que es
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Thanks a lot, I appreciate the help.
Logged

Phoenix, Arizona USA
Offline Offline
Faraday Member
**
Karma: 36
Posts: 5519
Where's the beer?
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

For the money and time you spend on building that inefficient linear supply, you could buy a switching transformer brick power supply (like is used for laptops - in fact, buy a used one at a thrift store; shouldn't cost more than a few bucks).

You might still need to run the output thru the 317, tho, since most of those bricks output 12 VDC or higher...

 smiley
Logged

I will not respond to Arduino help PM's from random forum users; if you have such a question, start a new topic thread.

Texas
Offline Offline
Jr. Member
**
Karma: 1
Posts: 97
Eso es lo que es
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

With that power supply I could tap 9 volt as well as 12 volt off of it?  I was planning on running the 12 volt through a mosfet transistor, controlled by an Arduino output, that would control a pneumatic solenoid.  Then, just use the 9 volt to power the Arduino.  That power supply could accomplish that?
Logged

Phoenix, Arizona USA
Offline Offline
Faraday Member
**
Karma: 36
Posts: 5519
Where's the beer?
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

It should be possible, but you might want to use a 7812 (or a beefier 12 volt regulator) with a heatsink and tap off of that (choose a brick that is running around 18 VDC; I think many of the HP bricks run around that, and can supply several amps). This would be just to avoid causing the brick problems, as it wasn't designed to be switching a solenoid on and off, which may cause issues for it without the regulator (and you may still need some noise supression caps, too).
Logged

I will not respond to Arduino help PM's from random forum users; if you have such a question, start a new topic thread.

Texas
Offline Offline
Jr. Member
**
Karma: 1
Posts: 97
Eso es lo que es
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hey I sure appreciate your help, but where am I going to get the 9 volt from?  Or here's a better question; do I even need the 9 volt?  My duemilanove says it can safely run on 7-12 volts, and I just didn't want to push the limit on that.  That's the only reason I'm worried about providing a 9 volt supply.  Otherwise, 12 volts is good for everything I'm doing.
Logged

Phoenix, Arizona USA
Offline Offline
Faraday Member
**
Karma: 36
Posts: 5519
Where's the beer?
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

The 9 volts you would get from the LM317; you take the output of the PSU brick (running at, say, 12-18 VDC), pass it into the LM317 (set up with the proper resistors to output 9 volts), and tap your 9 volts off of the LM317's output.

You would -also- hook up a 7812 (or something better, if you need more than what a 7812 can provide, which I think is only 1 or 2 amps - with a heatsink) to the PSU brick, and tap your 12 volts off the output of the 7812.

If you can find a 12 volt switching PSU brick, then you could (in theory) run the Arduino off that (if you use the external power input jack, so that the Arduino is using its regulator). You could also hook up a 7805 to the PSU brick and tap it for 5 VDC to supply the Arduino directly (and bypass its regulator).

You have a lot of options here; but I don't think building your own linear power supply is the best way to go, unless you have those parts already in your junk bin (and you know how to build such a power supply so that it is safe to use). You will likely spend more time and money doing so. With that said, though, using a PSU brick for a laptop may bring its own set of issues unless you incorporate extra regulators into your power scheme (the LM317, 7812, and 7805 - for the 9 vdc, 12 vdc, and 5 vdc outputs) - simply because you are trying to control a large inductive load (the solenoid), for which directly driving it from a power supply designed for a laptop might cause issues - using a regulator after the PSU will isolate the PSU from most of this (spikes and such); but you will also likely want to incorporate the proper filtering caps into all of the regulators (see each respective datasheet for details).
Logged

I will not respond to Arduino help PM's from random forum users; if you have such a question, start a new topic thread.

Texas
Offline Offline
Jr. Member
**
Karma: 1
Posts: 97
Eso es lo que es
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

OK, I get it now.  Thanks again for all your help.
Logged

Pages: [1]   Go Up
Jump to: