Rules | Recent posts | topic RSS | Search | Register  | Log in

Intelligent battery charger circuit
Goto page 1, 2, 3, 4  Next
 
Post new topic  Reply to topic    EDAboard.com Forum Index -> Microcontrollers
Author Message
kit_714



Joined: 05 Jul 2006
Posts: 63


Post24 Sep 2007 17:40   Intelligent battery charger circuit

Dear All,

I would like to build a module of battery charging circuit, better can use microcontroller to monitor the status. Is there any recommendations on those battery charging ICs to acheieve the task?

If yes, kindly leave the information for me.

Thanks.

Kit
Back to top
btbass



Joined: 20 Jul 2001
Posts: 918
Helped: 69
Location: Oberon


Post24 Sep 2007 18:58   Intelligent battery charger circuit

You might find a solution at Microchip application notes
Back to top
kender



Joined: 19 Jun 2005
Posts: 965
Helped: 70
Location: Stanford, SF Bay Peninsula, California, Earth, Solar System, Milky Way


Post26 Sep 2007 5:45   Re: Intelligent battery charger circuit

kit_714 wrote:
Is there any recommendations on those battery charging ICs to acheieve the task?


Kit,

What cell chemistry are you planning to use? What capacity? Charging is different for Lithium and Nickel chemistries.

Nick


Last edited by kender on 29 Sep 2007 2:22; edited 1 time in total
Back to top
nguyennam



Joined: 06 Sep 2006
Posts: 459
Helped: 28


Post28 Sep 2007 2:27   Re: Intelligent battery charger circuit

You should refer to Microchip and Atmel website for PIC and AVR MCUs application notes on charging batteries.

For chemistries and algorithm, as well as excellent ICs dedicated to batteries charging, you should go to Maxim website.
Back to top
hamed_sotoudi



Joined: 01 Aug 2007
Posts: 108
Helped: 11


Post28 Sep 2007 13:16   Re: Intelligent battery charger circuit

Hi
go to atmel website. and search for battery charger. there is one document about battery charger with atmega8 and atiny15 and u can download its codes in c and assembly for them. but u should change the codes alittle for your battery types. and u can implement it very easily.
Back to top
inventor(y)



Joined: 18 Jun 2007
Posts: 30
Helped: 7


Post29 Sep 2007 1:30   Re: Intelligent battery charger circuit

Don't use the atmel app. It's complete nonsense.
It's designer must have bin sleeping. Just look at
the mosfet driver and the way the program is written.
if you want to use it, make an extra board with a fire extinguisher
trigger circuit. a 10 K PTC and some comparators work fine here.
Back to top
ChineseDragon



Joined: 31 May 2002
Posts: 27


Post29 Sep 2007 8:54   Intelligent battery charger circuit

Go to TI and Maxim website.
Back to top
contagiouseddie



Joined: 10 May 2004
Posts: 60
Helped: 3


Post29 Sep 2007 16:12   Re: Intelligent battery charger circuit

Hi There,

I just came back from a Microchip battery charging seminar and lab session.
I have been using TI's BQ series for quite some time and I guess they are better than Microchip's one in term of minimal external components, charging current capability, and wide input range.
Back to top
inventor(y)



Joined: 18 Jun 2007
Posts: 30
Helped: 7


Post29 Sep 2007 18:37   Re: Intelligent battery charger circuit

Hi contagiouseddie , what BQ have you used? I tried the BQ2004. But it never worked like it should. Later I came across a battery charger using the same chip having the same problem as my design. I'm now using my own design based on an ATMEGA48. Low part count/low cost. (ATMEGA €0.8 )

Last edited by inventor(y) on 30 Sep 2007 1:17; edited 1 time in total
Back to top
hamed_sotoudi



Joined: 01 Aug 2007
Posts: 108
Helped: 11


Post29 Sep 2007 20:21   Re: Intelligent battery charger circuit

inventor(y) wrote:
Don't use the atmel app. It's complete nonsense.
It's designer must have bin sleeping. Just look at
the mosfet driver and the way the program is written.
if you want to use it, make an extra board with a fire extinguisher
trigger circuit. a 10 K PTC and some comparators work fine here.


I dont know why u say like that. I use it but I made some changes to it and it has been working very well till now.
Back to top
inventor(y)



Joined: 18 Jun 2007
Posts: 30
Helped: 7


Post29 Sep 2007 21:56   Re: Intelligent battery charger circuit

Hi,

-NiMh version uses -Delta V technique. This is not suitable for NiMh unless you charge with very high currents. Something the hardware can not do.
-Take a close look at the 0R25 sense resistor in the switching current source and try to find out what PWM resolution you need to get it to work stable.
-The software doesn't use a watchdog while using while loops for polled IO. It should at least use a watchdog timer for Li-Ion batteries.
-The stable ADC function.
-...


