Charging through expansion port

Hey forum

I’ve been working on a possibility to use OTG and charge at the same time, or at least, keep the battery level.

After first successful tests with charging through the expansion port, I’ve come to some limitations. On short tests I always achieved 500 mA, or even almost 800mA, just by pressing two cables to the according pins (pin documentation by dirkvl - github). So I made a connector that fits well and I could make some longer tests (pin charge and ground pressed down, the other three stay up and hold the connector in place). Sadly, I usually only get 200-350 mA on average. It cycles up and down, sometimes as low as 100 mA, sometimes up to 700 - 800 mA, but comes down quickly to 200-350 mA again.

So, sure thing, the connector connects too badly. I made another one. Big conntacts, pressed down by hand. Same picture.

Sadly I need around 500 mA for my project.

I measured with an app called Ampere and supplied the power with an USB cable on regular USB chargers. The numbers from the app seem reasonable. I can rule out everything up to the connector, since the setup charges up to 1200 mA when fitted with an USB micro plug and connected regurarly. I didn’t try to build a matching pogo pin setup to also rule out the connectors though…

Someone here to deliver some experience and numbers? Is that as good as it gets, or is it possible to get better numbers or stable currents respectively?

7 Likes

I’m thinking of doing the same because I don’t want to buy replacement bottom modules

I 'm thinking about another option. Making two deepened connectors within the cover which go directly to battery+ and battery-. Then use a TP4056 charging board to charge it without the Fairphone internal charging unit. That way I could make a docking station that should deliver 1000 mA.

On the other hand, it would be a risk. Not sure how the phone reacts, even though it shouldn’t even notice it, since the battery can have the voltages, that the TP4056 provides. The only difference would be a quick uprising during the connection. Like switching a low charged battery with a fully charged one without connection loss. And vice versa.

Another risk would be the possibility to create a short, when there is no fuse. So far I’m not aware of a 1200 - 1500 mA fuse that is flat enough to put there, but I wouldn’t want to create the connectors without one. A battery blow up is not exactly the risk I am willing to take, no matter how small it is.

