Building a Battery Powered PC

This is a sort of part two between my write-up building a portable PC the other week and the one on building a backpack VR shenanigan next week (or so). DC powering a PC is sort of a big topic, and I haven’t seen a lot of good guides/writeups online, so I’ll try to be somewhat thorough.

Firstly, this isn’t an Electricity 101 guide (please read up). I’ll also be focusing on DC power. It’s very important to recognize that electricity can easily kill you. Currents as low as 200mA (0.2A) of DC can kill you, and we will be dealing with significantly higher currents. Here’s a good video that has some info and here’s a page that has some electrical safety notes. Please don’t do any electrical work if you don’t know what you’re doing!

Safety Warning:

  • Always unplug before doing any work, including batteries. Note, AC power supplies can remain dangerous even unplugged, but you shouldn’t need to touch those at all within the context of building a DC/battery-powered system.
  • Never leave any exposed wires – always use heatshrink/electrical tape around anything carrying live current.
  • Treat electricity like it can kill you – err, because it can.
  • Don’t cross the streams.

If that last point doesn’t make sense, you should first, make sure you’ve watched Ghostbusters, you philistine, and second, you should make sure you’ve read enough on electrical safety that it does make sense before proceeding. Or not, I can’t stop you.

And now, for some basic theory.

First, while the electrical grid runs on AC power, all your computer components use DC power. Typical internal computer power supplies (form factors like ATX, SFX, etc) convert AC to DC. If you use something like a PicoPSU or HDPLEX, these are DC to DC converters that take a certain input voltage and convert them to an output your computer components will use (typically 12V and 5V). These require a separate external power supply convert AC power to DC power.

Speaking of, here’s a decent summary of AC vs DC power if you are so inclined, and you can also read about what a dick Edison was (Oatmeal form). All this is somewhat academic as all batteries are DC, but it does mean that if you plan on battery powering your computer, you should strongly prefer to use a DC-DC converter board and external power supply, otherwise you would to suffer power-loss going from DC to AC w/ a power inverter, and then an additional AC to DC w/ a standard PC power supply, which is a bit silly and pretty inefficient.

Most PC enthusiasts talk primarily about wattage when discussing power, and while a watt (1 J/s) is the measure of power (the rate of doing work), for our purposes, we actually care more about the relationship a watt has to amperage (flow rate of electric charge) and voltage (difference in charge, or electric pressure).

watts = amps * volts

You can read more about voltage and current or these Quora answers on amps, watts and volts. For a more involved answer, this article, How are watts, ohms, amps, and volts related looks pretty thorough. If you’re more of an equations kind of person, you can see a list of how they relate.

(A slightly tangential relationship is that 1W = 1J / 1S. 1 cal = 4.18J, so 1W is basically the power needed to heat about 240g of water by 1 degree C in a second. Almost all the power consumed by a computer is output as heat.)

Ignoring power factor (or not), you could say that for a computer that averages 300W of power consumption at 110V (regular US AC), you’d need about 2.7A of current. If you were to power the same 300W system from a 19V battery, you would need 15.8A of current. If this is new information, hopefully, this also helps make all those numbers on the wall-wart plugs around your house make more sense now.

With this knowledge in hand, we can roughly figure out how much power you need. While you can adapt an existing PC (and use something like a Kill-a-watt or Watts Up to get ballpark power consumption), if you are building a new system, in practice you’ll be limited by your DC-DC board. The highest performance option commonly available option is the HDPLEX HiFi 250W DC-ATX board with support for “Support 250W with 400W Peak” power (with sufficient cooling, it should be able to handle sustained >250W – I run it regularly at >300W, but obviously that’s out of spec.) The HDPLEX has a wide input range of 16-24VDC, which is perfect considering that a battery’s voltage changes based on charge (if that doesn’t make sense, this article may help explain why).

OK, time to talk batteries.