Regards
Back to top
PaulHolland



Joined: 15 Jan 2003
Posts: 621
Helped: 59
Location: Holland


Post29 Sep 2007 22:46   Re: Intelligent battery charger circuit

Design one yourself like I did with discrete components. I designed a SLA battery charger with an 10uA idle current and temperature compensated also. Current and Voltage limited and C-I and C-V charging.
Back to top
kender



Joined: 19 Jun 2005
Posts: 965
Helped: 70
Location: Stanford, SF Bay Peninsula, California, Earth, Solar System, Milky Way


Post06 Oct 2007 7:20   Re: Intelligent battery charger circuit

Colleagues,

Since you are well-versed in the topic of battery charging, could you look at this topic?
http://www.edaboard.com/viewtopic.php?p=915464

Cheers,
Nick
Back to top
Dexter Dude



Joined: 26 Oct 2007
Posts: 45
Helped: 1


Post26 Oct 2007 6:43   Re: Intelligent battery charger circuit

Check this page:
http://myweb.absa.co.za/eric.brouwer/electronics.htm

It's a good charger. I have built it with an PIC16F628A ( changed the asm code for this PIC but the logic of the charger is the same ).

Good luck.
Back to top
RenatoBR



Joined: 25 Feb 2007
Posts: 24


Post07 Dec 2007 13:53   Re: Intelligent battery charger circuit

quote="Dexter Dude

It's a good charger. I have built it with an PIC16F628A ( changed the asm code for this PIC but the logic of the charger is the same ).

Good luck.[/quote]


Hi all,

Congratulations Dexter, a long time looking for a charger with pic 16F628A, but I didn't find it on the web.
I don't have konwledge enough in pics to write or change a source code.
Pls, can you post Your schematic and the source code?

Rgds,


Renato
Back to top
sri45



Joined: 12 Jun 2006
Posts: 25
Helped: 1
Location: Hyderabad


Post08 Dec 2007 10:05   Re: Intelligent battery charger circuit

hi

you can go for renesas controller R8C/1A ....

to my choice this can well justify your process.
here you have not mentioned for which batteries and capacities

for processing and reference details
check out this..........

http://www.e-radiocontrol.com.ar/?download=picref-2.pdf
Back to top
Dexter Dude



Joined: 26 Oct 2007
Posts: 45
Helped: 1


Post09 Dec 2007 16:18   Re: Intelligent battery charger circuit

This is the schematic for the charger (PIC16F628A / osc int 4MHZ).If needed , one could add at pin RB7 a simple serial intreface to PC.This way you could watch the voltage of Acc. , time , and state of charger using a program like RealTem or Hyperterm .



The charger perform a self test (if batt not inserted) , then checks the number of acc. connected (1-4) and display this number for 2 seconds .Then starts the discharging process till 1V/element .When discharging has finished , it pauses for 35sec(cool down) then enter into Slow charge mode (display indicates S ) for 450sec . After that it triggers High charge mode (display indicates H ) . The algoritm of charging is somehow similar with Eric's Brouwer
http://myweb.absa.co.za/eric.brouwer/electronics.htm .
This charger performs a so called "reflex charging" or "Burp charging" , and it is the most advanced charger I had buid (so far) .I must say , I am very pleased of it.
It is simple , cheap ,robust and works quite well , even with old accumulators .It is suitable for NiCd and Nimh batteries.
This is the latest hex file for PIC16F628A :
http://depositfiles.com/files/2651036 <- tested OK

For burning must use this settings :
IntOsc/ IO WDT=off PWRT=off MCLR=OFF BODEN=ON CPD=Off CP=off




The 7 segment digit display works like this:
- 0 for discharging
- I for battery In
- S for Slow Charging
- H for High (Normal) charging
- P for Fail to detect Peak
- F for Finish charging , or Trickle reflex charging
- E -for Error
- E A - for Error on Acc (battery removed while charging)

This is the schematic used for the 7segment display( I had 2 digits glued together so I made a separate PCB for this 2 digit display but only one connected to PIC )


The the switch (Ra5 to GND) could be omitted .It's function is not implemented yet.

The diode is a cheap 3A (not a Schotky diode becouse you need at least 0.6V on it .)When Lm317 is turned off it still outputs 1.25V-1.3V .So :
1.25V-0.65V= 0.6V on out when Lm317 is turned off.In practice I obtained 0.75V (the Delta Sigma ADC has some influence ).
This voltage is used to detect if at least one element is attached .After you build the circuit , with PIC removed , you must check this voltage to be soure that everything working fine.The software need at least 0.92V to detect one element , so this voltage must be in range of 0.6V-0.92V .


