Some Bits: Nelson's log

2 posts in December 2019

UPS battery lifetime

I use cheap UPS units for battery backup. Things like the CyberPower CP825LCD, basically power strips with a 12V battery and an inverter. They work OK.

For a few years. The lead acid batteries in them eventually wear out, and after 3-5 years they don’t hold a useful charge anymore. They lose capacity over time, too. Unfortunately these cheap UPS units don’t have a good way to monitor their battery health. You only notice when the power goes out and find you have 5 minutes of battery backup, not 15. Or else the unit just fails entirely and starts beeping confusingly or doesn’t provide power, even when plugged in.

Checking battery health

There is a way to easily check the battery life though, at least with CyberPower UPS units. Their PowerPanel software connects to the USB port on the UPS and gives you info on battery status. Including a self test which calculates battery capacity in the moment

Before I clicked the “self test” button it was saying Battery Capacity was 100%. But that was a guess based on the fact the battery was fully charged. Self test swaps over to battery power for a couple of seconds and then measures drain. This battery really only has 1/3 capacity which means it’s time to replace it.

You can also do a simpler version of this self test by just yanking the plug and seeing how long the UPS lasts. Works better if the UPS has some sort of display of battery life remaining. But I found that a little confusing; this software test works better.

Every UPS I’ve had also runs its own self test regardless of whether there’s any software talking to it or not. I’ve never seen this test report any useful information, though. Maybe when it fails that’s what sets the UPS off on the endless beeping until you change the battery? Dunno. I sure wish they’d invest a little more into communicating to the user this necessary maintenance.

One other neat thing about the software: they report wattage used as well. For some reason the CyberPower LCD units don’t show that on the LCD screen.

Another blessing of the software is it lets you turn off the beep alarm when the power goes out. I already know the power is out, I can tell because of how dark it is. I don’t need every UPS in the house beeping at me.

These UPS units offer software for Windows, Mac, and Linux. The last time I used the Linux software (from APC) it was scary bad code running as root so it could run shutdown. But it did reliably output numbers on battery activity that I could graph with munin.

Replacement batteries

The simple solution to a failing battery is to replace the battery. The CP600LCD I have that just failed is $70 new, or $35 for a battery from CyberPower. Not great. But fortunately lead acid batteries are standard and common; as long as it’s a lead acid battery with 7V, the same Ah capacity, and the same physical size, it’ll work. (Probably any capacity battery will work but if you want it to fit the case, you’ll want the same size.) I ordered an ExpertPower battery for $17.50, or just half of the CyberPower official price.

The one thing to look out for is that the connection terminals come in two sizes: F1 and F2. F2 is wider. My UPS has F2 connectors but the new battery has F1 spades, I’m hoping it’ll still fit well enough to just work. You can also buy very simple adapters, metal clips, but the Amazon price on something that cheap is ridiculous.

Don’t put your old battery in the garbage, they are hazardous waste. Instead dispose of them like you would a car battery. Most trash collection companies have a special pickup or dropoff option for them. Places like Auto Zone and Home Depot often take car batteries for recycling, too.

Better batteries

Battery tech has come a long way; why are we still using old lead acid batteries? Mostly because they’re cheap, and UPS units don’t need to be compact or light. There are other battery tech options though.

Our ordinary lead acid batteries are “VRLA”, sealed. There’s a different type of “flooded” lead acid battery that’s open. They work for more cycles, but they are constantly venting hydrogen and needing distilled water added to it. So not really practical for home use.

I’ve never seen a NiCd or NiMH consumer UPS. The articles I’ve read say they are just too expensive for the performance, although I’ll note that didn’t stop laptop manufacturers in the 90s / early 00s. There are some hacker projects you can find building cheap 5V UPS backups with NiMH AA cells for low power devices like Raspberry PIs. Sounds fun.

As for lithium, I think it’s just too expensive. APC does build one consumer lithium-ion UPS, the APC BG500. But at $270 for a 500VA backup it has a hard time competing with the $50ish 500VA from lead acid batteries. It’s smaller and the battery will last twice as many years, sure, but for 5x the price? There’s a range of high end rackmount lithium UPS units for datacenters where compactness matters, but now we’re talking thousands of dollars.

