What is the best way to power an Arduino (Uno) when I have 24VCD available? Should I convert it to 12V or directly to 5V? The Arduino needs to supply power to:
itself
ethernet shield
2 relays
1 hall effect magnetic sensor
I would like to keep idle power loss as low as possible.
Yes. The specs say you can use 6-20V, but 7-12V is the recommended range into the regulator (through the barrel jack). The Ethernet shield will consume current which puts more stress (heat) on the voltage regulator. Power dissipated by the regulator is calculated as current x voltage, and that's the voltage "dropped" across the regulator. The lower the applied voltage, the cooler the regulator will run.
If you run from 5V, you can bypass the Arduino's on-board regulator.
2 relays
Most relays can't be driven directly by the Arduino. You generally need a driver circuit and a separate power supply. If the relay coils are rated for12V, then a 12V supply might be the best choice. (You can easily find solid state relays that can be controlled by the 5V low-current output from the Arduino.)
I would like to keep idle power loss as low as possible.
The Arduino is going to consume about the same amount of power when "idling" as when doing something useful, unless you put it into sleep mode. Relay coils consume power when energized, and no power when not energized.
The power loss in a linear regulator is calculated as above. With 24V regulated-down to 5V, you've got the same current through the regulator as the Arduino is consuming, but with most of the voltage across the regulator... So, there is almost 4 times as much power wasted as heat as is consumed by the Arduino. If you use an external linear regulator, some of that heat will be generated in your external regulator and some of it will be generated in the Arduino's regulator (same total power loss).
Switching regulators can be nearly 100% efficient. That means you actually get more current out of a switching regulator than you feed-in (with less voltage out than you feed-in).
DVDdoug:
Yes. The specs say you can use 6-20V, but 7-12V is the recommended range into the regulator (through the barrel jack). The Ethernet shield will consume current which puts more stress (heat) on the voltage regulator. Power dissipated by the regulator is calculated as current x voltage, and that's the voltage "dropped" across the regulator. The lower the applied voltage, the cooler the regulator will run.
If you run from 5V, you can bypass the Arduino's on-board regulator.
I guess my real question is, as I anyway need a regulator to get from 24V, is it a good idea to by-pass the builtin regulator? I suppose this depends on the Arduino model and how much I trust the quality of that regulator compared to the separate regulator I would buy.
DVDdoug:
Most relays can't be driven directly by the Arduino. You generally need a driver circuit and a separate power supply. If the relay coils are rated for12V, then a 12V supply might be the best choice. (You can easily find solid state relays that can be controlled by the 5V low-current output from the Arduino.)
These are relays intended for the Arduino, I got them in the started kit. They are controlled by 5V and can switch 30VDC or 250VAC.
DVDdoug:
The Arduino is going to consume about the same amount of power when "idling" as when doing something useful, unless you put it into sleep mode. Relay coils consume power when energized, and no power when not energized.
The power loss in a linear regulator is calculated as above. With 24V regulated-down to 5V, you've got the same current through the regulator as the Arduino is consuming, but with most of the voltage across the regulator... So, there is almost 4 times as much power wasted as heat as is consumed by the Arduino. If you use an external linear regulator, some of that heat will be generated in your external regulator and some of it will be generated in the Arduino's regulator (same total power loss).
Switching regulators can be nearly 100% efficient. That means you actually get more current out of a switching regulator than you feed-in (with less voltage out than you feed-in).
I want it to consume as little power as possible until I send it network input. When it gets network input I don't really care as long as it does not break. It will control a >1kW motor for a few minutes, so a couple of extra watts is nothing. But if I can have <1W idle power I can leave it on and will have one less manual switch to change (twice!) when I want to use it.
bwz0:
I guess my real question is, as I anyway need a regulator to get from 24V, is it a good idea to by-pass the built-in regulator?
Absolutely! In fact, the only sensible way to do it. The built-in regulator is only really for powering the processor itself and a couple of LEDs.
bwz0:
These are relays intended for the Arduino, I got them in the started kit. They are controlled by 5V and can switch 30VDC or 250VAC.
Well, they require 5 V to operate, but you never should power them from the Arduino; they require a separate supply.
A properly regulated 5 V switchmode supply can power both the relays and the Arduino, but power (and that includes the ground wire) to the relays and their control transistors must be wired directly from that supply, not via any part of the Arduino board.
If you step down using a (5v) DC-to-DC step-down converter (a 'step-down buck converter' as opposed to a linear converter) you will 'saving' power inasmuch that the step down won't consume hardly any power whilst it is not required - hence the very high (95% ish) efficiency rating. But there is a tiny niggle in the quality of that output.
I have a video #21 all about voltage conversion which highlights the good and bad of both methods of converting voltage. URL in my signature of this post.
Paul__B: Absolutely! In fact, the only sensible way to do it. The built-in regulator is only really for powering the processor itself and a couple of LEDs.
Great, thanks!
Paul__B:
Well, they require 5 V to operate, but you never should power them from the Arduino; they require a separate supply.
The switched power will not come from the Arduino, it will come directly from my 24VDC source. Only the power to operate the relay I plan to take from the Arduino, which I would assume is OK (how else would I do it?).
Paul__B: Absolutely! In fact, the only sensible way to do it. The built-in regulator is only really for powering the processor itself and a couple of LEDs.
Well, they require 5 V to operate, but you never should power them from the Arduino; they require a separate supply.
A properly regulated 5 V switchmode supply can power both the relays and the Arduino, but power (and that includes the ground wire) to the relays and their control transistors must be wired directly from that supply, not via any part of the Arduino board.
Personally, I'd power the relays from a different rail than the Arduino, because the relays will put spikes on the supply - no matter how small. The rails can both be 12V or 5V, but separated before the regulator that is used to power the logic. And don't forget the snubber diodes on the relays to catch any back EMF spikes.
bwz0:
The switched power will not come from the Arduino, it will come directly from my 24VDC source. Only the power to operate the relay I plan to take from the Arduino, which I would assume is OK (how else would I do it?).
No, that is simply not OK!
Put it in mind that you cannot "take" any power from the Arduino, even - or particularly - to actuate relays; it is purely a control device.
We must presume you are using a relay board with at least switching transistors that the Arduino controls, if not optocouplers. When asking any such question here, you must illustrate by a Web link or link to a photo, just what relay board you actually have in front of you. The power to that relay board to actuate the relays must not be drawn from the Arduino board.
The point is that if you have a regulator to provide 5 V power, then you can run separate power wiring (that is, 5 V and ground wires travelling together) to that relay board from your regulator, and similarly to the Arduino 5 V and ground terminals from that regulator. "lastchancename" indicates a concern about impulse transmission over those power connections which needs to be addressed by providing a capacitor - say 200 or 470 µF - across the power terminals of the relay board.
Put it in mind that you cannot "take" any power from the Arduino, even - or particularly - to actuate relays; it is purely a control device.
We must presume you are using a relay board with at least switching transistors that the Arduino controls, if not optocouplers. When asking any such question here, you must illustrate by a Web link or link to a photo, just what relay board you actually have in front of you. The power to that relay board to actuate the relays must not be drawn from the Arduino board.
OK, so the Arduino controls a transistor, and the transistors switched power should come from an external source, and the output of the transistor controls the (mechanical) relay that can switch my 24V?
All of this and a surge protector is mounted on a board that I have, and I'll likely get another board like that but with an optocoupler.
This means that even when the relay is opened the Arduino's power needs will not change significantly as it only drives a very low-power transistor?
Paul__B:
The point is that if you have a regulator to provide 5 V power, then you can run separate power wiring (that is, 5 V and ground wires travelling together) to that relay board from your regulator, and similarly to the Arduino 5 V and ground terminals from that regulator. "lastchancename" indicates a concern about impulse transmission over those power connections which needs to be addressed by providing a capacitor - say 200 or 470 µF - across the power terminals of the relay board.
Across the outgoing (5VDC) power? And if so, one for each load on the regulator, or a common one? And on + only, or also on -/ground?
MalharD:
If not concerned about the heat disssipation, use LM317.
I am concerned about inefficiencies when the system is "idling" (99% of the time) to conserve power. Dissipating a few watts of heat will not be a problem. Is the LM317 a good choice for that?
bwz0:
I am concerned about inefficiencies when the system is "idling" (99% of the time) to conserve power. Dissipating a few watts of heat will not be a problem. Is the LM317 a good choice for that?
(24-5)*1A(say)=19W~Light for a room usinc CFL. If 19W are few for you and you are not running on a battery, it is totally fine