MADPSU: A measurable and adjustable DC PSU - Part 1

Door mux op maandag 28 februari 2011 23:28 - Reacties (11)
Categorie: MADPSU, Views: 16.698

In my 8.5W Core i3 build I already used a home-made PicoPSU design. Back then I told you I would extend this idea into a better design. Well, here you have it. This particular post is the first in a series and will explain to you why a new type of PicoPSU is necessary and what it should be able to do.

In recent times I've been busy analyzing and modifying the power supply of computers at every step of the way: first AC-DC conversion, then subsequent DC-DC converters down to the components that actually consume the current. There is a lot to be measured along the way requiring either a buttload of multimeters (which can get quite expensive if you require a good confidence interval) or switching around one multimeter dozens of times. Both methods incur a measurement error: measuring currents that can be found in a computer is usually done with shunt resistors which eat away a little bit of voltage and power. Not measuring everything at exactly the same moment also skews measurements. But most important of all: it takes lots of time, money and quite a bit of expertise, too. Even doing half the type of analysis I did cannot be done by many people. And really, if there's any hope of demystifying and popularizing energy efficient computing, we need tools for the masses.

My dad has a very interesting way of performing the science that is power conservation. In his home, he swapped all frequently-used incandescent lighting for compact fluorescent. He bought some more integrated TV and internet equipment and then he told me he did everything there is to do to save on the electricity bill in the home. Sure, he did the right thing one some accounts; wherever it was obvious power could be saved, he did so. But he never properly measured what he was actually using, nor did he break down power use in the home to each individual device. He went on to hypothesize that I could not save more than an insignificant amount of power - i.e. 10% or less - by other means.

The same happens all the time in computers. People buy an 80 Plus power supply, buy a 'green' motherboard and that's it. Maybe they try out one of those Atom or Brazos boxes. Usually, they don't actually go out and measure what their computer actually consumes, and what causes excess power usage. That is mainly because it is just very hard to measure these kinds of things sufficiently accurate. As of late energy meters have become affordable and abundant, and I do see that people have a generally favourable mindset towards these devices. But these devices have flaws when it comes to pinpointing power use in your computer: first, they are usually not True RMS and exhibit large measurement errors for less-than-ideal PFC and mains voltage waveforms. Second, they usually have very poor resolution below 10W, which is a region that I predict will become very important for computers in the coming few years. Last, they only measure AC input and give you no clue as to how much power is wasted in the power supply.

