5v MCU powered from 5-24v - Page 1
Forum section: electronics / projects

author: mobbarley
author_rank: Regular Contributor
timestamp: October 18, 2010, 10:37:25 am
content: I want to run a 5V MCU with an input from 5-25V, whats the best way of doing this?I only need ~10mA so I was thinking of a series resistor with shunt a regulator but if my calculations are correct the series resistor will be at almost 2W dissipation at 25V - a little high.

author: Zero999
author_rank: Super Contributor
timestamp: October 18, 2010, 11:12:34 am
content: I think you've got the decimal point wrong, I make it 200mW.Another option is to use a low drop-out regulator and make sure that the circuit will still work when the input voltage is 5V and the regulator is operating in drop-out.The LM2936Z-5 has a low quiescent current current of 15µA and the drop-out voltage will be just 150mV when the load current is 10mA so with 5V in, the output voltage will be 4.85V which is within the power supply voltage specification of all 5V logic components.

author: saturation
author_rank: Super Contributor
timestamp: October 18, 2010, 11:15:22 am
content: Build a regulator around LM7805 IC, this will accommodate the wide range in Vdcin and give you a Vo= 5Vdc within 4%.

author: TheDirty
author_rank: Frequent Contributor
timestamp: October 18, 2010, 11:54:31 am
content: 7805 has a dropout of 2V. That wouldn't work at 5V in. You need something with a much lower dropout, like Hero999 suggested, or some other way to avoid the dropout as Vin gets close to 5v. I'm not the best at analog and power.

author: migsantiago
author_rank: Frequent Contributor
timestamp: October 18, 2010, 01:30:23 pm
content: A step-down switching supply would be enough. I was going to recommend the TL2575 but it only accepts an input from 10V to 40V and you have 5V to 24V.The easiest choice is a 7805 as the other guys say.Forgot the dropout voltage.

author: saturation
author_rank: Super Contributor
timestamp: October 18, 2010, 01:41:16 pm
content: you're right, at least 7Vindc. I stand corrected.Quote from: TheDirty on October 18, 2010, 11:54:31 am

author: scrat
author_rank: Frequent Contributor
timestamp: October 18, 2010, 01:50:02 pm
content: If your spec is strict, and you have to obtain (in the worst case) 5V from a 5V- source, then you will need a switching regulator that can even step-up voltage (buck-boost or similar).Otherwise, if an output voltage of little less than 5V is allowed, what about bypassing an LM7805 or similar with a Schottky diode? The IC regulator will work for high input voltages, while at low values (near to 5V) the diode will provide something above 4.5V, which could be enough.

author: Mechatrommer
author_rank: Super Contributor
timestamp: October 18, 2010, 02:00:12 pm
content: LM317 input 8V-40V for Vo = 5V

author: Strube09
author_rank: Regular Contributor
timestamp: October 18, 2010, 02:03:20 pm
content: Is the input anywhere from 5-24V?Or would it be used at certain levels from certain sources? Like 5V wall wart, 9V wall wart, 12 or 24V Automotive?If so you could set up a comparator circuit that would just say anything less than 5.5V would just pass the supply to the controller and anything greater than 5.5 would pass the voltage through a regulator.What kind of micro are you using. Microchip has a few high volt chips that have a internal shunt regulator that you could look at if you are using a PIC.

author: scrat
author_rank: Frequent Contributor
timestamp: October 18, 2010, 02:34:58 pm
content: Quote from: Strube09 on October 18, 2010, 02:03:20 pmIt ends up that a simple reference(zener?)+opamp+MOSFET could be a good choice. For little currents, series resistance of the MOSFET can have quite low dropout (even a 10 Ohm MOSFET will give 100mV @10mA).

author: Zero999
author_rank: Super Contributor
timestamp: October 18, 2010, 06:44:34 pm
content: I wouldn't rule out either the LM7805 or LM317 just yes, it depends on the minimum voltage requirements of the PIC circuit. The drop-out voltage depends on the current, for example with an output current of 10mA a typical LM317 will drop-out at 1.5V, not 3V so if the PIC circuit is still fully operational down to 3.5V, it will be fine, otherwise you need a better regulator.

