Introduction: Restore Batteries With Arduino

Do you have rechargeable batteries that aren't chargeable anymore? There are many possible reasons why a battery stops taking a charge, here are a couple of common ones. It may have been damaged by heat due to overcharging, or sulfates may have built up on the internal plates due to extreme discharge. The good news is that many times a battery in this condition can be restored. You may be familiar with desulfating circuits, the setup I'm presenting in this article is my take on one.

Step 1: The Circuit

Be advised that this is an experimental setup, it should only be duplicated by those who are familiar with appropriate safety precautions.DO NOT attempt to charge Li-Ion/Polymer batterieswith this setup as there is a risk of explosion.

This circuit works by pulsing high voltage short duty cycle spikes, to a problematic battery. This can help breakup sulfation, and re-stimulate the chemistry of the battery. This setup is intended to be used primarily for Lead-Acid, Nickel-Cadmium, & Nickel-Metal-Hydride batteries.

The way this circuit functions is a square wave pulse generated by the Arduino is amplified with a MOSFET to switch an inductor (L1) on and off rapidly. Each time the power to the inductor (L1) is switched off the magnetic field surrounding the coil collapses which generates a high voltage spike. We direct this spike into the charge battery through D1 which allows current to flow in only one direction. D2 is a safety precaution to help protect the MOSFET from being damaged by the high voltage spikes. D3 is a blocking diode to keep supply voltage from coupling with the Arduino's supply. R1 is a pull down resistor to keep the MOSFET off until it receives a positive pulse on the gate.

I used a 12VDC power supply to power the charge circuit.

Parts List:
  • Q1 = N-Channel MOSFET rated above the input voltage, and for a couple of amps to be safe.
  • D1, D2, D3 = 1N4007 Rectifier Diodes
  • R1 = 10K 1/2W
  • L1 = Experiment with a variety of coils. I used a small air core spool of light gauge magnet wire that measured 15 Ohms.

Step 2: Arduino Setup & Sketch

This is my first Arduino project and I'm hooked. This is a simple setup, I'm currently powering the Arduino UNO via USB but would incorporate a stand-alone programmed micro controller into a more permanent setup and power it from the input supply. I only used 2 pins, Pin 3 to MOSFET gate, & GND to charge circuit ground through D3 blocking diode.

I used this simple sketch to create a square wave pulse on pin 3 with a pulse-width & frequency that I can adjust using the delay functions. If both delay values are equal the duty cycle is 50%. I have it set at a 10:1 ratio with 10 being the Off time, & 1 the On time, this seems to be a good balance between charge rate and inductor loading. The longer the pulse-width, or the higher the frequency the more current used which will generate waste heat in the inductor and the MOSFET so be mindful of this when altering the values.

The delay values are in milliseconds.

int fetPin = 3;

void setup() {
  pinMode(fetPin, OUTPUT);

void loop() {
  digitalWrite(fetPin, HIGH);
  digitalWrite(fetPin, LOW);

Step 3: Conclusion

The amount of time necessary to restore and fully charge a battery will vary and since at this time I haven't incorporated automated control functions into the sketch you will need to manually monitor the charge voltage and use care not to overcharge.

I intend to keep developing this setup and incorporate more of the features and functions made possible with micro controllers and awesome development tools like Arduino.


Ashiro (author)2016-08-01

Can this be used on an alkaline battery (alkaline can be recharged with a special charging circuit)? I'm wondering if this would be capable?

technovative (author)Ashiro2016-09-05

This setup should not be used on non rechargeables.

enrico.enry.98 (author)2015-11-11

Great. I really don't understand the necessity od D3. Can someone explain it to me ? Thanks


It isn't necessary, in fact I later decided to not use it and the circuit seemed to work better with the grounds tied directly together.

matsk (author)2013-08-25

To expand the scoop would be to measure the voltage and the temperature on the battery and log it to an SD card or just to the serial port.

Thom Kouwen (author)2013-06-19

Nice project, I normally just put 10V on a NiMH for a second, quite cruel now that I think about it, but it works. Since this is your first project, and I see you haven't used PWM, I think these two links will be quite helpful for learning the things Arduino can do:

Good luck!

technovative (author)Thom Kouwen2013-06-19

Thanks, manually pulsing voltage to a battery above that which it is rated for can indeed help stimulate it to take a charge. I appreciate the suggestion of using PWM, and the URL's. I used the analogWrite function in my first sketch, it didn't produce the result that I wanted, I realize now it was due to error. I understand that using the delay function limits the other functionality that can be added to the loop. However if the Arduino is just being used as a trigger source for the charge circuit, I like the simple versatility of the digitalWrite and delay functions.

Thom Kouwen (author)technovative2013-06-19

It is indeed a simple system, but it actually also a kind of PWM, it's just at a low frequency. If you want to PWM in frequencies other then the standard 500Hz, check out this link: . With this you can set your PWM to a whole range of frequencies, even 30Hz is an option.

Good luck with your future Arduino Projects!

About This Instructable




Bio: Exploring the cosmos one synapse fire and one mouse click at a time.
More by technovative:ScrapPi - Upcycled Media HubDoor Triggered Automatic Light SwitchWireless Guitar Distortion with a Cordless Phone
Add instructable to: