Super Simple & Super Cheap DIY UPS/CCTV System From Recycled Batteries!




Where I live, short power cuts are fairly frequent and can be very irritating. I have also wanted to experiment with CCTV for some time. After experimenting with test UPS systems using cheap inverters and old car batteries I decided to scale it up.
When homes have an alarm system installed it usually contains a backup battery in case of power failure. These batteries need to be replaced every few years to ensure the system performs correctly.
The waste batteries are usually sold to scrap dealers for their lead content, but alarm installers are usually happy to give/sell them to you for an incredibly low price. We have picked up 7AH batteries for less than 50p each.
In this instructable I aim to show you how easy and cost effective it can be to "recycle" these for your own projects, such as a UPS/CCTV system.
The project was designed, tested and built by myself and Dom. We are fairly experienced with electronics and suggest that this project should only be undertaken if you have done all the appropriate research beforehand (also see safety disclaimer on step 2).

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: Part 1 - Gather Parts

This instructible can be followed to the letter, or changed to suit your own needs if you wish to use other batteries etc.

We used:

8x 7AH Sealed Lead Acid batteries    -   £4       -     Alarm installation company
700w modified sine wave inverter      -   £25     -    Gumtree (classifed ads site)
Selection of wire, mostly mains flex   -   £0       -    Had this laying about at home
2x 8 way earth block                              -   £3.92  -    Toolstation
3 pole double throw 240v relay           -   £4        -     Ebay
2x 13A plugs                                           -  £0         -    Had these laying about at home
Double gang socket                              -  £0         -    Had this laying about at home

Extras for CCTV:
Old computer (Prusabox)                      -  £0         -   Came from a family member, saved from the tip!
RCA cable                                                -  £2         -   Ebay 
EasyCap                                                   -  £4         -  Ebay
IR Night Vision CCTV Camera             -  £9         -  Ebay
LAN Cable                                                -  £0         -    Had this laying about at home

Optional: Instructables T-Shirt for optimum DIY-ness

Step 2: Wire Up Batteries

You can use as many or as few batteries as you like. We decided to use 8 which gives us around 1.5 to 2 hours of backup power for the entire system. You should test all your batteries to check they are not faulty before being used in your system, Test them with a volt meter first, they should measure between 12 and 13.5 or so volts. You should them test them under load, I use a 12v bulb for this. If they fail, they may just be in need of a recharge. I recommend using a Gel charger but any 12v battery charger should do.

If using a 12v Inverter your batteries should all be wired in parallel, this will keep the voltage the same but increase the current output and life of the battery bank.
A spade connector should be crimped to the end of each wire to connect to a battery, this allows the battery to be swapped out if it becomes faulty (or vents because you managed to short it).

Now is probably a good time to mention that you will be working with a very high current supply which is not dangerous is treated properly. 12v is not enough to break down the internal resistance of your body so you will not be electrocuted by the supply. However if you short/drop/misuse the batteries you could well be burned, blinded, or poisoned by release of toxic gasses. Take the appropriate safety measures, do NOT breathe vented battery smoke :P. I am not to be held responsible for anything irresponsible you do!

I have attached the wiring diagram for the entire UPS but I strongly suggest you watch the video of our system HERE (along with all the other videos on our channel)

Step 3: Chosing Your Inverter

The inverter is one of the most cruital components of a UPS. Its function is to convert 12V DC voltage to 240V AC suitable for use with household appliances (Inverter voltages vairy from counrty to country but the princible is the same).

There are two main types of inverter:
True sine wave: The inverter is one of the most crucial components of a UPS. Its function is to convert 12V DC voltage to 240V AC suitable for use with household appliances (Inverter voltages vary from country to country but the principle is the same).
Modified sine wave: These produce a square wave style output. They still work fine for most appliances but often produce a buzzing sound, more heat, and are less efficient. The good news is they are pretty cheap and readily available (ours was £25 second hand, but they can be bought from stores like Halfords, B&Q and Maplin)

Take a look at the attatched image for a better idea of the difference in output waveform (not from the UK as the output is 115V source)
Our inverter is a 600W modified sine wave inverter, it comes with basic features such as under volt, over current, and high temperature cut-off protection. This prevents the inverter causing damage if it is overloaded. It also has a fan that kicks in when the inverter is under load to keep it cool. The alligator clips are handy as they fit over the earth block well, however these could have been cut off and the bare cable screwed into the earth block.

The power output of your inverter should be about 120% of the rated power of the devices you are running (200w computer + ~30w for hdd, wifi router and cameras). We went for the 600w for a bit of future-proofing.

