Energy requirement for shutdown

The idle state may be the key! How to detect it and that it persists for some period before shutdown is initiated. Then, how to initiate shutdown in a foolproof manner.

Reply to
Charlie
Loading thread data ...

No of course not. The key is to detect that the power fails. The idle state is what you need to hope for, because then shutdown will be quick.

Reply to
Rob

Be careful what you wish for. Picture this: in the middle of a major edit you go to get a coffee and the phone rings. Urgent call - you deal with it. Then come back to find that your fancy RPi idle detector had timed out and shut down. What happened to that edit? Gone!

--
martin@   | Martin Gregorie 
gregorie. | Essex, UK 
 Click to see the full signature
Reply to
Martin Gregorie

If that editor didn't at least save a recovery snapshot then get a better editor.

--
Steve O'Hara-Smith                          |   Directable Mirror Arrays 
C:>WIN                                      | A better way to focus the sun 
 Click to see the full signature
Reply to
Ahem A Rivet's Shot

How's this Idea for an inexpensive solution? The dollar store sells solar powered garden lights, the circuit includes a rechargeable 6 Volt battery designed to fully discharge each night. Draw the Pi's working current from the battery and while chargeing it with the USB supply at the same time, a diode prevents the battery from discharging back into the supply when the power is cut, and you could also reap a bit of "make electricity while the sun shines." If that's insufficient current, kitbash four or eight of them, scaling up is inexpensive given the source of 'obtanium.'

#SolarPi

--
   All ladders in the Temple of the Forbidden Eye have thirteen steps. 
There are thirteen steps to the gallows, firing squad or any execution. 
 Click to see the full signature
Reply to
DisneyWizard the Fantasmic!

Energy requirements of Pi are discussed along with shutdown methods in several articles regarding Solar powered Raspberry Pis, Google Solar Pi

such as

formatting link

Raspberry Pi Current Daily Power

Board Consumption Consumption (Amps x 5V x 24hrs) Model A+ 200mA 24Wh Model A 260mA 31.2Wh Model B+ 300mA 36Wh Model B 480mA 57.6Wh

Divide daily power by the fracti> How's this Idea for an inexpensive solution? The dollar store sells

--
   All ladders in the Temple of the Forbidden Eye have thirteen steps. 
There are thirteen steps to the gallows, firing squad or any execution. 
 Click to see the full signature
Reply to
DisneyWizard the Fantasmic!

"The key is to detect that the power fails". Only if you have some sort of backup power available, and a scheme to do an orderly shutdown. True power failure makes a controlled shutdown difficult, to say the least.

I got into this issue many decades ago with industrial computer controlled systems. The problem really was to somehow make sure that anything controlled by the system shutdown in a safe and non damaging manner when the computerized control system failed, due to loss of power or other untoward events. Keeping the computer alive long enough to do an orderly shutdown was sort of a trivial part of the problem. It was simple to get the computer back to the exact state it was, but finding out what the status of everything else and reacting appropriately was the real problem.

Reply to
Charlie

Yes, that is what this thread is discussing.

Reply to
Rob

To be honest, the simplest thing is something like a 2 cell LIPO battery and a regulator chip to knock it back to 5V.

Then have some kind of orderly shutdown if the pack voltage calls below about 8v

This sort of stuff available from model suppliers and robot type people

--
"It is an established fact to 97% confidence limits that left wing  
conspirators see right wing conspiracies everywhere"
Reply to
The Natural Philosopher

The discussion was about the possibility of using a capacitor.

Reply to
Rob

I know, but really, why?

Its simply not up to it. And prolly costs more than a battery

--
No Apple devices were knowingly used in the preparation of this post.
Reply to
The Natural Philosopher

It will require less care and have a longer useful life than a battery.

Reply to
Rob

I'd likely use a two or three cell lipo, and a switching regulator (BEC) from the RC hobby as a backup supply. The complicating factor that lipos can only be discharged to around 3.v per cell without damage, and require balance protection circuitry. Still, the necessary bits and pieces are readily available at reasonable costs. There are some devices that amount to something that is not exactly a battery or a capacitor. Trouble is that they are not in common use, due to cost and availability. I really don't know what the innards actually are. I do know they were intended to be used in aerospace and some other high dollar applications.

Reply to
Charlie

No it wasn't, it was about any method of providing a power reserve. It is only you that insist the approach taken must be capacitor based despite all evidence to the contrary.

Poof! That's another £50 you've just sent up in smoke. You decided you didn't need to take care and blew the expensive capacitor in mere milliseconds by taking it overvoltage with switching transients. You must be up to hundreds of pounds by now.

