4
\$\begingroup\$

I am wondering how charging circuits works; obviously there is some misunderstanding on my side. For example, a mobile phone is sold with a 1.5 A adapter. One can assume that charging and powering the phone can load up to 1.5 A. How is it possible that no malfunction occurs when a less powerful adapter/USB port is connected to the phone?

First adapter: It should behave as a perfect voltage source up to some specific current. So if I have a 5 V, 0.5 A adapter, until the load is less than 500 mA, it will provide the 5 V. With a bigger load either the voltage will drop or it will burn or malfunction in some way. So => the load of the charging circuit must be somehow max. 0.5 A even if in other cases it can load much more.

Second charging circuit: As I understand it, it should have some specific load, for instance 1 A. It is obviously not so, but I do not understand how this is achieved. How can it be 0.5 A in one case and 1.5 A in another?

How can the charging circuit 'decide' how much current to use based on the source?

\$\endgroup\$
7
  • \$\begingroup\$ Some chargers are smart and will limit current by adjusting the voltage. Others will indicate available current and expect the device not to draw more than is available. Some as you say will be overloaded and burn out. Most devices try to be conservative and fail safe these days. \$\endgroup\$
    – KalleMP
    Jan 17, 2018 at 9:04
  • 1
    \$\begingroup\$ Your basic assumption is already wrong, the chargers don't behave light voltage sources, they start dropping right away. \$\endgroup\$
    – PlasmaHH
    Jan 17, 2018 at 10:49
  • 3
  • 1
    \$\begingroup\$ @Divisadero Phones typically include a circuit that detects wether it is connected to USB 2.0 (500mA) or USB 3.0 (1.5A). The detection is usually done by measuring the resistance on the data lines. \$\endgroup\$
    – user4574
    Jan 17, 2018 at 14:30
  • 7
    \$\begingroup\$ "How come charging a phone with less current is just slower" How come filling a bathtub from a drip is slower than filling it from a fire hose? \$\endgroup\$ Jan 17, 2018 at 16:32

3 Answers 3

12
\$\begingroup\$

Typically:

It just monitors the voltage of the power supply. If that drops too far (typically, for USB chargers, below 4.8 V), it reduces the current sink into the battery.

A smarter charger might "scan" the "tolerable" input voltage range and find the sweet spot where most power can be drawn from the supply, but really, supplies are designed to be low output impedance, so, the closer to a current maximum you press them, the more power you'll transfer (basically: maximum power impedance matching means that your charging circuit should look like a small resistor value, subject to a load limit).

\$\endgroup\$
8
  • 1
    \$\begingroup\$ Thanks, don't you know about any circuit diagram that shows how is it done? \$\endgroup\$
    – Divisadero
    Jan 17, 2018 at 9:05
  • 5
    \$\begingroup\$ um, no. Real-world chargers these days are ICs, not discrete-built circuits, and will be typically way more complex than you seem to think. I'd actually expect, for example, li-ion chargers to include a very simple CPU with ROM, very few bytes of RAM and a bit of nonvolatile memory to do things like charge counting etc. \$\endgroup\$ Jan 17, 2018 at 9:06
  • \$\begingroup\$ I though of some study example, I do realize that real world would be extremely sophisticated stuff. \$\endgroup\$
    – Divisadero
    Jan 17, 2018 at 9:07
  • 1
    \$\begingroup\$ Well, QuickCharge and similar techs allow a charged device and a charger to negotiate. But: If you have a 500mA charger, chances are high that even a high-rate chargeable device will just try to pull as much power out of that as possible. \$\endgroup\$ Jan 17, 2018 at 16:32
  • 3
    \$\begingroup\$ No. Typically (at least for a phone charger) this "what the adapter proves able to handle" mode is only entered when the phone detects that it is connected to a charger. Ie, in a cable with only VBus and ground or connected to a simple DC supply such that none of the signalling works, charging will likely be limited to 500 mA, regardless if the adapter is more capable. Otherwise they'd frequently be tripping overcurrent warnings on downstream USB ports. \$\endgroup\$ Jan 17, 2018 at 16:33
8
\$\begingroup\$

The USB wires D+ and D- have attached resistors for coding the nominal current of the adapter - 500mA, 1.5A, .... This is detected by the charging IC that will sink just the nominal current of the adapter.

\$\endgroup\$
2
  • \$\begingroup\$ Good answer the Wikipedia article on USB has all the details. \$\endgroup\$
    – RoyC
    Jan 17, 2018 at 10:43
  • 6
    \$\begingroup\$ This used to be true. Nowadays many devices follow the USB battery charging standard where D+ and D- are just connected together, and maximum current is detected from voltage drop. \$\endgroup\$
    – jpa
    Jan 17, 2018 at 11:35
5
\$\begingroup\$

Ok so I know this is answered already but not well. I just finished designing a charger for a wearable that does this so I'll try to explain. Engineers using USB for charging are well aware that they will encounter sources of varying quality, capability and spec. The USB standard for one provides several options. You have your old school start at 100mA raisable to 500mA standard USB port. You have dedicated battery charging ports 3.25A, charging downstream ports at 1.5A. Then apple has their own standard for their chargers using voltage dividers on data lines. Qualcomm has their own Quick charge standard which allows you to request the source to raise your voltage to 9V, 12V and beyond. There's even an adjustable version. Oh and then USB-C 3.0 changes the game even more.

So with all these possibilities you need to design a much smarter charger. Fortunately for the engineer there are solutions from TI, Maxim and others. There are ICs that attach to the USB lines and just detect what kind of charger is attached and by going through each option one at time. Maxim has a very long app note about how that is done.

If you look at a TI series part like the bq25898 series you will see it includes USB source type detection, full Lion charging control, and an integrated buck regulator. You can further complicate your system by having a small host micro processor to make higher level decisions but for the most part these parts can run autonomously.

enter image description here

So when you plug a USB device into your system using the above type of charger design, it runs through each type of source detection in series. Are you QuickCharge, do I see pullups, shorted D+/D-, voltage dividers on D+/D-. Once it finds one it sets an internal current limit for itself so it will not pull more power from the source. They also add in some voltage droop monitoring on the source voltage to ensure that even though it says 1.5A that it still works if the source is poorly designed and can only provide 1A.

USB-C 3.0 adds another layer of complexity. They have new pins, the CC pins and the standard defines a method of communicating over those pins to negotiate how much current/voltage the source can supply to you. They also define a way to determine if your cable is capable of supplying that current.

So anyway that's how the circuit decides how much current it can pull from the source. There is a whole nother section of the charger dedicated to charging the Lion correctly.

Oh and I should mention if your product also wants to communicate over USB there is often a small switch involved. So the charger connects itself to the lines for "charger detection" phase, then swaps the lines over to your processor when detection is complete (or not if it's in a particular charging mode).

\$\endgroup\$

Not the answer you're looking for? Browse other questions tagged or ask your own question.