Introduction: DIMP 2 (Desulfator in My Pocket 2)

Mikey Sklar designed the DA PIMP 2 ("Power In My Pocket 2") based on George Wiseman's paper "Capacitive Battery Charger" and generously released it to the open hardware community back in 2014.

It is capable of charging and desulfating/rejuvenating just about any rechargeable battery of any type, so long as the battery is not totally unrecoverable.

For more info on Mikey's DA PIMP 2:

After eagerly waiting for Mikey to release DA PIMP 3 for a long while, I decided to design my own with a focus on safety and voltmeter accuracy and call it DIMP ("Desulfator In My Pocket") version 1.

However, after communicating with some fans of DA PIMP 2, it seems that there is a preference for the all-in-one desulfator + voltmeter design of DA PIMP 1 and 2, so I have designed DIMP version 2 with an integrated voltmeter.

Here are the differences between Mikey's DA PIMP 2 and my DIMP 2:

  • Switched to four-digit LED display
  • Rewrote voltmeter code on ATMEGA48V-10PU for four-digit display and improved accuracy at the low end (note that you may have to adjust the calibration values in the open-source source code depending on the actual values of your resistors R1 and R2)
  • Replaced rare Schurter rocker switch with commonplace OMRON A8L rocker switch
  • Replaced dangerous jumper headers (used to select current output) with C&K L202 slider switches
  • Increased max power rating for R1 resistor
  • Changed diode bridge from round to D3K rectangular package
  • Reduced fuse cartridge size to 5mm x 15mm 2AG
  • Reduced PCB width to 61mm to fit soap box case
  • Increased PCB length to 97mm to fit the slider switches and extra display resistor
  • Moved 9V battery so that it will fit better vertically under the soap box's domed lid
  • Added J5 and J6 strain relief holes for 9V battery leads
  • Added PCB mounting holes (J4 at top left is at 12.5mm,17.5mm from top left corner, J7 at bottom right is at -4.0mm,-4.0mm from bottom right corner) for 3D-printed housings with screw bosses

If you can solder with a low wattage pencil iron, you can assemble the DIMP 2. It takes about 1 to 2 hours to assemble.

DANGER: DIMP 2 exposes lethal voltages to the operator via the output leads. Do not buy or build or use DIMP 2 unless you take full responsibility for the safety of yourself and others nearby. Only adults with a proper understanding of the risks may attempt to use DIMP 2. I recommend that you do not buy or build a DIMP 2 if you have young children in the home, as they might plug it in and turn it on without knowing the dangers.

If you accept the lethal danger, here is how you build the DIMP 2.


The PCB by itself is here, sold in ProtoPacks (1 Protopack = 10 +/- 1 PCBs). When you order, change the Size to max 10 x 10 and the Thickness to 1.6mm.

You can also change the PCB color. Keep the other settings unchanged (FR4 proto, 2 layer, HASL coating, 1oz copper, no stencil).

(If you have questions or problems with your PCB order, please contact the seller DirtyPCBs for help.)

You are welcome to sell the spare PCBs on ebay if you like.

Very occasionally I sell the PCB with pre-programmed ATMEGA48V-10PU AVR chips on ebay. Set up a Saved Search for "DIMP 2" on ebay if you want one of those, but it could be a long while before I buy a batch of AVR chips and bulk-program them.

The BoM is here:

Mouser no longer sells the ATMEGA48V-10PU, so it has been removed from the BoM above. See below for substitutes.

If you have to program a blank ATMEGA48V-10PU, I have written an Instructable about using a Raspberry Pi and the free open-source avrdude command to program the chip:

You don't have to use a Raspberry Pi to program the blank ATMEGA48V-10PU--you can use any USB-to-SPI programmer and software that supports AVR chips.

Please note that the BoM does not include the output leads because I was not able to find them at Mouser. You will have to source them elsewhere. It is very easy to find fully-assembled Y-cables with a 5.5mm x 2.1mm DC barrel plug and a pair of red and black alligator clips on ebay from various Chinese sellers for under USD$3. When buying, just be sure the wire gauge is thick enough to handle 5A of current and that the insulation on the alligator clips is good.

For auto or marine batteries you will have to assemble your own output leads by replacing the alligator clips with Mueller Kelvin clips, p/n BU-111-2 (red) and BU-111-0 (black) from Mouser or Digikey. They have nylon bodies and partially-concealed brass jaws and are much safer than all-metal plier-style clips. Obviously, you still must not handle the output leads while the AC mains are connected, but these nylon clips will reduce the chance of accidental shocks.