It is important to consider the current draw your inverter will put on your batteries, here comes some maths.
Modern inverters have an efficiency rating of 70% up to about 90%, we aren’t going to consider that in our equation for the time being.
Power (watts) = Voltage (volts) X Current (amps)
Current draw = watts / volts
Our battery bank puts out 12 volts, and our inverter is 600w
Current draw = 600w / 12v
Current draw = 50 AMPS!!!!!
That’s a LOT of current, but remember that figure is only if the inverter is under full load, and the current is distributed evenly across all batteries in the bank. Meaning only 6.25 amps is being drawn from each battery in our 8 way bank (50/8).
That works out to 1.2 hours (~50 mins considering inefficiency’s and losses) under full (600w) load from our 7Ah battery’s (calculated here)
To increase this figure sustaining the same maximum power output, we need to add more batteries, which is pretty easy.

Step 4: Connecting Your Inverter

This is the easy part. Connect the Positive (+) input for your inverter to your positive earth block, and the negaive (-) to your negative earth block. I would reccomend testing the polarity with a multimeter before connecting, as this may be an expensive mistake!
You can connect your inverter by either stripping its cables and scewing them into the earth block, or clamping its alligator clips over the blocks (like we did). You should also take care to mount your inverter securely, you dont want it touching any of the battery terminals and shorting!

Step 5: Wiring in the Relay

This is the part that may become confusing, so I would REALY recommend watching the video as mis-wiring mains electricity would be dangerous.
A relay is an electrically operated switch. It uses an electromagnet to open/close its switching mechanism. We will be using a 3 pole, 2 throw relay for this project.
Relays are often marked SPST, SPDT, DPST, DPDT. This indicated the number of "poles" and "throws". A double "pole" relay has two switches inside it. In A single "throw" relay, each switch can either be open, or closed. In a double throw relay each switch has a "Common" which can be connected to one of two outputs, named NC (normally closed) and NO (normally open). Relays are spring loaded to the NC position. When the coil is energised, it creates a magnetic field, pulling the "common" to the NO position.

Take a look at the relay in the middle of the below diagram.

The output sockets live is connected to one pole of the relay, the neutral to another. This allows us to switch between the output sockets being connected to the mains, or the inverter.
Now obviously, when the mains is available, we want to use it. To accomplish this, we connect the mains input across the coil of the relay. In this setup, while the coil is energised, the sockets will be connected to the mains input.
When the mains fails, the coil loses energy and the switch returns to its spring loaded NC position, connecting the sockets to the inverter.
All of this happens in about 0.01 seconds.
Always make sure you use a circut breaker when testing your setup, just incase of any mistakes.

Step 6: Final Connections

Once you have checked, double checked, and triple checked all of your connections, you are now ready to wire your output to your socket. Sockets are labeled with live, neutral and.... earth?
We havent talked about earthing at all yet, so we will do that now.
It is essential to make sure that your output is always connected to earth, we are going to accomplish this by using an "earth loop". The alternative to doing this is switching your earth using the third pole of your relay. I belive this is wrong as all alaments of your circuity should be continuously earthed. We will use the earth pin from the UPS input plug to connect both the output earth and inverter earth to your household earth circuit.
Once again, this is explained in the diagram and video

Step 7: Time to Test!

Congratulations on making it this far. I expect most people lost interest somewhere around my inverter ramblings in step 3.
You are now ready to test your UPS. So go ahead and connect your load (I usually test with a small desk lamp).
Turn your inverter on and watch your lamp spring to life!

If it didn’t, make some checks:
  • Is the lamp broken? Test with a wall socket.
  • Are you batteries flat or incorrectly wired? Test with volt meter.
  • Is your inverter busted? Test it in the car.
  • Did you wire your relay wrong? Go back and try again!
If it did, great! Time to switch on the mains. Your relay should "click" over to mains power, and your lamp should stay lit.

If it didn’t, make some more checks:
  • Has the fuse blown in your plug? Test with multimeter.
  • Is the lamp broken? Test with a wall socket.
  • Did you wire your relay wrong? Go back and try again!
If your fuse blew, then you probably have a short in your wiring somewhere, check it all against the diagram again.
If your RCD of circuit breaker tripped then it is probably the same story. If you can't get to the bottom of the problem, disconnect your inverter and test again.

If all went well, then pat yourself on the back. You have made your own DIY UPS system. All you have to do now is charge your batteries with enough current to overcome the drain of the inverter in standby and keep them topped off. I find that 13.5v at 2 amps is the ideal supply. If you have a power cut and your inverter has to take over, you may want to connect a higher amp charger to top your battery bank up again. The bank can be charged by connecting your charge leads to each earth block.

If your not interested in the CCTV part of the build, then go and enjoy your peace of mind knowing power is available wherever, whenever. If you want to know how to connect your router and CCTV equipment to your supply, then stay tuned!

Step 8: Hooking Up Your Router