Since I am struggeling with a display that suffers dead zones and ghost touches, I am not sure if I want to investigate this further. There is the option for a USB-C phone which should render all the problems null and void and give me what I need (OTG and power)(. On the other hand, it would be far from fair, in anyway. So…I keep you posted when I digged deeper into the charging stuff.

If someone is aware of the fuse that could fit between the cover and the phone, I am all ears!

@wolferl
I am not sure if this is a good way to go except you need the extra charging opinion. It is not an elegant way, and opens other vulnerabilities.

1 Like

Actually I thought of connecting directly to the ± - Battery port myself. But If I connect something there, it would be a couple of 18650cells in a 3D printed case xD

The good old 18650s! They would be a bit too big for me, but surely would spend quite some power for a while :smile:

But then the TP4056 could be something for you as well, in case you don’t know them already. There are several suppliers and they come quite cheap and handy with the micro USB connector. I was not aware of them and very happy to stumble over them.

Sure, directly connecting from external to the battery pins while being in the phone also connected to the phone pins almost asks for serious trouble. (do you know the phone´s internal resistance and the charge control circuitry?) Maybe you will learn about it…
How about temperatur supervision of the battery while being charged?
I would advise taking another approach, have you heared of those external chargers?

Anyway…

Look out for some of these matching your needs:

https://www.reichelt.de/rueckstellende-sicherungen-max-40a-60v-2-2s-pfra-020-p35203.html?&trstct=pos_14
(they are resetable)

or

SMD chip fuses (one time protection)

https://www.reichelt.de/smd-sicherungen-1206-traege-1-a-serie-sf-bou-1206s100-2-p228964.html?&trstct=pos_0

There are also so called pico-fuses but on my quick search I could only find them at this dealer.

Thanks for your input @Patrick1. Someone also brought the SMD 1206 fuses to my attention. I though about going to use those, or a LiPo
1S BMS if I manage to fix it there. Found one that should only have 2mm.

I thought, that I don’t need to know the internal resistance, since the battery would deliver more amps anyway, so it should be able to handle it. Same with the voltages, since the charger provides max as much as a full battery. But I surely lack the knowledge about those things. You think I would run in a problem?

As stated by @anon41484458 ~500mA seems to be the maximum.

I´m using Ampere too and afai could experience it comes close to the values I also could measure with a measuring gauge on the bottom µUSB socket.

I could only identify this as a “varistor” - voltage depending resistor by a datasheet. But a conventional fuse works by current not voltage. Also in this issue there should not be any voltage peaks expected. The range should be somewhere between ~3,6VDC - 4,2VDC if all works properly. A current protection is rather needed here.

The phones internal resistance (load) is always there so it have to be considered.

Without the bottom module? I don´t know if the phone will even startup/operate without bottom module. If it does, there are more direct connections between the battery pins and the core unit. Maybe one voltage control circuit for the bottom module with µUSB/OTG and one for plain battery use on the core module.
There is a reason why the phone loops and don´t startup without the battery when connected to a cable only.

I assume your thought is without bottom module and original battery.
Any battery charge regulator (LiPo 1S BMS, TP4056 etc.) would have to be matched also to supply the phone and not only charge the battery. Therefore they have an internal charging curve that should match with the battery type to be charged properly and a voltage regulation for the other components.
CPU load, connectivity and usage changes permanently, I think it´s not so easy without a more specific design to fit a replacement supply.

There was a missunderstanding. I hope I can write the whole answer this time, the screen has its own life these days :wink:

I am not planning to replace nor to remove the bottom module / battery. All I want to achieve is another charging possibility while using the micro USB for a DisplayLink adapter. I am aware of the wireless possibilties to mirror the screen, but they lag.

I want to do my own docking station. Two deepened connectors on the back of the phone. One going to the plus of the battery and one to one of the minus’. To prevent shorts there, I would use either a SMD 1206 fuse 1.5 A or a LiPo 1S BMS which also would include voltage protection etc., even though that would not be necessary, the BMS module surely is a plus.

So, with that I could have two connectors to the battery which are safe considering shorts in the daily live in pockets and on metal surfaces.

On the docking station side would be a TP4056 charger module (LiPo 1S). It would deliver the same voltages as the regular battery would when fully charged (~4.2 V at max, depending on the battery state).

I don’t see a problem, because in my understanding, the phone would not even notice, beside of the sudden rise and fall of the voltage on connection/disconnection. It takes the amps it needs. If it is less than the charger provides, the battery gets charged. If it is more, the battery has to deliver as well.

The only problem I see so far is the battery loading state. When the internal charger measures the amps that go in and out, it would stop to show the correct loading state, since I would bypass it. If it only relies on the voltage, there wouldn’t be a problem, as soon as it gets disconnected, but I highly doubt that.

Further the heat might be a problem that needs to be addressed. But I guess it would hit the TP4056 more than the battery. The temperature would need to be supervised to prevent charging over 45° C.

I am looking at that in a simple battery charging way. Maybe I oversee something, since I lack the experience when it comes to smartphones. So I am thankful for second thoughts!

So the common connection would be only the +/- pins of both batteries.

And that’s the point where both charge regulators will start off with their own individual regulation process related to their internal charging curve parameters. And they are both not known to each other (phone internal and TP4056).

What surely will change is the resistance as then each regulator will not only see the resistance of the individually attached battery but a parallel connected resistor network. (Li-Ion, LiPo battery + phone)

Each charge regulator is matched for a specific type of battery (different battery types are differently charged, not always just constant current. Sometimes pulsed, low current/charge ramp, high current/charge ramp, boost, trickle etc.). So here you will couple a Li-Ion with an external LiPo battery.
Without any charge regulator but equal voltage it would work until both batteries are empty.
But the regulating here is tricky and might fail. If the regulating is not matching it’s unpredictable what will happen. Both regulators could start to swing and current shifts could occur causing more heat exposure and accumulating currents. That may happen right after connecting or take some time. A fuse probably won’t help much here as with some luck the regulator(s) will cut of due to overload or break as consequence of overheating. Having batteries remaining is risky then.
Maybe luck is with you and all works out well…

The above mentioned site is a very informative place addressing general battery and charging issues. They also write about cell balancing.
It could provide you with a lot more information on your approach.

Btw. I could read of someone on iFixit who managed to double his battery capacity by connecting two equal Samsung batteries and directly fixing them in his modified Samsung phone cover. It worked for him and I don’t know for how long and if the phone is still living meanwhile.

We still have a missunderstanding. Maybe you didn’t see that the 18650 LiFePO stuff is something different, which wolferl has in mind. I don’t want to bring in other batteries. And I agree, mixing LiFePO with LiPO is not recommended at all, but that is not what he plans, if I got it right.

In short:
An external LiPO charger connected directly to the battery. Use it to charge the phone while it is running.

In detail:
Two deepened connectors in the cover which go to the original battery + and -. Secure the plus with a fuse to avoid a short, in case there is an accidental connection between those two (unlikely, but no one wants an unplanned short on batteries). That is the only reason for the fuse after all.

On the other side a docking station with a TP4056 charger with matching pins. Use this charger to charge the regular Fairphone battery while using the micro USB for OTG stuff.

This charger can easily charge the battery when not connected to the phone. Like any other that can charge 1S LiPO. The question is only, how will the phone react when one tries to do that while it is running. And by that I think the phone reacts like any other electrical load, since it is not acting as a charger in that moment. So the FP2 charger circuit shouldn’t interfere at all, since it has no power. Well, that is at least my guess, but I am still happy to read other thoughts on that.

Aha, things are clearing up a bit more now.

Use the µUSB for OTG only (providing a power output then) while being charged with your TP4056 on the orig. battery connected to the phone’s battery pins.

I think such details are reserved for FP engineers only. Guessing remains for us customers I am afraid.

I am afraid it will be powered and hence interfere. As soon as the phone is switched on there will be power on pin +/- and all circuitry will awake. Whether from the battery or a µusb cable.
The current flow direction will change though. No µusb cable connected it drains the battery, µusb cable connected with a source, current will flow into the battery or at least expect one to be connected for charging (remember, the phone won’t even start without a battery).
Once up and booted enabling the OTG mode (by a specific µusb cable/adapter) - guess which circuitry will provide power output to the µusb port for OTG usage? It’s one for all.
So at the end the internal charging circuitry will always be active, it just acts differently according to the mode. There are no switches at all to activate/deactivate any circuitry.
This usb charging technique is a lot more sophisticated as I could find out while I made my own OTG adaptor.
I had to read and investigate a lot and I am very glad that we still have µusb and not usb-c. The latter does not joke around, if things does not match as they should your device will simply be fried. (There were reports on the net about other users having received non-compliant usb-c cables damaging their devices).
Hence µusb is a bit more tolerant and easier to handle.
This is about to be expected as circuitry behind the µusb connector in our phone. The red marked area would be your playground.
It’s not simply done with switches, there is also some kind of signal protocol behind to built up the proper usb data transfer/charge connection. Also the battery pins are always connected with the phone circuitry not insulated at any time.


This should give you an idea.

Thanks for your input and the wiring diagram @Patrick1. I agree, there is an uncertainty when playing around with those things, but so far I can’t see why the phone would care, so to say, where it gets its power from. As long as it is in voltage range and as long as it gets the amps it needs, there should be no problem. The battery on the other hand needs supervision. It would take more amps, which would lead to a shorter battery life at best, so it should not be charged with more than 1000 mA at max and lesser to the end, which the charger takes care of. Further, it shall not be charged over 45°C. These are things the internal charger would usually take care of, so I would have to take care of during the tests and install a fan if necessary. And as a last, I wouldn’t want to charge it directly and also charge it by micro USB.

I It is on a lower level than your changes on the micro USB cable - what was your project then by the way? But then again, I am not sure yet if I’ll try it, as this is only a simple theory and as you say, things can go wrong.

I will build an external battery charger first and see how it goes from there. Make some tests and see how the TP4056 performs, measure the amps it delivers. And maybe I can even get rid of the fixed idea of a screen mirroring without latency.

Anyway, talking about that plan helped to clear things up for me a lot. I will update as soon as there is a progress, however it looks like.

I made my OTG cable following a guide from the XDA site.
Nothing fancy, but a bit tricky to get everything properly placed and soldered.

I could find several guides for OTG and charging adapters over the net as phones seem to be so different in charging issues.
Some adapters on sale may work while some don’t.
I could read about several different resistors to enable or make the phone recognize chargers or set a specific (charge) mode. After all I was testing on my developer board which combination was actually working. But charging does not with OTG. Maybe I will give it another try some day to test. Nevertheless I could read that it would also rely on software drivers.
Also we don’t have a quick charge mode. We have some about ~500-600 mAh when a data connection is enabled (using all 4-wires out of 4) + computer or up to ~1400mAh without data connection (or using only 2-wires out of 2-4) + wall charger/power bank.

So have luck with your project. I guess you have read into this topic already.

Conclusion: It works, but scrambles the battery percentage as expected. Can’t recommend it.

TL;DR

So, that escalated quickly here :wink: I got my TP4056 modules and could run some tests. They charge as expected, but get warm and maybe due to that start to deliver less amps, even though the battery would take more. Maybe there are also better qualities around. But it was always above 700 mA and at max a bit more than 1000 mA (within specs, as they state a 2% variance). No notable warmth on the battery.

Next test was to charge it while the battery was in the fairphone but the phone off. No problem there. The battery load percentage gets actualized after the next start (as it would on a battery change). The phone started right away, so I was happy about that.

Next test was to switch on the charger while the phone was running. No problem there considering the phone itself. It runs as usual. Within the app Ampere I could see a rise in the voltage, but it was lower than the one I measured on the wires to the battery. So I guess Android is measuring somewhere else, since I can’t think of a way that it drops 0.2 V from the cables to the pins. Temperature seemed fine.

Of course no indication of charging within Android or Ampere. That was expectable, but sad anyway. Which leads to the problem of the story. The percentage keeps dropping as it would, even though the battery load is rising. I was measuring the amps that go in and saw the ones that are used according to Ampere. So, even with a plus of 200-300 mA, it keeps droping as it would when not charged. Bummer, since what is going to happen when it falls below 15%? Or 0%?

Alright, anyway, next test. Plug in the DisplayLink adapter - I used a powerbank to power it, since I wanted to make sure that there is at least a 1 MV galvanic isolation between the TP4056 and the DisplayLink :wink:

Wow, what just happened? The percentage gets actualized! Suddenly it went up from 34% to 56%. That was a reasonable jump for the time it was charged that way. Like starting at around 43%, going down even though it gets charged, and then correct it to a realistic value. So, plugging in micro USB somehow triggers a recalculation, maybe it starts a charging routine or something the like, which at the end also recalculates the battery load state.

But further tests of stopping the charger and starting it again, showed the experimental nature of this setup. Sudden jumps, sometimes down to 5%, then up again. Reconnecting the OTG adapter helped to correct the value, even though I lost the feeling for what should be right, it did at least make a change.

Then the heat is a problem after all, not with the battery, but the main module, which starts to heat up around the SIM slots. Something I always noticed using the DisplayLink. So I would need a fan after all, even if the charger does not seem to be the culprit, I cannot imagine to run it for hours without problems.

Well, I am not sure yet, if I am not going to give it another try, but together with the experimental desktop apps (Sentio, Leena) it is not what I was aiming for. A decent way of getting a text editor and browser on my bigger screen running from my Fairphone. So…too much fumbling for a bad solution.

I am ogling with Samsung DeX, I guess that would be perfect for my requirements and the best solution these days to use an Android as a netbook replacement. Hope stays, that others follow and by thus the apps get enhanced and other brands follow.

1 Like

I see, we somehow had the same goal. I was reading about that possibility too, but then didn’t follow through as I have read, that there is no chance to do it like that, if it is not enabled in the kernel. I guess that was the reason why it didn’t work out. But I am glad that you have brought that up, cause I always had it in my mind, like a last chance that might work if all others fail. So that one is gone too, and for once I am not sad about it, it feels like a relief :wink:

Right now I am just running my charger setup for the last time I guess. It feels nice to write this text on a real keyboard using my little TV/Radio screen. Maybe somewhen in the future.

1 Like

And for the sake of correctness: I made another run, and the heat was not due to the DisplayLink, but the WiFi that I didn’t turn off after a test with an HDMI dongle. So the heat is not an issue of DisplayLink, except you power it by the phone of course.

18650 you said? :wink:



That is my V1 of a battery-pack. Dimensions are exactly my FP2-Dimensions.
I have to redo it/resolder it, because i am not happy.
(For the ones interested in Data: 6x 3400mAh 18650-cells at 3.7V nominal in 3s2p-configuration, LED-Change-Indicator, micro-USB-chargeport, micro-USB-cable dangling out. Direct charge with 20V10A can be handled by the BMS if i hook up things directly. Would charge the pack in about 1 hour, 12V car-adapter would also be possible (but not charge up to 100%))

Back to topic:

Instead of the Kapton-Tape that currenly holds everything in place i want to create a univeral back-adapter to my FP2 exposing the 5 pins similar to the TOHKBD:

That Jolly only had I2C, we would have full USB2.0-Capabilities. I think of an magnet plug-on battery-pack, keyboard, USB-Hub, etc. pp.

I still have to brush up my freecad-skills before i can show something for real (and make a thread of my own), but that are my thoughts for the expansion-port.

6 Likes

Nice, shit got serious! That looks decent. Have you already tested the capabilities of the expansion port, e.g. charging through it?

1 Like

Only a bit through the Prototyping Shield with charging port (e.g. QI) but nothing directly.

If that would not be enough i would just ride off the bottom-charger (with an adapter or so) with 1.5Amps @ 5V

1 Like