There are lots of different kinds of batteries, but I’ll run through a few of the more common battery chemistries:

  • Alkaline – these are your old-fashioned coppertops. They’re not rechargeable and completely inapplicable to our discussion
  • Lead Acid – car/marine batteries, also used for UPS’s – they retain charge well and are cheap, but their energy density sucks (you should be getting at least 3-5X w/ Lithium chemistries). They have lots of subtypes (AGM, Gel, etc), and if you are building a non-portable solution you might want to look at these, but it’s obviously not good if portability is a consideration
  • NiMH – better energy density than lead acid, but still, don’t care. These guys have a memory effect and heavy metals (definitely need to recycled/ewasted). I can’t think of a good reason these days to use these (or their even more toxic cousins, NiCds)
  • Li-ion/LiPo – These are the lithium ion batteries that are in pretty much all electronics these days (typically LiCoO2). They have the highest energy density available (until Li-S batteries start popping up), and are standardized at 3.7V nominal, 4.2V max charge per cell. Note, the only difference with “polymers” is referencing the form factor (a polymer pouch vs a cell casing). As you should know from the news or traveling, these can get flamey/explodey if undercharged, overcharged, or otherwise mistreated (temperature, pressure)
  • LiFe – These are worth noting as they have lower energy densities than other Li-ion chemistries (there’s also NMC but you won’t really find those around) but are more stable. These are commonly used in electric bikes and for utility storage and are 3.3V nominal, 3.6V max charge per cell.

For portable power, LiFe’s are an okay (safer, longer cycle life) option, but for energy density (Wh/kg), cost ($/Wh), capacity (Ah), and continuous discharge (A or C), there’s really only one choice – LiPo’s used for RCs and drones are by far the best suited option.

Firstly, breaking down the terms that are most useful (if you want more):

  • Watt-hours (Wh) – simply how many watts/hr a battery can supply. In theory, a 500Wh battery for example would be able to power a 100W system for 5 hours or 250W system for 2 hours. In practice though, the higher your draw (amperage) the less power capacity you have (heat, resistance, etc increase)
  • Amp-hours (Ah) – Wh is typically a computed number from this “actual” capacity number (well, at least how batteries are properly rated; you need to individually measure each battery or even each cell if you want to get the actual actual capacity, which will change over the battery’s cycle lifetime to boot). Wh is Ah * nominal voltage. (BTW, for those wondering what “nominal means” – that’s because the batteries have a range of voltages that is a curve based on their discharged state (and rate))
  • Voltage (V) – your DC-to-DC board takes a certain input voltage. Note, some DC boards like the picoPSU expects 12V and does not do any voltage conversion. While a bit more efficient with steady power, this is a really bad idea with battery power since a 12V nominal battery will probably pass in something like 15V/16V at max charge and less than 12V when it gets low. Also, a lower voltage requires higher amperage. Consuming 240W @ 12V means you need 20A of current, vs a 24V battery only needing 10A.
  • Amperage (A) – this is the current that’s being drawn (or charged). Higher current drawn will negatively effect battery life as temperature and internal resistance increase. If none of what I’m describing makes sense, this guide to LiPo batteries does a good job of giving more background.
  • Capacity/C Rating (C) – this is a standard used by RC/drone batteries in particular for measuring discharge rate. C is a multiplier number against the Ah capacity of a battery. There is typically a continuous and instantaneous/peak discharge number. A 10C 12Ah battery is rated at 120A continuous discharge.
  • Energy Density (Wh/kg) – Watt-hour per kilogram is the standard metric for energy density. Consumer grade RC/drone cells are about 180-200 Wh/kg. LiFe batteries are around 100-120 Wh/kg. Perhaps one day soon, Li-S batteries w/ 400-500 Wh/kg energy densities will show up, but I wouldn’t hold your breath, next-gen battery tech is always coming next year (or better yet, 5-10yrs). Calculating this number is just what’s on the tin: nominal voltage * capacity / weight.
  • Cost Ratio ($/Wh) – Even more obvious. Typically the price decreases as capacity goes up (since there are fixed costs associated w/ a battery). This is most useful for comparing different battery types and seeing if some other characteristic is worthwhile.

I’ve included a spreadsheet of options, but I’ll make this easy and just tell you which one to get. You want to buy a MultiStar High Capacity 6S battery from Hobby King. The 6S wiring gives you a 22.2V nominal voltage (25.2V max, 18.0V min) which puts it squarely in the HDPLEX HiFi 250W DC board‘s 16-24V input range. (If you go with a LiFe battery, a 7S would give you the exact same voltage range as the 6S LiPo.)

The Multistars “only” have a 10C continuous discharge rating (120A for a 12000mAh, 160A for a 16000mAh), which is still 100-140A more current than you should ever need for your PC. You wires will melt long before you touch those amperages. (Oh yeah, definitely take a look the American Wire Gauge (AWG) current ratings (also)). For our purposes 10 gauge is overkill, 12-14 gauge is good, 16 gauge is a bit weak sauce, but you’ll probably get by.)