IoTaWatt energy monitoring

I’ve been playing with an IoTaWatt energy monitor. This is a bit of hacker-friendly kit that measures electricity usage on each circuit in your breaker box. It gives you real time wattage data with 5 second samples and makes it much, much easier to understand where power is going in your house.

There’s a lot of products on the market now that do this kind of thing. Many are full consumer turnkey products like Neurio or Sense. They have cloud based monitors and some fancy pattern recognition to tell you things like “your refrigerator is failing”. I opted for the more hacker-friendly one, both to keep the data private and to be able to play with it more myself. See also OpenEnergyMonitor. I tell you, what I really want is something like a Leviton Smart Load Center, where the panel and breakers do this kind of monitoring themselves. (Price seems to be ~$4000 for a house, compared to $1500 for traditional dumb breakers.)

This post is long because I’m in the middle of learning about this stuff. But after running it just for 24 hours I learned some things like I have a leak in my water system somewhere, that my office uses 80W even when everything is “turned off”, and just how much electricity videogames use when you’re playing them. Having precise numbers for all this stuff is great.

How it works

The key sensor technology is the Circuit Transformer, a ~$10 metal coil you clamp around the hot wire of a circuit you want to monitor. The magnetic field in the main circuit induces current in the CT, which you can then read out the other end as either variable voltage or amperage. The common split-core CTs are installed without disturbing the wires in the breaker box at all, and nothing is electrically connected. Even so it’s important to keep the CTs plugged in to the controller box; if they aren’t they can build up a dangerous charge.

The CTs are plugged in with 3.5mm jacks to a controller box. The IoTaWatt is an Arduinio-class system that basically takes 14 CT sensors as input, stores the data on an SD card, and has a web interface over WiFi. The custom software (not Unix) includes a decent graphing interfaces and enough APIs to load the data up to some other system like Emoncms or your own stuff. It seems pretty good.

Installation

A temporary installation isn’t as hard as I feared. You take the panel for your breaker box off, exposing all the wires. Then you clip the CT sensors of the appropriate sizes around the wires you want to monitor. Done! You don’t even have to turn the power off first although obviously you should to be safe.

Of course it’s not so easy. The tricky part in North America is we use split phase power. We get 240V from the power company but it’s split into two out of phase 120V legs. The CTs only monitor a single leg, so if you’re measuring a 240V circuit (like a well pump or a dryer) you need to use two CTs, or pass both hot wires through a single CT, or double up the measurements. Also it’s easy to install a CT backwards, so the values are all the wrong sign. Fortunately the IoTaWatt has many software tools to compensate.

The other problem is a permanent installation. All the CTs and wires take up a lot of room in the breaker box. And the IoTaWatt also has to go somewhere, and be plugged in to two wall transformers. If you have a big breaker box you could just leave it inside (if code allows), but I’m not sure how well WiFi works there. I haven’t figured out a good permanent install.

What I measured

I just went with a simple temporary install to get some basic measurements. I only measured for a subpanel in my house and wasn’t able to get some of the more interesting things like the refrigerator. What I did get:

  • My office: a simple 110V circuit. This is where I spend all my time and includes my PC, my PS4, and my TV. Also overhead lights.
  • Furnace fan: simple 110V circuit? Gas heat, so fan only.
  • Pool: full 240V circuit. I’m only monitoring half of it, so I have to double the numbers reported. This may not be entirely accurate if the load is not balanced. But my 385W pump load shows up as 200W on the graph, so doubling is roughly correct.
  • Well pump: a 240V only circuit. I should double the numbers reported.
  • Septic pressure dose pump: another 240V only circuit, should double.
  • Subpanel supply: a full 240V circuit, with two monitors installed. I believe it’s correct to sum the two numbers when measuring the load.

Data and Graphs

Here’s some data I collected after running the monitor for 24 hours.