author: RayJones
author_rank: Frequent Contributor
timestamp: October 18, 2010, 06:50:33 pm
content: The obvious answer would be a SEPIC buck/boost switching regulator design.The not so obvious is the design of these, but SEPIC into Google will get you started.The efficiency of a SEPIC is not as good as either buck or boost regulator versions, but still is a damn sight better than a shunt regulator @ 24V. ie heat dissipation.Another possibility depends on how tight your 5V needs to be.If you use a Low Voltage capable PIC, you could maybe simply use a 7805.You will probably find the 5V output regulation stops when you get to 7Vish, but the output voltage will still follow the input albeit with a 2V or so difference.This however definitely falls into ugly design territory.

author: migsantiago
author_rank: Frequent Contributor
timestamp: October 19, 2010, 02:10:42 am
content: Quote from: RayJones on October 18, 2010, 06:50:33 pmI didn't know that kind of supply. Thanks for mentioning it.

author: slburris
author_rank: Frequent Contributor
timestamp: October 19, 2010, 03:57:15 am
content: So let me put in a plug for the design software on the National Semiconductorsite. You can start a design right on the front page:http://www.national.comSo I put in the input voltage 5-24 volts, output voltage 5 volts, current 50ma,and out popped a nice little flyback switcher design using the LM2585, completewith schematic and a parts list. See attached PDF for details.Scott

author: RayJones
author_rank: Frequent Contributor
timestamp: October 19, 2010, 07:28:35 am
content: Quote from: slburris on October 19, 2010, 03:57:15 amGotta love that Design.pdf file.It even lists the components, especially the transformer.I admit the magnetics are always my weak point with switcher designs - choice of core windings etc.

author: scrat
author_rank: Frequent Contributor
timestamp: October 19, 2010, 08:45:10 am
content: Quote from: slburris on October 19, 2010, 03:57:15 amGood shot! I didn't even know how powerful it could be a tool like this.

author: Zero999
author_rank: Super Contributor
timestamp: October 19, 2010, 09:58:37 am
content: Quote from: RayJones on October 18, 2010, 06:50:33 pmDon't you think that's a little overkill for 5V at 10mA from a 24V power source?Presumably it doesn't need to be low power so I don't see any real benefit of using an SMPs.Just for educational purposes: an alternative to a SEPIC is to use two switching transistors so it can work both as a buck and as a boost.http://www.eetimes.com/design/automotive-design/4006655/Linear-regulators-vs-switchers-for-automotive-applicationsQuoteThat sounds like a good enough idea to me.QuoteThe dropout voltage will be closer to 1.5V with an output current of only 10mA (see the datasheethttp://www.national.com/ds/LM/LM340.pdf) so it should be better than that, if the PIC will work down to 2V, it should be fine down to 3.5V which should be more than enough contingency for a circuit running off a 5V supply. Just make sure the output is well decoupled so ensure it's still stable when regulation is lost.

author: RayJones
author_rank: Frequent Contributor
timestamp: October 19, 2010, 10:26:30 am
content: Yeah a SMPS for 10mA is a bit of overkill. I must admit I skimmed the current requirement.If you reckon the voltage regulator is the go then there is really no difference to the OP's original desire to use a shunt regulator and a series dropping resistor.Either way 200mW needs to dissipated, it either going to be the series resistor or the series voltage regulator.The series voltage regulator will however not regulate once we reach whatever the dropout voltage is.The shunt regulator will always give a more stable "5V" than a series pass device.There are some nice TO-92 shunt regulators. I encountered some in a, dare I say it, SMPS I recently repaired.http://www.fairchildsemi.com/ds/KA%2FKA431.pdfis the devices I came across.A simple 4V7 zener would maybe all that is needed and an appropriate sized resistor value, but the varying zener current would be somewhat of an issue for a stable Vout over the specified range.The KA431 would eat it for breakfast.

author: Zero999
author_rank: Super Contributor
timestamp: October 19, 2010, 11:19:09 am
content: The advantage of a series pass device is that it uses less current when the output current falls, a shunt just uses the same amount of power regardless. In this case though, the LM7805 has a quiescent current of 6mA and the requirement is 10mA so I agree, use the (LM/TL/KA)431.

author: TheDirty
author_rank: Frequent Contributor
timestamp: October 19, 2010, 12:19:19 pm
content: Another thread that can't actually give any final answers because the OP never returns to answer any questions regarding their actual design rules.

author: Mechatrommer
author_rank: Super Contributor
timestamp: October 19, 2010, 04:40:43 pm
content: so we just talking to ourself.

author: Zero999
author_rank: Super Contributor
timestamp: October 19, 2010, 05:09:44 pm
content: I think we should be more patient. We've only waited just over a day for the original poster, give it a few days, then we can start complaining. It annoys me when people ask questions on forums then whine when no one responds within a day - let's not be like that.

