Introduction: How to UPS Mains Power Any Battery Powered Smart Device (Yale Conexis L1 Door Lock)
This Instructables will show you how to adapt any battery powered device to run from the mains while still maintaining a battery backup, so you will never have to replace batteries again and you won't be affected by power cuts. This type of device is known as a UPS (Uninteruptable Power Supply).
I did this for my Yale Conexis L1 smart door lock but you can use the same process for any battery powered device. The door lock was a great example where this project can really be useful becase Yale don't sell a mains powered version and the door lock will never need to be portable, so running a cable to it is no problem!
Now there a number of different ways to do this. A few alternatives are below:
- Buy a battery to mains converter from Amazon. This is super cheap and easy but does not provide a battery backup: https://www.amazon.co.uk/Battery-Eliminator-AIEVE-...
- Use rechargable AA cells with a AA charger soldered to the battery holder of your smart device. I didn't go for this method because I found online that my smart door lock cannot be used with rechargables, I assume due to the lower voltage (1.2V per cell as opposed to 1.5V per non-rechargable cell). Also lead acids have more capacity and are known to be more rugged and longer lasting that AAs.
To do this using my chosen method (with a lead acid), you will need:
- A lead acid battery. You can use a smaller size lead acid if you want but it won't fit in my 3D printed box (the 2.3Ah battery that I used is overkill for my application). Here is the one that I used £20: https://uk.rs-online.com/web/p/lead-acid-batterie...
- A lead acid battery charger: https://uk.rs-online.com/web/p/battery-chargers/8...
- A switching voltage regulator. Make sure you use switching rather than a linear regulator as the efficiency will be much better and waste less power. I used this one £3: https://uk.rs-online.com/web/p/switching-regulato... This one can do 1A, but you may need more depending on the device you are powering.
- Cable clips. I 3D printed some that I found on GrabCAD here: https://grabcad.com/library/cable-clip-8
- Some strip board: https://www.amazon.co.uk/Vero-Strip-Boards-64mm-9...
- Some wires for hooking up your smart device to this UPS
- A 10μF/50V ceramic capacitor (if you watched the video closely you'll see, yeah I did use electrolytic, I'm assuming that's ok...?)
- A 22μF/10V ceramic capacitor
- 2x 2 way through hole PCB screw terminals 2.54 spacing: https://thepihut.com/products/2-pin-screw-terminal...
- and an enclosure to put it all in. A sandwich box or something will do or if you want to go fancy like I did you can 3D print it to fit like a glove (I've supplied the files for my design). If you are 3D printing your box you will also need some fixings:
- 4x M4x10mm bolts
- 4x M4 nuts (standard)
- 4x 4mm diameter wood screws, length can be anything from about 30mm to 70mm. I used 45mm
- 4x small self tapping screws 8mm long. No longer than that, or they will poke out the side of the box (unless you space them with washers)
Step 1: How to Select the Right Voltage Regulator for You?
First things first, figure out how what voltage and current you need from the voltage regulator before you buy your voltage regulator. FIguring out the voltage is easy, just count the number of batteries and multiply that by the battery cell voltage. e.g. I had 4x 1.5V AA batteries, which makes 6V total, I used a voltage regulator with 6.5V output because that's what I could find at a low price and a fully charged AA cell will be around 1.6V anyway.
Figuring out what current you need from the voltage reg is a little trickier, you need to measure that yourself. To do this:
- Set up your multimeter for current measurement. Current must be measured in series, so you usually have to move the red probe to the amps position and set the dial on your meter to current measurement.
- Place a small piece of card in between one of the battery connections to break the circuit, then touch your multimeter leads one on each side of the card touching the battery tabs (this will connect your multimeter in series with the circuit and should now power your device with the multimeter as part of the circuit)
- Run your device and read the current draw. I tested mine 5 or so times and took an average reading of around 200mA which is well within the 1A that my voltage reg is capable of
Step 2: 3D Print Your Enclosure
Download and print my enclosure design which fits all the parts really well using this link to GrabCAD: https://grabcad.com/library/how-to-ups-mains-power...
Print the box base and lid on your 3D printer with full support material (there are 2 captive nut cavities that need support) I think I used about 20% infill for the box.
Save the cable tensioners and cable clips to print later because they need a different infill.
Step 3: Build Your Circuit Pt 1
While your 3D printer minion is working away you can build up your electronic circuit.
In your voltage regulator datasheet it should provide a suggested circuit. I have attached the circuit for the voltage reg I used (the image with the DC/DC box in the top left).
- Cut out a piece of stripboard to about 50mm x 65mm
- Drill 4 holes in the strip board in the locations shown in the attached image to match up with the screw bosses in the 3D print
- Solder the voltage regulator with capacitors onto the middle of the board following the circuit diagram
- Solder the screw terminals for the input and output lines
- Add labels to prevent mixing up the input/output connections and the polarities, important!
Step 4: Build Your Circuit Pt2
Your battery charger leads need to connect to the input of the voltage regulator circuit as well as to the battery, in other words the battery, the charger and the voltage regulator need to all connect in parallel.
To do this; splice the battery charger cables and sodler 2 new wires in. Remember to use heat shrink to insulate.
Then plug everything in and use your volt meter function to:
- check that you're getting around 13-14V out of the battery charger
- and 6.5V from your voltage regulator
Step 5: Prepare Your 3D Printed Box
- Remove your box from the printer
- Begin a seperate print for the cable tensioners and cable clips with 100% in fill and support material:
- cable tensioner from my box design is found as part of the GrabCAD download here: https://grabcad.com/library/how-to-ups-mains-power...
- cable clips from here: https://grabcad.com/library/cable-clip-8
Step 6: Assemble the UPS
- Screw your circuit board to the lid using the screw bosses and your small self-tapping wood screws
- Place your battery into the enclosure
- attach the cables from your battery charger to the power in side of your circuit (with the battery charger unplugged). Make sure you have the polarity correct!
- attach the output cables to the power out side of your circuit
- before plugging in the battery, just plug in the charger and check that you're getting 13-14V out from the battery charger and 6.5V out from the voltage regulator (be aware; some battery chargers may be clever enough to sense if the battery is there, so would not give out a voltage without a battery plugged in)
- plug in your battery using the red and black spade connectors of the battery charger. Make sure the polarity is correct! Double check the voltages again
- screw in the cable tensioners using the M4 bolts (you can screw these in fairly tight but not so much that you crack the plastic). These will make sure the cables will never get yanked out of the circuit board
- Place the lid on the base of the enclosure and use the 4 long 4mm diameter wood screws to screw the lid onto the base
Step 7: Solder the UPS Output to Your Smart Device
- Remove the origonal batteries from your smart device, you'll never need them again!
- Dissassemble your smart device to find where the origonal batteries connect to the circuit board
- Check the polarity of the origonal battery connections. If you're lucky this might be labelled on the board, but most often you will need to reference the + and - of the batteries to tell you the polarity of the circuit board connection.
- Solder the output wires from your UPS to the battery connections of your smart device. Make sure you get the polarity right.
- Then create a hole for the new wire to pass out of the device, I used a needle file for this
Step 8: Cable Management
Use your 3D printed cable clips to trail your cable in a neat path. I used hot melt glue to glue these on but you can also use foam double-sided pads.
Step 9: Sumg-ness
Be smug with the thought that your device will never run out of battery again!
Participated in the