Next is connectors.

The HDPLEX has a 7.4 x 5.0mm barrel connector. This is a pretty standard jack size and is also used by the Dell 330W and HP 350W power bricks, so no adapters are required if you want to plug into wall power.

RC/drone batteries have tons of different connections for main power. The big Multistars use XT90s (while they look like the XT60 in pictures, and search results may give you one or the other, the XT90 plugs are physically bigger, so don’t get them confused). You probably won’t avoid doing some soldering, but if you get some connectors with cables, you’ll save yourself some trouble.

The Multistars also have a 6S JST-XH secondary plug is used for cell balancing/monitoring while charging (usually up to around 0.5A/cell for balancing). When usinng the battery to power your PC, you will want to stick a voltage monitor or alarm on there, so you know when your charge is low.

To connect the battery, you’ll need to make a 7.4×5.0mm to XT90 cable (I wasn’t able to find any prebuilt ones in my searches). It was actually quickest/cheapest for me to Amazon Prime an $8 90W Dell-compatible power supply and clip off the wire. It has cheezy 16 AWG wires, which isn’t ideal, but it works and I haven’t been motivated to find a better solution. When soldering, make sure your polarities are matched, and you can ignore the ground wire.

Depending on the battery charger, you may also need a banana plug to XT90 cable for charging your battery.

Now, like for the batteries, I’ll just give a recommendation. If you only need to charge a single battery at a time, I can recommend the Ultra Power UP300AC (CA shipping, China shipping) – it gives you great bang/buck w/ up to 300W/20A charging connected to AC. It has a touch screen, and has some data capabilities (I haven’t used them). It also includes everything you need for monitoring, balancing, different battery types, cycling (charge/discharge) and with automatic safety cutoffs.

UPDATE: after <6mo my UP300AC gave up the ghost. I dropped a line but since Warranty service looks like it’ll require roundtripping to/from Shenzen China, I just bought a lower-power/small replacement that should do the job).

Here’s a good 20 minute video that also steps through the basics of charging:

When you charge the battery, do not charge above 1C. For safety, you probably want to have a safety bag/box and/or not charge the batteries unattended.

You should partially discharge the battery if you are going to put it into storage or not use it for a while (you’ll also need to periodically recharge them in that case).