Power supply reviews won't give you the answer. First of all, they seldomly (if ever) test lower loads than 20%, which for pretty much every PSU in the market means 60W or more of DC power use. A minority of modern desktop computers require this kind of power sitting idle, which is most of the time. But more important even is the fact that computers don't use power from the PSU in the same way that is being tested. Reviewers usually test efficiency (which we're looking for here) at proportional loading: every voltage rail is loaded at the same percentage of its max rating. Most desktop computers, as I pointed out in my earlier breakdown of my 8.5W core i3-system, draw way more current from 12V than anything else. At best, power supply reviews will give you a rough idea - within 10% - of the actual efficiency you'll be encountering. This is very significant, because it causes a ridiculous spread in the numbers that you'll see in reviews. Compare for instance the AC power figures for a nearly identical Brazos system reviewed in three different places:

Figure 1: SilentPCReview's take on a Brazos board. Source: SPCR

Anandtech: Brazos power consumption (idle)
Anandtech: Brazos power consumption (load)
Figure 2 and 3: Anand's take on the idle and load power. Source: Anandtech

Tom's Hardware: Brazos power consumption during a PCMark Vantage run
Figure 4: Tom's hardware doing something that's technically good, but fails to be comparable to anything and is not very informative for the layperson. Source: Tom's Hardware

Three reputable review sites, wildly different power consumption figures. Can you deduce what the components actually use? AC power clearly is a poor guideline. In any case, these reviews don't nearly show the potential power savings for this particular platform. Also, note that although all three sites incorporate power consumption and benchmarks, even comparisons to other systems in their own database, they never even try to go out and see what other reviewers make of it using similar benchmarks. There is no consistency across sites and they do not verify their account or improve their methods using results from other websites. If these people were journalists, they would be ridiculed by their peers.

Then again, the journalism analogy would work if you've heard the difference between Western and Arabic news agencies lately: both death tolls and protestor counts during the various North-African uprisings at some times differed by an order of magnitude between Al-Arabiya and Aljazeera on one side; AP, Reuters and BBC on the other side.
A solution for low-power computers
Alright, I think I've established the need for actual DC power measurements. How will we go about doing this? Well, low-power systems1 (which, by the way, include many ordinary desktop systems in my book) work most efficiently with an AC adapter and PicoPSU. The reason behind this is that although power adapters don't necessarily have a fancy 80 Plus Gold certificate, at low power outputs they are much more efficient at converting AC mains to DC power because they work at a better performance point. Most switching power supply architectures2 work pretty efficiently at between 20 and 100% loading, but their efficiency drops off precipitously below this range. As long as ATX power supplies don't go down in their max power rating, the only choice for energy efficient desktop computing will be this arrangement of adapter+picoPSU.

Now, I'm calling it a PicoPSU because that's the brand name that most people recognize. For those of you who don't: a 'true' ATX power supply takes mains power and converts it into 12V, 5V and 3.3V, along with a few control signals to turn the power supply on and off. A power adapter cannot be turned off by the computer (usually), and only produces one output voltage. The picoPSU solves this by incorporating some switches to turn power on and off, and doing some conversion to create the required voltages. Back to the story: we were talking about power conscious builders usually opting for an adapter and picoPSU.

That's great, because while designing an ATX power supply with measurement stuff built in is hard to do in your free time, designing just a picoPSU is a relative piece of cake. And whaddayaknow, this device is in exactly the right spot to do a lot of interesting measurements. It takes the output power of the AC adapter; together with the information of a wall-wart energy meter this can give you a good idea of its efficiency. Then it distributes the power to the different voltage lines - great! Now you can dissect power use into all the different lines that go into your computer. Also, DC-DC conversion is done on board, so you can directly measure both efficiency and actual voltage as it is being produced. If you're lucky, you could even adjust the 5V and 3.3V outputs as you please.

Now, just building in measurement stuff isn't quite enough. You'll need to relay that information to a computer. I'll have to add that I regard the booting phase of a computer as a time when power measurements are also very important; usually, the CPU is fully stressed during POST3 and harddrives also spinup. It's a stressful period and people looking for the required output power capability of an adapter might want to know this information. Therefore, this device should either be able to log measurements for a reasonable length of time (e.g. a few minutes) or you should be able to connect it to another computer while the PC it's in is rebooting. Lastly, the interface should be commonplace. USB, for instance.
Bonus functionality: Automatic switchover to UPS battery
I think we've established a full set of top-level requirements now. But there's one final thing I'd like to see in this kind of device, and that's automatic switchover to a battery. Computers aren't always connected to a stable mains grid. Maybe you're somebody like me who tends to overenthusiastically switch off the powerstrip while the computer is still on or busy shutting down. Or maybe you're running networked storage and you're afraid of data loss on a 24/7 operating machine. In any case, a traditional UPS seems terribly lossy: it has batteries, then it uses a DC-AC inverter to make AC voltage, then your power supply turns that into DC again and uses it. What the hell? Why not use the battery directly? This enables the use of smaller batteries and simpler, cheaper and more reliable electronics. In an adapter+PicoPSU use case, the PicoPSU can simply switch the input 12V line between the battery and power supply, or even short those together to charge the battery. As an added bonus, you can get state-of-charge indication and controlled shutdown. An entire UPS with all its functionality and all you need is a battery and this PicoPSU-design. If only the entire world was so simple.
In-depth requirements
Some requirements need quantification. Most importantly are all the individual current ratings on the power lines. In order to grasp what we need to quantify, here's a schematic outlining all the different switches and measurements:

Here, the V_[something] markers are voltage measurement points and the I_[something] arrows are current measurement points. Power enters the MADPSU at the top from an AC adapter and/or a battery and exits the MADPSU at the bottom via the named power pins.

Now, I must admit I've already chosen two of the current ratings: the 5V and 3.3V output current ratings (and by extension, the measurement resistor ratings). In order to make this design as succesful as possible with little development time I'm planning on using VMP3203 fully integrated dc/dc converters for 5 and 3.3V. The main advantage here is that I don't run the risk of having an unstable feedback loop, which is a real nuisance in debugging dc/dc converters. The disadvantage at first sight of using these converters is that they are limited to 3A output current, however I've done my homework and for pretty much all reasonable desktop configurations this should be plenty. 3.3V in particular is seldomly loaded over 3A, whereas 5V typically only feeds hard drives and RAM. As long as you're not overvolting your RAM or using more than two 3,5" hard drives, you should be fine with 3A.

The 12V line on the other hand might be heavily loaded. I'm building the MADPSU to accomodate both really low-power systems (Atom, Brazos, VIA based) and low- to mid-end 'normal' desktop components (Intel Core, AMD Athlon/Phenom), possibly systems with a low-end video card like HTPCs. These draw a lot of current on 12V. On the other hand, I can't rate them too high or I'd have to use more expensive MOSFETs. Right now, I'm rating these lines at 8A or about 100W. This should be plenty for all Intel dual-cores and at least the Core 2 generation of quad cores. On the AMD side of things, most Athlon quadcores should fit in this power budget. For configurations with a video card, this PSU limits you to dualcores.

Then there is the 5V standby line. Electrically this is hooked up to the same 5V dc/dc converter that drives the main 5V line, but current draw here is usually much lower (easily under 100mA). If I'd use the same shunt resistor on this line, measurement resolution will become very bad. Therefore, I'm using a measurement resistor that effectively limits the current draw to about 250mA.

Now the last requirement is actually both a bit trivial and a major design driver: Cost. I want the MADPSU to have a BOM4 cost of less than €25 in small quantities (10-25). I'm aiming at this target to remove any financial barrier to build this instead of buying a ready-made (but feature-limited) stock PicoPSU. Those devices are about €25 as well.
The limitations
Obviously, just this picopsu can't remotely monitor everything in your computer. The biggest power loser - the AC-DC converter - cannot be directly measured by such a device. Also, on the motherboard itself are plenty more DC-DC converters. The power doesn't all go into one component either; what you're measuring at the picoPSU is everything lumped together. That lumping together goes a bit further still: CPU and peripheral 12V lines have to be lumped together because of a design decision I will outline in the next part of this series. Lastly, there is no actual charging regulator on this board so the battery will be hard connected to the power adapter if you wish to charge it. For more in-depth limitations, please refer to the next part in this blog series.

1 defined for now as idle <60W, load <120W
2 they're actually called topologies in electrospeak
3 Power On Self Test, the first phase of booting up your computer
4 Bill Of Material, i.e. the combined cost of all components, but not assembly/workmanship/misc. cost.
Next up
In the next post I'll go into the design of MADPSU. Stay tuned!

Volgende: MADPSU - the design 03-'11 MADPSU - the design
Volgende: 8.5W Core i3-based desktop computer (English) 02-'11 8.5W Core i3-based desktop computer (English)


Door Tweakers user TheMazzter, dinsdag 1 maart 2011 00:46

I'd like to use one of these, if I think I can build one, and if I have the time, I definitely will build one and maybe use it on my atom home-server.

Door Koen Vermeer, dinsdag 1 maart 2011 09:32

Just a quick comment. You're stating that

That is mainly because it is just very hard to measure these kinds of things sufficiently precise.

Note that measuring these kinds of things sufficiently precise isn't the problem. Precision (or how well you can reproduce the number over and over again) is relatively easy to come by with current devices. On the other hand, accuracy (or how well your measured number corresponds to the real value) is not that easy to achieve with cheap off-the-shelf components.

Door Tweakers user mux, dinsdag 1 maart 2011 09:40

Alright, that shows that English is not my primary language ;) I'll get it fixed rightaway.