Also, you will need one soap bar case. They are made by The Bottle Crew and sold at Walmart in the travel items aisle under the Equate brand for about USD$1. Get the clear/translucent white one. The other colors make it too hard to read the warnings on the bottom of the PCB.


If you'd like to cut the BoM cost down or can't get a part in stock, here are a few possibilities:

  • SUBSTITUTION: The ATMega48V-10PU chip is currently hard to get. It should be possible to drop-in substitute the ATMega48-20PU with no modifications (the difference is that the ATMega48V-10PU is lower-speed and can run at a lower voltage than the ATMega48-20PU). I have not tested the ATMega48-20PU personally for this purpose, but I have done this drop-in substitution for other models in the ATMega and ATtiny series.
  • SUBSTITUTION: The C&K high-voltage slide switches SW1 and SW2 are p/n L202031MS02Q. Any C&K switch matching this part number pattern will fit, but it might require that you install them in the correct orientation because some are missing pins:

  • L#02##1MS02Q

  • The first # sign is either a 1 or a 2 for the number of poles. The ## after 02 is a two-digit code for the height of the actuator. Any actuator height is fine, in my opinion, even the ultra-short screwdriver-actuator with code 12.

  • Another possible substitution are switches that match this part number pattern:

  • L#01##1MS02Q

  • For example, this switch is about half the price of the original switch at Mouser: L10101MS02Q

  • It is also possible to wire up just about any SPST switch to the PCB with short jumper wires, but be careful--these are high voltage!

  • Finally, you could always solder in a short jumper wire in place of each switch to permanently select an output current. For 12V lead acid batteries and power tool batteries, it is almost always best to use the maximum current. I almost never use the middle current setting, and the lowest current setting is best for 3V or 1.2V lithium or NiCd or NiMH batteries.
  • SUBSTITUTION: The ALPS low-voltage slide switch SW4 is p/n SSSU012200 (6mm tall actuator, SPDT).

  • You can substitute ALPS switches with these part numbers: SSSU011700 (9mm tall actuator, SPDT), SSSU022400 (6mm tall actuator, DPDT), or SSSU022800 (9mm tall actuator, DPDT). They all fit in the same footprint and orientation doesn't matter.

  • Also, any SPST or SPDT switch with 3mm pin spacing could fit, but I strongly recommend you stick with the ALPS SSSU series because the soldered frame legs make the switch much sturdier.
  • TOTALLY OPTIONAL: J3 is a 2x5 pin header for programming the ATMega48. It is p/n 5-146254-5 on the BoM.
  • OPTIONAL: the two squares of 3M adhesive foam tape
  • OPTIONAL BUT RECOMMENDED: The DIP socket is optional in that you can solder the ATMega48 directly to the PCB, but be aware that you can damage the ATMega48 with too high heat or static electricity.
  • OPTIONAL BUT RECOMMENDED: The J1 AC power inlet p/n 770W-X2/10 isn't necessary if you solder the AC power cord directly to the PCB. This would allow you to use a cheaper AC power cord with bare wires on the end or salvage a 2-prong power cord from a broken appliance or extension cord.
  • OPTIONAL: The 9V battery can be removed from the BoM if you already have 9V batteries in hand.


  • soldering iron with fine conical tip and optional medium conical tip (A fine tip helps with the DIP socket and LED display and a medium tip helps with the AC input port and the DC barrel jack, but you can do this all with either fine conical tip or medium conical tip.)
  • paste or liquid solder flux
  • solder
  • wire cutters or flush cutters
  • 3/8in drill
  • hobby knife with triangular blade
  • sharp scissors
  • labelmaker or permanent marker or paint pen

Step 1: Gather All Parts, Test Fit the PCB in the Case

Check to make sure you have all the parts before you start.

Test fit the PCB into the soap bar case to get an idea of where it will go and where the holes will have to be drilled in the left side of the case (the side with the hinge). It should fit fairly loosely if you got the soap bar case with THE BOTTLE CREW embossed on the bottom (sold at Walmart under the Equate brand). Other soap bar cases might be too small for the PCB to fit. I advise against sanding or filing the PCB to fit.

If you have a 3D-printed case you can make sure the mounting holes line up with the bosses. Before 3D-printing a case, be aware that DIMP version 2-02 has the rocker switch and slider switch moved slightly to the left from the original DIMP version 2-01 so that there is a little more room to operate the actuator on the slider switch.