Power usage for individual circuits (already doubled as needed):

  • My office: 4600 Wh
  • Furnace fan: 1200 Wh
  • Pool: 3200 Wh
  • Well: 1400 Wh
  • Septic: 700 Wh
  • Total measured: 11,000 Wh
  • Subpanel supply 1: 7400 Wh
  • Subpanel supply 2: 9300
  • Total subpanel: 16,700 Wh (or about $4/day)

Office and Pool

Office and Pool

Here’s a graph of power usage over the course of a day. The yellow line is my office, the blue line is the pool.

The pool is easy to understand. Note the graph is at half scale, I forgot to click “double” in the setup. The filter pump turns on around 2am, has a brief priming jolt, then runs steadily at ~400W until 6am. There’s a 30 minute window of very high usage, 1800W, that’s when the second pump turns on to run the sweeper. There’s also an occasional usage of power during the day, well below 100W. That’s a little pool cover pump I have that runs when there’s enough water. It was raining this day. The pool uses 3200Wh a day or $8.

My office is harder to understand. At night it’s a steady 80W; that’s with most everything turned off or in sleep mode, but I still have a bunch of network equipment and vampire loads from TV gear. The load in the morning of about 200W is when I turn on my computer and do low power stuff like reading web pages. It spikes up to 400W when I’m playing a game on my PC. The 350W load is when my PC is relatively idle but I’m playing a game on my PS4. The TV seems to also spike the whole circuit load up to 200W. There’s also some overhead lights in the mix. Putting this all together, I can estimate these loads:

  • Constant load 24/7: 80W
  • Idle PC use in morning: +120W
  • PC gaming: +300W
  • PS4 gaming: +250W
  • Watching TV: +100W
  • Full day: 4600Wh, or ~200W average.

Furnace, Well, Septic

Furnace, well, septic

The furnace fan (in red) uses 120W when it’s on. It doesn’t run at night. It averaged about 50W this day.

The septic pump runs a few times a day; this value should be doubled. It’s sorta correlated to water usage but not really, it’s not as simple as “every time I flush the toilet”. It’s a high load when it runs, 2000W, but only briefly. Average daily usage is 30W.

The water pattern is more troubling. (Again, values in graph should be doubled). My well pump is coming on every 30 minutes and it’s basically uncorrelated to water usage in the house. That to me says I have a leak somewhere. I turned off the outside water while monitoring this and the frequency went from ~25 minutes to ~33 minutes, so while there may also be a smaller leak outside the big loss is coming from the indoor plumbing. I’m pretty sure I don’t have any leaky faucets or running toilets. Maybe it’s the well itself and the water system’s pressure tank. Apparently a common failure mode is that the check valve leaks pressurized water back up into the well, so it has to refill itself every once in awhile. The power usage isn’t so bad (60W average, or $15 a month) but I don’t want to waste water. And it’d be better not to have the wear and tear on the pump.

Subpanel Inputs

This is the graph of the power going into the panel. Both legs of the 240V circuit, I believe it’s correct to sum these. Not sure why they aren’t balanced more? The yellow line seems to go higher when I’ve got lights turned on and the office is busy, so maybe it’s uneven 110V loads. Not sure it really matters anyway. Note that the 5 circuits I’m monitoring in detail only add up to 11,000 Wh of the 16,700 Wh the panel supplied this day. I’ve got a bunch of other circuits I’m not monitoring, I guess they add up to about 1/3 the usage.

Conclusion

I like this IoTaWatt! Even with a temporary install I think I could learn enough in a few days to model out all the power usage of my house. Idle load, average load, and max load for every circuit in the house. That will be hugely helpful when designing a power backup for PG&E’s stupid outages, whether a generator or a battery.

What I really want is to have this kind of monitoring all the time, storing history in the background. Would love to see how my usage patterns vary over time, or spot new water leaks, or realize when the refrigerator is failing. I think the IoTaWatt is sufficient to do that, at least if you can find a nice way to install it permanently.

I do think an integrated system like the Leviton Load Center makes more sense though. I wonder if their system is in any way open? I fear the answer is no. No hint it works with any of the open source software, and Leviton doesn’t even have it working with Alexa yet. I bet there’s a way to scrape data out of the web app.

Bonus

Another graph, this of the next 24 hours. All the doubling, etc is done correctly.