Trying to make a battery charger - Page 1
Forum section: electronics / projects

author: diegoterc3
author_rank: Regular Contributor
timestamp: January 27, 2014, 04:33:44 pm
content: Hello. I am trying to make a battery charger but for some reason it doesn't work.In picture 1 I show my diagram. The idea is that while the logic state (1/0) is at 0, given from the load, the battery provides energy to the circuit.In picture 2, when I turn the logic state to 1, the 16VDC gets regulated to 15VDC and provides energy to my circuit and charges the battery.From the simulation I see that step 1 and 2 work.In picture 3 if I turn the logic state to 0 again, it should cut the energy from the regulator and then the battery whould discharge and provide energy to the load. As you can see in the simulation this doesn't happen.Also I have put this circuit on a protoboard and when the transistor's gate is at 0 the output of the regulator is the same as the input. This charges the battery and gives me headaches. I believe there is something to do with the grounding of my circuit. IDK. HELP ME PLEASE!

author: Tube_Dude
author_rank: Regular Contributor
timestamp: January 28, 2014, 06:34:25 am
content: 16 Volts input voltage is too low for a 7815 regulator to work properly. You need at least 18 Volts input voltage. Consult data sheet for minimum dropout voltage for 7815 series voltage regulators...

author: mariush
author_rank: Super Contributor
timestamp: January 28, 2014, 06:45:09 am
content: ... not to mention that amp meter will cause a tiny bit of voltage drop, and then the 1n4001 will also drop around 0.8v @ 100mA and up to 1v @ 1A ... so really you have about 14v after the linear regulator.And you should have some input capacitor before 7815 and it wouldn't hurt to have 10-22uF on the output of that linear regulator.

author: poorchava
author_rank: Super Contributor
timestamp: January 28, 2014, 07:02:45 am
content: And there is also VCE of that transistor hooked up to regulator GND. Means that the regulator output is at least 15V+VCE. For TIP31 it's VCEsat is over 1V @ 3A. You may want to use another medium power transistor to form darlington pair with this TIP31. TIP31 is a fairly high power transistor and as such has rather low Hfe (around 30 iirc).

author: diegoterc3
author_rank: Regular Contributor
timestamp: January 30, 2014, 05:18:23 pm
content: Ok. Now I've given up the idea of a voltage regulator and begin using transistors.I've uploaded my schematics...As before the 0 and 1 state will be given by my MCU which I represent by my R5=10k ohm resistor.At 0 the transistor arrangement doesn't allow current to flow to the circuit and to the battery.At 1 current flows and charges the battery while gives energy to the circuit.At 0 again, current doesn't flow from the energy source but the circuit is energized by the battery.So basically I can charge and discharge my battery at will.In Peru we have 220V - 60Hz at the power outlet so I use a transformer to get 14.3VAC, acording to calculations after a rectifier bridge the DC voltage should be 14.3*sqrt(2) = 22.22 VDC but in reality it is 16.17VDC now that is the DC voltage that should be supplying to my TIP32 PNP (Q2) transistor. According to simulation when I set a logic 1 to (Q1) I should be getting 16.1VDC before the 1N4001 diode (D1) but in reality I get 13.85 which I know it is the Voltage_of_the_battery(t)+0.7V(From the diode).I need the battery to be charged up to 14.2V and I am monitoring the battery voltage with an ADC from my MCU. Also I know the transistor saturation voltage is 1.2-1.8V so if I am getting this right the voltage from the Q2 collector should be at the most 16.17-1.8= 14.37VDC which is acceptable.So my questión is: Why am I getting 13.85VDC at the Q2 collector? Should this be 14.37? Is it because the battery is charging?And a different question. The battery is a Rittar RT1270 according to its datasheet the current range to charge it is 0.1-0.3A. In reallity I have 0.2A but it charges too slow. From the graph (which I don't entirelly understand) at 0.1A for 8 hours I should be getting 13.6V but in reallity I've spend 2 days for this kind of voltage.Any help will be greatly appreciated.Regards

author: mariush
author_rank: Super Contributor
timestamp: January 30, 2014, 05:55:02 pm
content: Quote from: diegoterc3 on January 30, 2014, 05:18:23 pmsqrt(2) = 1.4142 .. 14.3 x 1.4142 is never 22.22Peak dc voltage = Vac x sqrt(2) - 2 x voltage drop on diode in bridge rectifier = 14.3 * 1.414 -2 x ~ 1v = 20.2v - 2 = 18v.Why 2 x voltage drop? Because at any point, the current flows through 2 diodes in the bridge rectifier.. see picture below. 1n4001 (datasheethereyou mention has 0.8v drop at 0.1A, about 1v @ 1A.Also, the transformer may output 14.3v AC without any load (regulation is usually 5-15% for low power transformers, in the range of 10-30va) and may drop to about 13.5-13.8v AC with 100-300mA of current on it.Now this 18v is not DC voltage but rather the peak dc voltage after rectification - to get a smooth dc output you need to output a capacitor which would prevent the dc voltage from dropping :Capacitor can be estimated with formula C = Current / (2x AC Frequency x Vripple) where V ripple is difference between peak dc voltage and minimum voltage you want. ex. for 1a of current and peak dc 18v and you want 16v out then formula is C = 1 / (2x60x2) = 1 / 240 = 0.004166 or 4166 uF.Do the math again knowing these and see what changes.