Pages: 1 [2]   Go Down
Author Topic: Techniques for getting 3v3 from the Uno/Mega 5V bus  (Read 1857 times)
0 Members and 1 Guest are viewing this topic.
Left Coast, CA (USA)
Offline Offline
Brattain Member
*****
Karma: 331
Posts: 16513
Measurement changes behavior
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
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  
« Last Edit: December 06, 2012, 12:16:54 am by retrolefty » Logged

Offline Offline
God Member
*****
Karma: 21
Posts: 650
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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".)



Logged

WiFi shields/Yun too expensive? Embeddedcoolness.com is now selling the RFXduino nRF24L01+ <-> TCP/IP Linux gateway: Simpler, more affordable, and even more powerful wireless Internet connectivity for *all* your Arduino projects! (nRF24L01+ shield and dev board kits available too.)

Left Coast, CA (USA)
Offline Offline
Brattain Member
*****
Karma: 331
Posts: 16513
Measurement changes behavior
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
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
Logged

Offline Offline
God Member
*****
Karma: 21
Posts: 650
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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?
Logged

WiFi shields/Yun too expensive? Embeddedcoolness.com is now selling the RFXduino nRF24L01+ <-> TCP/IP Linux gateway: Simpler, more affordable, and even more powerful wireless Internet connectivity for *all* your Arduino projects! (nRF24L01+ shield and dev board kits available too.)

Left Coast, CA (USA)
Offline Offline
Brattain Member
*****
Karma: 331
Posts: 16513
Measurement changes behavior
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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
Logged

Offline Offline
God Member
*****
Karma: 21
Posts: 650
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

So no tips or tricks you can think of over and above what will in the datasheets?
Logged

WiFi shields/Yun too expensive? Embeddedcoolness.com is now selling the RFXduino nRF24L01+ <-> TCP/IP Linux gateway: Simpler, more affordable, and even more powerful wireless Internet connectivity for *all* your Arduino projects! (nRF24L01+ shield and dev board kits available too.)

SF Bay Area (USA)
Online Online
Tesla Member
***
Karma: 106
Posts: 6371
Strongly opinionated, but not official!
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

The 1117 off the 5v rail should be working.  You need to figure out why it's not...
Logged

Offline Offline
God Member
*****
Karma: 21
Posts: 650
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

The 1117 off the 5v rail should be working.  You need to figure out why it's not...


Well, it does work on the Uno. On the Mega, only with one of three external power sources. That's why I was thinking the mega just doesn't have enough juice left over on the 5V rail after meeting it's own needs...

I'll have to do more digging to find out what exactly the failure mode is on the Mega. It is consistent with brown out for the peripheral, though.

Logged

WiFi shields/Yun too expensive? Embeddedcoolness.com is now selling the RFXduino nRF24L01+ <-> TCP/IP Linux gateway: Simpler, more affordable, and even more powerful wireless Internet connectivity for *all* your Arduino projects! (nRF24L01+ shield and dev board kits available too.)

Valencia, Spain
Offline Offline
Faraday Member
**
Karma: 118
Posts: 4549
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

One of these?

http://www.ebay.com/sch/i.html?_nkw=AMS1117+3.3+DC+Step-Down+Voltage+Regulator+Adapter
Logged

No, I don't answer questions sent in private messages...

Anaheim CA.
Offline Offline
Faraday Member
**
Karma: 44
Posts: 2808
...
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Designing switchers is not too difficult as most all Mfr's I've dealt with in the past have offered both "Reference Designs" as well as recommended PCB layouts.
Both National and Linear both have complete recommendations for the use of their products as well as online design tools for switcher optimization. All are free and come highly recommended by the industry. (and me too)
Utilizing "Reference Designs and PCB Layouts" I built switchers from both National and Linear Technology that worked first time properly, that is according to design and published specification.
This was one of the few design area's that was reasonably constant and predictable.
I didn't process more than 8 bit A/D so filtering was no issue. However I always added a Pi section filter... just in case. The noise from the switcher isn't an issue for digital designs and easily dealt with for 10 bit A/D conversion with a 5 V reference because even the fastest A/D conversion I did averaged several measurements for accuracy and external noise rejection.
Still it isn't a trivial task and advice from Mfr's should be followed as closely as possible.
Ground plane integrity, split analog and digital supplies and a layout that has it's own Analog return path wired in a star topology works the best especially when millivolt repeatable accuracy is required.
Getting back to the Mega's I use two with Itead type displays on them and both work perfectly from the USB port, one with an AMS 2302 humidity sensor, a BMP085 barometer sensor and a GPS receiver... I am just lucky, I guess. I also use a breadboard PSU whenever possible although the GLCD/Barometer/clock works well without it @ 4.75 V Vcc.
Both designs will have 1A 7.5V Mains switchers for PSU's. 7.5V is about the minimum Vin that is high enough to work to the regulators design limits as there is a series diode that I am going to leave in place for reversed polarity protection. With enough current it is possible to destroy a "Fuse Popper" diode and thus let out the magic smoke from the rest of the PCB''s population of parts that are affected by large negative voltages.
Also 7.5V in is the least heating for the SOT-223 regulator (this is where the design fails, apparently) The AMS1117 in a SOT223 package isn't intended for more than 200 - 300 mA load current Anyway... If you are really feeling adventurous...
Do the right thing and make both the 5 and 3V3 supplies external and bypass the board regulators entirely.
There is a really common Misconception about the Arduino packages in general.
They aren't general purpose Microcontrollers...
They are general purpose teaching devices and power distribution is just one more lesson.
Unfortunately experience is still the best teacher and it sounds like you are behind several lessons in basic power supply design and application.
In bread boarding I've found that those little breadboard jumpers are totally unsuitable for carrying any current above 100 mA or so, depending...
As they are 30 Ga stranded and with the combination of jumpers and breadboard connections typical are lossy.
I start with 5 V from an external PSU and after 6" of travel through jumpers and pins the voltage ends @ 4.5 to 4.75 V.
Likely worse with a load greater than a GLCD back light
However for a 'commercial design' or something I was going to develop for others to use as commercial products I Certainly would stay well away from using USB power for anything beyond preliminary testing.
For example a hub that cannot supply the full 500 mA could well be an issue for some and for others there is the ground noise issue where the grounds of other equipment are at different potentials due to relative load current differences and if you make the mistake of daisy chaining grounds you might well be in for several surprises, some Legal.

