Introduction: NiCd - NiMH PC Based Smart Charger - Discharger

Picture of NiCd - NiMH PC Based Smart Charger - Discharger

How to build a low cost great features PC based smart charger- discharger which can charge any NiCd or NiMH battery packs.

- The circuit uses the PC power supply , or any 12V power source.

-The circuit uses The "Temperature slope" method which is the most accurate and safe method, in this case the packs are charged by monitoring the temperature and end the charge when the charger sense the end of charge dT/dt, which depends on the battery type.

Two parameters are used as a backup to avoid over charging:
- Maximum time: The charger will stop after a predetermined time according to the battery capacity
- Maximum temperature: You can set the Max. battery temperature to stop the charging when it becomes too hot ( about 50 C ).

- The charger uses the PC serial port, i have built the software with Microsoft Visual Basic 6 with an Access database to store the battery parameters and charging profiles.

- A log file is generated with each charging process showing the charged capacity, charging time, cutoff method ( time or Max. temperature or Max. slope )

- The charging characteristics is displayed online through a graph ( Time versus temperature ) to monitor the battery temperature.

- You can discharge your packs as well as measuring it's actual capacity.

- The charger has been tested with more than 50 battery packs, it realy works great.

Step 1: The Schematic

Picture of The Schematic

The circuit can be divided into e main parts:

Measuring the temperature:
This is the most interesting part of the project, the purpose is to use a low cost design with a low cost components along with a good accuracy. i have used the great idea from , review it , it contains all the required details.

A separate module in the program has been written to measure the temperature, as it can be used in other purposes.

The charging circuit:
- I used LM317 in the first design, but the efficiency was too bad and the charging current was limited to 1.5A, in this circuit i used a simple adjustable constant current source, using one comparator of the LM324 IC. and the high current MOSFET trannsistor IRF520.
- The current is adjusted manually using the 10Kohm variable resistor. ( i'm working on changing the current through the software ).

- The program controls the charging process by pulling Pin(7) high or low.

The discharging circuit:
- I have used the remaining two comparators from the IC, one for discharging the battery pack and the other for listening to the battery voltage and stop the discharging process as soon as it drops to a predetermined value ( for ex. 1V for each cell )

- The program monitors pin(8) , it will disconnect the battery and stop charging when it's logic level "0".
- You can use any power transistor can handle the discharge current.
- Another variable resistor ( 5K ohm ) controls the discharge current.

Step 2: The Circuit on the Bread Board

Picture of The Circuit on the Bread Board

The project has been tested on my project board before making the PCB

Step 3: Preparing the PCB

Picture of Preparing the PCB

For the fast charge process you will need a high current , in this case you should use a heat sink, i have used a fan with its heat sink from an old VEGA card. it worked perfectly. the circuit can handle currents up to 3A.

- I fixed fan module to the PCB.

Step 4: Fixing the MOSFET

Picture of Fixing the MOSFET

The transistor should have a very strong thermal contact with the heat sink, i fixed it to the back of the fan module. as shown in the image below.

Step 5: Soldering the Components

Picture of Soldering the Components

Then i started to add the components one by one.
I hope that i have time to make a professional PCB, but that was my first version of the project.

Step 6: The Complete Circuit

Picture of The Complete Circuit

This is the final circuit after adding all the components
look at the notes.

Step 7: Mounting the Discharge Transistor

Picture of Mounting the Discharge Transistor

This is a closed image showing how i mounted the discharge transistor.

Step 8: The Program

Picture of The Program

A screen shot of my program
I'm working on uploading the software ( it's big )

Step 9: Charging Curves

Picture of Charging Curves

This is a sample charging curve for a Sanyo 2100 mAH battery charged with 0.5C ( 1A)
notice the dT/dt on the curve.

Note that the program stop the charging process when the battery temperature increases rapidly
slope equals ( .08 - 1 C/min )


noahw (author)2007-09-04

Hello, and welcome to the Instructables community! This currently does not meet our criteria for an Instructable. A completed Instructable:

