Powering Arduino from 12v 1A linear regulator?

Hi all.

I’m trying to design a shield that will provide power and opto isolation to an Arduino Mega 2560 for use with 24v circuits and am having a problem with my chosen regulator.

From what I have (apparently wrongly) gathered; this regulator should be adequate able to step down the 24v to 12v; with the Arduino’s own regulator stepping the 12v down to 5v?
https://uk.rs-online.com/web/p/linear-voltage-regulators/7856958/?searchTerm=785-6958

What I observe is that the regulator runs very hot (getting on for 100degC after a few minutes) and cuts out as soon as I use say 3 outputs from the Ardunio to power LEDs. Connecting a few of the regulators in parallel allows a few more outputs to work before they all cut out.

I’ll upload my circuit later, but for now; is there likely to be a flaw with my circuit or is there a reason why this regulator isn’t suitable?

Well, yes, it's a linear regulator, and you're dropping 50% of the power as heat. It's bound to get hot.

You will need a "Big Ass™" heat sink on it, or better still, replace it with a switching (buck) regulator.

You're throwing away 12V of power (converting it to heat).

Assuming a couple of hundred milliamps of current: 12 * 0.200 = 2.4 Watts of heat.

Yep, that'll get hot.

It might work with a heatsink but you'll be back to square one if you add some more LEDs.

Connecting a few of the regulators in parallel allows a few more outputs to work before they all cut out.

Connecting regulators in parallel is bad. Don't do it.

fungus:

Connecting a few of the regulators in parallel allows a few more outputs to work before they all cut out.

Connecting regulators in parallel is bad. Don't do it.

You see, you have to remember that voltage regulators are active devices. That is, they watch what is going on with the voltage and make a decision about what to do with it. If the voltage drops too low it makes the decision to increase its output to raise the voltage. If it's too high, then it decides to lower its output to compensate. Now imagine you have two regulators in parallel. They're both going to be making independent decisions about the same voltage. They'll both decide to raise their voltages or lower their voltages, and the net result will be too much or too little voltage all the time, so they'll then try and compensate again. The two regulators will be fighting against each other to gain control of the voltage, and neither will get control. They'll just be getting in a complete mess.

Connect an oscilloscope up to one of the paralleled regulators, and chances are you'll see the voltage varying massively all the time.

The way to increase the power handling of a linear regulator is to add an external PNP power transistor, but I wouldn't recommend it, since the way to go is definitely with a switching regulator.

Thanks for the advice; it makes a bit more sense now.

Can anyone recommend a suitable switching regulator? Or a better way to convert 24VDC to 12VDC altogether?

Tobster86:
Thanks for the advice; it makes a bit more sense now.

Are you sure?

(see below...)

Tobster86:
Can anyone recommend a suitable switching regulator? Or a better way to convert 24VDC to 12VDC altogether?

So....you want the Arduino's tiny little regulator to convert 7V to heat?

Why not go lower than 12V?

Perhaps I'm not sure then!

Specs for the Arduino indicate a recommended input voltage range of 7-12V; surely the best I could do is a (presumably rare) 7V regulator, then throwing away 2V with the Arduino's regulator?

I understand the Mega 2560 runs on 5V; what's the best configuration of components to step 24V down to this?

Ideally I don't want to replace the regulators on the Arduino boards themselves due to the number involved in my project.

Tobster86:
Perhaps I'm not sure then!

(see below...)

Tobster86:
Specs for the Arduino indicate a recommended input voltage range of 7-12V; surely the best I could do is a (presumably rare) 7V regulator, then throwing away 2V with the Arduino's regulator?

7V is no problem. LM317 regulators are adjustable to any voltage you want.

...but are we going to convert 17V to heat?? That's even worse than converting 12V to heat. :astonished:

Why not use a switching regulator? (like the ones I linked to above) They don't deliberately convert power to heat, they transform it.

If you don't want to buy on eBay then somebody like Pololu will be happy to charge you more: Pololu - Step-Up/Step-Down Voltage Regulators

majenko:
Now imagine you have two regulators in parallel. They're both going to be making independent decisions about the same voltage. They'll both decide to raise their voltages or lower their voltages, and the net result will be too much or too little voltage all the time, so they'll then try and compensate again. The two regulators will be fighting against each other to gain control of the voltage, and neither will get control. They'll just be getting in a complete mess.

Actually, no!

Presuming the regulators are properly stabilised (and if they are not, then they are useless as regulators in any configuration whatsoever), their set-points will differ; one will be higher than the other. If their set-points were the same, then the resistance in the common wiring would equalise the currents they supplied and this is in fact used in some cases and works perfectly well.

In practice however, the regulator with the higher set-point will attempt to raise the voltage to that set-point, higher than the other which will then turn itself off. The regulator with the higher set-point will be providing as much current as it possibly can, and either overheat or safely current limit, depending on its design. If the latter, it will fail to regulate and the regulator with the lower set-point will simply make up the deficiency in current and be relatively lightly loaded.

Tobster86:
Specs for the Arduino indicate a recommended input voltage range of 7-12V; surely the best I could do is a (presumably rare) 7V regulator, then throwing away 2V with the Arduino's regulator?

As Fungus just noted, an LM317 would - if you wanted to do it the hard way - regulate to 7V quite well

Tobster86:
I understand the Mega 2560 runs on 5V; what's the best configuration of components to step 24V down to this?

A switchmode regulator of course.

