Raspi EDLC UPS: Unterschied zwischen den Versionen

Aus Hackerspace Ffm
Wechseln zu: Navigation, Suche
(Pictures from quick'n'dirty hack)
(Motivation)
Zeile 1: Zeile 1:
 
== Motivation ==
 
== Motivation ==
For the [[Rundbuntplasma]] I wanted that the main power supply (a big 20A/5V supply) could be hard disconnected from mains and the Raspberry has still the possibility to shutdown nicely. The idea is to buffer the 5V for the Raspberry using two big Supercapacitors (EDLCs) with 50F each from Nesscap. The circuit was designed to be as simple as possible, the drawback is that the capacity is not used efficiently and has only enough time for a proper short shutdown (about 30 seconds). Another drawback is that the power supply comes up slowly at startup (takes about 10 seconds before Raspberry starts booting) and also powers the Raspberry for quite a long time after the shutdown so the system must be unplugged for about 10min before it will boot up again.
+
For the [[Rundbuntplasma]] I wanted that the main power supply (a big 20A/5V supply) could be hard disconnected from mains and the Raspberry has still the possibility to shutdown nicely. The idea is to buffer the 5V for the Raspberry using two big Supercapacitors (EDLCs) with 50F each from [http://www.nesscap.com/product/edlc_small.jsp Nesscap]. The circuit was designed to be as simple as possible, the drawback is that the capacity is not used efficiently and has only enough time for a proper short shutdown (about 30 seconds). Another drawback is that the power supply comes up slowly at startup (takes about 10 seconds before Raspberry starts booting) and also powers the Raspberry for quite a long time after the shutdown so the system must be unplugged for about 10min before it will boot up again.
  
 
== Circuit ==
 
== Circuit ==

Version vom 19. März 2014, 02:32 Uhr

Motivation

For the Rundbuntplasma I wanted that the main power supply (a big 20A/5V supply) could be hard disconnected from mains and the Raspberry has still the possibility to shutdown nicely. The idea is to buffer the 5V for the Raspberry using two big Supercapacitors (EDLCs) with 50F each from Nesscap. The circuit was designed to be as simple as possible, the drawback is that the capacity is not used efficiently and has only enough time for a proper short shutdown (about 30 seconds). Another drawback is that the power supply comes up slowly at startup (takes about 10 seconds before Raspberry starts booting) and also powers the Raspberry for quite a long time after the shutdown so the system must be unplugged for about 10min before it will boot up again.

Circuit

UPS circuit for Raspberry using Supercapacitors

The powersupply goes in at the left side, the diodes prevent that current will be flowing back to the power supply and the resistors R5/R6 limit the current at startup rushing into the Supercaps (otherwise the diodes or the power supply might die).

The supercaps C1/C2 must be connected in series and the resistors R1/R2 are used that the voltage over the caps will be distributed evenly (balancing), otherwise the caps may degrade quickly. The resistors also discharge the caps slowly when the circuit is not powered (but within a quite long time) that is also good to lenghten the live of the supercaps.

With R3/R4 the input voltage of 5V is simply divided by half and connected to GPIO pin 7. When the main power supply fails the level at this pin quickly drops to a low-level, otherwise the Raspi will detect a high-level. A simple shell-script using the "gpio" command is polling every second the state of this pin and trigger a shutdown if the level goes to zero.

Warning

The EDLCs used from Nesscap are specified with a maximum ESR of 16mΩ - charged at 2.5V this will result in a minimum discharge current of >150A. So don't short circuit them when they are charged, otherwise something might burn or became welded...

Pictures from quick'n'dirty hack

UPS circuit quick hack

UPS circuit quick hack

Result

It works pretty well but those big caps are expensive if you have to buy them. It could be done much better and with much smaller supercaps if a step-up-converter is used to generate the 5V or better directly the 3.3V that the Raspberry only needs (avoiding that power-wasting linear regulator).