- details a finished project with instruction (not just links to instructions)
- has clear images that you took of your project (web-found clip-art is not acceptable)
- uses proper spelling and grammar
- contains appropriate cautions or safety considerations
- does not violate someone else's copyright
- does not violate the Instructables terms of service
- is typically written about something you are very passionate about and want to share.

If this is a comment, a question, a small tip, or something that cannot truly be a finish project, please post it as a forum topic. If you are looking to start a collaboration, post a topic in the forums. Look here for tips on writing a great Instructable.

So, it has been unpublished. Please do not republish until it has been corrected. When you republish, if everything is fixed, I'll remove this note. Multiple attempts to republish without correction will result in deletion.

hosam_eldin (author)noahw2007-09-05

Hi noahw, Thanks for the note, kindly be informed that i didn't finish my instructable, i'm still preparing the materials, images .. etc. i thought that it can be published until i finish my work. I will update it soon and publish it when it's ready. Thank you Hossam

noahw (author)hosam_eldin2007-09-05

You generally want to get your instructable all finished before you publish it. That way people can see the final product. Thanks for your submission and I am looking forward to seeing the finished project!

mpt442 (author)2015-03-08

why can't I download anything?

offtherails2010 (author)2012-05-17

Hi Hosam,

Just wondering if you managed to complete this instructable ?

i know its been a few years since the original posts but this software and the schematic would be greatly appreciated for my home project, i have recently become severely mobility impaired and started learning electronics (now that im stuck in one room full-time!) and have over two dozen (28!!!) varying sizes battery packs that would greatly benefit these tests using you excellent 'ible !

Please could you say if this is complete and/or if you could email me all the info including full parts listing so i too can make one of these 'super battery pack charger/discharger's' ??? !!!! ???

many thanks in advance for any or all help given through pm and i'll post you my email addy !!!

keep up the great inventive work !!!


Thanks a lot for your e-mail,
Actually i have made this project long time ago, all the info i have is posted to the website, but i think the schematic is a little bit missing some parts numbers, i think this can be sent.

But the final version of the software is the one on the website

Please let me know how can i help you in this project

By the way, i still have the circuit in the picture, i don't need it any more, but the shipping cost is high, better to build it at home.

I will try to help you as much as i can.


Many many Thanks for the LIGHTENING FAST reply Hosam !!!!! i am truly grateful !

I'm gathering the components at the moment and have downloaded all the software and schematic but the link for the research i need does not work anymore and i would very much like to see the extra information from the dead link (understandable considering how much time has past !)

here is the text from your 'ible that i need the link for:

Measuring the temperature:
This is the most interesting part of the project, the purpose is to use a low cost design with a low cost components along with a good accuracy. i have used the great idea from , review it , it contains all the required details.

Would you be able to remember the name of the project from the website that has all these required details ?

