PIC12F629 Lead-Acid Battery Desulfator

Introduction: PIC12F629 Lead-Acid Battery Desulfator

Hi everyone,

After reading so many articles on Battery desulfator i've decided to come out with my version of Battery desulfator using
Microchip base micro-controller using PIC12F629 or PIC 12F675.

"Please pardon my english" .I don't really have time to check for minor grammatical errors.

Before we begin this circuit although simple in design requires DIY builders to have at least basic PIC programming knowledge with electronics.

Honestly i had no programming knowledge initially.I started on my own on how to blink led using Pic micro-controller. 

I have used this circuit i design to recover 5 Maintenance -free battery ranging from 12volts 2AH (UPS battery) to 7.2AH (Previously used in electric bicycle).I have not attempted to recover a CAR battery since i don't have any old battery in my home.

I have recovered battery eg:2AH which had voltage as low as 0.9v which i have not charged  for around 8 years after removing battery from a defective home UPS.
I  have managed to recover 4 12v 7.2AH battery which i have not charged since 2004.These batteries were in my self assembled electric bicycle years ago.

These batteries were all recovered in within 48hours.For a car battery it would take weeks maybe.

Battery desulfator circuit i used while with charging battery with 12volt 500ma transformer.
I'd believe using slow and steady approach do produce better result most of the time.

The frequency output from Pin 7 is 56us on with 1ms off in a infinite loop.
During programming i have set it to use internal 4MHZ PIC oscillator which have 1% tolerance and i have disabled reset /mclr.
There is only 3 connection to pic.

I noted the current consumption of the desulfator circuit is around 13 to 15mA with a well desulfated battery if connected to the charger with voltage around 13.8volts.

I noted if a old battery needs to be desulfated the voltage would increase up to 17.xx volts on
battery with desulfator  circuit consuming about 40 to 50mA.

The D1  diode i used is the fastest recovery diode i could find with 25ns response time.
The purpose of D2 is to prevent accidental polarity reverse at the input to protect the circuit.D2 could be replace with higher amp rating like IN5820 if needed.
It's better to obtain C1&C2 capacitor which have a low ESR rating with at least 50V.
For L2 toroid if you could get anything from 170uh to 220uh would be sufficient.Please do not wind higher than 30 turns as the resistance would increase and hence lower the circuit efficiency as well.To be honest i don't know the uH rating for my self made toroid but i got results which what matters in the end.

For the mosfet if you could find a lower turn on resistance with low turn on/off delays which will definitely improve the efficiency of the circuit.

I have connected a piezo speaker temporarily to old battery which needs to be charged since it would have higher internal-resistance.i noticed the piezo speaker would emit a loud 1KHZ sound.But if the battery is already well desulfated i noticed the piezo speaker connected temporarily to battery would hardly emit any sound at all.  
We could use piezo speaker as a quick way to test to know if battery to be charged is well desulfated or internal resistance of the batery is already being lowered.

To really know the estimated internal-resistance of battery we would have to use 1Ohm maybe 50w resistor idealy  1% tolerance.
But normally it's more easy to find high power resistor with 10%
tolerance instead.

To increase internal-resistance measurement accuracy.It's best recommended we wait about 12hours after battery is disconnected from charger and circuit.

Formula to check internal resistance of battery.

(Battery voltage after charge) - (battery voltage after 1ohm resistor connected connected for around 5 seconds or once battery looks stable)      *         1  (Resister value in ohm.But if your resistor have 5 or 10% tolerance.It best you take min and max value eg:0.9,1.1)/(Battery voltage after charge)