I use a BT HomeHub 2.0, as it came with my broadband package. My whole house is wired with 100mbs LAN and my broadband speed is only about 12mbs so it is pretty sufficiant. The homehub uses a 15v transformer, which is connected straight into one of the supplys sockets. I extended the length of the cord to reach from the garage loft into the house using some old telephone cable. This is fine as it is a pretty low power device.
Thats about all there is to it, just make sure you didnt mix up the polarity of the connector by testing it with a multimeter, for the homehup the inside of the connector should be positive.

Step 9: CCTV Setup

I am using a 30 LED Infra-Red night vision camera from E-Bay. It cost around £9 and seems to be worth every penny, the night vision is pretty acceptable for the price and i would recommend it for anyone on a tight budget!.
If your camera is being mounted outside, make sure it is waterproof!. Another thing to check is its connectors. RCA is the typical yellow, white and red connectors you see on the side of most TV's. BNC connectors are an alternative often used on higher end equipment. In the camera pictured it has a red DC jack for 12V power input.

The camera is connected to the PC via an "EasyCap" capture card. It allows you to connect a RCA A/V video source to a computer through USB. The device shows up just like a webcam in windows and will work with most software. A great tool to test your camera is "AmCap". I had difficulty connecting my easycap to the PC as it is quite bulky and dint fit into the USB port, this problem was overcome by using a short USB extender. I ran a phono extender cable from the camera to the EasyCap to carry audio and video data. Power is delivered to the camera over a length of telephone cable, as this is what i has laying around. Ideally you would use RCA cable that also carries power, cables like this (pictured below) are available on ebay pretty cheap. The 12V source is provided directly from the computer. Standard desktop computers use what is called an ATX power supply. This is designed to put out a range of voltages, one of which is 12V. A "molex" connector contains a yellow +12v and two black ground cables, these can be used to power your camera.

I would recommend to steer clear of wireless cameras. They seem to be an easy solution as you do not need to run cables, however they are a pain to tune and often cut out due to interference.
IP cameras are another alternative, they allow users to pan/tilt the camera via a web interface. They can be connected to the network over wifi or LAN but tend to be expensive.

Step 10: CCTV Software

I am having real trouble finding some decent free CCTV software so this page will be updated when I do!

At the moment i am running "iSpy Connect" as a free trial. It only allows you to view cameras over the same network via their quite poor website. On the other hand it does support continuous time lapse recording with i think is a must-have feature.

ManyCam is a great utility that lets you use one video capture device with many applications. This way you can install as many software packages as you require to fit your needs.

For basic camera streaming WebcamXP is pretty good but does not on its own support recording. So using ManyCam will allow you to stream through webcamxp and record through iSpy Connect. Best of both worlds!

Video Patrol 5.0 is a package I am currently looking at testing.

If anyone has any software they would like to reccomend or think i should try out, please leave a comment!

Green Tech Contest

Participated in the
Green Tech Contest

Hurricane Lasers Contest

