Page 1 of 1

USB Tethering: How can I prevent the host from charging the phone/tablet?

Posted: Thu Nov 12, 2020 6:56 am
by lostweekend
I am tethering, via USB, a 3rd gen iPad Air to a router (running OpenWRT). This is running 24/7 and all is working pretty good. However, with this setup, the router's USB port is constantly charging the iPad. I don't want this happening because it is not good for the battery. What I'd prefer to do is charge the iPad thru its charging block connected to a timer so that the iPad is only charged at specific times of the day. I've looked online to see if there are any breakout cables that split the power/data leads of a USB cable, but I can't seem to find one that will do the job.

I have Apple's Lightning to USB 3 Camera Adapter which has a female USB type A port and a lightning port for charging. I thought this would be the perfect solution to my problem, but unfortunately this adapter does not seem to work with USB tethering.

Is there a way to accomplish what I'm trying to do? As a last ditch effort, I might try experimenting with hacking up some USB cables to split the data/power leads. I'd still prefer to find an elegant, off-the-shelf solution.

Re: USB Tethering: How can I prevent the host from charging the phone/tablet?

Posted: Thu Nov 12, 2020 7:10 am
by Didneywhorl

Re: USB Tethering: How can I prevent the host from charging the phone/tablet?

Posted: Thu Nov 12, 2020 7:33 am
by lostweekend
I am going to try this one: https://www.amazon.com/Certified-Lightn ... B083V2F7VJ

I should have it tomorrow. I'll report back my results.

Re: USB Tethering: How can I prevent the host from charging the phone/tablet?

Posted: Fri Nov 13, 2020 9:35 am
by lostweekend
I ordered both adapters to try. The one mentioned by Didneywhorl, and the one I posted afterwards. Both came today and neither one works the way I want it to.

I'm going to try hacking something together with these:

https://www.amazon.com/WMYCONGCONG-Term ... B07SGQ44F5

If that doesn't work then nothing will.

Re: USB Tethering: How can I prevent the host from charging the phone/tablet?

Posted: Fri Nov 20, 2020 5:27 pm
by lostweekend
After doing some experimenting, it looks like the iPad always needs USB power in order for USB tethering to work. There's no away around it.

The solution I came up with is a USB breakout cable I made with a separate female barrel power connector for connecting a 5V charging adapter. The idea is to use a 5V power supply with a very low output current (less than 250 mA). This way, the battery is charged at a very slow rate and is not overheating from the constant charge. Not the ideal solution, but it'll have to do.

Re: USB Tethering: How can I prevent the host from charging the phone/tablet?

Posted: Fri Nov 20, 2020 7:36 pm
by tetranz
lostweekend wrote: Fri Nov 20, 2020 5:27 pm After doing some experimenting, it looks like the iPad always needs USB power in order for USB tethering to work. There's no away around it.

The solution I came up with is a USB breakout cable I made with a separate female barrel power connector for connecting a 5V charging adapter. The idea is to use a 5V power supply with a very low output current (less than 250 mA). This way, the battery is charged at a very slow rate and is not overheating from the constant charge. Not the ideal solution, but it'll have to do.
I've been thinking along the same lines. I'm tethering a phone via a Raspberry Pi and I'm a little concerned about the battery.

I've read the same thing. The data circuitry won't work without voltage on the power line. Reducing the current and voltage (ohms law) might be a solution. I think it might need, at least for experimentation, a continuously variable power source so you can measure and adjustment it. Hopefully there is a point where the battery stops charging but the data still works. I suspect the data circuitry just uses the power line as a logic level so exact voltage probably doesn't matter much.

I'm not actually too worried in my situation.
- The phone, a Samsung Galaxy A01 is a cheap (but good) $85 phone so not the end of the world if I burned it out.
- I just discovered that it has a replaceable battery. It seems like quite an exercise to replace it but doable.
- I unplug the phone at night and use it as a bedside radio. It's half discharged when I hook it up to the Pi to start work the next day.

I've heard that this issue affects some devices much more than others. I'm surprised that any decent charging circuit can't simply detect battery level and stop charging.

Re: USB Tethering: How can I prevent the host from charging the phone/tablet?

Posted: Sat Nov 28, 2020 12:26 pm
by tetranz
I think I have a workable solution for this.

It's probably device dependent but, at least on my Moto G Power phone, there is a current level where the battery stops charging but the data still works.

charge-limiter.png

I will of course put some tape around it. I got a one of these https://www.amazon.com/gp/product/B06Y5KZC9W
and one of these https://www.amazon.com/gp/product/B08D68JW4K

I cut the VCC power wire and inserted a 1N4004 diode and 1 ohm, 1 watt resistor in series. The idea is that the resistor provides a convenient way to measure the current by measuring the voltage. The diode is a known voltage drop of 0.6v.

With just the resistor, I measured 480 mV across it which means 480 mA current charging the battery. Then I inserted the diode and got 56 mV across the resistor. It's not zero but the important thing is that the phone battery is slowly discharging. With two diodes there is too much drop because the phone doesn't recognize when the cable is plugged in.

You could probably just use a suitable resistor. I can see the possibility of an adjustable unit with some sort of indicator. "Turn this until the LED goes out" kind of thing.

This will work nicely in my RV where I can manually remove the "charge limiter" cable when the battery needs charging.

Re: USB Tethering: How can I prevent the host from charging the phone/tablet?

Posted: Fri Feb 25, 2022 5:05 pm
by ruraltx
This is something better solved in software, if you have root/are jailbroken.

Android:
https://github.com/sriharshaarangi/BatteryChargeLimit
https://github.com/VR-25/acc

iOS:
https://www.reddit.com/r/jailbreak/comm ... or_to_the/

If I were to try to do this in hardware, I'd write an app to record charge level and communicate it over bluetooth to a circuit to raise and lower voltage on the line.