Last edited by Dexter Dude on 10 Dec 2007 16:53; edited 2 times in total
Back to top
wizpic



Joined: 23 May 2004
Posts: 324
Helped: 22


Post09 Dec 2007 18:39   Intelligent battery charger circuit

Dexter Dude what did you write the software in ?

Want to share source code ?

wizpic
Back to top
RenatoBR



Joined: 25 Feb 2007
Posts: 24


Post10 Dec 2007 1:43   Re: Intelligent battery charger circuit

Thank you Dude,

Interesting circuit, wich type of diode can be used for "D"?
If possible share the source code, pls.


Rgds

Renato
Back to top
linhnc308



Joined: 19 Aug 2006
Posts: 22
Helped: 1


Post10 Dec 2007 7:03   Intelligent battery charger circuit

My opinion, diode D is 1N4007 or Shotsky diode, maximum current is about 2 or 3A
Back to top
Dexter Dude



Joined: 26 Oct 2007
Posts: 45
Helped: 1


Post10 Dec 2007 8:28   Re: Intelligent battery charger circuit

This is the complete schematic:


The software was written in both ASM and in PIC-Basic .The ADC routine is from AN700 Microchip AppNote . The RS232 interface was only used in the develpement stage.I also used this schematic (striped away unnecessary parts ) as an PC DataLogger.

RS232 settings:
"9600baud Parity None 8 bits driven inverted " ( also known in RealTerminal as "9600 8N1 none" )
Back to top
RenatoBR



Joined: 25 Feb 2007
Posts: 24


Post10 Dec 2007 15:44   Re: Intelligent battery charger circuit

Dude,

How to calibrate the 2k5 pot?


Renato
Back to top
Dexter Dude



Joined: 26 Oct 2007
Posts: 45
Helped: 1


Post10 Dec 2007 16:48   Re: Intelligent battery charger circuit

There are several ways to calibrate the Pot.

Met1:
Power up the charger with 12V dc , no batt in it.
Use the RS232 connection to watch the voltage readings of ADC .I used "RealTem" software to do this.
http://realterm.sourceforge.net/.

Also connect an Digital Voltmeter on charger Output (Cathode of 1N5401 diode)
Adjust the 2k5 POT till readings from DV and RealTerm match .An error of adjustment of less then 90mV is quite OK.
This is the most accurate adjustment.


Met2:
Feed 12V dc to the charger , no batt in it .
Adjust the POT to min value.Display will read E . Slowly adjust the POT untill display show I , then go back a little till display shows again E .
This method is less accurate but works just fine .

