I've wanted to make a UPS (Uninterruptible Power Supply) for a long time, but I took a while to figure the best way to do it.
It has a 12V 5A power supply to power the Server, Modem, Router * Network Switch. This way even with a power cut the Server and all the required network equipment to keep it online will all be powered by the built in lithium-ion battery. The battery is also charged by the mains power.
The difficulty was because the server and modem are 12V, the router is 19V and the network switch is 5V. So I added the ability to add modules that slot in to the back of the UPS that can provide different voltages. The modules can also be swapped out for different ones in the future if need be.
The UPS monitors the voltages and current of the mains power supply, battery and the output. This information is shown on a small OLED display on the front of the UPS and also sent to the server via a USB cable. The server monitors the data from the UPS and can then shutdown safely if the power is off and the battery is running low.
I'm not completely sure what the capacity of the battery is but I think it should be able to power the whole system for a few hours if need be.
It's not perfect and my decision to package it so tightly has caused a few problems but the hardware is complete and now working but I still need to finish the software side.
I've found a couple of things I need to adjust with the electronics, nothing major, so I can calibrate the voltage and current readings better. I'll have to power down the server, probably Monday, for a few minutes to remove the UPS and then again once the changes have been made to reinstall it. Unless the server is down when you come to the site you won't know any difference.
This is not unexpected, you always find things when making prototypes that you could improve as soon as you think you might be done :D
The software side is making progress, but having to learn the Python GTK3 Cairo drawing functions is a pain in the arse and slowing things down. The idea is the on screen widget on the server will be drawn on to a 'drawing area' which can then also be saved as a jpg and shown on a webpage on my internal web server so I can keep an eye on it without having to VNC in to the server.
There's lots of fun to be had with a 3D printer. They can be a pain in the arse sometimes when they don't work as expected, but there is so much support on the internet that I haven't had a problem yet that I couldn't find an answer to.
>>36635 It's pretty small at 100mm wide x 120mm deep x 82mm high. I wanted it to be that size so that I could add it to my mini server stack if I wanted, but currently I have it next to it instead. It was pretty hard to make it modular and pack in all the electronics, battery and power supply and still find room for all the cables to connect it all.
It's been running for a few hours now and seems to be happy. but I'll do more tests tomorrow to be sure it's working as expected.