What do you base this supposed longer life on anyway? Electrolytic caps don't last forever, especially when charged near to their rated capacity for years on end. This is a standby emergency reserve, we do not expect it to be cycled millions of times. That £50 capacitor I cited a few days ago would last less than 15 years at 25C. Lithium batteries would still be within their best before on a standby basis. Lead acids would have needed scheduled, planned replacment by the point your cap goes poof without warning but what's cheaper? Three £7 batteries over 15 years or a £50 capacitor over the same period. Which are you going to have more trouble sourcing when replacement is due?

Then there's the other aspect of useful life. A cap approach is going to provide seconds of power. If you can gurantee shutdown now in any possible condition within that time then great. What do you do when the next software revision needs 5 more seconds to shut down? Your solution goes in the bin, that's what.

It doesn't matter which way you spin it, capacitors simply are not a credible option in this situation. You know what the best approach is? I'd say a radioisotope thermoelectric generator since that will power the system for decades without intervention. Who cares than is costs £100m and jumping through regulatory hoops takes five years? Your approach up to now seems to regard time and money as completely inconsequential.

--
Andrew Smallshaw 
andrews@sdf.org
Reply to
Andrew Smallshaw

From the original poster:

I've been asked to create a "graceful powerdown" circuit for a Raspberry Pi 3.

The idea is to detect input power failures, then request that the Pi shutdown by (e.g.) changing the state of a GPIO, then supplying power from (e.g.) a capacitor and a DC/DC converter until the Pi has completed its shutdown.

Please read it again: "It will require less care and have a longer useful life than a battery"

Under similar mistreatment a capacitor will have less problems than a battery.

Of course you should remain within the rated voltage limit. I can assure you that keeping a capacitor charged to a fixed voltage will make it last for many years (capacitor "wear" is mostly caused by rapid charging and discharging causing "current" through the capacitor and thus heating), while doing the same with a battery is guaranteed to destroy it.

That

Of course you should not use that type of capacitor... Just a plain electrolytic will do. The question asked is if it can contain enough energy to do an orderly shutdown. That cannot be easily answered because it is unknown how long an orderly shutdown will take and how much energy is used during that time.

Note that there is no need to "cleanly shut down" all processes in this case, it should be enough to cleanly shut down any application that is writing to files, and to sync the filesystem.

Reply to
Rob

l have stored a *lot* of energy, and will be within the control range of most DC-DC converters. In fact your greatest concern would probably be some form of S/C protection!

Incidentally, for very fast detection of loss of mains, use an AC input optocoupler (ISP814) fed from the mains via something like 100K 3W (with ab out

10k shunting it). A small RC filter on the output transistor is all you nee d to remove the narrow crossover drops.
--
W J G
Reply to
Folderol

Lets say, for the sake of argument that an RPi idles at around 200 mW (50mA at 5V) and takes 10 seconds to shut down, i.e. shutting down burns .03 mAh if we assume that shutdown takes place using only idling current.

Now 1 Farad is 1 Ampere second per Volt. 1 F = 1 As/V. 1 Ah = 3600 As

3600 As / 12V = 300 As/V = 300F.

so you need 9 Farad of capacitance to drive the shutdown if you neglect losses. 47uF is 4.7 x 10-5 farads, so you'd need just over 200,000 47uF capacitors to power the shutdown.

It looks like sticking to lead-acid or NiCd cells is the smart choice. A size D lead-acid cell holds 2.5 AH and costs under $US 6, so get one of these, and add either:

- an RPi-specific UPS that accepts a single cell lead-acid battery OR

- a Maxim 2v DC- 5v DC converter and a multi-stage single SLA mains charger

... and the job is done for a lot less cash and shelf space than using commodity electrolytic capacitors would require.

--
martin@   | Martin Gregorie 
gregorie. | Essex, UK 
 Click to see the full signature
Reply to
Martin Gregorie

I think you need to go back to school...

200 mW for 10 seconds is 2 Ws. The energy stored in a capacitor is 1/2*C*V^2 so the capacitance required to store 2 Ws at 40 volts can be found from:

1/2 * C * 40^2 = 2 C = 2 / (1/2 * 40^2) C = 2.5E-3 F or 2500 uF

A lower voltage requires a larger capacitance. At 12V it would be: C = 2 / (1/2 * 12^2) C = 27777 uF

(these calculations assume you can discharge the capacitor to zero and convert the voltage to 5V without loss)

It can easily be seen that a lot can be gained by using a higher voltage, because the energy in the capacitor is proportional to the square of the voltage, and the physical size of the capacitor isn't. Of course you need to convert the higher (and dropping) voltage to 5V in an efficient way, so no 78xx but a switchmode converter.

Reply to
Rob

Come on, common sense should tell you that figure is orders of magnitude too big.

---druck

Reply to
druck

Just want to add, that I was suggesting 47000u not 47u

--
W J G
Reply to
Folderol

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.