application note bq2004
Thank you very much for sharing this project with us.
I have just build this project and it seems to run well.
But I will surely subject it to extensive testing in the followings weeks.
Nevertheless I would like to suggest a design modification of the schematic based on the problems I have already encountered.
First, using a scope I discovered that during a charge pulse the LM317 current source occasionally goes into oscillation. Older Cells with higher internal resistance or small AAA or 2/3AA size cells seem to favor these oscillations.
The remedy is (like with most linear regulators that exhibit oscillations) a 47-100nF ceramic cap from the output (i.e. pin 2 of LM317) to ground.
The same applies to the LM7805. To minimize the risk of oscillation on the 5V rail (see application and design notes on the LM78xx series regulators) which may interfere with the PIC operation/AD conversion, it would be advisable to have additionally a 100nf ceramic cap parallel to the 1u electrolytic already present on the output of the LM7805.
Second I assume that the 4K7 resistor from G to S of IRF530 is counterproductive when trying to get a MOSFET with quite high Gate Voltage Threshold like IRF530 to turn on with a low RDSon.
In discharge mode of one cell my scope showed 600mV voltage drop across the Drain-Source path of IRF530 during the discharge pulse which translates to roughly 800 mOhm RDSon. After removing the 4K7 the voltage drop across D-S of IRF530 dropped to 100mV. This is a significant increase in conductivity (which translates to lower RDSon) of the MOSFET.
So if your intention was to have the MOSFET operate at low RDSon, I would suggest omitting the 4K7 and lowering the 1K from PIC Pin 16 to G of the MOSFET to 220 Ohm when using IRF530. MOSFET with lower Gate Voltage Threshold like those from MoBos or "Logic Level MOSFET" like IRL3103 should work with this modification as well.
BTW some time back in this thread on 12 DEC 2007 you said that "For IRF530 using IRF540" was "not critical". My search turned up that IRF530 had a Gate Threshold voltage of 2,9V. With IRF540 it was 10V. So you may never get a IRF540 to work the way the IRF530 it is intended when driving with 5V Gate Voltage.
And finally I was wondering if you could please modify the code of the PIC to deliver a RS232 data stream during any operation mode. Especially during the charge modes S,H,F, since I would like to monitor the voltages/status during the charge period, too, and with this data make conclusions as to where and why peak detection or other criteria may fail depending on the type of cell, charge current, age of cell, manufacturer etc.
Thanks again for sharing this project.
Best regards
Wicked Witch