element14 Community
element14 Community
    Register Log In
  • Site
  • Search
  • Log In Register
  • About Us
  • Community Hub
    Community Hub
    • What's New on element14
    • Feedback and Support
    • Benefits of Membership
    • Personal Blogs
    • Members Area
    • Achievement Levels
  • Learn
    Learn
    • Ask an Expert
    • eBooks
    • element14 presents
    • Learning Center
    • Tech Spotlight
    • STEM Academy
    • Webinars, Training and Events
    • Learning Groups
  • Technologies
    Technologies
    • 3D Printing
    • FPGA
    • Industrial Automation
    • Internet of Things
    • Power & Energy
    • Sensors
    • Technology Groups
  • Challenges & Projects
    Challenges & Projects
    • Design Challenges
    • element14 presents Projects
    • Project14
    • Arduino Projects
    • Raspberry Pi Projects
    • Project Groups
  • Products
    Products
    • Arduino
    • Avnet Boards Community
    • Dev Tools
    • Manufacturers
    • Multicomp Pro
    • Product Groups
    • Raspberry Pi
    • RoadTests & Reviews
  • Store
    Store
    • Visit Your Store
    • Choose another store...
      • Europe
      •  Austria (German)
      •  Belgium (Dutch, French)
      •  Bulgaria (Bulgarian)
      •  Czech Republic (Czech)
      •  Denmark (Danish)
      •  Estonia (Estonian)
      •  Finland (Finnish)
      •  France (French)
      •  Germany (German)
      •  Hungary (Hungarian)
      •  Ireland
      •  Israel
      •  Italy (Italian)
      •  Latvia (Latvian)
      •  
      •  Lithuania (Lithuanian)
      •  Netherlands (Dutch)
      •  Norway (Norwegian)
      •  Poland (Polish)
      •  Portugal (Portuguese)
      •  Romania (Romanian)
      •  Russia (Russian)
      •  Slovakia (Slovak)
      •  Slovenia (Slovenian)
      •  Spain (Spanish)
      •  Sweden (Swedish)
      •  Switzerland(German, French)
      •  Turkey (Turkish)
      •  United Kingdom
      • Asia Pacific
      •  Australia
      •  China
      •  Hong Kong
      •  India
      •  Korea (Korean)
      •  Malaysia
      •  New Zealand
      •  Philippines
      •  Singapore
      •  Taiwan
      •  Thailand (Thai)
      • Americas
      •  Brazil (Portuguese)
      •  Canada
      •  Mexico (Spanish)
      •  United States
      Can't find the country/region you're looking for? Visit our export site or find a local distributor.
  • Translate
  • Profile
  • Settings
Raspberry Pi
  • Products
  • More
Raspberry Pi
Raspberry Pi Forum In case of power failure, does the Pi desktop turn off the raspberry Pi safely?
  • Blog
  • Forum
  • Documents
  • Quiz
  • Events
  • Polls
  • Files
  • Members
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
Join Raspberry Pi to participate - click to join for free!
Featured Articles
Announcing Pi
Technical Specifications
Raspberry Pi FAQs
Win a Pi
Raspberry Pi Wishlist
Actions
  • Share
  • More
  • Cancel
Forum Thread Details
  • State Verified Answer
  • Replies 9 replies
  • Answers 4 answers
  • Subscribers 668 subscribers
  • Views 2600 views
  • Users 0 members are here
  • raspberry_pi
Related

In case of power failure, does the Pi desktop turn off the raspberry Pi safely?

ladam
ladam over 6 years ago

In case of power failure on the network, does the Pi desktop turn off the raspberry Pi safely?

  • Sign in to reply
  • Cancel
  • shabaz
    0 shabaz over 6 years ago

    Hi,

     

    I think that requires a UPS, the desktop Pi behaves like any desktop PC as I understand (I could be wrong).

    • Cancel
    • Vote Up +3 Vote Down
    • Sign in to reply
    • Verify Answer
    • Reject Answer
    • Cancel
  • gdstew
    0 gdstew over 6 years ago in reply to shabaz

    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.

    • Cancel
    • Vote Up +4 Vote Down
    • Sign in to reply
    • Verify Answer
    • Reject Answer
    • Cancel
  • rew
    0 rew over 6 years ago

    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).

    • Cancel
    • Vote Up +5 Vote Down
    • Sign in to reply
    • Verify Answer
    • Reject Answer
    • Cancel
  • baldengineer
    0 baldengineer over 6 years ago in reply to rew

    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.

     

    image

    • Cancel
    • Vote Up +3 Vote Down
    • Sign in to reply
    • Verify Answer
    • Reject Answer
    • Cancel
  • beacon_dave
    0 beacon_dave over 6 years ago in reply to shabaz

    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.

    https://www.element14.com/community/message/212180/l/re-build-idea-raspberry-pi-upsuninterruptible-power-supply#212180

     

    There also appears to be a 'Live CD/USB' type SDK for the R-Pi

    Nard SDK

    which may at least help avoid the OS on a SD card from becoming corrupted due to an unexpected loss of power.

    • Cancel
    • Vote Up +4 Vote Down
    • Sign in to reply
    • Verify Answer
    • Reject Answer
    • Cancel
  • ladam
    0 ladam over 6 years ago

    Thanks all for your help!

    • Cancel
    • Vote Up +4 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • abrain
    0 abrain over 6 years ago in reply to ladam

    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

    • Cancel
    • Vote Up +3 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • clem57
    0 clem57 over 6 years ago in reply to abrain

    A good solution is to use a super capacitor to buffer up the power. Add a indicator to a GPIO pin signalling power loss. This would trigger a script to shut the Pi down gracefully.image

     

    Clem

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • rew
    0 rew over 6 years ago in reply to clem57

    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.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
element14 Community

element14 is the first online community specifically for engineers. Connect with your peers and get expert answers to your questions.

  • Members
  • Learn
  • Technologies
  • Challenges & Projects
  • Products
  • Store
  • About Us
  • Feedback & Support
  • FAQs
  • Terms of Use
  • Privacy Policy
  • Legal and Copyright Notices
  • Sitemap
  • Cookies

An Avnet Company © 2025 Premier Farnell Limited. All Rights Reserved.

Premier Farnell Ltd, registered in England and Wales (no 00876412), registered office: Farnell House, Forge Lane, Leeds LS12 2NE.

ICP 备案号 10220084.

Follow element14

  • X
  • Facebook
  • linkedin
  • YouTube