Convert a Dead UPS Into a Battery Charger

by Ramatronics Laboratory in Circuits > Electronics

98 Views, 1 Favorites, 0 Comments

Convert a Dead UPS Into a Battery Charger

WhatsApp Image 2025-06-11 at 5.19.58 PM.jpeg
ups_circuit_bottom.jpeg
ups_circuit_top.jpeg

In this project, I will explore how to repurpose an Uninterruptible Power Supply (UPS) into a dedicated battery charger. A UPS is commonly used to provide backup power during outages, but it also contains powerful circuitry that can be effectively modified for charging lead-acid batteries. By understanding the internal design of the UPS, such as its inverter stage, transformer, and control logic, we can modify the power flow to create a smart and efficient battery charging system. In many YouTube videos, I have seen some creators demonstrating modifications where they open the parallel connections of wires used in the transformer's primary winding. However, I do not recommend doing this. Altering these original windings can permanently damage the transformer, making it unusable for future projects. It's always better to find safer and reversible methods when repurposing components like transformers.

This project not only promotes electronic recycling and cost-saving but also provides a hands-on way to learn about power electronics, transformer behavior, and charging algorithms. This conversion can be an excellent DIY upgrade for both hobbyists and engineers.

Go through the following steps one by one.

Supplies

ups_circuit1.jpeg
UPS Transformer.jpeg
12V Lead Acid Battery.jpeg

Required Parts

  1. Computer UPS main board
  2. Computer UPS transformer
  3. 12V sealed lead-acid battery

Necessary Tools

  1. Screwdriver
  2. Soldering iron
  3. Soldering wire
  4. Soldering flux
  5. Solder wick (for removing excess solder)
  6. Jumper wires
  7. DSO138 Digital Storage Oscilloscope Kit (for waveform analysis and signal testing)

Remove the Dead Microcontroller IC

ups_circuit3.jpeg

Begin by removing the non-functional microcontroller IC from the UPS circuit board.

  1. If the IC is in a DIP (Dual In-line Package) form, you can easily desolder it using a soldering iron and solder wick.
  2. If the IC is in an SMD (Surface-Mount Device) package, use a hot-air soldering station for safe and efficient removal.

Once the IC is removed, carefully clean any excess solder from the pads using solder wick and flux. At this point, your UPS board should look similar to the reference image.

Find the H2907A PNP Transistor

ups_circuit8.jpeg

On this UPS board, there is a PNP bipolar power transistor that functions as a series voltage regulator. Its primary role is to provide a constant 12V DC supply to the following sections of the circuit:

  1. MOSFET driver circuits
  2. PWM charging pulse generator (e.g., UC3843AN)
  3. Relay control circuitry
  4. Buzzer/alarm circuit

This transistor ensures the stable operation of these sections even when the input voltage fluctuates.

You can easily identify this component on the board—it is a Through-Hole Technology (THT) device in a TO-92 package. In the provided image, I have highlighted it by drawing a red circle around the component.

Activate the Power Supply Circuit for Charging

ups_circuit5.jpeg

On the UPS board, there is a PNP bipolar junction transistor (BJT) labeled H2907A. This transistor plays a crucial role in supplying a stable +12V DC to key components such as the MOSFET driver circuits, relay, and the UC3843 charging controller IC.

To enable battery charging, it's essential to keep the MOSFET drivers and charging controller IC powered. This means you must ensure the H2907A transistor remains ON.

Since H2907A is a PNP BJT, it turns on when the base-emitter voltage (V_BE) is approximately -0.7V (i.e., the base is about 0.7V lower than the emitter).

In the UPS circuit:

  1. The emitter of H2907A is connected to the positive terminal of the battery (+12V).
  2. The base is connected to the collector of an NPN BJT (PMBT2222A) through a 1kΩ resistor.
  3. This 1k resistor is used to limit the base current of the PNP transistor.

To force H2907A into conduction and turn on the 12V supply rail:

  1. Connect the base resistor (the end connected to the collector of the NPN BJT) directly to ground (GND).
  2. You can do this by soldering a jumper wire as shown in the reference image.

This modification will permanently turn on the PNP transistor, thereby ensuring the +12V supply is active and the battery charging circuit is operational.

Check 12V DC Supply of MOSFET Drivers and UC3843 With a Multimeter

testing voltage.jpeg

Check the DC Supply of the First Half-Bridge

Verify that the first half-bridge circuit is receiving the required 12V DC supply.

Check the DC Supply of the High-Side MOSFET Driver

  1. Connect the red and black wires from the UPS board to the positive and negative terminals of the 12V battery, respectively.
  2. Set your multimeter to the DC voltage range.
  3. Connect the black probe to the negative terminal of the battery.
  4. Hold the red probe and touch it to the anode terminal of the bootstrap diode (e.g., 1N4148).
  5. If the voltage at this point is ≥ 12V, the high-side MOSFET driver is receiving a proper 12V DC supply.