I would say that both precision and accuracy will be hard to come by on my board. It's going to require quite some testing and tinkering to get both noise and linearity within good bounds.

Door Tweakers user Xudonax, dinsdag 1 maart 2011 09:45

Some motherboard also connect USB to the 5Vsb line, so I don't know if a max of 250mA is enough there. Personally, I use the standby power to charge my phone and to make sure my keyboard is always on so I can boot the machine with the press of a key. A normal USB keyboard requires about 100mA as far as I know, so that would leave 150mA to power the USB controller and possibly other USB devices still connected.

TL;DR: I think 250mA is a little bit on the low side for 5Vsb

Door Tweakers user mux, dinsdag 1 maart 2011 10:01

The 5Vsb line should not be connected to USB high-current circuitry according to the ATX specification. If this is the case, current-wise a maximum of two USB ports may be connected to 5Vsb but this would technically be violating (other, non-current regulating) specs. The specification states explicitly that 5Vsb may be used for WOL and standby power which is up to 2A for WOL, 50mA for on-board applications and two low-current USB supplies (each 100mA). You would be right to say that 250mA is too low even for the quite conservative ATX 2.1 specification. I do think it is enough, though.

First of all, the 5Vsb line is directly connected to the dc/dc converter that is rated at 3A, which is sufficient for the recommended 2A in the specification.