Bob
Logged

--> WA7EMS <--
“The solution of every problem is another problem.” -Johann Wolfgang von Goethe
I do answer technical questions PM'd to me with whatever is in my clipboard

the land of sun+snow
Offline Offline
Faraday Member
**
Karma: 149
Posts: 2790
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
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?

I don't think that's the best solution either, as somewhere in the chain you have a
5V v.reg that's dissipating a huge amount of heat. Better to run the 3.3V dc-dc
converter off Vin in the first place. No?

And after all, a 3.3V "linear" v.reg running off of 5V really isn't gonna be generating a
lot of heat anyways. Eg, (5V - 3.3V) * 0.5A = 0.85W, whereas the 5V linear v.reg will
be dissipating much more, just to power the 3.3V device. Eg, (9V - 5V) * 0.5A = 2W,
not to mention any other loads.

So you see, OP, there are probably no universally agreed upon solutions to much of
anything.

Actually, a solution I like a lot is being using by Pololu on their Zumo shield. They use
4 rechargeable AA-cells to power a 1 Amp dc-dc converter that puts out 7.45V.
Then you can connect your Arduino board to that. Even if it's using linear v.regs,
they're not running super hot [except maybe for those tiny SOT-223 parts that I
dislike - I always use TO-220 or DPAKs myself].

http://www.pololu.com/catalog/product/2504

[Edit after the fact: after reading through some of the other posts, and in light of
what I said here above, I like the Due idea of a dc-dc converter for 5V powering
a linear v.reg for 3.3V. Good compromise].
« Last Edit: December 06, 2012, 01:37:03 pm by oric_dan(333) » Logged

the land of sun+snow
Offline Offline
Faraday Member
**
Karma: 149
Posts: 2790
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
The noise from the switcher isn't an issue for digital designs and easily dealt with for 10 bit A/D conversion with a 5 V reference because even the fastest A/D conversion I did averaged several measurements for accuracy and external noise rejection.

Not a switcher power supply as being discussed, but I once built a board with 12-bit
ADC and opAmps running off +/-6V linear v.regs [78L06,79L06], and with the negative
rail being supplied by a 7662 chip. In the prototype lashup, there was a lot of noise on
the ADC conversions, but that was solved by placing a ground plane under the 7662,
and also moving the 7662 further away from the opAmps.

http://www.maximintegrated.com/datasheet/index.mvp/id/1357

So, having good ground planes and physical separation of the spike makers is 1000%
required.

Quote
In bread boarding I've found that those little breadboard jumpers are totally unsuitable for carrying any current above 100 mA or so, depending...
As they are 30 Ga stranded and with the combination of jumpers and breadboard connections typical are lossy.
I start with 5 V from an external PSU and after 6" of travel through jumpers and pins the voltage ends @ 4.5 to 4.75 V.

The Arduino female headers with the tuning fork inserts, combined with temporary
jumpers using circular endpins, makes for a perfect storm of iffy reliability. OTOH,
the usual 0.1" male headers, combined with suitable female pins, makes for a reliable
1 Amp [or 3 Amp] connection.

http://www.jameco.com/webapp/wcs/stores/servlet/ProductDisplay?freeText=100766&langId=-1&storeId=10001&productId=100766&search_type=jamecoall&catalogId=10001&ddkey=http:StoreCatalogDrillDownView


« Last Edit: December 06, 2012, 01:54:18 pm by oric_dan(333) » Logged

Offline Offline
God Member
*****
Karma: 21
Posts: 650
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Well, since the advice in this thread suggested that the Mega _should_ work, I cajoled a friend into letting try his Mega2560. And guess what? It works. For all the PSUs tested and USB power as well.

So looks like I've got a dud Mega.  smiley-sad

But the good news is that the shield design appears to be fine, which is the main thing. And everyone seems to agree that for the 1117 LDO regs, there isn't much to be said beyond using the 0.1uf and 10uF caps as specified in the data sheet. And since that's already what I'd done, I guess I'm done.

But it was useful to confirm there wasn't anything else in the way of design tricks I was missing. So sorry about stress testing the group wisdom here on what should be a simple topic, but all's well that ends well.

Except for the dud Mega... really, the only remaining mystery.  Is is a common failure mode for a voltage regulation circuit to "lose capacity" in this way, e.g., will provide the correct voltage up to a certain current and then brown out, way before it's rated capacity? In any case, that would appear to be what's happening here. Weird that the higher capacity 1A PSU seemed to make a difference.

Logged

WiFi shields/Yun too expensive? Embeddedcoolness.com is now selling the RFXduino nRF24L01+ <-> TCP/IP Linux gateway: Simpler, more affordable, and even more powerful wireless Internet connectivity for *all* your Arduino projects! (nRF24L01+ shield and dev board kits available too.)

Pages: 1 [2]   Go Up
Jump to: