4
\$\begingroup\$

I want to power an Arduino (Wemos D1 Mini) with 5 or 3.3 V from my garage door opener, which has 24 VDC available.

As far as I understand, this can be solved in the following ways:

  1. Step down buck converter
  2. Linear voltage regulator
  3. Voltage divider circuit

What are the pros/cons of each of these?

I'm concerned about heat, and I don't want to burn down the garage. I haven't measured how much current my Arduino draws, but I guess it's very little like 250 mA or less(?). I'm only using the built-in Wi-Fi module and no external sensors/relays.

\$\endgroup\$
1
  • 3
    \$\begingroup\$ Hi and Welcome. It would be better to not "guess" - can you measure? A voltage divider is never recommended unless you at least know your load current and the load current is VERY stable. \$\endgroup\$
    – mike65535
    Commented Nov 29, 2018 at 13:23

4 Answers 4

12
\$\begingroup\$
  1. This is the most efficient solution, will provide good conversion rate but is a little bit more complex to do and also more expensive. Although you can find modules that are already soldered with components saving you the trouble of calculating everything.

  2. This is less efficient, it basically acts as a regulated resistor, dissipating the power you don't use through heating. Only need 3 components usually, the voltage regulator and 2 capacitors and it is cheaper than 1.

  3. Won't work for you, voltage divider is not regulated and depends on the load, thus the resulting voltage may vary.

For your case, I would buy a DC/DC buck converter module already assembled like this one.

Note there are also capacitor based voltage converters.

\$\endgroup\$
4
  • \$\begingroup\$ Don't you think #2 will not be feasible at all as well? \$\endgroup\$
    – MaNyYaCk
    Commented Nov 29, 2018 at 12:45
  • \$\begingroup\$ Yes of course it's feasible, it's just less power efficient. \$\endgroup\$
    – Damien
    Commented Nov 29, 2018 at 12:48
  • 7
    \$\begingroup\$ That linear regulator would be dissipating like five watts. A good, well-installed heatsink would be necessary, and even then I'd worry about airflow depending on the case. \$\endgroup\$
    – Sneftel
    Commented Nov 29, 2018 at 15:39
  • \$\begingroup\$ @Damien can you please explain what a capacitor based voltage converter works, or at least point me to a site with some basic information? \$\endgroup\$ Commented Nov 30, 2018 at 11:24
9
\$\begingroup\$

One point to consider between choosing a DC-DC buck converter or a linear regulator is the quality of the output. Because of how they work DC converters will always have some amount of high frequency ripple on the output while linear regulators are extremely smooth.

So, DC converters are very efficient, but noisy, and linear regulators are very smooth, but inefficient (they basically "waste" the voltage difference as heat; stepping down 24V→5V a very large amount of heat).

Whether the ripple matters or whether you can smooth out the DC converter output enough depends on the device you're powering. In your case, an Arduino with no sensors, it doesn't really matter that the power rail is somewhat noisy.

But if other cases if you have sensors that depend on exact input voltage, or other devices that are sensitive to ripple it may matter. With very sensitive devices you might even have to use a combination of a DC converter to drop the voltage down to close to your target, and then use a low dropout linear regulator to get the final stable voltage without losing a lot of efficiency in the linear stage (since it's only a small step down, instead of a large step down).

Option 3 doesn't work at all. It combines all the disadvantages of linear regulator inefficiency (you're dissipating the voltage difference in the resistors) with an unregulated output voltage that varies depending on the load. The load will vary considerably depending on what the Arduino is doing, and especially whether the WiFi module is sending data or not.

\$\endgroup\$
5
  • \$\begingroup\$ This is correct, but to be picky: It does not really answer the question, but only parts of it \$\endgroup\$
    – Jounathaen
    Commented Nov 29, 2018 at 15:57
  • 1
    \$\begingroup\$ Is that better now, @Jounathaen? \$\endgroup\$
    – tylisirn
    Commented Nov 29, 2018 at 16:33
  • \$\begingroup\$ Shouldn't ripple on a DC supply be fairly easy to correct? AC guy talking here. @Jounathaen Better a good half answer, than a good half answer and a shabby half answer that's only there for statutory reasons. \$\endgroup\$ Commented Nov 29, 2018 at 20:54
  • 1
    \$\begingroup\$ Actually it is not that correct. It is a general assumption that linear regulator gives a smooth output. But in fact, it might be worse than a well done buck with filtering. The linear regulator are not good at ripple rejection, if you have an input with ripple, the output will also have significant ripple. Also linear regulator do oscillate on their own and varies depending on the current and capacitive load (capacitive load which varies over temperature if you use ceramic caps, thus you have a temperature dependent ripple). \$\endgroup\$
    – Damien
    Commented Nov 30, 2018 at 2:55
  • \$\begingroup\$ Rather than a heatsink you can use a power resistor between the 24V and the 5V regulator input to alleviate the thermal load on the regulator. \$\endgroup\$ Commented Dec 1, 2018 at 0:13
