2

Sometimes I have multiple batteries I want to charge, but I don't want to charge them all simultaneously. There are three scenarios for this:

  • My power source isn't strong enough to charge all the batteries simultaneously. For example, maybe I'm off-grid using a small inverter. Charging batteries sequentially rather than all at once
  • I want to keep several gadgets with batteries charged above 20%, but I want to avoid keeping them all at 100% in order to maximize their longevity.
  • I am connected to the grid but I'm trying to minimize my peak demand because I'm paying a peak demand tariff.

All my batteries have their own AC adapters, so I'm looking for something like a 120V power bar that has smart control of the outlets.

Is there anything on the market like this? I'm not even sure what to call this product category. I know there are "smart" power bars, but they mostly seem only useful for remote control, and that's the opposite of what I'm thinking of here (I want something that works unattended.)

Ideally I'm looking for something that can do any/all of these functions:

  • Ensure that only one power socket is energized at a given time. (Software developers describe this as "mutual exclusion")
  • Keep one socket energized until the power demanded drops below a threshold, then automatically energize the next socket.
  • rotate power to each socket on a timed schedule anywhere from minutes to days. (Bonus if the schedule can also be programmed with intentional blackout windows.)

If there is no product like this on the market, what would be a reasonable way to DIY something like this?

2
  • Is it safe to assume these batteries are all normally charged on mains voltage and used for consumer applications, such as power tools, garden equipment, etc?
    – LShaver
    Sep 2 at 14:36
  • Yes, charged on mains voltage (120 V). Regular consumer items like power tools and laptops.
    – Nic
    Sep 2 at 15:00
2

There are two different ways you could do this depending on how much programming you want to do.

Start with a commercial smart power strip with energy monitoring

There are likely a number of compatible products, but I've used TP-Link's Kasa line in my house. They offer the HS300, a smart WiFi power strip with energy monitoring. From the specs:

  • 6 Smart Outlets. Independently control 6 smart outlets and charge 3 devices with built-in USB ports.
  • Energy Monitoring. Monitor how much energy devices connected to the power strip consume.
  • Control From Anywhere. Control connected devices from anywhere with the Kasa Smart app.

Basic programming with IFTTT

The Kasa line is compatible with IFTTT (If this, then that) a simple web-based platform for coordinating actions of web-connected devices and services. Based on a forum posting, it seems like the power level from Kasa may not be available as a trigger for IFTTT, but you could use this for your third function:

  • rotate power to each socket on a timed schedule anywhere from minutes to days. [...]

Advanced programming with a Raspberry Pi

There are a lot of hits for "HS300 raspberry pi" that could likely serve as a starting point for this project. Several point to python-kasa on GitHub:

python-kasa is a Python library to control TPLink smart home devices (plugs, wall switches, power strips, and bulbs) using asyncio. This project is a maintainer-made fork of pyHS100 project.

With some tinkering, you should be able to program an RPi to monitor the consumption of each outlet to accomplish your first two functions:

  • Ensure that only one power socket is energized at a given time. [...]
  • Keep one socket energized until the power demanded drops below a threshold, then automatically energize the next socket.

With a web-connected RPi you'd be able to monitor this remotely and could even integrate data from a web-connected solar inverter, weather station, your own location, etc.

2
  • Given you've got a GitHub link in your profile, I'm guessing the second option could work for you :)
    – LShaver
    Sep 3 at 1:34
  • Oh nice, an RPi seems like a good choice for this project.
    – Nic
    Sep 3 at 2:53

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.