Second, the main reason for speccing it at 250mA is to allow for the best possible measurement resolution at interesting current draws during standby, i.e. the range between 0-50mA. The shunt resistor used is a 1206 0R18 0.125W resistor that can measure up to 900mA.

Third, it's just a starting point. I chose 0R18 for price and closeness to my ideal specs (which would warrant 0R14 or so).

My USB keyboards/mice only use about 30mA by the way. The only USB device I have that uses more is my 3D mouse at about 90mA (and that is mainly because of the useless ten blue LEDs). In practice I'm not expecting any trouble, and if you do get into trouble, you can just swap out the shunt resistor for another one and re-calibrate.

Door Tweakers user haarbal, dinsdag 1 maart 2011 11:08

Would it be possible to increase efficiency by using the battery as a buffer rather than a failsafe? By getting an ac-dc adapter that's rated slightly below full-load?

I guess you'd have to have some sort of current limiter on the adapter.

[Reactie gewijzigd op dinsdag 1 maart 2011 11:09]

Door Tweakers user mux, dinsdag 1 maart 2011 11:18

Sure that is possible, but ideally you would want direct control over the AC power supply. It's a much-debated merit of on-board UPSes. I actually tested this at one point in my 8.5W build because I wanted to see if a 60W supply was sufficient. By itself, it wouldn't boot (too much peak current) but with a battery in parallel it would, and it stayed pretty stable.

This obviously isn't a good idea if your sustained load power is higher than the PSU rating, because when your computer is loaded for a while your battery will fully drain. It is useful for things like HDD spinups, though.

Door Tweakers user delirium, dinsdag 1 maart 2011 13:48

I love the work you're putting into this.
It's an interesting read especially because I will be building a HTPC this summer.
Finger crossed this PSU might be ready then ;)

Will the PSU have support for charging the 12v battery?
Perhaps something as simple as this:

Door Tweakers user mux, dinsdag 1 maart 2011 14:11

MADPSU as it is right here will rely on either external charging circuitry or you making sure it doesn't charge too quickly if you connect the power adapter directly to the battery. I'll explain as soon as I got it up and running in about six weeks.

Door Tweakers user TD-er, donderdag 5 mei 2011 21:29

mux schreef op dinsdag 01 maart 2011 @ 09:40:
Alright, that shows that English is not my primary language ;) I'll get it fixed rightaway.

I would say that both precision and accuracy will be hard to come by on my board. It's going to require quite some testing and tinkering to get both noise and linearity within good bounds.
I also mix-up these terms at work, so I have an image like this printed for my reference.
It's always nice to have these explained in a single diagram.

Oh and keep up the great work, I really enjoy reading them, although I don't have much time for it.

Door Tweakers user necessaryevil, maandag 29 oktober 2018 20:15

Hallo MUX, is de MADPSU, of de printplaat daarvan af en te koop?

Om te kunnen reageren moet je ingelogd zijn. Via deze link kun je inloggen als je al geregistreerd bent. Indien je nog geen account hebt kun je er hier één aanmaken.