Modified: USB Charger Doctor as USB Current Shunt

A while back, I had purchased and completely tore down some USB Charger Doctors. While they didn’t seem very modifiable at the time, I came across a need which could easily be fulfilled should I choose to modify one of them.

Of the devices my own, my day-to-day LG D686 (a pretty dated, basic smartphone) has slowly been losing battery capacity. It’s not really that old, and the cell itself looks physically fine, so I was wondering what actually might be going on to cause the capacity issues I was seeing. Other than that, my HP Stream 8 has been pretty much on the fritz when it comes to charging – opting to charge at times, and not at others with little rhyme or reason. Finally, I had another device to review, and I really wanted to know how much charging current it consumed and how long it took to charge. The USB charger doctor as it is supplied wouldn’t have been particularly good for this because it has no ability to log any readings.

Modifications

Instead, I decided I would modify the charger doctor to just be solely a current shunt. I could have added an additional voltage-logging terminal, but since I’m using a quality charger as a source, we can assume it to be 5v without too much impact on accuracy.

20151209-1533-0503

To do this, I decided to lop off all of the left side of the circuit board including the LCD and IC. I had no need for it, and removing its current consumption would possibly make things a little more accurate. I decided to grab a few spare insulated wires and a mono 3.5mm panel-mount socket that I had in stock and solder them directly across the shunt resistor, producing a very small output voltage.

20151209-1535-0504

I didn’t measure the wires carefully, so when assembled, there is a nice loop of wire inside the casing. Readers might be wondering why a mono socket might be appropriate, and it’s basically so that I can easily connect or disconnect the measurement equipment from the shunt at any time. The action of connecting and disconnecting can cause a momentary short across the two conductors, essentially shorting out the shunt resistor, which actually has no negative impacts at all, hence it is safe to use this type of socket.

20151209-1535-0505

It also looks much neater than sprouting wires out of a hole in the side. Some superglue was used to hold the two case halves together to make sure they didn’t fall apart, but the tight fit of the socket in the drilled hole also serves to keep it together.

20151209-1558-0506

To go with this is a banana plug lead to connect it to the Keysight Technologies U1461A which I can log to the PC with. It also has a nice 60/600mV range which is a big bonus for the small expected shunt voltages. The plug here is a stereo plug, used in a mono-compatibility wiring – i.e. sleeve to black/negative and tip to yellow/positive with ring left unconnected.

Discovery

Screenshot_2015-12-11-14-50-59The first patient was the LG D686, also known as the G Pro Lite Dual. This phone has a very peculiar battery habit, namely that it has a large 3000mAh+ cell but it doesn’t last through a long day very well. It starts off with very behaved battery decline, but once it gets to 40%, the battery starts draining faster than a skydiver falling down to Earth.

More interestingly is, if you use the phone and then you reboot it, the reported battery level post-reboot is often 10%+ lower than prior to reboot and the decline is more reasonable.

I suspect this is evidence of the phone using tricks in the way it scales the battery voltage to capacity, and that it has no real colomb counting intelligence (as expected). By presenting you with the appearance of a better battery level, you’re more inclined to praise the phone or be at ease when using the phone. But it doesn’t last. The screenshot above was from my depletion run where I used the video recording feature with LED on to drain the battery, rebooting twice in the process. The drops in the graph show a drastic disparity after-reboot in remaining capacity.

But aside from the tricks, it could also well be that the cell that I have is losing its capacity, and it is doing so in an output voltage that reduces in a different way compared to the fresh cell. Why that might be the case deserves some investigation, so the first step (and the one we’ll look at in this article) is to examine charging.

I depleted the phone completely, and then plugged it back in while powered-down to charge.

lgd686-battery-charge-on-off

The charge current during the main part of charging is about 1.1-1.2A, before beginning a taper down around 1-hour into the charge. The taper lasts over 2-hours, implying that it may have been charging too fast initially or the cell has increased internal resistance resulting in early termination of the bulk charging phase.

After it first terminates at ~1/5th the bulk charge current, it comes back on in a PWM style on-off alternation, which is a very crude way to top-off the charge. Despite it being “power off” as such, the phone has started up into the flash firmware to show the charging screen initially, so the SoC is likely to be awake but in a low-power state. I can’t help but think this is evidence that the battery has been charged, but due to the slow current draw of the SoC, is being drawn down to the point of needing to be topped up periodically, leading to the phenomenon of microcycling.

Microcycling is basically a short partial-discharge and recharge cycle, and while Li-Ion cells are generally known to tolerate this better than other chemistries such as lead-acid, it’s also known to cause degradation in the storage capacity of cells. In fact, it is used by experimental procedures investigating Li-Ion lifetime and for EV usage. The linked paper by M. Safari et.al. shows that microcycling at 70% SoC had faster loss of capacity than microcycling at 30% SoC.

battery-lgd686-microcycling

With the phone fully booted up, it seems that this microcycling may still be happening (a full battery was shown here), but it’s also now partially obscured by the peaks from the SoC power consumption during processing demands (e.g. wake from sleep to handle app-push data).

At a guess, this seems to be evidence of microcycling and could possibly account for aftermarket sellers of batteries recommending that users disconnect their phones after the battery is fully charged. The incorrect reason given is always to prevent overcharge which is not possible on Li-based chemistries without catastrophic, firey consequences. Maybe the truth behind that is to avoid this microcycling which may lead to earlier than expected degradation of the battery. To confirm that microcycling is happening, I would have to modify the battery connection to allow for an ammeter to be connected in series to see what the current flow looks like.