Check the DC Supply of the Low-Side MOSFET Driver

  1. Place the red probe on the collector of the PMBT2222ASM transistor (labelled Q16 in my circuit).
  2. If the measured voltage is ≥ 12V, it confirms that the low-side MOSFET driver is also receiving the correct 12V DC supply.

Check the DC Supply of the Second Half-Bridge

  1. Repeat the same verification steps as used for the first half-bridge to ensure the second half-bridge also receives proper 12V DC.

Check the DC Supply of the UC3843AN IC

  1. The UC3843AN IC has 8 pins.
  2. Pin 7 is VCC, and Pin 5 is GND.
  3. Connect the red probe of the multimeter to Pin 7 (VCC) and the black probe to Pin 5 (GND).
  4. A reading of ≥ 12V indicates that the UC3843AN is properly powered.

Check the Charging Pulses Generated by UC3843 IC

charging pulses2.jpeg
charging pulses1.jpeg

In many computer UPS designs, charging pulses for the lower MOSFETs are directly generated by the microcontroller. However, in over 70% of UPS boards, a dedicated PWM controller IC UC3843AN is used for this task. The output of the UC3843AN appears on pin 6, which delivers the required PWM charging pulses.

To observe the duty cycle, frequency, and waveform of these pulses, I used a DSO138 oscilloscope kit. The waveform captured on pin 6 of the UC3843AN matches the images provided. The observed PWM frequency is 20 kHz, and the duty cycle varies from 10% to 30%, depending on the feedback voltage applied to pin 2 (VFB) of the IC.

For further verification, you can place the red probe of the oscilloscope or multimeter on the gate terminals of the two lower MOSFETs, one at a time. You will observe the same waveform as seen on pin 6 of the UC3843AN, but with a higher amplitude. This is because the MOSFET driver circuit boosts the signal level to ensure accurate and efficient switching of the low-side MOSFETs.

Connect the Transformer to the UPS Circuit

To configure the transformer for battery charging, follow these steps:

  1. Connect the low-voltage (charging) side of the transformer:
  2. Connect the red wire of the transformer to the spade terminal P1.
  3. Connect the blue wire to the spade terminal P2.
  4. Connect the high-voltage (AC input) side of the transformer directly to the AC mains (do not connect it to the UPS board):
  5. Connect the black wire to the neutral (N) of your 230V/50Hz AC supply.
  6. Connect the green wire to the line (L) of the AC supply.
  7. Special case – Low mains voltage:
  8. If your mains voltage is below 190V, the transformer may not charge the battery efficiently through the green wire.
  9. In this case, connect the blue wire (instead of the green wire) to the line (L) of the AC supply.
  10. The blue wire is internally tapped for better charging performance when the mains voltage is below 200V.

⚠️ Important: Make sure all connections are insulated and secured properly to avoid electric shock or short circuits. Always take necessary precautions while working with 230V AC.

Measure the Charging Voltage

ups_battery_charger1.jpeg

To measure the charging voltage:

  1. Disconnect the Battery:
  2. First, disconnect the red and black wires of the UPS board from the 12V battery.
  3. Connect the Multimeter:
  4. Connect the red and black probes of your multimeter to the red and black wires of the UPS board, respectively.
  5. Keep the Mains Supply ON:
  6. Do not turn off the mains supply during this step. The transformer should remain connected to AC power.
  7. Observe the Voltage Reading:
  8. If the voltage measured is in the range of 13.80V to 13.87V, the charging circuit is functioning correctly.
  9. This is ideal because the standard charging voltage for a 12V/7Ah sealed lead-acid battery is 13.80V, as also indicated on most battery labels.

Why the Mains Supply Must Remain ON After Battery Disconnection

The charging circuit requires a constant 12V DC supply to remain active. Here's why this is important:

  1. When the battery is disconnected and no other 12V DC source is connected, the H-bridge MOSFETs remain OFF.
  2. However, the body diodes of the MOSFETs, in conjunction with the transformer, form a full-wave rectifier.
  3. The output of this rectifier is typically only 7–8V DC, which is insufficient to power the UC3843AN IC, as it needs at least 12V DC to operate.
  4. Therefore, the charging circuit will not function unless the UC3843AN is powered.

To overcome this:

  1. Initially, connect the 12V battery to the UPS board. This allows the UC3843AN and the driver circuit to start operating.
  2. Once the charging process begins, the circuit generates a stable 13.80V DC (thanks to the transformer's leakage inductance and circuit design).
  3. At this point, you can safely disconnect the battery, and the charging circuit will continue to run, sustained by the generated 13.80V DC.

Important Note


This project is designed to work only with UPS boards that use a separate charging controller IC, such as the UC3843AN or NE555 timer, for generating the charging pulses.

If your UPS board uses the main microcontroller to generate the charging pulses instead, then this method will not be applicable.

But don’t worry! I will be creating another project specifically for those UPS boards that rely on the microcontroller for charging pulse generation. Stay tuned!

Watch the Video

Convert a Dead UPS into a Battery Charger | Step-by-Step DIY | E-Waste Recycling