Tobster86:
Ideally I don't want to replace the regulators on the Arduino boards themselves due to the number involved in my project.

You do not seem to have a choice. You need the supply to be regulated. How many are you using anyway? This is surely, the number of complete systems you propose to construct, not a number of them you would propose to use in a single design?

Sigh! As always, perhaps you should describe your intended project and take advice on the best way to approach the whole design.

Sorry I think we've gone slightly onto different wavelengths; let me rephrase my previous query.

The Arduino's take a recommended 7-12V (and specced 6V minimum) due to their own 5V regulator, and my power supply outputs 24V.

I'd be more than happy to use a 5V switching regulator to step 24V all the way down to 5V; probably something like this http://uk.rs-online.com/web/p/buck-converters/0398477/.

But is it possible to do this without replacing the regulator on (or otherwise modifying) the Arduino board? (Given the required min 6V input?)

Tobster86:
But is it possible to do this without replacing the regulator on (or otherwise modifying) the Arduino board? (Given the required min 6V input?)

Yes, just connect it directly to the 5V pin (bypassing the regulator completely).

Tobster86:
I'd be more than happy to use a 5V switching regulator to step 24V all the way down to 5V; probably something like this http://uk.rs-online.com/web/p/buck-converters/0398477/.

nb. That device needs external inductors, diodes, etc. You can't just connect it up on its own like an LM7805.

(The boards I linked to on eBay are basically one of those with the needed external components...)

Yeah the RS ones require an inductor, a capacitor and a diode, although I can design these into the circuit without too much bother.

Just to be 100% clear; will the Arduino function as normal from 5V by simply supplying 5V to it’s 5V pin and leaving the Vin pin disconnected?

Tobster86:
Yeah the RS ones require an inductor, a capacitor and a diode, although I can design these into the circuit without too much bother.

Just to be 100% clear; will the Arduino function as normal from 5V by simply supplying 5V to it's 5V pin and leaving the Vin pin disconnected?

Not so simple to give a definitive answer.
Many do just that with no problems reported. However be aware that the official Arduino recommendation is to not do that. From the product page description:

5V. This pin outputs a regulated 5V from the regulator on the board. The board can be supplied with power either from the DC power jack (7 - 12V), the USB connector (5V), or the VIN pin of the board (7-12V). Supplying voltage via the 5V or 3.3V pins bypasses the regulator, and can damage your board. We don't advise it.

I think that's mainly to cover their backs. There's no real technical reason not to do it, but numptys could connect what they think is 5V only to find it's unregulated and actually much higher.

It's perfectly safe to apply a properly regulated 5V supply to the 5V pin. You might like to add a diode between 5V and Vin (anode to 5V, cathode to Vin) to allow any reverse voltage to safely bypass the onboard 5V regulator, just to protect it from damage in case you should apply any load to Vin.

Tobster86:
Just to be 100% clear; will the Arduino function as normal from 5V by simply supplying 5V to it’s 5V pin and leaving the Vin pin disconnected?

The official Arduino page says “no”: http://arduino.cc/en/Main/ArduinoBoardUno

…but nobody can figure out why. The only difference between USB power in and the 5V pin is a fuse so the usual conclusion when this subject comes up is that they’re just covering their asses because the 5V pin has no protection whatsoever.

Here’s the schematic: http://arduino.cc/en/uploads/Main/Arduino_Uno_Rev3-schematic.pdf

The fuse is “F1” on the “XUSB” line at bottom-left.

I’ve done it many times and nothing bad ever happened but if you’re truly paranoid, power it via a USB cable…

PS: I prefer to connect 5V power to the power pins on the ISP connector, but that’s just me. You can even solder them on, just to be on the safe side (use the connecter up near the USB socket if you do this - you’re unlikely to ever use that for anything else).

More discussion here: Arduino Uno R3: Directly supply regulated 5V to 5V pin? - Electrical Engineering Stack Exchange

majenko:
I think that's mainly to cover their backs. There's no real technical reason not to do it, but numptys could connect what they think is 5V only to find it's unregulated and actually much higher.

Yep. Connecting an unregulated "5V transformer" from a toy would most likely end in tears...

majenko:
I think that's mainly to cover their backs. There's no real technical reason not to do it, but numptys could connect what they think is 5V only to find it's unregulated and actually much higher.

It's perfectly safe to apply a properly regulated 5V supply to the 5V pin. You might like to add a diode between 5V and Vin (anode to 5V, cathode to Vin) to allow any reverse voltage to safely bypass the onboard 5V regulator, just to protect it from damage in case you should apply any load to Vin.

Yes several people have shared that view, including the addition of the diode across the on-board 5 vdc regulator. Also keep in mind that powering via the 5V pin also doesn't allow the arduino auto-voltage selection circuit to properly isolate the USB power from the board when you attach a PC to the USB connector for uploading and/or serial monitoring, as there is no Vin voltage to trigger the voltage switch which isolates the USB power from the board's 5 volt bus. Having USB 5 vdc and the external regulated 5 vdc voltage source effectively wired together is not considers a good engineering practice.

retrolefty:
Having USB 5 vdc and the external regulated 5 vdc voltage source effectively wired together is not considers a good engineering practice.

Yep. There's a few ways to cause bad things to happen.

On it's own, regulated 5V to the 5V pin doesn't seem to be one of them.

Well I'm all sorted to draw that into my circuit then; 5V buck reg straight onto the 5V pin.

Thanks very much everyone for your instruction & advice.