Before heating up your soldering iron, install the fine conical tip first if you have both fine and medium conical tips.

We'll start with the smallest components and work towards the larger components, and when possible, we'll start from the middle of the board and work towards the edges.

Step 2: Solder the Diode D2

Observe Electrostatic Discharge (ESD) precautions when handling the diode.

Carefully bend the legs of the diode to fit the holes. D2 is located near the bottom right corner of the PCB.

Note the stripe at the cathode end of the diode and insert it through the PCB with the stripe end on the left, nearer the slide switch SW4. The non-stripe anode end should be nearer the right edge of the PCB.

Solder the wires quickly to avoid burning the diode and clip the excess leads off.

To save yourself some trouble later on, I recommend testing the diode with a multimeter after soldering it. If you accidentally burnt it, it will show infinite resistance in both directions.

Step 3: Solder the Display Resistors R3, R4, R5, and R6

UPDATE: The BoM at Mouser now has four 115 ohm resistors rather than the original four 300 ohm resistors. You can substitute any resistor value down to 75 ohms but no lower than that, with lower values producing brighter display segments. 120 ohm resistors are the brightest safe value (for display longevity); 115 ohms is close enough and Mouser sells them individually. I am currently testing 100 ohm resistors, and they seem to work fine with a nice bright display visible under bright indoor lighting but not in bright outdoor sunshine.


Find the four 115 ohm resistors for the LED display and solder them. They are located together near the top edge of the PCB.

There is no special alignment, so just gently bend the leads, insert them through the PCB, solder, and clip the excess leads off.

Step 4: Solder the Voltmeter Resistors R1 and R2

R1 and R2 are the voltage divider for the voltmeter.

Make sure you know which one is which based on their values. If either one were to be swapped accidentally with any of the resistors in this project, you will permanently damage your ATMEGA48V-10PU.

R1 is 24.9k ohms and R2 is 470 ohms. Use a multimeter to double-check the values so that you know for sure which one is which.

R1 = 24.9k 1% = red - yellow - white - red - brown

R2 = 470 ohms 1% = yellow - violet - brown - brown OR yellow - violet - black - black - brown

Solder them into their respective spots, which are located near the upper left side of the PCB and clearly marked R1 and R2.

Clip off the excess leads.

Step 5: Solder the DIP Socket

Make sure you locate pin 1 on the DIP socket before fitting it into the PCB. The half-circle notch indicating pin 1 should be placed at the right edge of the PCB. This is important, so double-check it before soldering.

Once you are confident it is aligned properly, go ahead and solder pin 1 and pin 15 (at the opposite corner, diagonally across the socket). Be quick about it--you don't want to melt the plastic socket by holding the iron in place too long.

Then, quickly solder all the other pins.

Step 6: Solder the LED Display

Follow ESD precautions when handling the LED display.

The LED display is located at the top right corner of the PCB and can only fit in one way due to the missing hole for the missing pin 10.

Do not hold the soldering iron too long to any pin, as you will damage the display by overheating it.

Fit it through the PCB and then very quickly solder pin 1 (near the bottom left corner of the display). Make sure the LED display is not crooked and then quickly solder pin 9 (near the top right corner of the display). Double-check the display's alignment. You can adjust the alignment by re-melting pin 1 or 9 and pushing the display in the direction you want before the solder melts.

Solder the remaining pins very quickly.

After these pins are soldered, clean off any flux residue anywhere on the PCB.

Step 7: Optional: Solder the 2x5 Male Header at J3

This step is optional. If you wish to flash firmware to your DIMP 2 via In-System Programming (ISP), install J3 for your In-Circuit Serial Programmer (ICSP). Otherwise, you can leave it out or install it later.

There is no particular alignment of the header; pin 1 is always at the top right corner nearest the corner of the PCB with the LED display.

Do not touch the metal pins with your bare fingers when holding the header in place. The soldering iron will quickly heat the metal pins up hot enough to burn you.

Be very quick when soldering so as to not melt the plastic header base.

Step 8: Align and Solder C4 and C5

Be careful with this step.

First of all, the small aluminum electrolytic capacitors have very thin leads that can be broken easily, and second, polarity matters!

First, look at the markings on each capacitor and find the minus/negative stripe on one side. That side should also have the shorter lead.

