Generally speaking, the USB interface is pretty complicated. This is also true if you want to charge or just deliver some power over USB – normally, USB-compatible devices will only dare to draw up to 500 mA, which isn’t much and it means a full charge would take hours. If you want to charge at, let’s say, 2 amps, you need to let the device know that it can actually draw that much current – and unfortunately, there are many specifications and protocols used to do that, from USB DCP (Dedicated Charging Port) which shortens the D+ and D- lines, to Apple’s own protocol, which applies particular voltages to the data lines and so on.
Additionally, some protocols even raise the VBUS voltage. Normally, the VBUS is +5 V, which limits the delivered power to 10 W (at 2 A, which is the limit of most connectors and cables), but some recent protocols like Quick Charge (Qualcomm), Fast Charge (Huawei) and USB Power Delivery started increasing the VBUS voltage up to 20 V, in order to deliver more power over the same wire thickness. More power of course means quicker charging and that is what everybody wants.
I do own a couple of devices which support one of the abovementioned protocols, and so when I was thinking about designing my own powerbank, I wanted it to have support for at least Quick Charge. So I started looking into how to design a QC-compatible USB port, but there weren’t really that many circuits on the internet. But in the end, I’ve succeded in creating a very well working circuit and here I’d like to share it.
Attempt #1 – QC 2.0
My first attempt was based on an IC I found over on LCSC.com – the SE100 in SO-8 package:
It’s an IC supporting QC 2.0 and a lot of other protocols. It’s working principle is simple – you have an external switching converter (either buck or boost, does not really matter) and such a converter usually has a resistive divider to monitor the output voltage. The middle is connected to a feedback pin and the converter adjusts it’s output in such a way that the feedback pin voltage is some predefined value – usually 0.6 or 1.2 V.
The SE100 has three open drain pins (called V1 to V3) – they are basically the collectors (or drains) of three transistors, which are switched on in a particular manner, based on the desired output voltage (detected by the QC interface). You can find these patterns in this table taken from the datasheet:
So what you do is you add three resistors, connect them to these pins on one side and to the center of the resistive divider (ie the FB pin) on the other side. If the SE100 detects a QC-compatible device, it enables some of the transistors, which basically puts the corresponding resistors in parallel with the lower feedback resistor. This lower the feedback pin voltage and the switching regulator reacts by increasing the output voltage to keep the FB voltage on the predefined level.
Normally the SE100 of course keeps the voltage at 5 V and only adjusts it if it detects a QC compatible device. In non-QC mode, it also puts different resistors and voltages on the D+ and D- lines in order to mimic charging protocols like DCP, Apple’s proprietary and so on.
Attemp #2 – QC 3.0
Another IC I found on LCSC, this time supporting QC 3.0, was the IPT2601. But I wasn’t sure how to use it – this is the only picture they give you in the datasheet:
Fun fact: the datasheet is copyrighted by “FINE MAD ELECTRONICS GROUP”, as you can see in the datasheet’s footer.
But back to the circuit – with so little information, I had to guess that it somehow injects (or sinks?) current from the feedback node. I just blindy build the circuit, assuming that the current flow is zero in 5 V output mode… and heureka, it worked! So now I have a QC 3.0 compatible buck converter:
Both of the abovementioned boards utilize the FR9885, which is a buck controller IC with integrated high and low side mosfets. So you simply add one inductor, three resistors and an inductor and you have a working switching regulator. Just be aware that the IC creates some heat and I had to make large PCB polygons around the pins to dissipate it.
You could do the same with a boost converter IC and power it from a single 18650 Li-Ion cell, let’s say. But you’d need a really good switching converter, as boosting 3,7 V to 12 V at these currents is quite a challenge.
I later found out that the FP6601 is basically the same as the IPT2601, so can use either of them, there are no diferences that I am aware of.
- input voltage: 6 – 15 V, recommended 12 – 15 V
- input current: max 2 A
- output current: max 2 A
- efficiency (Vin = 12 V, Vout = 5 V, Iout = 1 A): 95 %
- efficiency (Vin = 12 V, Vout = 5 V, Iout = 2 A): 92 %
- quiescent current (no load connected, Vin = 12 V): 800 μA
- HiSilicon Fast Charging Protocol (FCP), ie Huawei phones (tested)
- Qualcomm Quick Charge 2.0/3.0 Class A: up to 12 V Output Voltage (tested)
- USB DCP (shorting D+ Line to D-) per USB Battery Charging Specification, Revision 1.2 (tested)
- USB DCP (applying 2.7V on D+ Line and 2.7V on D- Line), ie Apple 12 W
- USB DCP (applying 1.2V on D+ and D- Lines)
- Chinese Telecommunication Industrial Standard YD/T 1591-2009 (whatever that is, I have not tested that)
I was really happy that I managed to make this work, because as I already mentioned, there are almost no other schematics on how to do this on the internet. The result works fine, the buck driver IC does not heat up too much even at full load, so that’s cool (literally). The only thing I had slight problems with were the fuses – I wanted to use resetable PTC fuses, but these are really hard to come by for the currents and voltages I needed, so as od now, I am relying on the buck converters internal current limiting.
- SE100 datasheet
- IPT2601 datasheet
- Adafruit MintyBoost – there is a nice discussion about different USB charging protocols
The only reason why I mentioned LCSC.com is because that’s where I found and got the chips from. But I am not endorsed, sponsored or whatever by them.