author: TheDirty
author_rank: Frequent Contributor
timestamp: October 19, 2010, 05:27:20 pm
content: Quote from: Hero999 on October 19, 2010, 05:09:44 pmThought the post date was earlier than that, but I was looking at the join date.

author: Mechatrommer
author_rank: Super Contributor
timestamp: October 19, 2010, 06:45:55 pm
content: Quote from: Hero999 on October 19, 2010, 05:09:44 pmok ok! ok "pa"i'm following you!

author: mobbarley
author_rank: Regular Contributor
timestamp: October 20, 2010, 11:47:28 am
content: i'm here i'm hereA lot of suggestions - I should have started out by mentioning that I had looked into a sepic / etc but I am really aiming for a tiny pcb that works first time - efficiency is not really a concern as it will be wall-powered from the device it is plugged into.I thought the drop out of even an LDO would be around a volt so I started looking at a shunt regulator etc. However from the look of some data sheets I should be able to get around 4.8v out from a 5v source - this is close enough to not need any bypass mechanism.All that and everything handled by an IC + small capacitor which is great for my small footprint of ~2 sq.inches.

author: Zero999
author_rank: Super Contributor
timestamp: October 20, 2010, 12:56:00 pm
content: Quote from: mobbarley on October 20, 2010, 11:47:28 amIs 4.8V your minimum voltage or will it work at lower voltages?Are you using the 5V as a reference? Could it be reduced to 3V?If it'll work down to 3V You could just about get away with the L317L which comes in a small TO-92 of SOIC8 package but don't expect great regulation when the input voltage is only 5V.The LM317 would be better but takes up more room so use the H or MDT version which comes in the smaller TO-39 or TO-252 packages.I still think the LM431 is the best solution suggested so far.

author: mobbarley
author_rank: Regular Contributor
timestamp: October 20, 2010, 01:26:48 pm
content: Quote from: RayJones on October 19, 2010, 10:26:30 amSo here is where I gave up on the shunt regulator, but perhaps I am doing it wrong:Series resistor:5V at least 10mA required = ~500R@25V 500R = 50mA50mA through 500R = 1.25 W.This makes for a pretty large resistor. I was hoping to do this all SMD.

author: mobbarley
author_rank: Regular Contributor
timestamp: October 20, 2010, 01:29:35 pm
content: Quote from: Hero999 on October 20, 2010, 12:56:00 pmThe MCU could run at 3V but the outputted data signals must be pretty close to 5V. The device that this controller is plugged into could supply 5, 12 or 24V but requires 5V data signals. If it took the input voltage for data I would settle for a 3.3v reg and use a logic level mosfet for the data line.

author: Zero999
author_rank: Super Contributor
timestamp: October 20, 2010, 01:50:28 pm
content: Quote from: mobbarley on October 20, 2010, 01:26:48 pmWhere did you get the 50mA from?A shunt regulator such as the LM431 only requires 1mA to regulate properly and the PIC requires 10mA so that's 11mA in total.The problem you now have is that you need a constant current source to power the shunt regulator - I didn't think of this before. If you select a resistor to give 11mA at 25V 20/11 = 1.8k the current will fall below that when the voltage drops below 25V. If you select a resistor which will only drop 0.5V at 11mA then 0.5/0.011 = 45, 43 Ohh being the nearest preferred value, you have 20/43 = 465mA, when the supply voltage is 25V. Maybe the LM431 wasn't such a bright idea after all.The constant current source will need to be low drop out too so you might as well go with a low drop out voltage regulator - it's the only sensible option.

author: RayJones
author_rank: Frequent Contributor
timestamp: October 20, 2010, 07:02:23 pm
content: Well it is certainly looking like the conventional linear regulators are all limiting in one aspect or another for the original reason I stated - heat dissipation.You stated you are not after efficiency, but you don't want the heat....You could just whack a few R's is parallel and share the heat love....It really does start to make a transformer based switcher like Scott's design, actually National's, look more and more appealing.That should EASILY fit in 2" square, especially if you wield the SMD stick.It crossed my mind last night on the train you need something like a fully enhanced mosfet as a pre regulator for 5V and increase the Rds with increasing input volts.Ala a heroic constant current source, at least the power is then being dissipated in a more heatsink friendly package, and the current rise does not get stupid giving such high power dissipation.A fully enhanced mosfet at 5V is however back to front in term of Vgs, but hey it is only 6AM right now and the brain is still half asleep!