Then look at the PCB at C4 and C5's silkscreens. Each one is a circle that has one half filled solid white. This side is the negative side, and the striped side of the capacitor with the shorter leg should go on this side.

The two capacitors are mounted back to back, with the striped sides nearer each other. The longer leads will thus be on the outside.

Check and double-check the polarity before soldering.

When done, clip off the excess leads.

Step 9: Switch Tips on the Soldering Iron

If you have the medium conical soldering iron tip, now is the time to switch over.

If you don't, then skip this step.

Shut off your soldering iron and allow it to cool fully.

Remove the fine conical tip and install the medium conical tip.

Turn on the iron and let it warm back up.

Tin and clean the medium conical tip.

Step 10: Solder the Diode Bridge

Observe ESD precautions with the diode bridge.

Locate the diode bridge's pin 1. It should have a tiny + (plus) sign etched right above it.

D1 is a D3K package. It's asymmetrical with the pins on the back side. Look for the semicircular notch on one side to locate pin 1. This notch will be present at pin 1 even if the + sign is missing.

Locate the square pad for pin 1 on the PCB.

Insert the diode bridge through the PCB and double-check the alignment.

This step is crucial because you will damage or destroy any battery attached to the completed DIMP 2 if the diode bridge is reversed.

Triple-check the alignment just to be safe. If you have a multimeter with diode measurement mode, use that to verify the bridge is installed correctly (see the schematic to identify the four diode legs of the diode bridge).

Solder the pins quickly and clip off the excess leads.

Step 11: Solder the Linear Voltage Regulator

Observe ESD precautions for the linear voltage regulator.

The linear voltage regulator also has a specific alignment.

Locate pin 1 on the regulator by putting the side with the heatsink "fin" away from you. The fin is the part that has the hole for a screw to attach a heatsink to the back. The tiny text etched on the front of the regulator should be facing you. Pin 1 will be on the left and will go into the square pad at U2 on the PCB.

Confirm the orientation by noting that the silkscreened footprint has a cross-section of the heatsink fin and its hole. The fin of the regulator should be above the silkscreen of the fin, nearer the LED display. The text on the front should be nearer the capacitors C4 and C5.

Note that I decided to gently bend the legs on the regulator so that it tilts back a bit. This makes it somewhat easier to reach the actuator on the slider switch. You do not need to do this, and if you bought a regulator that has a heat sink attached, it might not be possible to tilt it back.

Clip the excess leads when done.

Step 12: Install the Fuse Holder

First, take the two fuse clips and a single fuse and put the fuse clips on the ends of the fuse as pictured. One side of each fuse clip is open and can simply slide over the end of the fuse. If you have to use force, you might have the fuse clip turned around backward.

The four legs will be pointing downwards. You may need to adjust the spacing of the fuse clips to get the legs to line up with the PCB's four holes. Note that it is fairly easy to accidentally bend the legs, so be very gentle.

Beware that holding the fuse clips in place with your bare fingers will get them burned when you solder them. But, because the fuse cartridge is glass, you should not use pliers to hold it in place. I recommend wearing a cotton oven mitt or using tweezers to hold the fuse clips in place while soldering.

Carefully insert the legs through the PCB and solder them when done. The solder joint must be a strong one with a shiny bead surface (the solder flux will help with that). You want the fuse clips to be rock solid for future fuse cartridge replacements.

Step 13: Solder the Output Jack J2

Optional: put a small dab of hot glue or epoxy under the output jack, taking care not to get any adhesive on the solder pins or the solder pads.

Quickly insert the output jack's three pins through the PCB before the glue dries and align it so that the jack's opening face is flush with the edge of the PCB.

Solder the pins, making sure that each joint is a strong, shiny bead. It may take a few tries to fill the large holes with solder, but you can't dawdle too long, as the jack's body is plastic and will melt.

Step 14: Solder Slide Switches SW1 and SW2

Let's start with slide switch SW1.

On the bottom of SW1 are two plastic feet with an off-center notch cut in each foot. The notches are closest to pins 1 and 3. Ignore the number that might be molded on the bottom of the switch. It does not appear to be a pin number.

Solder as quickly as possible to avoid melting the plastic parts inside the switches.

Match the notches up with the printed notches on the silkscreen on the PCB. It's a good idea to solder pin 1 first, then the opposing corner, and adjust to make sure the switch is not crooked.

Solder the remaining pins.

Repeat these steps for SW2.

Step 15: Solder Capacitors C1, C2, and C3

