Introduction: Restore Batteries With Arduino

About: Fascinated by the cosmos, consciousness, and the space between. Compelled to learn, conceptualize, problem-solve, and create.

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.

Fix It Contest

Participated in the
Fix It Contest

Arduino Contest

Participated in the
Arduino Contest