2
\$\begingroup\$

I have a 12 V supply and wish to use it to provide 5 V supply to NodeMCU, which draws about 110 mA.

Which would be better to use? A 5 V 1 W zener and a 70 ohm resistor? Together they cost about $0.10 and only two parts to solder.

Or voltage regulator? An AMS1117 5 V with two capicators costs about $0.30 and three parts to solder. Or maybe a 7805 which outputs 5 V?

I will be making about fifty of these boards.

\$\endgroup\$
  • 1
    \$\begingroup\$ Use a regulator. Actually, nodeMCU uses a regulator, maybe you dont even need an external one. \$\endgroup\$ – Wesley Lee Oct 1 '16 at 6:00
  • \$\begingroup\$ @WesleyLee Hmm. I'm a little confused. I haven't attempted to use any of the NodeMCU boards (there appear to be several varieties.) I have not been able to find anything official about the power supply rail or range of voltages. I did find web sites claiming it works down to 2.2 V and up to 4.7 V (risky, they said.) Doesn't sound like 5 V. But I see what appears might be a regulator near the middle of one of the boards I looked it. Well, that's all the time I'll spend looking. Just curious if you had a handy link. If not, that's fine. \$\endgroup\$ – jonk Oct 1 '16 at 6:54
  • 2
    \$\begingroup\$ Use a switch-mode regulator (DC-DC converter). A linear regulator will waste about 700 mW in heat, and a Zener plus resistor will waste somewhat more power. \$\endgroup\$ – Peter Bennett Oct 1 '16 at 6:58
  • 1
    \$\begingroup\$ I see I have same address as Wesley supplied BUT get a direct PDF link with my version and not his ??? || 4th page here shows an internal NCP11173V3 regulator with NOTIONAL Vinmax of 20V. Dissipation makes this a very bad idea AND it is not safe to assume regulator will really take 20V. || IF it has an internal regulator you can drop SOME voltage externally with a resistor to keep module cooler. eg 47R at 100 mA drops 4V7 from 12v and still gives regulator some headroom. \$\endgroup\$ – Russell McMahon Oct 1 '16 at 10:39
  • 1
    \$\begingroup\$ @TonyStewart right. most of these app are things like table lamps. have the 12v adaptor that plugs into the wall. so no AC either. \$\endgroup\$ – cc young Oct 1 '16 at 13:34
2
\$\begingroup\$

Placing a single 5V1 zener diode with a resistor is not a good idea.

Zener-Transistor Regulator: Consists of a 5V6 zener (500mW or even smaller), a BD- series NPN transistor (e.g. BD241 or BCP56), 1 or 2 resistor and 2 electrolytic and 2 ceramic caps.

L7805 or AMS1117-5 Linear Regulator: Should be TO-220 or D²PAK package. Don't even try TO-92. Of course you need at least 2 electrolytic and 2 ceramic (100n or so) caps.

In either ways, the power dissipation of the regulator element (power transistor in opt.1, L7805 or AMS1117-5 on opt.2) will be at least $$ Pt = (Vs - Vo) Io = (12 - 5) 0.11 = 770mW. $$ For a TO-220 package, Rth = 62.5°C per Watt, hence the temperature rise of the regulator element will be $$ \Delta T = Rth * Pt = 62.5 * 0.77 = 48°C $$ And if we suppose the ambient temperature is about 24°C, the temperature of the regulator will be 72°C! You do need a heatsink (with black anodized coating recommended).

Why don't you try a simple cellphone charger?

| improve this answer | |
\$\endgroup\$
  • 1
    \$\begingroup\$ took me off guard that pulling a mere half watt could generate so much heat. you're right - cellphone charger or one of those LM2596 modules is the way to go. \$\endgroup\$ – cc young Oct 1 '16 at 9:02
  • \$\begingroup\$ If you want to make your circuit do not use a 7805, there are better options out there. \$\endgroup\$ – Vladimir Cravero Oct 1 '16 at 10:04
  • 2
    \$\begingroup\$ Using an air cooled series R before regulator to drop Vin to headroom limit at max I reduces regulator dissipation to Vheadroom x Imax. 2W resistor would nominally be OK (under 50% dissipation) but depending on available room a 5W ceramic blob would be very happy. \$\endgroup\$ – Russell McMahon Oct 1 '16 at 10:42
  • 1
    \$\begingroup\$ @RussellMcMahon what the resistor would be doing is emanating some of the heat rather than the regulator, but total heat is the same - right? \$\endgroup\$ – cc young Oct 1 '16 at 13:36
  • 2
    \$\begingroup\$ @ccyoung Yes. Total max waste heat is (Vin-Vout) x Imax . BUT air cooled resistors rated at far more than you are dissipating are cheap and common and allow regulator dissipation to be reduced to a minimum - so heatsinking and/or package used can be less significant. Resistors dissipating significant power should be run at a maximum of well below their rated power for reliability. Here you have 700 mW max. The regulator needs SOME headroom so say 500 mW in resistor max. So a 2W resistor would probably be OK BUT If room etc not an issue I'd use a 5W ceramic block resistor - cheap and common. \$\endgroup\$ – Russell McMahon Oct 1 '16 at 14:10
1
\$\begingroup\$

Using an air cooled series R before regulator to drop Vin to headroom limit at max I reduces regulator dissipation to Vheadroom x Imax.
2W resistor would nominally be OK (under 50% dissipation) but depending on available room a 5W ceramic blob would be very happy.

How hard can it be to 'design' a resistor? Let's find out.

What the resistor would be doing is emanating some of the heat rather than the regulator, but total heat is the same - right? –