Insert C1's leads through the PCB and solder it in place, then clip the excess leads. There is no polarity to observe.

Do the same for C2 and C3.

Step 16: Glue and Solder the AC Power Inlet J1

Because the AC power inlet is designed to snap into 1.4mm thick PCBs and this is a thicker 1.6mm PCB, the snaps will not engage.

Get some hot glue, apply it to only the plastic snaps on the inlet (not the solder pins), then quickly insert the inlet into the holes and press it flush with the PCB. If you don't have hot glue, get some super glue and insert the inlet into the PCB holes, then put a dab of super glue on each of the plastic snaps.

Do not solder it yet. Let the glue dry, then solder the two solder pins.

Make sure the joints are strong and shiny beads. The AC power inlet gets a lot of torque exerted on it when the AC power cable is plugged in.

Step 17: Solder the Rocker Switch SW3

Look for the 0 (off) and | (on) markings on the top and for the pin numbers on the side of the rocker switch SW3.

Align the switch with the silkscreen on the PCB. The | (on) side should be up, nearer the capacitors C1, C2, and C3. The 0 (off) side should be nearer the bottom edge of the PCB.

Solder pin 1, then check to make sure the switch is not crooked.

Solder the remaining three pins.

Step 18: Install Slide Switch SW4 and Solder Only Its Mounting Pins

Slide switch SW4 is a bit challenging because it has three tiny pins and two large metal mounting pins.

At this point you should still have the medium conical tip installed on your soldering iron. We'll need it to solder the mounting pins first.

Carefully insert the switch through the PCB. The PCB has six holes so that it can handle the switch in either direction.

Solder quickly so as to not melt any of the plastic parts inside the switch.

Solder only the two large mounting pins. Make sure the solder joint is a shiny bead. This switch will undergo quite a lot of use, more so than the rocker switch.

Step 19: Switch to the Fine Conical Tip on Your Soldering Iron

If you have a fine conical tip for your soldering iron, now is the time to switch over. If not, skip this step.

Step 20: Solder the Three Tiny Pins on SW4

Finish soldering slide switch SW4's three tiny pins. Be quick so as to not melt the plastic inside the switch.

Step 21: Install and Solder the 9V Battery Clip

This step seems a bit complex but is actually pretty easy.

You'll be threading the 9V battery clip leads through the two strain relief holes J5 and J6 in an S shape. It has to be done in a certain way.

First, decide whether you will be cutting the leads shorter. If you keep them long, you can flip the battery around with the snaps near the LED display. It also gives you a bit of leeway in the future if you accidentally pull the 9V leads too hard and break them off.

If you decide to cut the leads shorter, cut them in half to 7.5cm (measure only the wire leads, ignore the snap cap), then strip about 3mm of insulation and tin the tips.

If you decide to leave the leads longer, cut them to 12cm. I decided to leave them long, as you will see in the photos.

From the top of the board, insert the red and black leads down through hole J6 so that the black lead is on the right, nearest the right edge of the PCB.

Make sure this is right before proceeding.

Then, from under the board, insert the two leads up through hole J5 so that the black lead is nearer the edge of the PCB (this will avoid crossing the leads over each other).

Insert the red lead through the square, left-hand pad of BT1 marked with a tiny + (plus) sign.

Insert the black lead through the round, right-hand pad of BT1 that is marked with a tiny - (minus) sign and nearer the edge of the PCB.

Double-check that the red lead does in fact go through the square, left-hand pad of BT1 that is marked with the plus sign. Getting these two leads swapped might damage some components.

Solder the leads on the underside of the board.

Step 22: Clean Up Solder Flux Residue

All the soldering is done now.

You should clean all the solder flux residue off unless you are using no-clean solder flux.

I use 99% isopropyl alcohol and a small nylon-bristle brush (similar to a toothbrush but with tougher bristles).

Take the opportunity to make sure everything is soldered firmly in place.

Step 23: Turn Off SW4 and Install the 9V Battery

IMPORTANT: turn off SW4 by sliding its actuator down, away from the LED display.

If you have double-sided tape that is normal strength and not the small square of 3M double-sided foam tape that is in the BoM, put a small piece on the PCB where the 9V battery would go. If you have plain old single-sided tape, you can fold it over on itself with the sticky side out.

The small square of 3M double-sided foam tape will be used in a later step to mount the PCB to the soap bar case.

The point is to keep the 9V battery from flopping around in the soap bar case, not to permanently attach the 9V battery.

