We were cleaning some stuff out the other day when I came across this phone charger that I used to keep in the car. The USB connector that went to the phone eventually just wore out and wouldn’t connect properly, but the charger itself was still functioning. As with anything broken (and most things that aren’t) I took it apart to see inside. Luckily, everything was big and through-hole, meaning it would be easy to salvage parts if I wanted. Nothing was really worth the effort of salvaging though, except maybe the IC (an MC34063A). I looked up the data sheet and discovered a pretty detailed document for a switching regulator. Others had hacked these little chargers before, but I wanted to try my hand at it. Essentially, these are DC-to-DC converters, taking the 12 Volts DC that your car provides, and steps it down to the 5 Volts a phone uses. What I wanted to do was manipulate the circuitry to control the output voltage.
This is more of a “How I did it”, but in case anyone wanted to replicate this, you should have these on hand:
1x Phone Charger with MC34063A Regulator
1x 10k Ohm Potentiometer
1x 5k Ohm Potentiometer
1x Mini Voltmeter from Banggood
Extra wires for leads
Soldering iron, Solder, Digital Multimeter, Snips and Wire Strippers, Power Supply (could even be batteries)
Being cheap Chinese junk, the plastic case was easy to snap apart. Inside was the board, a fuse, some wires, and contacts. Nothing surprising, nothing fancy. But the board was labeled, which is nice.
Consulting the datasheet for the MC34063A , there were a few equations, including one to calculate the output voltage: V_out=1.25*(1+R2/R1). Luckily, the regulation is based on a voltage divider and the ratio of two resistors. There were four resistors on the board though. One was obviously for the LED. Following the traces and diagram on the datasheet, I found a 4.7k Ohm (R2 from the equation) and a 1.5k resistor (R1 from the equation). Using these values in the equation, it would produce an output of about 5V (5.17V to be exact). The fourth resistor was used to regulate the current.
To be able to make a variable supply, I would change out R2 for a 10k variable resistor. This would give me a minimum of 1.25V and a maximum of a little over 9.5V.
First thing I did was test it out. I put 12V in through my hacked up computer psu and made sure I was getting 5V out.
The LED was extraneous, and I figured it would burn out after my little experiment anyway. So the LED and its associated resistor came out. This also gave me a little more room on the board.
Originally, the idea was to use the leads that were already attached for the output. However, one broke off and there were better spots for them, especially with the LED and resistor gone.
Getting into the good stuff, the last component to come out was R2.
Making it Variable
The 10k potentiometer had an actual measured value of 10.27k Ohms. R1 had a measured value of 4.576 Ohms. If it worked out right, this meant I could get about 10.7V out. I also checked the voltage ratings on the capacitors at this point, because I didn’t want them blowing up. Getting closer to completion from soldering in the new leads and potentiometer, I also decided to solder in a small Voltmeter I had. I tested continuity, checked resistance again and figured it was time to test.
I decided to try the full output first. As I mentioned, it should be about 10.7V ideally (probably not, but ideally). Everything was hooked up the power supply, ready to go, none of the wires were shorting on each other, so I flipped it on. It read 10.3V. Nice. It worked.
Next was to try at a lower value. I turned everything off (it’s all exposed, and I’m not going to get shocked or break something), lowered the resistance to about 3.41 Ohms (should’ve been about 4V), turned it on and…10.3V. Well, that wasn’t right. I figured the potentiometer had a weird scale or something.
Everything was turned off again. I went to 0 Ohms (or whatever negligible value it was), and turned it on. Again 10.2V.
I checked continuity again, and everything seemed fine. This brought me to consider that maybe I had pulled the wrong resistor or that maybe it had something to do with the switching frequency and I had to adjust the capacitance or inductance. I went back to the data sheets, but still had no idea what went wrong. It seemed like it should’ve worked.
When I cut the potentiometer out completely and turned it on again, 10.3V was still showing.
My multimeter can measure frequency, so I put the meter in place of the potentiometer thinking if there was some sort of alternating current there, I could at least have a number. Energizing it again, the meter read 0 Hz, however, the voltmeter was now reading 6.43V instead of 10. This was new. Did the meter add resistance? Or do something with the frequency? Probably not the frequency, since it didn’t measure a changing current, but it was worth considering.
This gave me hope. I wanted to try something with the frequency just in case there was an alternating current I wasn’t measuring or something. Really, I was just playing around and not knowing what I was doing. I placed an inductor in place of R2 and nothing happened on the voltmeter. It didn’t even come on. At that point, I was worried that I had broke something. Then I realized that if it wasn’t alternating, the inductor would’ve been a short, 0 Ohms. This would produce 1.25V at the output. The Voltmeter had a minimum of 2.5V to work. So a 1.25V wouldn’t even turn it on. Now I really had hope.
Since the inductor was probably just shorting the connection, I removed it and just shorted the wires that were there. I used my digital multimeter to measure the output, hoping to get about 1.25V. Turning it on, I got 1.31V (slightly higher because of the small resistance in the wire). Something was going right at this point.
I decided to try a different pot, opting for a 5k pot. Soldering this one into place, I then went to full output (about 5.6k Ohms). The calculated voltage was about 6V. Hooking it up to the power supply and turning it on. I got 6.08V! Things were working out. Trying other resistances gave me exactly what I expected.
The only thing I could conclude was that a bad connection existed with the original 10k pot. After everything was done, I checked the original potentiometer to confirm that was the case. The wire must have broke inside the insulation or something. Luckily I had cut the wires instead of desoldering them so that I could check this for sure and not make the same mistake with another component. I thought I was diligent in my checks beforehand, but the results I was getting were consistent with a completely open connection at R2.
So now I have this little variable power supply. This was a “Because I can” type of project, but I can see some things I could do to make it more useful. I could add a case and put a 10k pot back into place. Maybe solder in a jack to use it with a 12V wall wart or hook up some batteries to it.