author: Zero999
author_rank: Super Contributor
timestamp: October 20, 2010, 10:08:35 pm
content: Quote from: RayJones on October 20, 2010, 07:02:23 pmWhat are you talking about? The maximum current is only 10mA and with a 25V supply is only a miserable 200mW which should be easy to sink with a SMT component on a PCB copper plane.The resistors also want to go in series with the regulator but they're not required in this case and will only increase the drop-out voltage so would be a bad idea.

author: RayJones
author_rank: Frequent Contributor
timestamp: October 21, 2010, 01:06:12 am
content: Oh FFS, the context I'm talking about was a shunt regulator.The OP has already pointed out the current would be much higher with a 25V input, and he cannot tolerate the drop over a linear regulator at 5V input.BTW, the current in the OP's current calcs for a 25V input to a 5V shunt regulator would not be 50mA, but 40mA with a 500R resistor: => 20V drop over 500ohms.20V x 20V / 500 = 800mW, certainly not as bad as the OP's original 1.25W, but still requires a meaty R to dissipate the heat.So put 3 or four smaller R's in parallel to spread the heat.However, the original calculation of 500 ohms is seriously flawed.For sure you'll get 10mA with 5V across 500R, leaving NO VOLTS INTO THE MCU!So make it 50 ohms = 0.5V drop @ 10mA, but 400mA at 25V inputThat's now 8W in the series R.- SHUNT IS NOT GOOD FOR WIDE INPUT RANGE -The LDO is a possible answer, but not the only one.http://www.national.com/ds/LP/LP2954.pdfshows a reasonable dropout voltage, best you could probably hope for, but pay due caution to the stability requirements in the DS.And yes I'll grant you 200mW for a LDO voltage regulator.At the end of the day it is the OP's choice which way he goes.If he truly desires 5V at 5V in, a SMPS is the only way out.

author: mobbarley
author_rank: Regular Contributor
timestamp: October 21, 2010, 05:20:30 am
content: Quote from: RayJones on October 21, 2010, 01:06:12 amI tried to make a worst-case generalisation, i'm not sure if that is correct or not. In reality the shunt regulator would also burn off excess power into heat spreading some of the heat over its transistor (might need to be external) - but with about a watt constant i'm sure my little board would get quite warm.

author: Zero999
author_rank: Super Contributor
timestamp: October 21, 2010, 06:56:11 am
content: In a shunt regulator, most of the power will be burnt off in the series resistor when the input voltage is high and in the MCU when the input voltage is low.I also explained the problem of the shunt regulator current not being constant a few posts ago.https://www.eevblog.com/forum/index.php?topic=1548.msg20805#msg20805

author: slburris
author_rank: Frequent Contributor
timestamp: October 21, 2010, 02:03:27 pm
content: So if no one likes the National switcher idea, how about this?Since the current requirements are so low, build a switched capacitorvoltage doubler (maybe with a CMOS 555?) that's only enabled whenthe input voltage is below, say 8 volts. Feed the output of the voltagedoubler through a diode to a conventional linear regulator.Also, connect the original input voltage through a diode to the regulatoras well. So the higher of the two voltages powers the regulator. If theinput voltage is above 8 volts, then the regulator cuts that down to 5 volts.If the input voltage is below 8 volts, the capacitor doubler makes thatV x 2 and that powers the regulator which regulates it back down to 5 volts.Or something like that.Scott

author: RayJones
author_rank: Frequent Contributor
timestamp: October 21, 2010, 07:02:11 pm
content: Quote from: slburris on October 21, 2010, 02:03:27 pmI like the switcher Scott and still think it is the most suitable answer and would not take up that much more space.Heck it will even probably deliver 5V out with an input voltage below 5V.

author: Zero999
author_rank: Super Contributor
timestamp: October 21, 2010, 08:10:32 pm
content: I disagree, I think a low drop out linear regulator is the best solution: one IC, a few capacitors and no inductors, why add extra complexity when it's not required?

author: Strube09
author_rank: Regular Contributor
timestamp: October 21, 2010, 08:22:40 pm
content: I too think it is major over kill for a 10ma source. What kind of efficiancy will that produce at such a low load. I bet the dive current of the controller and the gate of the switching FET will kill your efficency at this low of power. @ 5V we are only looking at a 500mW load.