Attach the 9V battery to the snaps, observing the polarity.

Double-check the 9V battery's polarity and the snaps.

Do not stick the 9V battery to the PCB using the tape yet.

Step 24: Test the Linear Voltage Regulator Circuit

Before inserting the ATMEGA48V-10PU into the DIP socket, we'll check to make sure that the linear voltage regulator is providing a clean 5V to the Vcc pin on the socket.

SW4 should be turned off (actuator slid down, towards the bottom edge of the PCB).

Get a multimeter in voltmeter mode and put the test probes on pin 20 (Vcc, red) and pin 22 (GND, black).

Pin 20 is the sixth pin from the bottom left corner of the DIP socket.

Slide switch SW4 to the on position (up, towards the LED display).

The voltage should measure +5.05VDC with a fresh 9V battery.

Once you have verified this, we can safely install the ATMEGA48V-10PU in the DIP socket without fear of damaging it.

If the voltage you measure is not +5.05VDC, check the diode first. I managed to destroy mine while soldering it. Then check the orientation of the linear voltage regulator and capacitors C4 and C5.

Turn off SW4 and remove the 9V battery from the snaps. We don't want the battery in the way for the next step.

Step 25: Install the ATMEGA48V-10PU in the DIP Socket

WARNING 1: Observe ESD precautions when handling the ATMEGA48V-10PU.

WARNING 2: The legs of the ATMEGA48V-10PU are very fragile. Be careful and gentle through this entire step. Breaking even a single leg could mean breaking the chip.

The ATMEGA48V-10PU might come with its pins pre-bent or not.

Take a look at them and see if they are straight--they will angle outward from the body if so.

If they are pre-bent, they will curl slightly under the body.

If your chip's legs are not pre-bent, very gently use the tabletop and press the legs into the table to bend them all together. Bend both sides slightly inward.

Then, find the tiny dot indicating pin 1 or the semi-circular notch on the top of the chip and align it towards the end of the DIP socket that has the semi-circular notch cut out.

Press the chip gently down into the socket, applying pressure evenly to the entire chip so as to not tilt the chip and thus bend the legs.

Step 26: Cut the Excess Leads Off Slide Switches SW1 and SW2

This step is only necessary if you are using the soap bar case as a housing.

If you are using a 3D-printed case, skip ahead.

Using diagonal flush cutters, cut about 1mm off the tips of the pins on slide switches SW1 and SW2. This will allow the PCB to sit lower, parallel to the bottom of the case.

Step 27: Prepare the Housing for Jacks J1 and J2

This step is only necessary if you are using the soap bar case as a housing.

If you are using a 3D-printed case, skip ahead.

Get the two squares of 3M double-sided foam tape. Leave the protective film on only one side of the tape, then cut each square in half. Then, stick each half to the other half. The goal is to make the tape twice as thick. When you are done, you will have two half-squares that are 1/8in. thick.

Leaving the protective film on the upper face, stick each half-square of tape in the bottom of the case, one at the center top and one at the center bottom as pictured. The PCB will essentially be suspended slightly above and across the ribs on the bottom of the case.

Place the PCB in the soap bar case with the jacks J1 and J2 facing the hinge, pressed up against the spine of the case.

With a marker, draw the outlines of the jacks where you would drill through the spine of the case.

Remove the assembled PCB from the case.

Carefully drill the holes and file or Dremel away any material that would block the insertion of the input or output leads.

Place the assembled PCB into the soap bar case and double-check the holes in the spine.

If needed, remove the PCB and enlarge the holes so that there is enough clearance around the jacks to easily insert the input and output leads.

Clean all the plastic flashing off using an XActo knife with triangular blade or something similar.

Place the assembled PCB into the soap bar case without removing the protective film from the double-sided tape. You'll be doing low-voltage testing in the next step.

Step 28: Test the Voltmeter Circuit Alone

If you do not have a pre-programmed ATMEGA48V-10PU chip installed, now is the time to program it. I have written an Instructable showing how to use a Raspberry Pi to do the programming here:

Do that and then return to this step.

If you do have a pre-programmed ATMEGA48V-10PU chip installed, please proceed with testing it:

First, make sure that the PCB is safely inside its housing and the AC power cord is not attached in any way to the DIMP 2.

Second, make sure the rocker switch SW3 is turned off (0).

Third, make sure the fuse is still installed.

Turn on SW4 by sliding the actuator up, towards the LED display.