(Original Battery voltage - Battery voltage with 1ohm resister)   x     (1/(Original battery voltage).

If you could get below  ".1ohms" means the battery desulfator circuit have done a good job in recovering your old batteries.

I have uploaded the source code merely as an example and hex file which you could program the pic with any cheap USB pic programmer.I'm using KIT150 USB PIC Programmer.

http://members.lycos.co.uk/sanjev17/desulfator.c        (Deleted by source webadmin)

http://members.multimania.co.uk/sanjev17/desulfator.HEX  (Deleted by source webadmin)





    • Creative Misuse Contest

      Creative Misuse Contest
    • Water Contest

      Water Contest
    • Tiny Home Contest

      Tiny Home Contest

    26 Discussions


    1 year ago




    1 reply

    Just what I have been looking for. Looks incredible man! Definitely trying this. Thanks!

    Help please! Does anybody have a hex file to program this PIC? Thank You in advance!

    1 reply

    Check out the video, do you still need the hex file?


    2 years ago

    Hi Guys

    I'm afraid that it is unlikely to work. For reasons, please kindly take the time to watch this;

    If you are pressed for time, forward to 2m:35s

    What do you guys think?


    The scheme can not be correct. The anode of D1 should connect to the drain of fet.

    Please explain how this can work. Assuming the "6 to 12 volts" is the battery your are trying to rejuvenate that means that you must be powering your circuit from another source. So where should it be connected? I am guessing that it is across C3 and C4. Also I am guessing it needs to be 5 volts. Also is the 30 turns centre tapped at 15 turns or is there some different ratio?

    3 replies

    The source of power for the circuit is the battery(Take note of the symbol for cell) itself while the battery is being charged from another source.

    Thanks, I think I might build one then. I could not see how it would work running from an old, discharged battery, and did not see anywhere that the battery itself was being charged while this was working.

    Now I have read it again I see you said "Battery desulfator circuit i used while with charging battery with 12volt 500ma transformer."

    Hi, thank you for a nice project. I am in the process to build this project but the C codes and hex codes is no more available. Can you please where can I get it ?

    1 reply

    It seems the code was deleted by http://members.lycos.co.uk web admin i think.
    I don't have a copy of it locally.
    The original was in c you could use any programming lang
    This is how the logic works
    Infinite loop
    delay 56us
    delay 1000 ms or 1s

    Please ignore the calibration part.I can't remember i think clicked on no or cancel.

    The frequency will be around 1khz anyway the impact on switch on period 56us is minimal.

    To prevent saturation of the 2inch ferrite toriod i did lowered timing from 59us to 56us as shown in the source code.

    Please careful about custom made winding torriod core too less winding your circuit would be inefficient too many it will not work well since resistance would increase at the core.
    I am not able to advise my torriod value as well as i am no expert.
    Objective to get around 200uh to 220uh

    1 reply

    Hello Michael

    Thanks for your quick reply. My ferrite toroid has been ordered and has a value of 220uh. The only way to be sure of your toroid value would be to get it's inductance measured. If you get the chance you can take it to an electronic store and test it in a few multimeters wich have an inductance measuring capability!? That way there will be no doubt ;-)

    Once again, many thanks for your help. I will feedback once testing is underway.



    I have added 2 new links to the instructables.
    I just open up the desulfator box took photos and read the code directly from pic12f629 to show you the fuse settings.

    Oscillator:INTOSC IOGP4



    There is few things to do at programmer.
    Disable MCLR and use internal OSC.

    Hi Michael

    Many thanks for your reply. I have ordered two low ESR (0.03 ohms) 47uf caps and intend to build the circuit soon. If the circuits works as intended then as the car battery is desulfated, the SG of battery electrolyte should rise indicating that it is working. Will keep you posted.



    Hi there, thanks for the circuit which i am in the process of building. When you mention low ESR capacitors for C1/2, what is the highest acceptable ESR for the circuit to work well?


    PS: can i use it condition a 12v car battery?

    1 reply

    You need to look for low ESR capacitor to increase efficiency.
    Else get standard 2 x 47uf caps and run it in parallel.
    Go for 50v cap at least as i noted voltage surge could go high as 44v for battery that needs to be shocked.

    There is no risk of accidental polarity reversal for my circuit with the Diode D2 in place along with 500ma fuse.

    I have not tried on old car battery yet but i believe this circuit could prolong car battery life to a certain extend.