Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Friends, help to find out the bug of this charger

Status
Not open for further replies.
Dear Brian,

Nice to hear that you are back...

No... that was may not be the reason for resistor burning. but not regulating. what ever i was doing, the output was constant 20v. then when i used the pinout for 317 (on test), it started working. i saw that following the 338 datasheet killed much of my time.

about adc, well, when no current is flowing, it is showing me 0. so (adc + offset) * scale factor will not give me 0 at 0 current... but well, it will give me correct value when some current flows... i'm planning to find out the error value using a dmm that can measure current. i'll first short the sense resistor 0.1ohm and then i'll measure using it. the load will be a 1ohm 10 watt resistor. output voltage will be somewhat 3.5 to 4v. then i can get the error.

i charged a battery last night (over night) and it was drawing only in max 600mA and after fully charged, it showed 0A. the batttery was a 7ah ups sla battery. it was old and thus i think the current cunsumption rate was this low. (because when i connected a 1ohm 10w instead of the batt, 3A current passed). is my thinking right???

one thing last, this charger can charge a battery that is not completely dead. if that happenes, then first i have to apply constant current at a high volt to start the initial reaction. then i can come to 14.6 const v and then finally float v 13.8v. so currently it is 2 stage charger that is capable of charging a running batt (though now i am planning to convert it for 3 stage with menue driven option...).

sincerely
Mishu~
 

well, discharged the battery and re charging it again. it is now drawing 1.3A. so i think due to left the batt idle for a very long time, it is taking a while to do the chemical reactions. i'll do several cycles for this battery. anyway, the charger is okey for now i hope (as a two stage charger). and well, i'm not sure but i think i should have take a measurement on the voltage at the ref pin of the uC and then i should use that in calculation. (instead of 5V, about 4.8-4.9V).
 

Well guys, thanks to all of you for helping me to finish the job. Specially Thanks to Brian.
So far, it is perfect (except a few) and working just the way I wanted. The schematic is the (final one) last pdf here. And i'm explaining here the limitations as per my hardware. (Note that the ADC result of simulation and real life will not be equal due to some limitations. But those will be explained.)

Code:
' * Description : It will get the voltage across a shunt resistor (lower side)
' * Vi and also check the battery terminal voltage. Currently it is extreemly
' * under development. After getting the voltage, it will decide on current
' * consumption and power. Also then it will decide if bulk charge or float
' * charge needs to be given. Results will be displayed in LCD and pins will
' * drive Relays to do the jobs.
' *
' * Hardware Req. :
' *
' * Software Limitation:
' * ADC: ADC ref is set as 4.96V as ADC Ref pin gets this voltage from 7805.
' * Thus for 10bit ADC, the resolution is Res=(4.96V/1024) = (4960mV/1024) =
' * 4.848375mV. This means the ADC can read minimum 4.848375mV. So at the time
' * of current measurement, using a shunt of 0.1ohm, at 1A, a voltage of 0.1V
' * (100mV) will develop. So if 100mV = 1000mA, then the minimum current that
' * can be measured is I = ((1000mA*4.848375mV)/100mV) = 48.48375mA. Thus in
' * time of current measurement and reading, if the current drops below
' * 48.48375mA (i.e. 48.48mA), the reading will be zero. Thus if the target
' * battery (e.g. 12V 7.2AH SLA) is a healthy one, then at fully charged, on
' * float mode, it will consume around 30mA to eliminate the self-discharge.
' * Thus at this time, though there is a very low current flowing, but the
' * reading will be zero.

So far, it's the first version and i'm now planning for the second version. I could use an Amp at shunt to solve it but avoided since it is now serving me as i needed and i'm not interested to make it any more complex (and more more complex by using filter to reduce noise at current measurement input). At this moment, it can't do a deep charge (means a complete dead batt stored long time in dead condition)/conditioning a dead batt automatically. I found once that one of my Dead SLA needed a bigger current to start the initial chemical reaction to charge. Once i did so, then it started to charge normally. So it can charge perfectly when the battery is even fully discharged but not actually DEAD.
Well, that will be my next version...

Sincerely,
Mishu~
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top