You should immediately see 00.00 on the LED display.

IMPORTANT: turn off SW4 now!

Find a known-good battery with a voltage of 20VDC or less and check its voltage with a separate multimeter. Note this voltage.

Insert the output leads for the DIMP 2 into output jack J2, then attach the clips to the battery, carefully observing the polarity. The red output lead goes to the positive (+, red) terminal of the battery, and the black output lead goes to the negative (-, black) terminal of the battery.

Double-check the output leads and make sure the red lead is really going to the positive terminal of the battery and the black lead is really going to the negative terminal of the battery.

After you are sure the leads' polarity is correct relative to the battery, turn SW4 on. You should see the LED display read a voltage somewhat close to the voltage of the battery measured earlier.

Remove the known-good battery. You are ready to test the desulfating circuit on a battery that needs desulfating.


This step is more important than it seems.

Because you don't know who might pick up and plug in your DIMP 2 in the future, be sure to make or buy at least one warning label that says at least these words:



The word DANGER is mandatory. It signifies that death can and will occur if the device is mishandled. The word LETHAL is strongly recommended for the same reason.

You could use LETHAL VOLTAGE or HIGH VOLTAGE or some equivalent that indicates that the DANGER is from the high voltages exposed to the user and persons nearby.

If you speak and write a different language than English, please add the equivalent warning in your own language.

If you cannot buy or make such a label, get a red permanent marker or red paint pen and write the DANGER warning on the soap bar case so that it can easily be seen and read.

Be sure to do this step! It might save the life of a family member or friend, so be sure to overcome all laziness and just do it now!

Step 30: Permanently Adhere the PCB to the Case

This step is only necessary if you are using the soap bar case as a housing.

If you are using a 3D-printed case, skip ahead.

IMPORTANT: Avoid covering any of the warning labels printed on the bottom of the PCB so that users can still read them. It might save their life.

Remove the protective film from the two stacks of double-sided tape and firmly adhere the assembled PCB to the inside of the soap bar case. Let the tape get a solid bond with the PCB and check that it stays put.

This is because the solder joints under the PCB will have lethal voltages on them, and you do not want the PCB popping out of the case.

Step 31: Simplified Description of the Desulfating Process

DANGER: This step involves testing with lethally high voltages.

IMPORTANT: Always wear protective gear and keep a fire extinguisher nearby when actually desulfating/charging batteries. You do not know whether the batteries might suddenly off-gas or catch fire (especially lithium-based batteries). This may result in caustic or flaming material striking you.

Wear safety glasses or goggles and thick rubber or fire-resistant gloves (mainly to prevent a lethal shock from traveling through your chest through both hands, but also to handle acid splashes).

Read the warnings on the top and bottom of the DIMP 2's PCB and make sure you understand the risks before continuing.

These are the general steps for safely using the DIMP 2 for one charge-rest cycle, start to finish:

  1. Place the DIMP 2 and the battery on a fire-resistant, non-conductive, stable surface where it can rest safely for the entire duration of the charging/desulfating.
  3. Set the two slider switches based on the current needed to charge the battery. For the lowest current (for AA batteries), slide both switches left (with the DIMP 2 oriented so that the LED display is at the top right corner). To increase the current to medium, slide one of the two switches right. To increase the current to maximum (for most power tool batteries and car batteries), slide both switches right. It is generally better to use less current (and thus take more time per cycle), so if you have the option to do so, use less current.
  4. Insert the output leads into the DIMP 2's output barrel jack.
  5. Attach the output leads to the battery, making sure the black lead goes to the battery's negative terminal and the red lead goes to the battery's positive terminal. Reversing the leads will result in damage to the battery and possible fire/explosion/personal injury.
  6. Turn on the slider switch and observe the voltage of the battery.
  9. Plug in the AC input cable into the DIMP 2 and then into the wall.
  10. Turn on the rocker switch and watch the voltage change slowly. It should not change by much or very quickly due to the speed of the pulsing versus the averaging of the voltmeter.
  11. If the voltage jumps way up and doesn't come down, the battery is almost certainly totally unrecoverable. A moderately sulfated/passivated battery should jump up quickly, then drop down almost as quickly under its nominal voltage, then gradually rise as it charges/desulfates. A badly sulfated battery will jump way up immediately and then take longer to drop down (hours or even days) towards the nominal voltage of the battery. This is because if the sulfation/passivation is really thick, it takes a long while to "chip away" at it with the pulsing.
  12. Monitor the battery temperature and the voltage as it continues charging/desulfating. Heat is bad for your battery. Lithium batteries must be monitored constantly, as they can enter thermal runaway and catch on fire. ALWAYS KEEP A FIRE EXTINGUISHER READY WHEN CHARGING/DESULFATING LITHIUM BATTERIES. Lead acid batteries can off-gas and shoot acid out their vents--you want to avoid this by turning down the current. Some clever guys have used ice packs (the kind that you can buy at a pharmacy that comes in a cloth pouch) or coolant baths (non-conductive liquid!) to keep the battery cooled. You can also buy thermostats that have a temperature probe you can attach to the battery and that turn off the AC mains when the temperature hits the threshold you set (set it slightly above room temperature).
  13. Turn off the rocker switch when the voltage reaches about 110% of the nominal voltage. NiCd and NiMH battery packs for power tools typically take about 15 minutes to half an hour to reach this point. Lithium batteries charge quickly but vary widely depending on capacity. Lead-acid batteries take the longest, often hours. The voltage should drop and then find a steady value. If this value is above the nominal voltage, you are done and can continue with the next step. If the voltage drops below the nominal voltage, you can try another pass this cycle, but it is possible that the battery cell or battery pack might not be completely recoverable.
  17. Then, double-check that the rocker switch is still off.
  18. Remove the output leads from the battery.
  19. Remove the output leads from the DIMP 2's output barrel jack.
  20. Allow the battery to rest before attempting another cycle. Rest periods are crucial so as to not do permanent damage to the battery by overheating it, AND resting allows the charge to spread evenly throughout the battery.

