Today the phone charger that I use to charge my cell phone in the car. It is not a USB charger but the principle is exactly the same as I will describe, the only thing that changes is the connector.
The first thing I did was take it apart and check the circuit. Honestly, initially what I wanted was to repair it, but then I realized that I had no solution so I decided to take advantage of it for educational purposes 🙂
In any case, once disassembled I realized that it was using an MC34063 integrated circuit, which is the heart of the charger. Actually the MC34063 is the heart of many products that today need a DC-DC converter, that is, a direct voltage converter. The MC34063 is an extremely versatile electronic component that has gained wide acceptance in the electronics world. Its versatility is accompanied by a very convenient price which is an interesting combination. It is a switching regulator that, unlike linear regulators (such as the LM7805), does not dissipate much heat.
In my case, my phone needs a charger at 5VDC, that is, the same voltage that a USB port provides us. Because of this, my faulty charger circuit was designed to provide such a voltage at a current of 500mA. With a few changes we can adapt the circuit I will discuss later to provide different voltages.
The chip used is basically the heart of a switched power supply (or switching regulator). That is, it is an oscillator that chops (or divides into portions) the input voltage, according to the required output voltage value.
Now the good news. After checking the printed circuit board of my charger I noticed that it was a very close copy of the factory suggested design, with the addition of a safety diode on the voltage input.
I will not explain all the components as their reference values can be found in the integrated manufacturer's datasheet. That by the way I share them here. I am only going to explain the part that seems central to me and that is how to select the values of the resistors R1 and R2 to modify this diagram and obtain the voltage we want.
The circuit shows the MC34063 configuration as a step-down regulator and in this configuration the output voltage is given by the following formula.
Vout = 1.25 * (1 + R2 / R1)
In our case R2 = 3.6k and R1 = 1.2K so Vout gives us exactly 5 Volts!
To transform our circuit into a USB charger, simply connect a USB terminal to the output by soldering the cables with the correct pinout. Here is a reference image, we do not need to solder any data pins (D + or D-), only VCC and GND, only pins 1 and 4.
Another interesting modification is if we need a voltage source other than 5 Volts. It is enough to modify the resistors R1 and R2 to obtain a different voltage. For example, let's imagine that we need to power a small GPS that works with four AA batteries of 1.5 Volts each, that is to say 6 Volts.
Playing around with the resistor values available in the market and using the formula seen above, we can see that it is possible to use R4 = 3.9k and R3 = 1k to obtain a voltage of 6.1 Volts, which is very close to the desired value. We would have obtained an exact value of 6V using an R4 = 3.8k, but that is not a common resistor value on the market.
To find out the standard values of resistors we can be guided by the following table.
I hope you liked it.