0
\$\begingroup\$

I need to supply 5V to power a Wemos mini MCU (ESP8266 based,) using a 12V source (in order to PWM a 12V LED strip.)

I wish to know what is the difference between using a linear regulator (such as AMS1117, asthis), to a buck/step down converter as this).

What considerations should I take when selecting one and not the other?

\$\endgroup\$

3 Answers 3

3
\$\begingroup\$

What considerations should I take when selecting one and not the other ?

As Tirdad explained, the LDO will waste the difference between input and output voltage as heat. If you want to drop from 12V to 5V, then 7/12=58% of the input power will be burned as heat in the LDO, and the remaining 42% will power the micro.

ESP8266 uses on average about 40mA so that's not going to ruin your electricity bill, and that's only 0.28W average dissipation in the LDO, so it would probably work... except it draws peaks of up to 200mA when using the WiFi, which corresponds to 7V*200mA=1.4W, which is above what an AMS1117 in SOT-223 can dissipate. So if you use the WiFi a lot it could overheat.

Also AMS1117 requires a large output capacitor which is not present on the quoted aliexpress module, so it will probably not work reliably. This is a very cheap and low quality LDO, it is slow, output transient response is poor, and the built-in protections are not as reliable as one would expect. Basically, there are much better LDOs, if you need a LDO, don't buy this one. I've had problems with ESP32 modules getting temperamental, and replacing this part with a better one (LDL1117) fixed the issues.

The buck converter will have much better efficiency, so that's what you need.

Buying cheap DC-DCs off aliexpress is a bit risky. The ones with "LM2596" are all fake with garbage quality capacitors. The one you quote doesn't have electrolytic capacitors, so at least it won't have bad electrolytic capacitors. There is no diode so it's probably synchronous, which means better efficiency. It'll probably work fine.

I'm going to use an ESP32, the project has lots of relays so I went with a 24V power supply, and I'm using this Recom DC-DC which is definitely not expensive. There are also higher current versions, the usual shops (mouser, farnell, digikey...) have plenty of canned buck converters like this, from known manufacturers and with full specs and datasheet...

Note if you want good smooth high frequency PWM for your LEDs, ESP32 is a better option than ESP8266.

\$\endgroup\$
3
  • \$\begingroup\$ bobflux - somehow you bumped into some problems I did not share. A) since my PCB containing this AMS117 PCB was soldered to, few times went into flames ending trashing my WEMOS, and 180mA was surely not the reason, so my first guess was low grade components (since it happend only on 2or 3 items, and others didn't). B) since some of my LED strips occasionally change its brightness, I guess it had something to do with a) power-supply b)AMS1117 - so my NEW PCB contains optional capacitior before and after AMS1117 to try fix this. Now you suggest to try an ESP32.... intersting \$\endgroup\$
    – guyd
    Commented Nov 21, 2021 at 12:04
  • 1
    \$\begingroup\$ ESP32 has much better PWM (16 channels, high frequency, lots of bits) very useful if you need fancy RGB dimming on your LEDs. If you don't need it, then... you don't need it. AMS1117 is dirt cheap because it time travelled from the 1985's so it likes large capacitors like back in the day, it's a really crummy part, plus if it comes from aliexpress it's also probably counterfeit. Total cost of a modern LDO plus ceramic capacitor is actually lower. \$\endgroup\$
    – bobflux
    Commented Nov 21, 2021 at 12:41
  • \$\begingroup\$ Why did you say that aliexpress.com/item/… is fake? \$\endgroup\$
    – guyd
    Commented Nov 21, 2021 at 13:36
2
\$\begingroup\$

The simple answer is that linear regulator "wastes" all the excessive power to make it suitable for the device while the switching step-down "buck" regulator, uses some tricks to achieve the lower voltage with less waste. That "waste" mainly shows up as heat. The trade off is that the switching "buck" usually needs more components and more design calculations while the linear regulator is less complex. Fortunately, there are ready made modules available for switching regulators like the one you mentioned, which ease the burden of that design calculations for beginners like me.

How much waste?

The wasted power of a linear regulator is calculated as P = (Vout-Vin)*I. So, if your application needs for example, 0.5 Ampere (500mA) at 5V, the calculated waste would be P = (12-5)*0.5=3.5 Watts. So your linear regulator acts as a tiny 3.5W heater which may destroy itself if not cooled correctly.

On the other hand, a switching regulator's waste could be as low as 5%. in the worst case of 30% loss (70% efficiency) the wasted power would be about 1W which is a lot more tolerable than 3.5W of the linear one; and it's the worst case.


For your case the LEDs are powered from the 12V supply directly, so the regulator needs to regulate the supply only for that ESP8266 board. The current consumption of the ESP8266 is between 50~200mA according to datasheet and other sources. So we calculate for the worst case of 0.2A which results in ~1.5W of heat. That's not ideal. It may work without a heatsink but it will get hot. Using a cheap "buck" would be better if the costs are OK.

\$\endgroup\$
-1
\$\begingroup\$

[1] The AMS1117 provides hardware programmed 5V(among others). All you need is to check it is 5V ... while the Step-Down Buck Converter needs to be adjusted manually via a pot variable resistor that is vulnerable to dust, vibrations, physical impacts. You needed to do PWM, which suggests robotics, telemetry? The AMS1117 seems a more elegant solution to deliver steady 5V

\$\endgroup\$
2
  • 1
    \$\begingroup\$ Actually, the buck converter in the link is a fixed 5V model. The question states the use for the ESP8266 board. It's for driving an LED string (which involves some form of PWM). There's no robotics involved. You leave out one of the most important reasons for choosing a buck converter over of a linear regulator, which is the fact that it is much more efficient (especially at higher currents and with higher voltage drops). \$\endgroup\$
    – StarCat
    Commented Nov 20, 2021 at 20:33
  • \$\begingroup\$ 'I need to supply 5v to power a Wemos mini MCU (ESP8266 based)' Yes however the what is the use of the MCU for? the power supply may also power the device being controlled by the MCU, we don't know that, neither do you. If you had the time to answer me why did you not contribute that correction/rebuke/mentoring into the answer? \$\endgroup\$
    – Redserpent
    Commented Nov 20, 2021 at 21:27

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.