Raspberry Pi power regulator transplant reduces power consumption

If you want to run your Raspberry Pi from something other than a mains power converter, and you’ve got some courage to spare, this hack is right up your alley. [Tom] wrote in with a switch mode power replacement for the RPi’s stock linear regulator. This is the first hack we’ve seen where the RPi’s on-board hardware is being altered and that’s where things get a little scary.

The first thing done was to remove the linear regulator, leaving the unpopulated RG2 footprint seen above. Apparently a rework station wasn’t available as the technique they used describes holding the board up by gripping the regulator with tweezers, then blasting it with a hot air gun. It makes us a bit queasy because the processor chip has a solder footprint you don’t want to mess with.

But apparently all is still well. With the wasteful linear regulator gone a pair of 5v and 3.3V switch regulators inject voltage through the GPIO header. Initial tests show a savings of around 25% but we’d imaging this varies greatly based on load.

Comments

  1. BusError says:

    It’s basic rework, nothing really ‘scary’ about it. If you want to add protection to the surrounding components, wrap the board in alu foil, gently cut a window around the component you want to remove then use the hot air.
    The foil will act as heatsink for the surrounding.

  2. justice099 says:

    I do something similar, BusError, but I just create a “bowl” with the tin foil, with the hole cut out for the part I am working on. This way the heat wicks up and away from the board completely.

    If the shape is complicated or heat is going to end up being excessive, I tape the tin foil down with kapton tape around the window, and isolate the part I am reworking completely that way.

  3. Jonathan says:

    Initial tests show a savings of around 25% but we’d imaging this varies greatly based on load.

    I’m not sure why this should vary greatly. A linear regulator wastes a constant fraction of the current, at a constant-ish voltage, so it’s wasted power fraction is also constant.

    A switching regulator and supporting components can be selected to target a particular current, but the efficiency usually doesn’t vary ‘greatly’ by going or down by a couple factors of two. Maybe your experience is different?

  4. George says:

    Why remove the linear regulator? Couldn’t you just leave it attached when feedin power through the GPIO pins?

    • naturetm says:

      That’s what I was thinking.

    • Erik Johnson says:

      Indeed. The regulators(s) shouldn’t consume anything when only power exists on its outputs.

    • rewolff says:

      We tried that. The output resistance of the two 3.3V regulators (the onboard one and the switching one we added) causes very little current to come from the switching regulator in this situation. So the saving was not as big as we expected and we had to remove the linear one. Of course we can drive up the set-point of the switching regulator, but how far are you willing to go?
      Most PC powersupplies deliver 3.35 or something like that. Officially 3.3V components should tolerate 3.6V. But with still 10 weeks waiting time for a new ‘pi I’m not going to risk it.

  5. fightcube says:

    Wow, I’m surprised there is no LDO on that board… very surprised.

  6. S says:

    Cutting both regulator pins may be enough to electrically remove it from the circuit and if needed easily reconnect it later.

  7. truebassb says:

    I’ve got the same LM2596 Adjustable Switching Regulator for around 3$ shipped to EU from Ebay,the seller starts from “J”.

    Say bye to your LM317 projects with huge heatsinks because this works as it should and is over 100% more efficient than the 317!

    This is what the Raspberry PI needs.

    • Chris C. says:

      Another option is the KIS-3R33S module, available from various sellers.

      There’s an Ebay auction up now to get 20x of them for US $8.79, with free international shipping. I like these because with a price like that, you can stock up. I bought 40x, and am set on switching regulators for quite a while!

      Unmodified, it converts 4.75V-23V to 3.3V at up to 3A. Which is useful enough.

      It can produce other voltages, but mods are required. Fortunately they’re easy, and require parts you probably already have on hand. Various sellers have guides of varying quality. The datasheet for the MP2307, on which the module is based, is also a good reference.

      I just modified one to output 5V fixed. It required only opening the case, removing an overvoltage shunt zener, and attaching two resistors in series (to get the exact value I wanted) between the ADJ and GND pins. A trimmer could have been used instead. I also added an optional 10uF SMD output cap, which conveniently fits where the zener used to.

      A couple of things I’ve found that I haven’t seen in any guide:

      1) By removing any residual solder (they’re removed from equipment) and carefully straightening the pins, they’ll fit in a breadboard.

      2) To challenge myself and see how much I could leverage my large stock of these, I turned one into a high power constant-current LED driver. First, I removed the zener and adjusted for a higher output voltage, as described above. Then I put a low-side sense resistor between the LED and ground. A LM339 comparator detects if the voltage on the sense resistor exceeds a threshold, set by a voltage divider (resistors and/or trimmer). If so, it drains the module’s soft-start capacitor through another resistor (to limit discharge speed), until the current drops below the threshold. It works very well, though it’s a bit of a shame that it took an extra IC to do it. At least the three remaining comparators on the same IC could be used for something else, perhaps three more drivers. I may use this in a LED aquarium light. Or interfacing a large RGBW LED to an MCU. The threshold voltage to the comparator could come from filtered PWM from the MCU instead of a fixed divider, allowing each color channel to be adjusted on the fly.

  8. tz2026 says:

    I did something similar though had to rev the actual board – it is the latest post up at harleyhacking. 12v to 3.3v was making the linear regulator a bit hot, and on a bike I need it sealed.

    Put simply, if you draw ANY current, you either need a close voltage if you are going to do linear, since the regulator simply becomes a big power resistor to turn the N-hundred milliamps over the drop into heat, And it is I-squared-R.

    Dropping in the switcher cut the current by over 2/3 (expected), and the thing is completely cool. The ATtiny and trickle charge for the GPS only use a few mA active, under 100uA asleep, so I’m leaving that half linear, but there is a way to use the switcher with a few external components to act as an on-off latching switch – I’d go down to about 50uA.

    Ath the robotshop, dimension engineering has some drop-in or bread-boardable switchers: http://www.robotshop.com/search/search.aspx?locale=en_us&keywords=dimension%20engineering%20regulators – I’m using the 25W just over 5v to keep my mifi charged (finally found that you need to short the USB D+ and D- to get it to charge), and my Samsung Galaxy player with room left over for my camcorder.

    • Robot says:

      I wish I’d read this post before commenting below. A 12 V to 3.3 V drop with a LDO is just plain crazy! Why did they do that? Could you have just switched to a 5 V supply?

      • Zac says:

        Well, considering that the website it’s on is HarleyHacking, and he says it’s on a bike, I’d hazard that he’s using it on a motorbike where only 12V is available.

    • rewolff says:

      > since the regulator simply becomes a big power resistor to
      > turn the N-hundred milliamps over the drop into heat, And it is I-squared-R.

      Yeah, but the “R” is inversely proportional to the voltage difference. I * delta(V) is more appropriate in this context.

  9. Robot says:

    Heh. . . if you’d break a sweat over this you should see the re-work that goes on at my job where tricky fixes are applied to boards worth more than a senior engineer’s salary.

    As for the use of a switcher over an LDO that could be a mistake and overly complicated. LDO efficiency increases when the input voltage is as close as possible to the output voltage. Also, LDO regulators have the advantage of suppressing noise whereas switching power supplies can create quite a lot of MHz rage noise reaching into the 100’s of mV in some cases. So I hope that power supply hack at least involves LC filtering with many decades of attenuation. . . but that could be moot if there are LDOs down the line to further drop the voltage.

    – Robot

  10. BusError says:

    I personally often use “car usb chargers” and extract the DC-DC board from them. Most recent ones have a pretty good parts, and you mostly just need a couple of cap to get a nice output. Most are also adjustable by changing a pair of resistors

  11. Scuzz says:

    I’m with Robot here, I would be worried about the noise generated by a switching power supply. Considering the fact that this is only a 5v to 3.3v drop it seems like an LDO should be fine, and switching would just lead to weirdness somewhere in the system.

    Never experienced the joys of “that peripheral doesn’t work when we turn on this other peripheral, but only on the newer board that uses a switching power supply”? It’s good times! And obnoxiously difficult to isolate.

    • daqq says:

      I wouldn’t be that worried. While it is true that switched DC DC converters produce a lot more noise than linear regulators, proper power layout and filtering will reduce-eliminate any problems from that area.
      I’m guessing that they chose an LDO not for its noise properties, but rather for the lower price.

      • Scuzz says:

        Proper filtering and layout considerations would seem to be impossible because the base board was designed for an LDO, not a switching power supply! Certainly the switching power supply module could filter, but the suggested $2 module from ebay probably does not have the best filtering in the world.

        Also, this isn’t “this is the worst idea in the world!” this is a “if this causes issues they’ll be *really* weird!” And considering the fact that the Rasberry pi consumes at most 3.5 Watts (according to wikipedia), that gives us (3.5W/5V)=0.7 Amps and so (0.7 Amps * (5V – 3.3V)) = 1.19 Watts (peak). But at the listed currents they had (200mA vs 150mA) that should be a savings of (in a normal 5V system) 0.25W. All things considered that doesn’t quite seem worth the effort for a “normal” user, but these guys were doing something different.

        Re-reading the article it looks like the suggestion was not “replace your wasteful ldo for normal operation” it was instead “doing 1 power conversion is less wasteful than doing 2.” It looks like they compared the power consumption for 12V->5V using the switching regulator in combination with 5V->3.3V LDO, and compared that to just putting the switching power supply into a mode where it does 12V->3.3V switching and putting that directly into the 3.3V rail. I’m a bit at a loss for why they removed the LDO for this, because I would think that just putting 3.3V on the LDO output and not giving an input wouldn’t cause an issue…

      • Robot says:

        @Scuzz

        Agreed; switcher for 12 V to 5 V and LDO for 5 V down to whatever is the ideal power topologie; that should have been used in the original design. So it is a good hack in that respect.

        I just used such a topologie for a complicated and very noise sensitive design where I had to provide 8 positive bias voltages, 4 negative bias voltages, 2 analog supply voltages and 2 digital supply voltages. The layout was a real hassle and critical to the design performance. Hopefully it will work :P

        – Robot

      • Scuzz says:

        @Robot: The original design cannot handle 12V input, it is only made to handle 5V, and that wasn’t the topology that they ended up with anyway.

        Looking through the schematic ( http://www.element14.com/community/solutions/5952/l/raspberry-pi-schematic-for-raspberry-pi-model-b-board ) it looks like the 3.3V rail might only be used for I/O (or at least the cores all have separate 2.5V and 1.8V regulated voltage). So if this is the case, doing a 12V->3.3V conversion directly would be fine.

        All that being said, it looks like the 5V rail is used as “VDD_BAT” inputs on the Broadcom chip… and once again looking at the article I realize I missed something. They actually used two separate switching power supplies! One to do the 12V->5V conversion and one to do the 12V->3.3V conversion! This doesn’t seem particularly practical, and interference generated by two different power supplies seems like a distinct possibility… I dunno, the savings here might be significant for a battery-powered or solar-powered project (as they suggested), but it seems like this might lead to more problems than it would solve. Why not just use a battery with a rating closer to 5V?

      • rewolff says:

        @scuzz.

        We did the testing for the “car-installed-raspberry”. So the 5V was already downconverted from the 12V with a module.

        Of course the efficiency of these modules drops a bit if you power them with only a few volts more than their input. So using such a module to downconvert the 5V to 3.3V would lead to some savings, but probably not as much.

        @all, the raspberry pi uses 5V for “a few things requiring 5V”. Nothing much. PLUS it uses it as the source for the switching 1.2V powersupply that is built into the Broadcom chip. Next there is a small 2.5V regulator. That’s used for audio or something like that. No powerdrain. And then there is the 1.8V. This power rail is used to communicate betweeen the broadcom chip and the RAM chip on top.

        If we assume that the 3.3V regulator is 83% efficient just as the 5V one, I measured 400mA average use on the 5V with the LDO installed (which gives me the 83% with the 200mA measured on the 12V). Now with only 150mA with the second regulator, we get I5 + I3 = 0.4 and 5/(12*.83)I5 + 3.3/(12*.83) I3 = 0.15 . Solves to I3=300mA, I5=100mA. Using temperature measurements, the guess is that about the same amount of power goes into each of the 3.3V regulator, the lan chip and the broadcom. This would put the 5V usage a bit higher and the 3.3V a bit lower. Nothing to worry about.

        The MAIN point is that you can shave about 20-30% off the battery-power-use by directly feeding the raspberry with 3.3V instead of just 5V. It’ll cost you more in the power converters you need to buy. About $2, but you’ll get 25% more use out of your battery.

      • Scuzz says:

        @rewolff: Yup! I’ll concede that! Towards the end once I’d figured out everything that you were doing I pretty much had to agree (I had to read it three times! Huzzah for sucking at close reading). But really, throw a smoothing cap in there (1/10 of the one built on to the board) and I’d probably trust the noise wouldn’t be an issue.

      • Robot says:

        @rewolf Thanks for your reply and the information.

      • rewolff says:

        Pete Lomas who did the schematics and layout, is a VERY conservative guy when it comes to adding capacitors.

        Dom (the guy sometimes working on the kernel) says he broke off the input capacitor, the big one. Works fine. So: “Take off 220uF of capacitance” and the board still works.

        Pete likes his margins.

        Now, having too little capacitance leads to very, very annoying problems. Chances are that during short bursts the voltage will drop below a threshold somewhere. So something is suddenly not working. For a few picoseconds! It works just fine when you try it a microsecond later.

        So having extra margin means you don’t have to debug these annoying problems.

        For mass produced products, I’d design slightly less capacitors as Pete does. But still WAY more than required. Then when the design is finished and debugged, it goes through stress testing. Next a new board is assembled, but with less of the capacitors installed. Keep dropping the number of capacitors until it fails the stress-tests. Double the amount and that’s a good guideline for production.

        (oops. Just heard/felt a spark between my finger and the pi…. Phew. Still boots. )

  12. truebassb says:

    About noise concerns….

    When you use these modules it is advisable to add parallel capacitance to the output,it already has and works very convinient but i clearly don’t trust the Capacitors of this circuit.

    For 2-3$ you already get a well printed PCB plus the Regulator,the Capacitors are not Trustworthy and in fact i believe after a few months of use they are going to make HAIR!!!

    The Input capacitor is not that necessary if you already smoothed DC or run of a good Battery but if the output Capacitor fail there are high chances to experience noise issues.

    Although personally i wouldn’t bother as i will probably use a circuit for Battery Charging or running Relays with a Battery in Parallel.

    • mshieh says:

      How about something from MuRata Power Solutions?

      They cost $3.93 from Mouser and I’ve used them in a couple of projects with no problems.

      The input capacitor is for when there is a sudden load transient and the switcher has to suddenly draw more power from the source. If the source is any appreciable distance away then that could affect stability of the switcher as well as its performance.

      • someone says:

        Yes, the issue is the internal impedance of a battery versus the much smaller impedance of a Cap. Another issue in dealing with digital electronics and filtering/decoupling is the quality of the caps. I am with the designer on being very conservative and generous with the correct caps and specs for the application. Electrolytes will degrade over time as well. Cutting back on caps to save a small amount is asking for reliability and service life issues later. Just look at all the junk LCD monitors around that should be lasting much longer given the technology.

  13. rewolff says:

    In reaction to the article: About the hot air gun… That’s a hot air rework station. Maybe our english isn’t up to spec…. What should we have called it?

  14. Thomas says:

    Why remove the whole regulator when it is probably just as well to lift a leg or two (or cut the legs, even)?

    • rewolff says:

      For us, with the hot-air-station just next to the soldering station, this is more convenient and faster.
      It also saves us a dollar having to buy a new one when we want it restored.. :-)

  15. Kari says:

    I guess all EMC tests which was made
    to Pi has to be redone after this mod.

  16. brainzilla says:

    You could also use a Recom regulator.
    They sell switching regulators in cases that are compatible with the regular 3-leg 78xx.

  17. Nubie says:

    Very interesting stuff, I am looking to power a RPi off of a lithium ion battery for a handheld setup.

    These switching power supplies seem great for $3 on ebay.

    This page details a RPi running on a single Li-Ion, and in the future a DC-DC switching power supply for 3.3v?: http://andreiprojects.blogspot.ro/2012/06/raspberry-pi-removing-hub-and-adding-li.html

    Sounds great to me, would love single battery, low draw regulator. Old Gameboy for a case, GPIO for buttons, $20 640×480 3.5″ LCD from eBay, Awesome console.

  18. someone says:

    It would be nice if the Raspberry pie had an internal/ external selection to disable the linear regulator… not as simple, but handy for other applications where efficiency is a priority.

  19. AdiIda says:

    you can use SMR88xx (http://goo.gl/2kRhEc0 to modified it into switching mode, easy to use same as 78xx but has higher current, better efficiency and less heat

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Follow

Get every new post delivered to your Inbox.

Join 93,859 other followers