Techniques for getting 3v3 from the Uno/Mega 5V bus

I've been working on a mini-shield design that draws its power from the 5V bus for a 3v3 peripheral (actually, it will run on anything from 1.8-3.6V, but more of that later). Because of the form factor of the shield, it doesn't have the option of connecting to Vin, so the 5V bus has to do. (It's actually being powered from the ICSP header.)

I've tried two approaches so far, both with limited success.

The first is the "diode voltage drop" effect. I use three IN4007 in series (no particular reason for using this part except I have a bunch of them on hand). I use a 1K resistor to ground to get enough current flowing through the diodes (~3mA) to induce the desired voltage drop -- the multimeter shows a bit over 3V when nothing else is connected, and that gets down to about 2.8-2.9V when the peripheral is drawing current (a device which will draw anywhere from nanoamps up to ~100mA, depending on what it is doing.) That's all well within the spec of the device, so it's all cool for this application.

The second approach is to use a low drop voltage regulator, a LD1117V33, in a TO-220 package (physically a bit big, but I really don't like mucking around with SMD.) I thought this would be a better solution, but actually they are both very comparable in terms of performance for this application.

The problem I have with both approaches is that even for a device with fairly modest current requirements, I seem to be butting up against the limitations of the 5V bus in terms of headroom. For the Uno, it's not so bad, but for the Mega2560, a 12V 500mA PSU, or 5V power from the USB, is insufficient on the Mega2560 to make enough current available to the peripheral (although both of these will work OK on the Uno for this particular application.) I'm finding that if I use a 1000mA rated PSU (12V) fro the Mega I will get the required current to the peripheral.

I'm guessing that the difference is that the Mega2560, being a bigger chip, is drawing more power from the 5v bus and therefore there is less headroom left to power a secondary supply. I must admit I'm surprised that more than 500mA is required to power the Mega2560 and the peripheral adequately using either of these methods, though. That's a lot of juice!

So I'd like to hear what others are doing about (efficiently) getting 3v3 from the 5V bus, in order to make the most of a limited resource, particularly on the Mega. Would a switched regulator rather than a linear one be significantly better, for example? Anyone care to recomend such a part that might be suitable for a small shield?

Any general power supply observations would be welcome, as I can see this is an important area that's trickier than it would first appear to really get right, depending on the peripheral you are trying to use.

"modest current requirements" isn't very useful - what current?

The LD1117 can provide over 1A at 3V3 from a 5V supply, so I think you are losing voltage somewhere else - poor connection
is possible, poor 5V regulation in the first place - have you measured the 5V rail when the 3V3 is sagging for instance?

MarkT:
"modest current requirements" isn't very useful - what current?

Up to 100mA. I did mention it earlier, sorry if it got lost in a long post.

MarkT:
The LD1117 can provide over 1A at 3V3 from a 5V supply, so I think you are losing voltage somewhere else - poor connection
is possible, poor 5V regulation in the first place - have you measured the 5V rail when the 3V3 is sagging for instance?

Well, it's not going to provide 800mA from a 5V supply that is limited to 500mA (or less).

The 5V supply is the regulated supply on the Arduino board.

The voltages measure fine. It's the current limitations of what the Arduino 5V supply (particularly on the Mega2560) can provide after meeting its own needs that appears that is the problem.

What I'm looking for are ways to use that scarce resource as efficiently as possible.

OP, I just measured the current draw on my Mega board, and it's about 90 mA with
no loads on the headers.

I must admit I'm surprised that more than 500mA is required to power the Mega2560 and the peripheral adequately using either of these methods, though. That's a lot of juice!

So any amount of +5vdc current above about 90 ma must be caused by the current used externally by the shield connected or wire connected loads. The 500ma USB current limit is enforced by a on-board thermofuse, and current limit for the on-board +5vdc voltage regulator will be limited by the regulator's max current rating or it's heat dissipation rating whichever is less.

Lefty

OK I'm going to make a guess here that we've been on a wild goose chase and the peripheral taking "~ 100mA" is actually a GSM module/shield
taking 800mA for 1/8th of the time?

You must find out the peak current requirements, not measure the average, when its a bursty load. GSM transmits on timeslices, usually one out of eight. Or it might be some other device that has peak current requirements higher than the average (multimeters take readings over a second or so and cannot follow rapidly changing values).

OK, let's suppose a hypothetical peripheral draws 100mA (peak) at 3v3.

What design(s) might be considered best practice in terms of the power supply circuitry for powering it using the Arduino 5V rail?

(If anyone's looking for wild geese to chase, they're over there.)

I think it sounds to some like some of those numbers don't sum properly.

If I were building a shield that needed a nontrivial amount of current at 3.3V, I would either
run a 3.3V v.reg off of the Vin pin, or include a 5V v.reg on the shield running off Vin to supply
the 3.3 v.reg.

For boards like the Mega and a lot of others that have those tiny SOT-223 v.regs, I wouldn't
try drawing more than a minor amount of current from them, 100-200 mA tops in general,
due to over heating of the SOT-223 devices.

In all cases, you need to compute power dissipation and temperature rises, as that dictates
how much current you can actually draw from each v.reg package type, given typical ranges
of Vin.

oric_dan(333):
I think it sounds to some like some of those numbers don't sum properly.

Maybe they do, maybe they don't, but that's the reason I thought I'd ask the more general question.

oric_dan(333):
If I were building a shield that needed a nontrivial amount of current at 3.3V, I would either
run a 3.3V v.reg off of the Vin pin, or include a 5V v.reg on the shield running off Vin to supply
the 3.3 v.reg.

For boards like the Mega and a lot of others that have those tiny SOT-223 v.regs, I wouldn't
try drawing more than a minor amount of current from them, 100-200 mA tops in general,
due to over heating of the SOT-223 devices.

In all cases, you need to compute power dissipation and temperature rises, as that dictates
how much current you can actually draw from each v.reg package type, given typical ranges of Vin.

So my design parameters are: a) I have to use the regulated 5V rail on the Arduino, power supplied via ICSP header. b) I would like to assume that a user can use as full a range of (otherwise valid) external power sources to Vin.