or if you could write me down the full list of exactly which components (capacitors, resistors, IC's etc) your original circuit used and all values so that i can start ordering the parts?!!!?

Once again, thanks for the great help in Reviving this Old But EXCELLENT Project as i need to breathe New-Life into it !!!

loopingz (author)2012-03-31

Interesting build, did you think about mixing temperature and voltage peak? It would be perfect this way.

Inducktion (author)2011-10-22

Could it be possible to make it so this same charger charges Li-ions, NiCd's, and lead acids, too?

It would be a whole lot more useful if it was universal!

pekili (author)2011-08-08

I think that your diagram is not well. First, the diode at pin 2 LM324 is turned. I think ,anode have to go at pin2 ,cathode at gnd to establish 0.6v at pin2.
Second,I have 3 v to 4v at fan with slow moving ventilation.Which type of the fan I must use: at 5v ,or 12v?.When I put 82k resistor between VCC and the baseof the transistor (I put BC639 ) I have about 8v to 9v, but BC639 is just warmer(about 40 to 50 Celsius degree.Third , cooling fancontacts need to be turned (oposite).
Fourth,100kOhm resistor at trimer 10kOhm#pin12 LM324,I think it should be there.Without 100kOhm , don't have current adjustment at all. With resistor ,have
current range from 0 to 0.65 A max..Why is that?.And,finally , In software you have a bug when I turn CHARGE button, next PAUSE,and again CHARGE button the program says '55 error' and close the program.
Best Regards from Serbia-Belgrade

minglett (author)2011-04-22

charger_setup_WinXp.rar file will download fine if you follow these instructions. BTW it only took me a minute to figure this out. Everybody gives up too soon.

Right mouse click on the link, "Save target as", let it download to your computer. It will save as FA2OIVDFDO2058V.htm. Once the download is completed change the .htm extension to .rar. Then open the file and it will unpack properly. Note: you will need Winrar or another program that opens RAR compressed files.

amitava.hcl (author)2010-09-25

charger_setup_WinXp.rar file appearing as tmp file and archive corrupted. Please help me to work with and to try.

moris_zen (author)2009-11-10

Great work man!
I just love batteries too (Link) . Just made a dis charger with Arduino .
Nice work .

giga97 (author)2009-08-06

thank you. will try to construct one.

giga97 (author)giga972009-08-08

encounter a big problem, charger_setup_WinXp.rar 45 MB seem impossible to download . server keep on reset after few minutes on download, and can not resume, waste a lot of bandwidth.

ReCreate (author)2009-04-29

How big is the Program?

hosam_eldin (author)2009-02-16

Hello all, I have uploaded the source code, i'm realy sorry for all that delay ( it was out of my hands) . Please if anybody has modified the software or enhanced it, just drop me an e-mail with the new version so i can upload it for everybody. Regarding polymer52's comment, actually the software worked for me over a year and also for many friends. YES it needs some enhancements like any software BUT i think it's not fair to say that it's "useless" as he mentioned. Anyways polymer52, thanks for the great comment !! Thanks Hossam

jhesy (author)hosam_eldin2009-03-01

hello! where can i get the source code?? i need it as soon as possible because the deadline of our prototype is nearly coming..we don't have much time to wait..please bear with us...please help us, for us to be able to pass our electronic subject ur response would be a great help for our group.. thanks!god bless!

polymer52 (author)2009-02-15

Don't waste your time and money on this one guys. The hardware will work okay but the software is unfinished and useless. I've contacted the author a number of times. Usually he doesn't respond. When he does he says he is going to upload the source code so we can fix it but he never does. No flame intended. I'm just trying to save you guys some headaches, money and frustration.

necrotopsy (author)2009-01-30

Can this circuit without the computer? I am looking to build one into a car to charge single cells.

whitetiger (author)2008-07-01

Hi Hossam: This project is great... I'm under construction... but i have some questions on it.... i need more data for the "temperature wire" Thanks. (excuse me for my English, i'm from Argentina)

Da_Fudge (author)whitetiger2008-11-14

I've just finished building, so maybe I can help. The temperature wire is not special wire, it's just whatever you want. He used headphone wire because of it's sheilding properties. Whatever wire you use, just add a 10K thermistor to it. THAT is what does the sensing.

polymer52 (author)Da_Fudge2009-01-08

Did you actually get this circuit to work with XP? It seems to have issues with the serial port (com 1). Gives errors and wont pull RTS (pin 7) high. Also there is no setup and calibration instructions.

Da_Fudge (author)polymer522009-01-12

Yeah. Admittedly, the program has some MAJOR bugs, but works well enough. Also, Hossam, a major feature I think you should impliment is PC controlled current, both charging and discharging. THe trimpots are way too annoying. It shuldn't be too difficult to impliment. Cheers, Fudge

polymer52 (author)Da_Fudge2009-01-20

Does your copy of the software have the discharge button as shown in the text? The ones I have doesn't. The zip file is a scrambled mess of different (versions?) programs. If I had the source code I could possibly help with some of the problems but I e-mailed him and got no reply.

hosam_eldin (author)polymer522009-01-22

Hello all, I'm sorry for not replying i was very busy. Regarding the software,i think the discharge button was disabled in this version, but the source code contains everything. I will upload the whole source code soon, sorry now i don't have a good Internet connection I will appreciate if anyone has modified/improved the software to upload it to be available to everybody. By the way the program is working good on XP it's right, the program does not include a setup for this part, sorry i didn't have time to add this feature.

hosam_eldin (author)Da_Fudge2008-11-26

Hi Da_Fudge I'm so happy to hear that you have built my project please test it and send me your feedback tel me if you need any assistance Thanks Hossam

hosam_eldin (author)whitetiger2008-07-02

Hi Whitetiger, Thanks for the update, It's a simple one, i used a wire from an old headphones just to decrease the noise, but i think any wire can work.

hosam_eldin (author)2008-11-27

Hi everyone, I have made this project long time ago, i don't need it at the moment and would like to sell it with the source code of the software, if anyone is interested please send to my private mail and we can arrange. Thanks Hossam

hosam_eldin (author)2008-10-13

Hi all, I have uploaded a more clear schematic, Thanks Hossam

codyke (author)2008-10-09

could you please send me the scemetic? I have a hard time making something out of it even enlarged it pretty unclear :(.

thank you in advance. -~

hosam_eldin (author)codyke2008-10-13

Hi codyke, I will upload a more clear image to my instructable Thank you Hossam

patmb (author)2008-09-23

This charger/discharger project is great! But I have problem downloading the software (i.e. charger_setup_WinXp.rar). I know for some reason it will be downloaded as "FA2OIVDFDO2058V.tmp", and I just have to rename it for decompression. But I can only download it as an empty file (zero-byte in size)! Do you have any idea about what's wrong? Thanks!

Sandisk1duo (author)2008-06-23

can you drw the diagram again? only this time just so you can charge batteries, and nothing else? sorry i'm a noob

carrierpilot1357 (author)2008-06-08

this is a great instructable. i like how neatly the schematic was written. i would make this but i would mess it up soldering.

babu03 (author)2008-05-24

please draw the schematic neatly by using MS-PAINT or the like.

jomarx (author)2008-04-28

very nice! will be making this when i have the budget! there's a slight problem on the schematics, its not very clear. if its possible for a high res pic? thanks!

hosam_eldin (author)2008-03-11

Folks, - I have uploaded the software ( the exe version for Windows XP) - your comments are welcomed.

n0ukf (author)hosam_eldin2008-03-13

Where is the program for this? I tried clicking the .rar file to download but it brings up the cryptic (meaningless) name FA2OIVDFDO2058V.tmp instead. What do I do with this?

hosam_eldin (author)n0ukf2008-03-30

Try to rename it to the original name after downloading it. actually i don't know why this behavior is happening

BFeely (author)n0ukf2008-03-18

Simply rename it to charger_setup_WinXp.rar and open it with WinRAR (or a compatible program).

abun1991 (author)2008-03-10

what you could do for the code is type it in Notepad, and save it as a txt file, and upload that. That should be much easier.

akira_ira (author)2008-02-11

i want to ask you, this rechargeble is for what type voltage battery? it is possible to have a charge 1.5V,6V and 12V?

hosam_eldin (author)akira_ira2008-02-12

Hi akira This charger is for Ni-Cd and Ni-MH batteries starting from one cell up to 8 ( design can be modified easily to accept more cells).

SpikeFiend (author)2008-01-29

Are you able to upload the code for this? I'd be really interested to see it.

hosam_eldin (author)2007-09-17

ofcourse it's more safe to monitor the slight drop for each battery when it's completely charged. But we are talking about battery packs, you don't have the chance to measure each cell ( unless you un- assemble it). - Some chargers stop the charging when there's an increase about 10-12 C from the ambient temp. But the most accurate method is to monitor the dT/dt and end the charge when the battery became hot rapidly. Each battery manufacture specifies this value. - Another point, ALL THE BATTERIES MUST BE IN THE SAME CAPACITY, TYPE AND CHARGE STATUS. For example, don't mix a charged battery with half charged one.

chooseausername (author)2007-09-17

Hello Hosam_Eldin :-) I did not know it was possible to "guess" when a battery is 100% charged by monitoring its temperature. Is this as safe as monitoring the difference of potential between each terminals of the battery ?

About This Instructable




More by hosam_eldin:Simple JDM PIC ProgrammerHow to make Lithium chargerNiCd - NiMH PC Based Smart Charger - Discharger
Add instructable to: