0

Is it theoretically possible to build a device that connects to a laptop via USB-C, receives battery level information and connects laptop to a charger only if the battery level is in certain range?

I am totally inexperienced in electrical engineering, hence also (if the above is possible at all):

  • Is it something complicated / platform specific (on a hardware level) or relatively easy to do having some basic knowledge?
  • How is it different with Thunderbolt 3?

Assumptions:

  • Laptop supports USB-C power delivery charging.

2 Answers2

1

Yes, the new Mac-Book laptops charge via USB-C.

https://www.apple.com/shop/accessories/all-accessories/power-cables?fh=459d%2B4891%2B45d4

I am not certain of the details of their implementation though. Most likely they used the USB power deliver standard.

https://www.usb.org/usb-charger-pd

In order to do what you are proposing the laptop hardware would need to have been designed to accept power via a USB-C port. You can't just do it with any random laptop that happens to have a USB-C connector on it.

user4574
  • 11,816
  • 17
  • 30
  • Thank you! Had to mention that yes, I'm assuming that laptop supports usb-c charging. The problem is to use the same cable for data transfer and (conditionally) power delivery. Again, both at the same time is surely possible (e.g. connecting phone to a laptop can both charge it and used to transfer data). The question is how to 'block' power delivery under certain conditions. – Edward Ruchevits Nov 05 '20 at 09:26
1

Is it possible? Of course? Practical? Ehhh. Easy to implement? Depends on your skill. It's a non-trivial project. And a full blown usb-c dependant way as you asked is beyond the purpose of this site.

An easy way to do it would be a control program on the laptop that talks to a Bluetooth or network/wifi device that controls a relay, like an esp or similar. This way you don't need to get the usb c or thunderbolt connection involved. Simply power on and off a relay controlling the usb power supply. Some hysterics so that the relay doesn't turn on and off because it went from 89 to 90 percent full and then back down would help.

Passerby
  • 72,580
  • 7
  • 90
  • 202