Currently (no pun intended), I've tried various external power sources, a regulated 12V 1A PSU (switch mode), a regulated 12V 500mA PSU (heavier, may be linear rather than switched), and 5V via USB from a laptop. For the same shield and the same test sketch, the Uno will run happily using all three using my LD1117V33 design, but the Mega2560 will only run properly using the 12V 1A PSU. The other two sources appear to be resulting in brown-outs in the resulting supply to the peripheral, leading to intermittent behavior.

So that's what's what. As I said, the numbers may or may not add up, but facts are stubborn things. It looks to me like I'm bumping up against a power supply limitation on the Mega2560 that I'm not seeing (yet) on the Uno. I will be trying to characterize the exact nature of the problem a bit more precisely with further debugging.

But I am still interested in my original general question of what would characterise a "best practice" design for a situation like this --- just so I know I'm not leaving anything on the table. Switch mode regulators? More filter capacitance after the second regulator to reduce brown outs? That sort of thing.

but the Mega2560 will only run properly using the 12V 1A PSU.

Seems this is still the question mark, why the others don't work. Seems at this point,
you're the only guy can answer it.

oric_dan(333):

but the Mega2560 will only run properly using the 12V 1A PSU.

Seems this is still the question mark, why the others don't work. Seems at this point,
you're the only guy can answer it.

Agreed, but entirely independent of that question is the following:

"But I am still interested in my original general question of what would characterise a 'best practice' design for a situation like this --- just so I know I'm not leaving anything on the table. Switch mode regulators? More filter capacitance after the second regulator to reduce brown outs? That sort of thing."

In other words, what are the best designs for a secondary 3.3V rail running off the Arduino 5V rail?

Perhaps just forget for the moment what led me to be interested in this question, and consider it from the general case.

pico:

oric_dan(333):

but the Mega2560 will only run properly using the 12V 1A PSU.

Seems this is still the question mark, why the others don't work. Seems at this point,
you're the only guy can answer it.

Agreed, but entirely independent of that question is the following:

But I am still interested in my original general question of what would characterise a "best practice" design for a situation like this --- just so I know I'm not leaving anything on the table. Switch mode regulators? More filter capacitance after the second regulator to reduce brown outs? That sort of thing.

In other words, what are the best designs for a sencondary 3.3V rail running off the Arduino 5V rail?

Perhaps just forget for the moment what led me to be interested in this question, and consider it from the general case.

Well then the answer is simple, the best case solution is a switch mode 5 volt to 3.3volt regulator. It will not waste 5 volt power just to turn it into heat, so the total wattage consumed from the 5 volt bus from any given 3.3 volt load will be less. Next question?

Lefty

retrolefty:
Well then the answer is simple, the best case solution is a switch mode 5 volt to 3.3volt regulator. It will not waste 5 volt power just to turn it into heat, so the total wattage consumed from the 5 volt bus from any given 3.3 volt load will be less. Next question?

Lefty

Recommended part #s for the regulators? Suggested values for caps, etc?

pico:

retrolefty:
Well then the answer is simple, the best case solution is a switch mode 5 volt to 3.3volt regulator. It will not waste 5 volt power just to turn it into heat, so the total wattage consumed from the 5 volt bus from any given 3.3 volt load will be less. Next question?

Lefty

Recommended part #s for the regulators? Suggested values for caps, etc?

I wouldn't personally try and build a switching regulator for raw components, not with the cheap prices one can find for complete modules on E-bay from asian sellers. I would just mount the regulator subassembly onto the shield. You buying decision is just a trade-off of 3.3v current capacity Vs module size you can live with, but that's your task. :wink:

I just bought five of these for tasks like this:
http://www.ebay.com/itm/251066005460?ssPageName=STRK:MEWAX:IT&_trksid=p3984.m1423.l2649

Lefty

retrolefty:

pico:

retrolefty:
Well then the answer is simple, the best case solution is a switch mode 5 volt to 3.3volt regulator. It will not waste 5 volt power just to turn it into heat, so the total wattage consumed from the 5 volt bus from any given 3.3 volt load will be less. Next question?