There are much more detailed instructions out there on how to best charge and maintain the different battery chemistries. I've only provided a highly-simplified set of instructions per charge-rest cycle. I encourage you to search and read more on the topic of desulfation/depassivation so that you get the best results.

Step 32: Troubleshooting the DIMP 2 Itself

This is a short, non-exhaustive list of potential problems.

BEWARE: Capacitors C1, C2, and C3 can contain high voltages capable of giving you a nasty shock. Do not touch the underside of the PCB unless you are sure they do not have high voltages stored in them. You can discharge them by putting on rubber gloves and shorting a wire across each capacitor's two pins.

Displayed voltage is obviously incorrect.

Usually this is due to a weak 9V battery. Try a fresh battery that is definitely 9V or higher. Rechargeable 9V batteries often quickly drop below the voltage required to operate the circuit.

Displayed voltage is 00.00 all the time.

This is probably due to loose output leads.

Do not handle the output leads without first turning off the rocker switch and also unplugging the AC input cord from the AC mains!

It could also be that resistor R1 is toast. With the DIMP 2 completely turned off and disconnected from AC mains and the battery, check the resistance of R1. It should be about 25k ohms.

Desulfating doesn't seem to be working--the displayed voltage doesn't change.

This is probably due to a loose AC input cable in the AC power inlet or a blown fuse. You can blow the fuse if the battery is shorted out inside (and thus completely unrecoverable) or if you accidentally short the output leads together or if you accidentally reverse the output leads on the battery terminals.

Do not handle the output leads or fuse without first turning off the rocker switch and also unplugging the AC input cord from the AC mains!

Do not handle the AC input cable without first turning off the rocker switch!

If the fuse blows while you are operating the DIMP 2.

STOP. FREEZE IN PLACE. Then move slowly and deliberately (in other words, do not suddenly grab anything, or you might experience a lethal shock). Put on rubber gloves if you are not already wearing them (you should be!) Turn off the rocker switch first, then unplug the DIMP 2 from AC mains. Then, disconnect the output leads from the battery. At this point, you may start to diagnose the cause of the blown fuse.

Integrated voltmeter doesn't turn on.

There are several possible causes for this problem.

If you have a blank ATMEGA48V-10PU installed, it will result in a blank display, and you will need to program it. If you have a pre-programmed ATMEGA48V-10PU installed, proceed as follows:

Check the battery first and make sure it is around 9V and connected securely.

Carefully remove the AVR chip and check to make sure that approximately +5VDC is at pin 20 on the DIP socket, relative to ground on pin 22. If not, then you may have a bad ALPS slider switch, blown linear voltage regulator, blown diode, a broken wire on the 9V battery snap connector, or bad solder joint somewhere. Diagnosing this further is up to you. The AVR chip might also be damaged if the diode or linear voltage regulator is blown.