Once you have everything connected up (be sure to test your wires w/ a multimeter for shorts) you’re ready to plug it all in. I’ll just assume it all works the first time. (it did for me 🙂 The one missing component is that you will want to have a battery alarm in the JST-XH plug. I’ll link to some in the BOM, and below there’s already discussion on if you wanted to connect that to report into your computer, blah blah blah. The alarm I’m using gives a disturbingly large alarm (they’re built for drones mostly – you can gaff ’em to make them less annoying) if a cell goes below 3.3V. That should be fine (you can lower it to 3.0V if you want to live on the edge).

Here are some links in case you want to use GPIO and measure voltage but honestly, you’re probably just better off with an external battery alarm:

If you’ve gotten this far, I’ll finish off with a full rundown of the components and costs:

  • $85 – HDPLEX HiFi 250W DC-ATX (nanoATX Series)
    • if you buy directly from them (they have a CA warehouse), request the appropriate PCIe power connector for your video card (by default it comes w/ an 8 & 6+2, but you probably want a 6 & 6)
  • $61 – HP Firebird 350W Power Supply
    • When you don’t feel like plugging in a battery
  • ~$10 – 7.4×5.0mm DC Male Barrel Connector to Male XT90 Connector
    • I feel a bit conflicted on recommendations. For expediency, I Amazon Primed a cheapy $8 power brick, chopped it off, and soldered it to an XT90 connector ($10/5), but this is certainly not rated for more than 5A. Nothing you can readily buy (save for chopping up another 350W power supply) seems to be, however… I have some 10AWG XT90 cables, but those wouldn’t solder well
    • Your best best might be to buy a plug (here or here) and and solder w/ a 12 or 14AWG wire (guide, guide). If this is too daunting, you may want to talk to an Electrician friend, I couldn’t find anything off the shelf.
  • $4 – XT90 to Banana Plug charging cable
    • Of course this may be quicker/easier to just make your own if you already have your soldering iron out.
  • $8 – Battery Voltage Checker/Alarm (alternative)
    • Put these on your JST-XH plug to alert you to when your power is too low
  • $103 – MultiStar High Capacity 6S 12000mAh LiPo
    • You can of course buy any capacity you want, keeping in mind that the max continuous discharge for these guys is 10C. You won’t find anything remotely close in price to this, btw (the Tattu 12000mAh 6S’s for instance are $200)
  • $115 – Ultra Power UP300AC Touch AC/DC Charger
    • $105 if you’re not in a rush for shipping.

Testing with a selection of SteamVR apps I had handy, I was able to run my system for close to 2 hours (CPU averaged 20-50%, and GPU TDP was around 60-80% @ 1300MHz). Under regular usage (web browsing with music, video, non-graphics development) I was able to get just under 5 hours of usage.

Next time I’ll wrap this all up by turning this into an untethered/backpack VR system.

  • Pingback: The Most Portable VR Workstation – random($foo)()

  • Pingback: DIY Backpack VR System – random($foo)()

  • Zerofool

    Hi, I really like this write-up and it inspired me to build my own DIY VR Backpack PC (especially after seeing the prices of the recently released XMG Walker). Yeah, there have been some developments in the wireless video signal transfer for the Vive, but it will be probably another year until it appears as a consumer product in retail, so I decided to go with the DYI backpack for the time being.
    There’s something that’s bothering me, however, and I’m not sure how you solved it.
    I’m talking about the voltage of the 6S battery when fully charged – 6×4.2=25.2V (as you explained yourself). The HDPLEX and the Pico-Box units are designed to work with 16-24V and they have over-voltage protection so I suppose it would be engaged when connecting the fully charged battery. Do you know at what voltage the protection is triggered?
    I had two ideas for solving this:
    The first one was to find high capacity (10Ah or more) 5S LiPo batteries, ideally High Voltage ones (HV, a.k.a. LiHV), which are designed for 4.35V max per cell. Of course, I couldn’t find any, so this option was out :/
    The other one was to charge the cells of standard 6S LiPo to only 4V, but my research on the chargers brought me to the conclusion that the cheaper ones don’t offer such control and aim to charge all cells to 4.2V. There are some more expensive models that offer such Terminal Voltage Control (TVC), but the lower end of that range is 4.18V per cell – still too high. There are some high-end models which cover much wider range (3.85-4.35V for the iCharger 308Duo and higher models; 4.00V-4.23V for Reedy 1216-C2) but they are DC/DC chargers which are expensive enough by themselves, and they require additional AC/DC power supply, which makes the entire setup even more pricey.
    If someone knows of a decent, affordable AC charger, which allows for custom TVC as low as 4V (ideally, available in Europe), please let us all know.

    @Leonard, how did you solve that issue? And again, thanks for this great inspirational post!

  • lhl

    @zerofool:disqus Basically, I wouldn’t worry too much about the relatively small overvoltage. It’s only overvolted when the battery is at full charge anyway, which quickly goes down. If you are worried, you can just set your charger to stop charging at a lower voltage, which basically any balanced-charger should let you do.

  • Zerofool

    @lhl Thanks Leonard! That’s really encouraging and reassuring. It appears that the HDPLEX is more robust and forgiving than it seems.
    However, I’d like to “undercharge” my batteries also for the benefit of longer life / endurance / reliability / more charge-discharge cycles. I didn’t know that most of the balance-chargers had such options (I’ve only seen their menus in YT videos :)).
    And something else I thought may be useful to someone (mostly beginners like myself) – for my project I plan on getting a CellLog 8S unit, so I’d be able to log the discharge process a few times and better decide when to sound the alarm. Ideally, that would be right before the cell voltage starts to decrease rapidly, which depends on the battery, the current which the PC will draw, ambient temperature and many other factors. Monitoring/logging is required in order to find that value for the particular setup.
    Here’s an example of a discharge graph (10S pack):
    http://www.neptronix.org/forumpics/lipotutorial/24_dischargingmechanics.gif

  • Brian Grant

    how are you connecting the HDPLEX HiFi 250W DC-ATX (nanoATX Series) to the computer? Did you roll your own cabling for this?

  • lhl

    The HDPLEX is built for PCs so you shouldn’t need to do anything hooking up to the motherboard, etc (some people recommend making your own harnesses to make the cabling neater, but I’m lazy and just did extra cramming).