Recommended part #s for the regulators? Suggested values for caps, etc?

I just bought five of these for tasks like this
http://www.ebay.com/itm/251066005460?ssPageName=STRK:MEWAX:IT&_trksid=p3984.m1423.l2649

Yes, I've seen those. I also notice that the whole unit is selling for significantly less (including shipping) than I can buy the regulator used from Mouser! (at least in small quantities.)

But since space will often be an issue, I was really interested in a design, even if it will cost more to build than buying a ready made board from China.

Which is why I was interested in the specifics. Maybe not such a simple answer, after all.

What about using non-switched regulators? Any tricks there that can be exploited? What is the upper range/type of the filter cap value I should be considering, for example?

What about using non-switched regulators? Any tricks there that can be exploited? What is the upper range/type of the filter cap value I should be considering, for example?

Well if by non-switching regulators you mean basic linear voltage regulators, then you are back with having to live with the wasted +5vdc power the 3.3 volt linear regulator consumes as heat to perform it's regulation duties, and I thought one of your goals was to minimize the load on the +5vdc bus to a minimum while still supplying the 3.3v load current demand required. Power management and current budgeting is almost never easy, as the trade-offs can be difficult decisions. But in this day and age switching regulators are quickly taking over for most new designs as their advantages no longer come at such a cost disadvantage as they once did.

The new arduino Due board now uses a switch mode regulator to convert from Vin to +5vdc, but surprisingly they seem to still use a simple linear regulator for the +5vdc to +3.3vdc duty and 3.3 volts is the main current consumer, as the ARM chip is a 3.3 volt device. But in a way that makes sense as the biggest waste of power and heat is when users use a higher value of Vin, say 12-20, where there is much energy wasted in heat if wired straight to a linear regulator like most past arduino boards.

Lefty

retrolefty:
The new arduino Due board now uses a switch mode regulator to convert from Vin to +5vdc, but surprisingly they seem to still use a simple linear regulator for the +5vdc to +3.3vdc duty and 3.3 volts is the main current consumer, as the ARM chip is a 3.3 volt device. But in a way that makes sense as the biggest waste of power and heat is when users use a higher value of Vin, say 12-20, where there is much energy wasted in heat if wired straight to a linear regulator like most past arduino boards.

Lefty

That's interesting, and surprising, int the context of this thread where I asked a question about the 5V and 3v3 power rails on the Due:

http://arduino.cc/forum/index.php/topic,132509.0.html

Someone replied that the current rating for the rails was 800mA each. But maybe 800mA in total would be more accurate -- you're certainly not going to get 800mA out of a secondary 3v3 rail if the 5V rail is limited to 800mA!

I take your point about the 5V->3v3 drop to be relatively small, and hence not so wasteful. I actually had this in mind when selecting the LD1117V33, which doesn't even get warm in use. So maybe a switcher for this step is overkill.

Bt what about the choice of the other components? Caps etc.? (I was thinking about taking a look at the Due schematic for some hints regarding "best practice", but then remembered the thread about the 16V caps on the Vin input stage, and though "maybe not".)

Bt what about the choice of the other components? Caps etc.? (I was thinking about taking a look at the Due schematic for some hints regarding "best practice", but then remembered the thread about the 16V caps on the Vin input stage, and though "maybe not".)

The input and output caps used with typical linear regulators has nothing to do with their operating effiency, it's about preventing the regulator from going into oscillation under certain operating conditions, so there are there as more of a safety issue then an power efficiency issue. See the datasheet for your specific linear regulator for a much better description of the reason for their use and proper sizing recommendations. Output filter caps on switching mode regulators have a much more active role as they are part of a low pass output filter to help filter out the switching frequency being used to generate the regulated DC output voltage.

Lefty

retrolefty:
Output filter caps on switching mode regulators have a much more active role as they are part of a low pass output filter to help filter out the switching frequency being used to generate the regulated DC output voltage.

Yes, I was thinking that if the 5V regulation was doing its job, there wouldn't be much need for the output filter caps regarding ripple from the supply side. But then I was thinking that maybe I hadn't considered their role for smoothing out demand spikes, which occurs might be coming into play in some situations? What do you think? Significant or not?

pico:

retrolefty:
Output filter caps on switching mode regulators have a much more active role as they are part of a low pass output filter to help filter out the switching frequency being used to generate the regulated DC output voltage.

Yes, I was thinking that if the 5V regulation was doing its job, there wouldn't be much need for the output filter caps regarding ripple from the supply side. But then I was thinking that maybe I hadn't considered their role for smoothing out demand spikes, which occurs might be coming into play in some situations? What do you think? Significant or not?

I'm sure it's significant, digital current loads are very 'spiky' in nature. I just can't explain the specific operating conditions that can cause a linear voltage regulator to break out into oscillation, but their datasheets should do a good job of the why and how to avoid it. As I recall the output filter caps value used is not all that critical and the datasheet usually gives a range of values that will work.

Lefty