In case of power failure on the network, does the Pi desktop turn off the raspberry Pi safely?
In case of power failure on the network, does the Pi desktop turn off the raspberry Pi safely?
Hi,
I think that requires a UPS, the desktop Pi behaves like any desktop PC as I understand (I could be wrong).
No, you are absolutely right. Without a power backup of some kind there is a very good chance that data on the SD card will get lost
or corrupted if a file operation is in progress. Using a journal file system like ext4 will help, but it can not prevent data loss in all cases.
Once the power goes, the raspberry pi has no way of "shutting down nicely": the power is gone.
An UPS can help in such a case. IIRC, you can buy them commercially.
I am currently working on a project where I powered a raspberry pi (compute module) from a lab power-supply. I Had set the current limit to 1.05A (5.4W), and my power supply at one point in the boot process decided: That's more than 1.05A, you can go... well, the power dip is less than 100ms, but the pi crashed and then starts to boot again and in the end it keeps crashing at exactly the same point every time.... (all this while the average current is now under 600mA).
I Had set the current limit to 1.05A (5.4W), and my power supply at one point in the boot process decided: That's more than 1.05A, you can go... (all this while the average current is now under 600mA).
About a year ago I measured the current draw of a Pi 3 using a current probe on my scope. In this attached shot, you can see there are >1 Amp transients. This measurement was like a PS1 emulator was running Final Fantasy 8. I thought I had one from the boot process, but I cannot find it at the moment.
I recall an earlier discussion about this on here and that some members were using USB power banks as UPS devices for their R-Pi projects.
There also appears to be a 'Live CD/USB' type SDK for the R-Pi
which may at least help avoid the OS on a SD card from becoming corrupted due to an unexpected loss of power.
I get the impression this is a common problem with using the Pi in a real application - I’m sure many would be interested if you get a good solution, Ladam!
A
We can do some math for that supercapacitor.
If you trust me that my measurement is OK that the pi will work just fine(*) from 3.3V, then the capacitor can drain from 5.0V to 3.3V or thereabouts. 1.7V, A 10F supercap that you drain at 0.7A will then run out after 10/.7*1.7 = 24 seconds. That should be enough to actuallly do a shutdown, yes.
I didn't expect this outcome of the "math". :-)
(*) It's peripherals like USB devices and HDMI->VGA converters that stop working.