Power Supply to Standalone

building a standalone micro controller for a project, have it working fine with a 5v power supply from spark fun http://www.sparkfun.com/products/8269 in order to make it cheaper to reproduce I want the power regulation to be built in to the circuit board so that i can just wire a cord to be plugged straight into a wall socket. anyone have any links to circuits or general advice? as I'm not really sure where to start at all..

Bringing in wall mains will not be less. 5V wallwarts are really inexpensive these days. Use inexpensive panel mount jack to receive power:

http://www.taydaelectronics.com/hardware/dc-power.html http://www.dipmicro.com/store/index.php?act=viewProd&productCode=DCA-0510

http://www.dhgate.com/product/5v-2a-wall-power-adapter-charger-for-tablet/157276058.html#s1-12-1a|1550053607

http://www.dhgate.com/product/lowest-price-100pcs-us-wall-2-0mm-charger/143104701.html#s2-12-1a|3635495489

Need to ensure have mating adapter. Keep the 120V/240V away where someone else has taken care testing & certs.

The arduino onboard regulator can handle up to 1A if you plug your walwart into the dc jack. If you want to bypass the onboard regulator you can get a female jack for your walwart and connect the ground and +5V to the GND and +5v pins on the arduino. It would be connected to the OUTPUT of the onboard regulator but it wouldn’t matter because the onboard regulator would have nothing connected to it’s INPUT because it’s INPUT is the Vin pin. It would essentially be like it wasn’t there since no current would be flowing through it with nothing connected to the Vin. The USB +5V is a DIFFERENT input so if you connected your USB to the arduino WHILE you had your walwart connected to the +5V & GND then you would have TWO +5V power supply OUTPUTS connected TOGETHER. THAT WOULD BE BAD. If you think you can remember to disconnect your walwart BEFORE plugging in your USB to upload sketches you would be ok.But trust me. Some day ,some time , you will be tired or distracted and sooner or later you will make that mistake and all life as you know it will cease to exist. (or maybe you’ll just fry the USB in your computer. Have fun fixing that.

austinphilp: building a standalone micro controller for a project, have it working fine with a 5v power supply from spark fun http://www.sparkfun.com/products/8269 in order to make it cheaper to reproduce I want the power regulation to be built in to the circuit board so that i can just wire a cord to be plugged straight into a wall socket. anyone have any links to circuits or general advice? as I'm not really sure where to start at all..

I doubt that will make it cheaper but it will be illegal to sell because it has no FCC/CE approval.

Put in a USB socket instead, USB power is everywhere.

Most people will have several USB power supplies at home so you don't need to include one with your device (it doesn't get cheaper than that!) You can offer a version with wall wart as an optional extra.

I think both is better, the dc jack Crossroads linked and the USB fungus recommended. Then you have the best of both worlds. If you want make it portable you can add a lipo or Nicad battery connector and a 5V regulator.

The arduino onboard regulator can handle up to 1A if you plug your walwart into the dc jack.

I believe it is only rated for 800mA. And even then, the barrel needs to be low, like 7.5V, or it will overheat.

It would be connected to the OUTPUT of the onboard regulator but it wouldn't matter because the onboard regulator would have nothing connected to it's INPUT because it's INPUT is the Vin pin. It would essentially be like it wasn't there since no current would be flowing through it with nothing connected to the Vin.

The data sheet for the regulator recommends a diode from +5 (anode) to Vin (cathode) to avoid reverse driving the regulator like that. The Duemilanove had a more robust regulator that could take it.

The USB +5V is a DIFFERENT input so if you connected your USB to the arduino WHILE you had your walwart connected to the +5V & GND then you would have TWO +5V power supply OUTPUTS connected TOGETHER.

If Vin/2 is > 3.3V, the FET that allows Vusb into 5V is reverse biased, thus only the regulator output flows into the 5V bus.

Well that's good to know. Thanks for clarifying that.

CrossRoads:

It would be connected to the OUTPUT of the onboard regulator but it wouldn’t matter because the onboard regulator would have nothing connected to it’s INPUT because it’s INPUT is the Vin pin. It would essentially be like it wasn’t there since no current would be flowing through it with nothing connected to the Vin.

The data sheet for the regulator recommends a diode from +5 (anode) to Vin (cathode) to avoid reverse driving the regulator like that. The Duemilanove had a more robust regulator that could take it.

Not the way I read it!

The NCP1117 family has two internal low impedance diode paths that normally do not require protection when
used in the typical regulator applications. The first path connects between Vout and Vin, and it can withstand a peak surge current of about 15 A. Normal cycling of Vin cannot generate a current surge of this magnitude. Only when Vin is shorted or crowbarred to ground and Cout is greater than 50 µF, it becomes possible for device damage to occur.

Strictly, the UNO has 47 µF capacitors, but the point is - you simply should not be shorting Vin to ground. It is true that the TI LM1117 specifies:

In the LM1117-N regulators, the internal diode between the output and input pins can withstand microsecond surge currents of 10A to 20A. With an extremely large output capacitor (?1000 ?F), and with input instantaneously shorted to ground, the regulator could be damaged.

It is clearly much more rugged.

You use a switchmode adapter which is regulated, and feed it directly as the 5V, no regulator needed on-board. Admittedly, almost none of the switchmode “wall-warts” include proper crowbar protection.

I think we are all agreed that not only would it be foolish to attempt to incorporate the (switchmode) power supply into a project unless you were undertaking a commercial product on such a scale as to undertake the CE, UL and other certification (very expensive process), but there simply is no way it would even be anywhere near as cheap.

Love that pricing for the “DHgate” adapter - US $2.38 - just as long as you buy a hundred. :smiley:

Not the way I read it!

I appreciate your input. I am always ready to learn, but , honestly I have no idea what your talking about. If you can show me where I suggested shorting Vin to GND (which, as a technician with 30 yrs experience , I would never do in my wildest dreams) I might understand the reason for your comment. You completely lost me. I don't know where that came from.

raschemmel: If you can show me where I suggested shorting Vin to GND (which, as a technician with 30 yrs experience , I would never do in my wildest dreams) I might understand the reason for your comment. You completely lost me. I don't know where that came from.

And that was my whole point!

CrossRoads suggested that the protective diode was recommended; I am pointing out that the only circumstance in which it is recommended in the datasheet, is to protect against that particular eventuality. :D

My understanding is he is simply referring to a standard reverse polarity protection diode in case some idiot plugs in a negative
voltage power supply. I always used to include that diode on any equipment that was used by laymen with no electronics background. A 1n4001 (or even 104004) is relatively cheap as insurance policies go.