Participated in the
Hurricane Lasers Contest



    • Indoor Lighting Contest

      Indoor Lighting Contest
    • Metal Contest

      Metal Contest
    • Make It Fly Challenge

      Make It Fly Challenge

    21 Discussions


    7 years ago on Introduction

    Very nice setup !
    There's just one slight improvement i'd suggest.
    When wiring such a battery bank in parallel, it's better to run the negative and positive wires in opposite directions.
    This distributes load better across the batteries.Otherwise the "front" one tends to work more than any other and will eventually fail earlier.
    ( Although this might not bea a significant concern since your setup doesn't power anything most of the time ).

    Great work!

    1 reply

    Reply 7 years ago on Introduction

    Thanks for the tip!
    Will bear that in mind if we ever need to rewire the battery bank. Have pleanty of spare SLA's to drop in if one does fail though.


    3 years ago

    I did this, but with a very important Step.

    As I Noticed, all cameras & DVR itself runs over 12VDC. I ran Heavy gauge Automotive wires to cameras & DVR directly off battery (With fuses of course). That way you skip the power hungry inverter as well as stupid AC-DC transformers & rectifier. The Efficiency of system goes up good 50~60%. Try it!


    3 years ago

    Great post guys. I'm looking to build one of these in the next few weeks for a cctv system. I would also like to back up an internal light in the house do you know if this is possible using your system? Any advice would be greatly appreciated. Thank you.


    7 years ago on Step 10

    If you've used linux before try Zone Minder

    a very powerful open source linux CCTV software.

    With a extremely large range of features.

    2 replies

    Reply 7 years ago on Introduction

    I am running Windows at the moment but i would like to give zoneminder a try, might set it up in a virtual machine and see what its like

    Thanks for the interest


    Reply 3 years ago

    Why not just try VLC player? as u r using a standard video device the EasyCap I think that should be a good enough software for your use.


    4 years ago on Step 10

    Thanks for this, especially for the relay info.

    Regarding your video software.

    I use yaw cam, has quite a few nifty features like streaming, motion capture, etc. works with both USB and IP cameras. Have had issues though setting it up with DVR cards so not sure how easy it would be to use with EazyCap


    6 years ago on Introduction

    Did your inverter have an auto low-voltage shutoff? I need to find one that doesn't have that feature so I can get maximum output.


    6 years ago on Step 9

    you could simplify this further and cut out the expense of a video capture card by simply using a usb webcam and an active usb extension if required tho webcams arnt usually waterproof but im sure you could quite easily make a waterproof enclosure.
    the video from either cam set up could also be encoded with adobe flash media live encoder or windows media live encoder along with sound from a microphone if required and saved on your hard drive as well as being streamed online and viewed remotely via a website url, though for this you would need to purchace a domain and have some sort of server to service this which you could probably set up on your own pc and isp as the bandwidth draw for 1 viewer would only be small but if you paid for an external server you could also archive the stream remotely online so even if someone breaks in and steals your pc and all your survelance equipment you will still be able to recover the video evidence ;-) and you can check on your property anywhere in the world where you have an internet connection and with the correct set up you could even view it on your mobile phone. and of course anyone you give the url to could also check on your property and of course if you have multiple cams you could connect these to manycam and set the encoder up to stream from manycam and best of all all the software ive mentioned is free for personal use ;-) tho this does require some technical knowledge to set up but i could hook you up with a friend who could provide this service as well as a remote server and bandwidth ;-)


    6 years ago on Introduction

    I was considering building my very own version of this...a bit more simple...
    I would use 8 standard car batteries + one 600w car dc-ac inverter.
    If I were to use a 13w Walmart floodlight (apx $12) I would derive from this setup
    (after rounding up...) up to 8 DAYS of continuous light.

    Assuming: amps = watts/ volts
    Car battery = 12v
    Inverter = 600w (max)
    (600w/12v = 50amps)

    So, 50a distributed over 8 car batteries = 6.25 amps used per battery per hour.
    Each battery averages (40/6.25 = 6.4 hours of life at full power.)

    Now... if I use only 13w (1 LED floodlight)...
    Car battery = 12v
    inverter -> lightbulb 13w
    (13/12 = 1.08333 amps)
    1.09a / 8 = 0.13541666ah/battery (rounding to 0.2
    Each battery averages (40/0.2 = 200 hours of life for the one floodlight.)
    8 DAYS of constant on. (If u use a daylight sensor...16 days)

    so, theres the math...have fun!

    1 reply

    Reply 6 years ago on Introduction

    ......almost, dont forget if you are going to do the maths to include the efficiency of your inverter as inverters generally are about 80-90% efficient so your 200 hours would in reality be 160-180 hours or less if your inverter was less efficient,
    probably of little consequence with a floodlight but could prove critical in some applications


    7 years ago on Introduction

    We have added a nice looking control panel for the system too:


    7 years ago on Introduction

    I really like it - is your inverter running 24/7 or does it power on when the relay flips over?

    One thought; many consumer electronics run on 12v. You can get a 12v psu for the computer, and you can run the camera(s) directly off the 12v bank. You can even add alternative energy (solar) to top off your batteries, so long as your trickle charger is appropriate. Saving the efficiency losses of the inverter is always a nice thing.

    3 replies

    Reply 7 years ago on Introduction

    The inverter is powered at all times. On our test version using a 150w inverter we switched it using the relay but it took far too long to "warm up".
    Yeah I like the sound of those PicoPSU's you can buy for DIY car-puters which accept a 12-24 volt input. Cost is the issue here, using an inverter also allows us to run anything we want.
    My Rayburn range cooker relies on an electronic ignition system even though the oven is gas fuelled so it would be handy to run that from the UPS too.
    Solar panels and wind turbines are great but also come with a high cost.
    Thanks for the comment


    Reply 7 years ago on Introduction

    I agree with frollard's thoughts about using a UPS. It's much simpler and effective. Solar panels would keep your system up 24/7, while its stated there are only have approx. 1 - 1.5 hours of run time. If you have an extended overnight outage or the like, you have a problem.

    You could get away with a 50 watt solar panel to help extend the run time. It won't completely recharge the batteries, but it will slow the draw during the day.

    Also (A last random note) that is one wierd looking plug outlet. That's not American, is it? Our plugs typically run at 120v. I don't know why they up the voltage.

    Good instructable and good luck in the green tech contest!


    Reply 7 years ago on Introduction

    I have a 12w solar panel for a boat/caravan I am tempted to wire in, but big solar panels are well over our budget!
    Our inverter uses a standard UK socket, we use 240v here. The Inverter I pictured in the middle of the other two I believe has a universal style plug that will accept UK, US and European plugs.