USB power relay board?

I’m building out my on-wall android tablet project as many other have before me. I looked around to see if there was any way to have HAOS enable/disable charging so the tablet battery doesn’t get trashed. But the consensus is that it’s not possible programtically.

That has led me to the idea of having a small (micro even) esp32 board that esphome could have HAOS monitor the tablet battery level and enable/disable a USB power passthrough to charge the tablet following the 80/20 approach.

I have seen there are TI chips that act as a USB relay but not being super electronics-designer skilled, I’m not sure how to go about designing the board or writing the ESPHome code to drive it.

Now, I can’t be the only one that has thought of this. Is there possibly something already on the market that would take a USBc power in and provide a switchable USBc power out that can be hooked into HAOS? Preferably something small enough that could be mounted into a slim wall mount for a 10" tablet?

The USB-C power must come from somewhere → mains?
Why not take a smartplug and switch mains instead of USB power?

1 Like

There is, but it’s USB A. On a positive note, it’s quite small, can be flashed with Esphome or Tasmota and can handle up to 20v

https://a.aliexpress.com/_EGjtAuN

PS: before you commit, most modern-ish tablets have some kind of battery overcharge protection setting you can enable. Depending on your tablet, you might not need any extra hardware at all.

2 Likes

@ShadowFist

THANKS!!!

My bigger TabS7+ does have that, but I don’t think the Tab8a has that feature. I’ll double-check that.

What it doesn’t have, though, is the other end of the equation. It will stop charging at 80% but not let the battery drop to 20% like a regular charging cycle would.

1 Like

@tmo The tablet is getting mounted on the wall with a recessed outlet behind it. The outlet has USBa and USBc ports to power the tablet from behind. All neat and hidden. A smart plug won’t fit back there without making the tablet mount hideously huge!

I haven’t found any remote outlets let alone any with USB ports integrated. Unless you know of any, preferably Zigbee or Z-Wave?

If you have space for Esp32 board, tiny NPN transistor can take care of the switching.
Also 30-70% would be better than 20-80.

@Karosm

This sounds intriguing…

Can you elaborate a bit more?

Kudos for the 30%-70%

I had to use translator… :wink:
You can switch on/off the negative wire of your battery charger with NPN transistor or mosfet controlled by Esp-board.

I wouldn’t worry about it. Even if you do a 100% / 25% charge/discharge cycle every day the battery would still have more than 75% of its original capacity after 12 years.

https://batteryuniversity.com/article/bu-808-how-to-prolong-lithium-based-batteries
DST-cycles-web2

3 Likes

Welcome.
If you want a zigbee version, I stumbled upon this which also has power monitoring, but I haven’t actually bought one yet.

Looks like it’s fully supported in Z2M and partially supported in ZHA, but you’ll have to join a waitlist for the next batch which is due in March.

1 Like