12V, 2A Uninterruptible Power Supply


Please vote for me if you find this Instructable useful

What is a Uninterruptible Power Supply?

Extract from Wikipedia

"An uninterruptible power supply, also uninterruptible power source, UPS or battery backup, is an electrical apparatus that provides emergency power to a load when the input power source or mains power fails. A UPS differs from an auxiliary or emergency power system or standby generator in that it will provide near-instantaneous protection from input power interruptions, by supplying energy stored in batteries."

Note that a UPS is only a short term solution, and power availability will depend on the load connected to the UPS.

Why a 12V UPS?

Most modern electronic equipment in and around our homes rely solely on the utility power supply. When the power goes off, so does all our modern electronic equipment. There are some instances where this is undesirable, to name only a couple:

  • Alarm systems
  • Access control systems
  • Network connectivity
  • Telephone systems
  • Security / Emergency lights

All these systems usually operate on 12V, and can easily be connected to a 12V UPS.

Components of an UPS

A UPS consists of 3 parts:

  1. Transformer
  2. Regulated power supply
  3. Battery charger
  4. Back-up battery

I will go through each step, explaining how to build a reliable 12V UPS using no special components.

Teacher Notes

Teachers! Did you use this instructable in your classroom?
Add a Teacher Note to share how you incorporated it into your lesson.

Step 1: The Transformer

The 12V UPS uses an off-the-shelf, standard transformer, that is available at all leading security equipment suppliers. The transformer output should be between 16 to 17 V AC, and rated up to 3 amps. I always prefer to over design, so I will design this 2A UPS so that it is rated for a maximum of 3A.

Some suppliers have transformers already fitted into a enclosure, with added overcurrent and surge protection.

Step 2: The Regulated Power Supply

A UPS must be able to continuously supply the rated current at the rated output voltage, without relying on the back-up battery for assistance. So the first step will be to design a 12V power supply.

A good start will be to use the LM317 voltage regulator. Before we look at the current rating of the device, lets start with the regulated output voltage. Although we are all used to refer to a 12V system, it is in fact normally a 13.8V system. This voltage is the fully charged voltage of a standard SLA battery. So for all calculations, I will be using 13.8V.

To calculate the components values, refer to the LM317 datasheet. It states that:

Vout = 1.25 ( 1 + R2 / R1 ) + Iadj x R2

and that Iadj is typical limited to 50uA.

To start off, I chose R1 value to be 1Kohm, so

Vout = 1.25 ( 1 + R2 / R1 ) + Iadj x R2

13.8 = 1.25 ( 1 + R2/1K ) + 50uA x R2

13.8 = 1.25 + 1.25/10E3 x R2 ) + 50E-6 x R2

12.55 = 0.00125 R2 + 0.00005 R2

12.55 = 0.0013 R2

R2 = 9.653Kohm

But a value of 9.653Kohm is not a standard resistor value, so we will have to use multiple resistors to get close to this value. The best solution will be to place two resistors in parallel. Any two resistors in parallel, will always have a combined resistance LOWER than the lowest value resistor. So make resistor R2a 10Kohm.

1/R2 = 1/R2a + 1/R2b

1/9.653K = 1/10K + 1/R2b

1/9.653K - 1/10K = 1/R2b

R2b = 278Kohm

R2b as 270K

R2 = 9.643Kohm, close enough for what we need.

The 1000uf capacitor is not critical, but this is a good value. The 0.1uf capacitor reducing output voltage oscillations

We now have a 13.8V power supply, rated at 1.5 amp according to the datasheet.

Step 3: The Battery Charger

To use our power supply as a battery charger, we need to limit the charging current to the battery. The power supply can only provide 1.5 amps maximum, so the next step will be to look at the circuit with a battery connected to the output. As the battery voltage rises (charging), the charging current will reduce. With a fully charged battery of 13.8V, the charging current will drop to zero.

The resistor on the output will be used to limit the current to the rating of the LM317. We know the output voltage of the LM317 is fixed at 13.8V. An empty SLA battery voltage is around 12.0V. Calculating R is now simple.

R = V / I

R = (13.8V - 12V) / 1.5A

R = 1.2ohm

Now, the power dissipated in the resistor is

P = I^2 R

P = 1.5^2 x 1.2

P = 2.7W

Step 4: Doubling Current to 3A Maximum

Instead of using more expensive regulators that is rated for 3A, I opted to still make use of the standard LM317. To increase the current rating of the UPS, I simply added two circuits together, thereby doubling the current rating.

