PDA

View Full Version : Charger Circuit



mitchf14
- 17th June 2009, 03:33
I am trying to build a charging system for a normal 12v car battery with a pic 16f628 using adcin, does anyone have any ideas for a circuit to know when the current has reached close to zero. This will tell me the battery is full charge and to disconnect the power with a small relay.

Thanks any ideas would be greatly appreciated.

tiger_bel
- 21st June 2009, 11:59
16f628 has no adc in, use 16f1220 in place
same pinout.

rgds

Acetronics2
- 21st June 2009, 13:49
16f628 has no adc in, use 16f1220 in place
same pinout.

rgds

"use 16f1220" ????

Let's suppose you meant 18F1220/1320 ... or 16F88 ...

Alain

mitchf14
- 22nd June 2009, 15:22
Yes it's actually pic 16f873 that I am using not a 16f628 sorry about that, I got a couple projects on the go right now. I tried using a shunt resistor with dcin to calculate the current but it was not very accurate. I even checked the circuit in a battery charger the full charge led is connected to an op-amp with a bunch of voltage dividers. I guess I could do some reverse engineering to figure it out.

I was wondering if anyone else had any ideas. All I want to know is when the current has reached close to zero an analog value would be more useful.

Melanie
- 22nd June 2009, 18:27
For arguments sake, lets say your Charger can charge at 10A max.

An 0R02 Resistor would drop 0.2v at 10A charge current dissipating 2W. An MSR-3 (3W) or MSR-5 (5W) type Resistor is perfect. Fit it in the NEGATIVE supply lead to your Battery. If you now set 0.2v as +VREF (a couple of 1% Resistors as a Voltage Divider from your +5VDD Supply) then your ADC will be able to measure (across this Resistor) from 10A Charge current right down to just under 10mA (10A/1024 ie steps of 9.7mA). You may need to check if your chosen ADC's VREF can go that low).

There are other ways, but hey, 50 cents for three precision Resistors can’t be beat. Sure you might need some over-current /short-circuit protection at the ADC input, but that’s the easy bit.

You can do the same thing with a PICs Comparators, but that will just give you a threshold under which you can say it's not doing much charging.

Acetronics2
- 22nd June 2009, 18:42
You may need to check if your chosen ADC's VREF can go that low).

.

Hi, mel

I remember having searched a lot for this info, ( similar reason ...) and finally found something around 2-3 v min. in the far end of the Datasheets ( Parameter AD06 )

Regards
Alain

Melanie
- 22nd June 2009, 18:52
In which case it's Comparators rather than ADC for this choice.

mitchf14
- 23rd June 2009, 14:38
I was also thinking of using a op-amp as a comparator that was my next try, but i never tought to use the pic comparators.

Thanks for all your inputs guys.