Yes.
Total max waste heat is (Vin-Vout) x Imax .
BUT air cooled resistors rated at far more than you are dissipating are cheap and common and allow regulator dissipation to be reduced to a minimum - so heatsinking and/or package used can be less significant.

Resistors dissipating significant power should be run at a maximum of well below their rated power for reliability. Here you have 700 mW max. The regulator needs SOME headroom so say 500 mW in resistor max. So a 2W resistor would probably be OK BUT If room etc not an issue I'd use a 5W ceramic block resistor - cheap and common.

fyi 5w ceramic block resistors about $0.20/ea, and metal film 2w 47 ohm resistor about $0.03/ea. Am I right in aiming at 47 ohm here? for ceramics, seem to be limited to 22, 47 and 75 ohm.

The aim is to distribute the heat most benignly.
First you MUST take maximum current draw EVER and maximum Vin ever.
If Imax is 100 mA usually but sometimes 100 or 120 mA more than very momentarily then use the worst case unless it is certain to be only for short enough period to not matter thermally.

Then look at 12V supply - is it 1% regulated or 5% or 10% or ???.
A brief surge at startup does not matter thermally (probably) but it if can run 10% high worst case then that's what must be used.
Say worst case is 13V and 120 mA (probably High).
If vout = 5V then you must deal with (13V-5V) x 120 mA
= 8 * 120mA = 960 mW heat.
If it was 12V and 100 mA then heat dissipation = (12-5) x 100 mA = 700 mW
so the 13V/120 mA would be about 35% more heat if it applied.

Then look at the onboard regulator. What Vmin does it need worst case at max possible current? Some regulators safely allow 1V or less "headroom" while some may need 2 to 3V. Say it was a modernish LDO and allow 2V. So Lowest possible max regulator heat is 2V x 120 mA = 240 mW. Then resistor COULD drop regulator input voltage to within 2V of 5V = 7V. Now you need MINIMUM 12v rail to calculate resistor so headroom is maintained at 12V_min_level. Say it's always at least 12V.
So resistor can be R = V/I = (12-7)/120 mA = 41.666 Ohms.
You can use smaller but not larger to maintain 2V headroom.
If Imaxpossible = 100 mA then Rmax = (12-7)/100 mA = 50 Ohms so 47R is OK.
Now look at regulator - is the above 240 mW worst case OK with heatsink etc used.
If it's easily able to handle that then all is well.
But, if it will get too hot then you need more heatsinking or an external regulator.
That 240 mW was based on 120 mA worst case and 2V dropout allowance - and it MAY be much lower. SO finally calculate Rexternal based on all above

3 cents for a 2W metal film sounds nicely low cost in US. Easy enough in China. Here R dissipation is 960 mW max based on above and probably lower. Work out actual worst case figures. There is no hard rule to how close a resistor can be run to its wattage ratings and notionally 100% is OK BUT a look at the data sheet may show that that rating is only for impossible air conditions etc. So look CLOSELY at data sheet and housing etc. I'd try to not run a resistor above 50% of it's allowable ratings in a given application and lower is nicer.
Running a 5W resistor at under 1W gives me a comfortable feeling.
Running a 2W after rating for conditions RESISTOR (eg maybe 3W nominal) at approaching 1 watt sustained worst case would leave me far less comfortable.
Doable? Sure.
Reliable? Probably.
Wise? Do they pay you for callouts? :-).

Please provide links to resistors concerned if available.

| improve this answer | |
\$\endgroup\$
  • \$\begingroup\$ power source 12V plug in adaptor - range from 12.1 to 11.5V with load. need 5v between 100 - 120ma. 1) can use prebuilt LM2596 module between $0.40 and $0.60 (more has caps). or 2) can build on board using 1 AMS1117-5, 3 10uf 25V electrolytic caps (one in, two out for 20uf), 1 3w 42ohm resistor, cost totaling about $0.13. the AMS1117 is SOT-223 surface mounted. \$\endgroup\$ – cc young Oct 2 '16 at 7:17
  • \$\begingroup\$ do not think much info in links, but here they are: aliexpress.com/item/… aliexpress.com/item/… aliexpress.com/item/… - I am retired in Cambodia. shipping from China to here is very cheap. \$\endgroup\$ – cc young Oct 2 '16 at 7:21
  • 1
    \$\begingroup\$ @ccyoung OK. Your location and sources add extremely useful perspective. I'm well aware of Chinese supply situation and costs. (I've visited China 15 times and spent 6+ months in China overall.) Referenced resistors are liable to be OK (never certain). IF you depend on caps staying good over lifetime (whether it matters depends on design) then I'd be wary of components of unknown 'provenance'. Chengx I know not. They may be superb. They may be junk. I've seen both. Gong Chen may be exceedingly reputable. \$\endgroup\$ – Russell McMahon Oct 2 '16 at 8:36
  • 1
    \$\begingroup\$ Or not. I'd have no reason to expect they were. Even if they are. Caps sold with no temperature spec are suspect. Even if they are superior quality the supplier does not care to say either way. || AMS1117 solution is fin as long as part meets spec. I have some that don't. IF you care and if you can test well enough and/or have confidence in your supply chain then all could be well. LM2596 would be very under-stressed in that application. || I guess the main conclusion is that any solution of these types can be fine but don't use a zener :-). \$\endgroup\$ – Russell McMahon Oct 2 '16 at 8:39
  • \$\begingroup\$ thanks again. guess I'll go for it. feel much more confident in this approach than the modules. will keep you posted if you don't mind. \$\endgroup\$ – cc young Oct 2 '16 at 9:34

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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