Homemade/DIY USB-C Charger Connects to Phone, but does not Charge

Thread Starter

leiloumou

Joined Sep 12, 2019
16
Hey everyone,

Without going into too much detail, I'm trying to design a USB Type-C charger that outputs 5V and 3A.

The charger is fed a supply voltage that varies from 5V-20V. To ensure that the voltage is always at 5V, I used a 5V voltage regulator along with 2 capacitors as shown in the schematic below:

1710603006007.png

At the ends of the capacitor C2, I connected a Type-C male connector that's shown in the image below:

1710603028501.png

Connecting the Type-C header to a Galaxy A30s first charges it normally. At a battery percentage of 20%, the phone first says 1h 51m until full. A few seconds later, the charging speed states 6h 21m until full. After waiting 5 minutes, the phone's battery percentage did not even increase by 1%.

Do I need some form of PDIC to ensure proper communication between the charger and phone? Or is there something else that I'm missing here?
 

Jon Chandler

Joined Jun 12, 2008
1,070
The first big gotcha is the power dissipation of a 5 volt regulator dropping 20 volts to 5 volts at 3 amps.

Pd = (Vin – Vout) × i

Where

Pd = power dissipated by the regulator in watts

Vin = input voltage

Vout = output voltage

i = output current in amps

Pd = (20 – 5) × 3 = 45 watts.

Ever put your hand on a 40 watt on a incandescent bulb? That's a lot of heat to get rid of. You need a switch mode regulator, not a linear regulator.

Depending on the device, shorting the data lines together tells it it can draw > 500mA
 

Thread Starter

leiloumou

Joined Sep 12, 2019
16
Thank you for your replies!

Assuming I have proper heat dissipation for my voltage regulator, I was advised to connect a 10 kΩ pull-up resistor between 5V and the plug's CC pin to advertise the 5V and 3A I'm looking for.

These is a picture of the male plug I have on hand:
1710680279372.png

Please correct me if I'm wrong, but does that mean I should solder a 10 kΩ pull-up resistor each on pads R1 and R3?

If anyone knows, could you also explain to me what the resistor on pad R1 is for?
 
I don't want to rain on your parade here but I don't think hotwiring the circuit to sort-of work is really the correct way to handle this, and in particular there's so much broken USB-C power stuff out there that adding to the pile just seems like a bad idea. Check the ST tech brief I linked to, they and many other vendors actually make controllers that handle all of this for you, and also provide eval boards to play with that you could base your design on.
 
Top