Giter Club home page Giter Club logo

raspberryups's Introduction

RaspberryUPS

The RaspberryUPS service monitors a GPIO pin to trigger a shutdown after a grace period. In conjunction with a USB battery pack, it makes for a great Uninterruptable Power Supply for the Raspberry Pi.

To set up the service:

  1. Edit RaspberryUPS
  • Set DIR to the checkout directory.
  1. Edit power_monitor.py
  • Set SHUTDOWN_GRACE to the number of minutes to wait before shutting down.
  • Set POWER_PIN to the GPIO pin connected to the power detect line
  1. Set RaspberryUPS and power_monitor.py to executable.
  2. Copy the RaspberryUPS file to /etc/init.d/RaspberryUPS

Now, start the process with:

service RaspberryUPS start

For the harware side, find a USB rechargale battery pack that will provide output power while it is charging. It is also important that the output stay active when the charging power is disconnected. Many battery packs require you press a power button, so pay attention. I was able to snag one on sale for $12. To add auto-shutdown, the pack's 5v charging line is run through a voltage divider to make a safe 3.3v for the GPIO pin. This is important, as 5v will kill your Raspberry Pi.

raspberryups's People

Contributors

kerber avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.