author: slburris
author_rank: Frequent Contributor
timestamp: October 21, 2010, 08:39:16 pm
content: The original problem was produce 5 volts out with an input voltage as low as 5 volts.If that's true, then I don't see how you get away from some sort of switcher/capacitorswitchover design.If the problem really is produce 4.75v out with an input voltage as low as 5 volts,then some LDO solution will work fine.I'm just not seeing shunt designs working well with such a wide input voltage range,although I suppose you could drop a several watt zener after a 0.1ohm resistor andget things to work.Re: the question about the switcher efficiency. Attached is the efficiency graphof the webench design. It's at least 70% efficient or better.Scott

author: Zero999
author_rank: Super Contributor
timestamp: October 21, 2010, 09:22:16 pm
content: Quote from: slburris on October 21, 2010, 08:39:16 pmThe regulator I suggested at the start of the thread, LM2936Z-5, will give 4.85V out when the current is 10mA. The LM2940 is overkill but should output over 4.9V when the output current is just 10mA but the quiescent current is also 10mA which is probably a bit higher than we'd want.I've found a better IC, the LP2980 which will only drop 90mV at 10mA (worst case) and the quiescent current is negligible.http://www.national.com/ds/LP/LP2980.pdfThe original poster explained that the requirement is due to the circuit interfacing with a 5V circuit which should be able to accept 4.9V inputs with no problem.QuoteYes, I think we ruled out shunt regulators a few posts ago.QuoteI don't doubt the efficiency but it's run from a wall so it doesn't matter - the extra complexity and expense of an SMPS simply don't justify the benefits.

author: cybergibbons
author_rank: Frequent Contributor
timestamp: October 21, 2010, 09:27:10 pm
content: If I'm ever trying to solve a problem, and I find that no-one else has already solved the problem, then I probably need to restate the problem, maybe break it down into several distinct issues.What are you trying to achieve? I can't think of anything that has such a voltage range.If it is trying to work with a range of wall warts, that probably isn't enough of a range. I've got 3V up to 28V here, and then you need to deal with polarity and AC.

author: NiHaoMike
author_rank: Super Contributor
timestamp: October 22, 2010, 01:23:33 am
content: You could use a PTC with a shunt regulator, so it self adjusts, but a LDO is a better choice.

author: RayJones
author_rank: Frequent Contributor
timestamp: October 22, 2010, 07:20:35 am
content: Quote from: slburris on October 21, 2010, 08:39:16 pmYes I agree entirely, and that has been the basis of my assertions.If the OP wants 5.0V out with 5.0V in then it must be a switcher.If the OP is happy with 4.75V (5% low) then a suitable LDO will do.If the OP needs a regulated 5V from an unregulated 5V, then once again the switcher is the only one that could possibly cope with Vin dipping below 5V.There has been plenty advise already espoused in this thread.We have explored the shunt regulator and determined that due to the widely spec'd input range it is 100% unsuitable despite initial appearances.The LDO will work if the design is OK with a "5V" rail likely to dip by 5% to 10%.By the sound of it, the design all really hinges on the device required to be driven.Is it logic? If so, what's The minimum acceptable level for a logic "1"?It would be all academic if it external input is actually the ubiquitous TTL compatible, nominally 5V but Vin(min) = 2V!A 5V coming back can be easily handled either by level translators eg 5V to 3V3 stuff, or micros that will cope with input levels higher than Vcc.Only the OP knows these answers, we've supplied heaps of answers, tell us more please

author: mobbarley
author_rank: Regular Contributor
timestamp: October 23, 2010, 04:44:53 am
content: Here we go.Quote from: RayJones on October 22, 2010, 07:20:35 amNo arguments there - but I was trying to keep the parts / size / cost to a minimum as it needs to be small - its a 'circuit on a plug' of sorts. The power is supplied by the plug and will be either a 5, 12 or 24v regulated source depending on the brand / configuration of the equipment it is plugged into. The data lines input back to the device and must only be 5v.Quote from: RayJones on October 22, 2010, 07:20:35 amI am coming to the realisation that 5v in and 5v out is not really possible over this input range without a switcherQuote from: RayJones on October 22, 2010, 07:20:35 amI've done testing and found that anywhere around the 3v mark is recognised by my equipment, so this is sounding like the simplest optionQuote from: RayJones on October 22, 2010, 07:20:35 amIf only it was that simple. The 'specification' (if I can call it that) is 5V high 0V low - as there is a lot equipment this could be plugged into and I only have one brand to test with the aim was to get as close as possible - of course the difference between 4.5 and 5v is nitpicking so an LDO looks like the best option.Quote from: RayJones on October 22, 2010, 07:20:35 am