But there is a problem when connecting two power supplies together. Although their output voltages were calculated to be exactly the same, variations in components, as well as PC Board layout will result in one power supply always taking the majority of current. To eliminate this, the combined outputs were taken after the current limiting resistors, and not on the output of the regulator itself. This ensure that the voltage difference between the two regulators are absorbed by the output resistors.

Step 5: The Final Circuit

I was unable to source 1R2, 3W resistors, thus I decided to make use of several resistors to make up the 1R2 resistor. I calculated different series/parallel resistor values, and found that using six 1R8 resistors yields 1R2. Exactly what I needed. The 1R2 3W resistor has now been replaced with six 1R8 0.5W resistors.

Another addition to the circuit is a power fail output. This output will be 5V when the mains power is present, and 0V during a mains failure. This addition makes it easier to connect the UPS to systems that also require a mains status signal. The circuit also includes an on-board status LED.

Lastly, a protection fuse was added to the 12V output of the UPS.

Step 6: PC Board

Not much to say here.

I designed a simple PC Board using the freeware version of Eagle. The PC Board was designed such that non-insulated quick disconnect lugs can be soldered to the PC Board. This allow the complete UPS board to be mounted on top of the battery.

Make sure to add decent sized heat sinks to the two LM317 regulators.

Power Supply Contest

Participated in the
Power Supply Contest



    • Indoor Lighting Contest

      Indoor Lighting Contest
    • Make It Fly Challenge

      Make It Fly Challenge
    • Growing Beyond Earth Maker Contest

      Growing Beyond Earth Maker Contest

    9 Discussions


    7 months ago

    Hi, I'm building an ups with two 12v/7ah SLA battery supplying 12v/2a for 1 modern, 5v/2a for 1 camera, another 12v/2a security panel. Should I connect the batteries in series or parallel.
    Both battery are charge with an auto 3+ stages charger 24/7. Can you tell me how to do it and what safety precautions should I take... or should I change those battery to 38120 or the 18650.....Thank you

    Eric BrouwerMarcinK95

    Reply 11 months ago


    Sorry, I noticed that I did not include the PC Board file.

    It is now uploaded, and available under Step 5.

    Regards, Eric.

    Eric Brouwermortezapar

    Reply 1 year ago

    The charge pin on the schematic can be used to determine if the mains supply is on or off. When supply to the charger is on, this pin will be 5V, and 0V when supply is off.



    2 years ago

    Gotta have a close look at this . You have probably noticed that these batteries don't last long ! The reason is the charging current is at too high a voltage. 13.8V is fine in a car where the car systems use some and the regulator quickly closes off current as the voltage of the battery rises.

    Even so we are only getting 3 years or so now because it is so high .

    I suggest you install an option to drop the input voltage to no more than 13 Volts . Reason being a 12 Volt lead acid battery is full at 12.7Volts so I don't want to overfill it . That's whats killing them!

    1 reply
    Eric Brouwertytower

    Reply 2 years ago


    I agree with you when you look at the circuit as only a battery charger. But this circuit is used as a 12V UPS, thus it is actually a power supply with battery back-up. There is always a load connected to the system. On average, the batteries will last between 1,5 and 5 years, but this depends on the actual use when load is fed from the batteries.

    With a 8W load on for 4 hours at a time, twice a day, the battery is drained each time close to 100%. In this scenario, the battery life will be around 1 - 1,5 years. But the load is used for emergency lighting, which is more important than battery life.

    On a typical alarm system, with say 1 - 2 short power failures per month, the battery will last much longer.

    Thus, irrespective of charging voltage, the ultimate battery life depends on the discharge current, and battery voltage at the end of the discharge.

    If one takes a 7Ah battery, it will last about 5 years when the maximum current drawn from it is 350ma (7Ah over 20 hour period). But, the battery should also not be drained more than 20% of it's total capacity, or 350mA for more than four hours (1.4Ah).

    In the drawings, you will notice the six 1R8 resistors for each LM317. They perform two tasks. First, it regulates the charging current between the LM317 and battery. The lower the battery voltage, the higher the charging current. As the battery voltage rises, the charging current will decrease. Icharge = (13.8V - Vbattery) / 1R2.

    Secondly, it controls the output voltage going to the load. These resistors creates a voltage drop across then, depending on the current through them. When drawing 0.5A from the unit, the output voltage (and battery voltage) will never rise above 13.2V. When drawing 1A, this voltage will reduce to 12.6V. The ideal load for the unit is 750mA, which will leave you with a constant battery voltage of 12.9V as per your suggestion.

    I hope this explains the design as presented in this Instructable.




    2 years ago

    Oh check out the battery university site the battery is not flat until it is down at around 11.5 giving a 1 Volt useable range