1
\$\begingroup\$

First, make sure your garage uses 24VDC. A more common control voltage in residential wiring is 24VAC, seen in doorbells and thermostats. AC voltage is a big mess for a DC device, but it works with transformers!

Since it's part of a building, it must reasonably comply with the electrical codes. Fortunately those codes are pretty easy on low voltage (30V) low power (<55W) devices. You will need to use proper enclosures and do wiring to the low standards of doorbell or thermostat wiring (e.g. Neat and workmanlike, don't be stupid, make an effort to staple it out of harm's way, and don't use mains power wiring as a hanger.) So in a Code context:

A DC-DC converter

is a great way to handle it. The converter will make less than a watt of residual heat, and will be small, so it will fit neatly into a common, cheap steel 4" or 120mm square junction box. The steel's thermal conductivity and the size of the box will take care of heat dissipation. Its current draw will certainly be within the range available from the opener.

Code requires the use of "approved" equipment which generally means it is UL listed. "Equipment means "not components": difference being, the equipment has labeling/instructions describing its consumer use, and UL tested and listed it that way. But again, rules are relaxed for low voltage <55W stuff. The point of this is, favor a DC-DC that is packaged more like a finished good, i.e. That has screw terminals and a case, rather than wires sloppily soldered onto a unit meant for PCB mounting. If it's packaged neatly enough, you may not even need a steel junction box to hide it.

Resistor ladder

I've worked with resistor laddes a fair bit. For instance, Westinghouse HL traction drive equipment (the L is for line powered, not battery) uses a resistor ladder to synthesize roughly 80V from 600V line voltage. The lower resistor, between load and GND, keeps the voltage from floating upward toward 600V if there is no current draw by the load.

But the voltage varies considerably, since the lower resistor is paralleled with between 0 and 15 contactors on a 5-car train. This varying of voltage is the Achilles' heel of resistor ladders. You mitigate it by making the upper and lower bypass resistors larger (in watts and physical size, smaller in ohms). For any reasonable working range, the vast majority of power will be consumed in the resistor ladder, not the load.

In your application, you need to spec your resistor ladder so your voltage stays between 3.3V and 5V at load draws between 0A and 250ma (or whatever measurement proves out). The math isn't overly complicated, but that's a narrow range that I expect will require a fairly enormous resistor ladder. So you're going to be making a lot of heat, and will need appropriate safety caging for the resistor bank. I fully expect this will exceed the supply capacity of the garage door opener's power supply. It may even exceed the 55W statutory limit for relaxed rules for low voltage wiring! All in all, ladders are just not for things with narrow voltage requirements.

A linear voltage regulator

Something like a 7805 regulator is a resistor ladder -- but with the lower balance resistor deleted, only the Arduino as the lower resistor, and the regulator as a "smart" upper resistor, changing its resistance on the fly to track the load current. The whole circuit flows whatever the Arduino draws, which is up to 250ma, you say.

The voltage regulator must dissipate the difference between supply voltage and lutput voltage, e.g. 19-20.7 volts x circuit current. E.g. At 250ma that'd be about 5 watts. That will need to be heatsinked appropriately. Too much to use a 4x4 steel box as an ad-hoc heatsink.

Almost all voltage regulators are made for external heatsinking, so you have a big packaging problem as far as making it look like "not a science project". And you have to deal with ultimate heat removal: the heat sink has to interchange with ambient air, and you can't just let the junction box get hot.

Expand mains power at the opener; add a "wall wart"

A few garage door openers have provisions for a receptacle (mains socket e.g. NEMA 5-15). If not the socket, a pre-cut knockout where a socket could be installed. You could retrofit that.

Or you could fit a duplex mains socket at the garage door opener's supply, give it a power cord, and now you have an open socket.

Plug a wall-wart in there and done.

\$\endgroup\$
0
0
\$\begingroup\$

One option that has not been pointed out (as far as I can see), is that you are not limited to choosing only one option. In particular, a buck regulator followed by a linear regulator can give you the best features of both.

I would suggest a buck regulator to bring the voltage down from 24V to say 9V, then feed the 9V into a linear regulator down to 5V. At 250mA, the linear regulator is only dissipating 1W (9-5=4V x 250mA). Thus the buck regulator does most of the work, and the linear regulator provides a ripple free output.

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.