However, that being said, if you were to heed every piece of conflicting advice surrounding Li-Ion cells, you’d have a pretty hard time actually using them – namely:

  • If you charge them fully, and leave them charged, and this microcycling is happening, then you should avoid it by unplugging the device from the charger after it’s fully charged. But then, when you come to need the device, it may not have enough remaining charge.
  • You shouldn’t drain them fully, nor charge them fully for the maximum cycle life – sticking in a range of SoC from 30-80% or so.
  • If you do that, you would probably have to watch your charging very carefully and disconnect it manually, which is hassle, but it does avoid microcycling at the cost of possibly not having enough charge for your daily needs. Oversizing the battery would be a good way around it if you were a product designer.
  • Microcycling could be happening as well where you are using external power banks, so you can’t avoid it there because phones seem to be designed only to operate with an internal battery plugged in as a “buffer” for the incoming energy in case the incoming power is interrupted by shifting contacts etc.
  • Having the SoC too high for long term storage causes voltage stress on the separator, reducing storage life. If you do leave the SoC too low, the cell is at risk of overdischarge and permanent failure due to metallic lithium plating, which would make the cell unsafe.

I suppose it’s just easier to live your life however you find most convenient and just replace the batteries on an as-needed basis. After all, they still generally do live long enough to meet the useful life of the device.

stream8-charge-profile

The HP Stream 8’s charging proved to be particularly interesting and difficult to capture. One of the issues was that the charging current during first testing proved to go very randomly up and down, and this was traced to the connector contact resistance. Ultimately, the USB connections on the charger doctor and the charger/cable in use weren’t a good match, meaning that the contacts had sufficient resistance to limit the charge current. To get around this, I bent the shells of the connectors inward so they put more pressure onto the tongues of the USB connector, causing the resistance to drop sufficiently to allow the tablet to reach a much closer to design charge rate.

Initially, when plugged in, the BIOS was taking over the charging up to the point the battery was no longer critical. Then, charging abruptly stopped. I had to boot up the tablet into Windows before the charging would resume. Charging was very fast and used the majority of the 2A available from the charger until about 2h 10m when the taper suddenly got noisy. Ultimately, the taper on this charge algorithm has a more exponential style to it with some noisy bits.

As a result, I think I’ve narrowed down the inconsistent charging on the HP Stream 8 to contact resistance – the charger’s contact seems to be at fault as the charge rate increases when the cable is slightly pulled out from the charger and the pressure of the connector’s locking “fangs” are pushing down on the plug. Good to know.

But it also teaches me something else – namely that the output signal from such a small shunt can be difficult to measure with conventional multimeters, and that on the U1461A, high currents exceed the low 60mV range (1.2A maximum) resulting in a range change and potential loss of accuracy. I suppose this is easily remedied with a Rail-to-Rail Op-Amp in non-inverting configuration leeching off the USB 5v supply from the input. Easily built if necessary, but I suppose with a good mV range like on the U1461A, it’s not as necessary as if I was using my U1241B.

Conclusion

Modifying the cheap USB Charger Doctor definitely beats severing a USB extension cable and soldering in a shunt resistor, and having wires leading everywhere along with the associated resistive loss. It makes more accurate and detailed time-based trend measurement of USB current consumption easy to measure for devices undergoing charging, or even in active use on a USB bus as the data signals are passed-through on the PCB. This is now definitely a piece of equipment I can use in future reviews to provide more information about device charging requirements.

About lui_gough

I’m a bit of a nut for electronics, computing, photography, radio, satellite and other technical hobbies. Click for more about me!

This entry was posted in Electronics and tagged , . Bookmark the permalink.

3 Responses to Modified: USB Charger Doctor as USB Current Shunt

  1. Anonymous says:

    What charger were you charging the LG with and are you able to determine the capacity from your logs? I had the same thing happen with my D802 after 8 months of use. Replacing the battery solved it, but I was disappointed that the genuine LG battery only lasted a fraction of what it should of. If this ‘microcycling’ causes premature battery failure is a charger fault or a problem with the phones charging circuit.

    • lui_gough says:

      I am still using the stock LG charger and LG battery, although that being said, microcycling is an unfortunate fact of life based on what I know of most phone designs – if it won’t run without the battery with the charger attached, then it’s likely to rely on the battery as a reserve of power to draw on, using the charger to top it up periodically, resulting in microcycling.

      The charger itself is a pretty simple and “dumb” device in the sense that it just provides 5v USB-spec power, and the phone’s internal charging logic is what decides whether the current is “drawn” and where it goes to (battery and electronics, electronics only).

      Capacity is a lot more difficult to determine as you must log current over time at the least. It is rather annoying to do, and the method I have is rather fragile and not amenable to doing it properly. But I might give it a go to try and get a decent estimation of the actual in-use battery capacity.

      – Gough

  2. freddyzdead says:

    Hi Gough,
    I hope your break is going well. I have a question you might be able to answer.
    That was a good idea, to use the charger doctor in that way. I have a few of these, as well as others with both volts and current displays, which is much easier to use. It seems I spend a lot of time with this one, waiting for the display to switch to “amps”. Every time I glance at it, it’s on “volts”. Anyway, the question is, the data pins on this gadget are connected straight through. That means D+ input is connected to D- output, and vice-versa. As this is just a single differential channel, I don’t think it should matter which is which for most purposes, but I’ve never confirmed this, nor seen any mention of it. Does it matter at all if you swap these? I am aware that sometimes these two are used to signal the host about the device’s current requirements for charging, by clamping one or the other to an intermediate voltage, but I’m talking about the normal differential signaling function.

Error: Comment is Missing!