Now put 1 acc in and power up .
The display will show for 2 sec the number of elements to be charged (in this case I and then discharge the acc till 1V (pulse discharging , aprox 300mA for 1 element , 500mA for 2 elements , 600mA for 3 or 4 elements ) . Remember to use 0.8ohmi /10W 1.25ohm/10w resistors .

Normal operation mode :
- first connect the rechargeable batteries to the charger
- power up charger
Reset = Power off charger
Back to top
wizpic



Joined: 23 May 2004
Posts: 324
Helped: 22


Post10 Dec 2007 20:16   Intelligent battery charger circuit

so dexter you going to share code or not

we understand if you say no

wizpic
Back to top
RenatoBR



Joined: 25 Feb 2007
Posts: 24


Post11 Dec 2007 0:44   Re: Intelligent battery charger circuit

Hi all,

I built the circuit on a potoboard using IRF540, I don't have IRF530.
Display, I have only common catode, no possible to calibrate the circuit, IŽll buy the correct this week.
Each time I power the charger it works for about five minutes (pulse discharge) and then stops using battery full charged or discharged.
I donŽt know how to prepare the RS232 to conect to PC, anyone can help me?
Can I use only one display and one BC251?


Rgds


Renato
Back to top
Dexter Dude



Joined: 26 Oct 2007
Posts: 45
Helped: 1


Post11 Dec 2007 7:38   Re: Intelligent battery charger circuit

After discharge to 1V/element the charger rests for 35sec (cool down battery) and then start slow charge for aprox. 6min. So I guess your charger is working but you still need to calibrate . If you do not calibrate , the charger could work but the discharge voltage will be off .I think that's what happening in your case .
The MOS-FET it is not critical but it is better to use one with low "Vgs threshold voltage " like those in PC motherboards .This tipe of fet is important only if you are planning to use only one rechargeable element at a time (so that reflex charging keep working normal at low voltages ).

Actually you could connect the display like this (no need for transistors) :


I used 2 digits becouse I intended to display more information , but that is for future development .

The RS232 terminal should display something like this :


For RS232 connection you could use this :
http://picprojects.org.uk/projects/simpleSIO/ssio.htm
or
http://www.kmitl.ac.th/~kswichit%20/MAX232/MAX232.htm

I used MAX232 , but the transistor version should work fine.
Back to top
RenatoBR



Joined: 25 Feb 2007
Posts: 24


Post11 Dec 2007 10:48   Re: Intelligent battery charger circuit

Tanks Dude,

You're helping a lot.
I'll build the RS232 with transistors, but I have one more question:
+3 to +5 volts conect on LM7805 (out).
PIC TxD conect on RB7.
PIC RxD where to conect??
GND conect on ground from charger.

Sorry for asking a lot of question, I'm not expert in pics.


Rgds


Renato
Back to top
Dexter Dude



Joined: 26 Oct 2007
Posts: 45
Helped: 1


Post11 Dec 2007 11:02   Re: Intelligent battery charger circuit

"+3 to +5 volts conect on LM7805 (out). " <- correct
You don't need PIC_RXD .The communication is unidirectional : from PIC to PC.
"GND conect on ground from charger. " <- correct
Back to top
RenatoBR



Joined: 25 Feb 2007
Posts: 24


Post12 Dec 2007 13:46   Re: Intelligent battery charger circuit

I built the RS232 interface with transistors and did the calibration.
On the screen of the RealTerm after the calibration I read:

V=7791 mv read=742 status=err, and on multimeter 0.773 volts, is it correct?
The value to compare with multimeter is read?
What means V=7791?

I connected one cell and start dischargin, when finished, the RealTerm showed
"no B" and did not start charging.
My calibration is correct?

May be I have a problem because no all parts available:

For 27k using 22k
For 0.8R using 2.2R
For 1.25R using 4.7R
For pot 2k5 using 2k2
For IRF 530 using IRF540

The resistors for charge and discharge are criticals or I can change the values?

What do you say.


Renato
Back to top
Dexter Dude



Joined: 26 Oct 2007
Posts: 45
Helped: 1


Post12 Dec 2007 20:25   Re: Intelligent battery charger circuit

"The value to compare with multimeter is read? "
No.That is the 10bit value ADC reads (0-1023 max).You calibrated the wrong way.You should use V=xxxxmV variable instead (not read variable from RealTerm.( I guess you also changed the POT or the 2k2 resistor connected to it )


The ADC is 10bit precision but it it feed thru an voltage divider aprox 2:1 (2k5 Pot and 2k2 resistor. The resistor needs to be a little lower value then the POT )


* For 27k using 22k (OK values 22K-56K )
* For 0.8R using 2.2R (important for discharge current , not critical but direct proportional with charge resistor , in order to correctly use the "reflex charging technique"
* For 1.25R using 4.7R see above , not critical
* For pot 2k5 using 2k2 not critical
* For IRF 530 using IRF540 not critical

This are the voltage thresholds used by charger :
V_batt read
0.877V ----- 90(units) <-you need to adjust the pot to read this value 90 +- 5
1V ----- 100 (units)
2V ----- 200 (units)
3V ----- 300
4V ----- 410
8V ----- 850 ....................(1023 units max)


V=7791 <- the voltage ADC sense (or 742 x ADC_resolution )
So 7791/742 ~10mV resolution.

How exactly did you calibrate ? Where did you connect DV? If DV reads 0.773 volts then you should adjust the POT until Realterm reads 0.77-0.8V or "read=77" .Then if you put a batt in the DV and Realterm readings should match.
It is impossible to get 7.791V reading with no batt atached .Check the LM317 , the BC173 and the resistor connected to its base (decrease 1K5 resistor).
Also , if you power up the charger with no batt attached , the display should read E
Check protection diode orientation.

"Met1:
Power up the charger with 12V dc , no batt in it.
Use the RS232 connection to watch the voltage readings of ADC .I used "RealTem" software to do this.
http://realterm.sourceforge.net/.

Also connect an Digital Voltmeter on charger Output (Cathode of 1N5401 diode)
Adjust the 2k5 POT till readings from DV and RealTerm match .An error of adjustment of less then 90mV is quite OK.
This is the most accurate adjustment. "


Last edited by Dexter Dude on 12 Dec 2007 20:48; edited 1 time in total
Back to top
Post new topic  Reply to topic    EDAboard.com Forum Index -> Microcontrollers
Page 1 of 4 All times are GMT + 1 Hour
Goto page 1, 2, 3, 4  Next


Abuse
Administrator
Moderators
topic RSS 
sitemap