As versatile as the Raspberry Pi is, it has a weakness when it needs to be able to shut down properly during a power outage, especially when handling data-sensitive or industrial applications. To solve this problem, [Pavol Sedlacek] has created a supercapacitor-based UPS specifically for the Raspberry Pi that gives it enough time to properly halt its processes and shut down if it detects a power failure.
The device is called the Juice4Halt. It uses a DC-DC converter to provide power to the Pi from the normal power supply and to charge the supercapacitors during normal operation. It is bidirectional, so in the event of a power failure it works in reverse to take power from the capacitors and feed it back to the Pi. A second DC-DC converter handles power from an external power supply.
A side effect of using supercapacitors as a UPS is that they can also help the Pi survive brownouts. The project site has an incredible amount of detail about the functionality of the device, including circuit diagrams and the source code. We’ve seen other supercapacitor-based UPS units before but this particular one is much more robust and would be truly at home in any industrial or other sensitive setting.
What happens when you want to integrate a Raspberry Pi into some kind of project that gets turned on and off with mains voltage? Do you power the Pi separately, or make a UPS for it?
[Lutz Lisseck] decided he wanted to turn his ambient-lamp (Rundbuntplasma) on and off with only the main power switch in his Hackerpsace. He could build a traditional UPS using a battery pack (it’s only 5V after all!) but decided to take it a step further. He picked up a pair of 50F supercapacitors. This way his UPS would last longer than his Pi would! The caps store just enough power that when the main supply is cut, a GPIO notices, tells the Pi, and it begins a shutdown sequence lasting about 30 seconds.
While [Lutz] is using two 2.7V supercapacitors, he mentions it would be a lot cheaper to use a step-up converter instead of putting them in series — but he had the caps on hand so decided to use both.
If you need it to last a bit longer, you could make one with rechargeable batteries…
Looking at this huge Uninterruptible Power Supply we are a little envious. It’s meant to hang on the wall of a utility room and power your critical devices. [Radek Hvizdos] has had it in service for quite some time, and when he started thinking of replacing the internal battery he decided to see if he could also extend the functionality. To do so he needed to get at the firmware of the chip controlling the device. And so began his adventure of dumping the firmware from the read-protected PIC 18F452.
The challenge of dumping code from a write-protected chip is in itself a fun project. But [Radek] was actually interested in fixing bugs and adding features. The wishlist feature we’d be most interested in is a kind of triage for shutting down devices as the internal battery starts to run low. Nice! But starting from scratch with the firmware is a no-go. You can see the two places where he connected to the PCB. The upper is for using a PIC programmer. The lower is an I2C connection used to dump the EEPROM with an improvised Bus Pirate.
In the end it was improper lock bit settings that opened the door to grabbing the firmware. The bootloader section of the PIC is not locked, and neither is the ability to read from FLASH at run-time. These two combined allowed him to write his own code which, when flashed to the bootloader section, dumps the rest of the firmware so that it may be combined into a complete file afterward. Since posting this fascinating article he has made a follow-up about disassembling the code.
About the size of a shoebox and stuffed with a compact battery/inverter combo, the BatBox packs a mean wallop at 480Wh. What else was [Bill Porter] supposed to do with his free time? He’s already mailed out electronic wedding invitations and built custom LED centerpieces for the reception. He and his wife [Mara] then made an appearance in a Sunday roundup tying the knot by soldering a circuit together. Surely the LED Tetris Tie would have been in the ceremony had it existed. This time, though, [Bill’s] scrounged up some leftover electronics to put a realistic spin on a Minecraft favorite: the BatBox.
A pair of 18V high energy density batteries connect up to a 12V regulator, stepping them down to drive a 110VAC inverter. The BatBox also supplies 5V USB and 12VDC output for portable devices. Unfortunately, [Bill]’s first inverter turned out to be a low-quality, voltage-spiking traitor; it managed to let the smoke out of his fish tank’s LED bar by roasting the power supply. Undeterred, [Bill] pressed on with a new, higher-quality inverter that sits on an acrylic shelf above the batteries. OpenBeam aluminum extrusion seals up the remainder of the enclosure, completing the BatBox with a frame that looks both appealing and durable.
[Woodporterhouse] must deal with regular power black outs in his area. He recently converted a rack-mount uninterruptible power supply to feed a portion of his mains wiring. This one is not to be missed, since he did such a great job on the project, and an equally remarkable job of documenting it. It’s one of the best examples we’ve seen of how to use Imgur as a project log.
The UPS still needs to have a case, but it doesn’t need room for batteries as he’s going to use a series of high-end sealed lead-acid batteries. So he cut down the enclosure to about half of the original size. That’s it mounted just above the new batteries. For this to work you need some type of transfer switch which can automatically patch between incoming line voltage, and the battery backup. He already had one of these switches in place for use with a generator, that’s it in the upper left. The entire system powers a sub-panel responsible for his essential circuits — the electronics in the home and a few lighting circuits (we’d assume this includes utilities like the refrigerator).
One really great feature that the reused UPS brings to the project is a monitoring card with a NIC. This way he can check the server to see if the UPS is being used, and how much of the 14 battery life remains.
[Thanks Ross via Reddit]
[Ishan Karve] works in some bizarro world where the building management demands that all servers and Uninterruptible Power Supplies be shut down at the end of each evening. While inconceivable to most systems admins, he has no recourse but to comply. This means that his employees need to turn things off before they leave for the day, and since they often work up to 15 hours a day, waiting for Windows server to shut down seems like an eternity.
Being the good manager he is, [Ishan] decided to build a device that handles the clean shutdown of their servers and UPS for them. An Arduino board serves as the brains of the device, communicating with and issuing shutdown commands to the UPS over a serial port. The Arduino is also connected to the office network, enabling it to send ARP requests to the servers in order to determine when they have completely shut down for the day. In order to protect against an accidental shutdown due to network connectivity issues, [Ishan] added an RTC module to the mix so that the Arduino does not issue shutdown commands until at least 8 pm.
Instead of waiting around for Windows to do its thing, [Ishan’s] employees can take off once they start the server shutdown process, knowing that they are totally compliant with their landlord’s crazy requests.
When the power goes out at home, what do you do? Most of us probably scramble around the house looking for a flashlight. [Gigawatts] wanted a better solution, so he built an emergency lighting system based off a standard household UPS. A while back he had constructed a relay-switched outlet box to help periodically restart his cable modem which would get hung up a little too often for his liking. Since changing Internet providers, he no longer needed the switched outlet box, and was looking for a way to reuse it.
He hooked up the outlet box into the “battery powered” side of the UPS, and inserted a light bub into the normally closed half of the switch box. A 5v power supply was hooked into the “surge protection only” side of the UPS and is used to keep the relay switched. This causes the half of the switch box that is normally closed to remain open, and the light switched off. When power is lost, the 5v supply no longer switches the relay, and the light is turned on – powered by the UPS battery.
This is quite a useful hack if you happen to have a spare UPS sitting around – it sure beats scrambling around searching for a flashlight in the dark!