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.

52 thoughts on “Raspberry Pi Power Regulator Transplant Reduces Power Consumption

  1. 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. 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. 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?

      1. The issue with that (as far as I can tell) is that you can’t back feed regulators, or they fry. I did it once and after a few moments, the regulator shorted to ground on both rails. This is even if the voltage you feed into its output is what it would normally supply.

    1. 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.

      1. LDO does, actually, stand for low drop out. Non-LDO regulators (like the classic 78xx – e.g. 7805, 7812, etc.) have a different topology than LDO regulators, and significantly higher minimum voltage headroom (2+ volts usually).

    1. Yes, that would have worked. Now we’ve removed the chip, tested with the switching powersupply, and for working on kernels etc, it is more convenient to have the 3.3V regulator on the board. So it’s back on. The LM1117-3.3 is a common component, we even have it in our stockpile of components.

  4. 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.

    1. 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.

  5. 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.

    1. 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?

      1. 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.

    2. > 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.

  6. 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

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

    1. 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.

      1. 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…

      2. @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

      3. @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?

      4. @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.

      5. @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.

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

  8. 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.

      1. 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.

    1. 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.. :-)

  9. 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.

  10. 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.

Leave a Reply to SCancel reply

Please be kind and respectful to help make the comments section excellent. (Comment Policy)

This site uses Akismet to reduce spam. Learn how your comment data is processed.