Loading ...
Sorry, an error occurred while loading the content.

Raspberry Pi with battery backup

Expand Messages
  • Max
    Anyone know of a program for the PI that can communicate with a battery backup so it can be shutdown when the batteries are depleted? If I could find a program
    Message 1 of 8 , Jan 5, 2013
    • 0 Attachment
      Anyone know of a program for the PI that can communicate with a battery backup so it can be shutdown when the batteries are depleted? If I could find a program that would monitor the status of one of the GPIO pins and would issue the shutdown command when pulled low would be all I need, I can build the rest. I don't like powering off without a proper shutdown first since this APRS Igate with APRX will be running unattended.

      Thanks, Max KG4PID
    • Javier Henderson
      There is upsd for linux and Unix variants. I have not used it with the Pi, however. It monitors APC (and other brands) UPS via USB. 73, -jav k4jh
      Message 2 of 8 , Jan 5, 2013
      • 0 Attachment
        There is upsd for linux and Unix variants. I have not used it with the Pi, however.

        It monitors APC (and other brands) UPS via USB.

        73,
        -jav k4jh


        On Sat, Jan 5, 2013 at 8:59 PM, Max <kg4pid@...> wrote:
        Anyone know of a program for the PI that can communicate with a battery backup so it can be shutdown when the batteries are depleted? If I could find a program that would monitor the status of one of the GPIO pins and would issue the shutdown command when pulled low would be all I need, I can build the rest. I don't like powering off without a proper shutdown first since this APRS Igate with APRX will be running unattended.

        Thanks, Max KG4PID



        ------------------------------------

        Yahoo! Groups Links

        <*> To visit your group on the web, go to:
            http://groups.yahoo.com/group/Raspberry_Pi_4-Ham_RADIO/

        <*> Your email settings:
            Individual Email | Traditional

        <*> To change settings online go to:
            http://groups.yahoo.com/group/Raspberry_Pi_4-Ham_RADIO/join
            (Yahoo! ID required)

        <*> To change settings via email:
            Raspberry_Pi_4-Ham_RADIO-digest@yahoogroups.com
            Raspberry_Pi_4-Ham_RADIO-fullfeatured@yahoogroups.com

        <*> To unsubscribe from this group, send an email to:
            Raspberry_Pi_4-Ham_RADIO-unsubscribe@yahoogroups.com

        <*> Your use of Yahoo! Groups is subject to:
            http://docs.yahoo.com/info/terms/


      • Jeff Francis™
        If all you want to do is monitor the status of a single GPIO pin, all it takes is a half dozen lines of bash script shoved into a crontab. If you actually
        Message 3 of 8 , Jan 5, 2013
        • 0 Attachment
            If all you want to do is monitor the status of a single GPIO pin, all it takes is a half dozen lines of bash script shoved into a crontab.  If you actually want to monitor a commercial UPS, there are packages like apcupsd.

            

          On Sat, Jan 5, 2013 at 5:59 PM, Max <kg4pid@...> wrote:
           

          Anyone know of a program for the PI that can communicate with a battery backup so it can be shutdown when the batteries are depleted? If I could find a program that would monitor the status of one of the GPIO pins and would issue the shutdown command when pulled low would be all I need, I can build the rest. I don't like powering off without a proper shutdown first since this APRS Igate with APRX will be running unattended.

          Thanks, Max KG4PID




          --
          -=jeff=-
        • Max Harper
          The Raspberry Pi and Linux is all new to me. I ve only had the Pi now for a couple of weeks. How difficult is it to have the Pi shut down when a GPIO pin is
          Message 4 of 8 , Jan 5, 2013
          • 0 Attachment
            The Raspberry Pi and Linux is all new to me. I've only had the Pi now for a couple of weeks. How difficult is it to have the Pi shut down when a GPIO pin is pulled low? I've been searching using Google but can only find hardware articles, nothing in reguards to software. I can build charging / power supply circuits and program a Pic chip to monitor AC power / battery voltage and pull an output pin low on the Pic which would be connected to an input pin on the Pi, wait long enough for the Pi to shutdown and then remove power to the Pi until AC power is restored. If there was a way to pull an output pin on the Pi low as it was shutting down my pic chip could remove power after it had time to finish, basically making it act just like a PC. Hit a power button and the Pi turns on. The shutdown command or the power button would turn it off. Everything outside the Pi I can handle, i just don't know anything about programming on it yet. Any suggestions?
             
            Max, KG4PID

            From: Jeff Francis™ <jeff@...>
            To: Raspberry_Pi_4-Ham_RADIO@yahoogroups.com
            Sent: Saturday, January 5, 2013 10:00 PM
            Subject: Re: [Raspberry_Pi_4-Ham_RADIO] Raspberry Pi with battery backup
             
              If all you want to do is monitor the status of a single GPIO pin, all it takes is a half dozen lines of bash script shoved into a crontab.  If you actually want to monitor a commercial UPS, there are packages like apcupsd.

              
            On Sat, Jan 5, 2013 at 5:59 PM, Max <kg4pid@...> wrote:
             
            Anyone know of a program for the PI that can communicate with a battery backup so it can be shutdown when the batteries are depleted? If I could find a program that would monitor the status of one of the GPIO pins and would issue the shutdown command when pulled low would be all I need, I can build the rest. I don't like powering off without a proper shutdown first since this APRS Igate with APRX will be running unattended.

            Thanks, Max KG4PID


            -- -=jeff=-
          • Max
            From the short read I just did on upsd I think it might be hard to use for my application. I d rather use a couple of GPIO pins if possible. But thanks for the
            Message 5 of 8 , Jan 5, 2013
            • 0 Attachment
              From the short read I just did on upsd I think it might be hard to use for my application. I'd rather use a couple of GPIO pins if possible. But thanks for the help, I'll read up more on upsd just in case I ever need it.

              Thanks, Max

              --- In Raspberry_Pi_4-Ham_RADIO@yahoogroups.com, Javier Henderson wrote:
              >
              > There is upsd for linux and Unix variants. I have not used it with the Pi,
              > however.
              >
              > It monitors APC (and other brands) UPS via USB.
              >
              > 73,
              > -jav k4jh
              >
              >
              > On Sat, Jan 5, 2013 at 8:59 PM, Max wrote:
              >
              > > Anyone know of a program for the PI that can communicate with a battery
              > > backup so it can be shutdown when the batteries are depleted? If I could
              > > find a program that would monitor the status of one of the GPIO pins and
              > > would issue the shutdown command when pulled low would be all I need, I can
              > > build the rest. I don't like powering off without a proper shutdown first
              > > since this APRS Igate with APRX will be running unattended.
              > >
              > > Thanks, Max KG4PID
              > >
              > >
              > >
              > > ------------------------------------
              > >
              > > Yahoo! Groups Links
              > >
              > >
              > >
              > >
              >
            • Dave B
              ... Interesting. For the Bash/Cron challenged amongst us, how about an example to chew on? Please... In regards to monitoring a GPIO pin that is via
              Message 6 of 8 , Jan 7, 2013
              • 0 Attachment
                On 6 Jan 2013 at 11:28, Raspberry_Pi_4-Ham_RADIO@yahoogroups.com wrote:

                > ______________________________________________________________________
                > Re: Raspberry Pi with battery backup
                > Posted by: "Jeff Francis¢" jeff@... jeffrey_francis
                > Date: Sat Jan 5, 2013 8:10 pm ((PST))
                >
                > If all you want to do is monitor the status of a single GPIO pin,
                > all it takes is a half dozen lines of bash script shoved into a
                > crontab. If you actually want to monitor a commercial UPS, there
                > are packages like apcupsd.
                >

                Interesting.

                For the Bash/Cron challenged amongst us, how about an example to chew on?
                Please... In regards to monitoring a GPIO pin that is via Bash/Cron.

                (There are just tooooooo many often conflicting hits when googling for
                that sort of thing.)

                There is a lot of interest in using the Pi on battery power, so something
                like that could be very useful to have an example of (however crude at
                first) so an orderly shutdown can be done, before the lights become too
                dim..

                Perhaps also, at the last gasp, to flip another GPIO pin, to actually
                disconnect the supply (by FlipFlop and power fet?) from the Pi, so though
                the OS is killed of, the Pi's residual power consumption doesn't wreck
                the (otherwise still connected) batteries. Said FlipFlop could be
                toggled back to the "Power ON" state by hardware when the batteries have
                recovered enough (if unatended use is needed) or by mk1 push button.

                73.

                Dave (G0WBX)
              • David Kjellquist
                Here is a thread that provides all the needed shell scripts for watching a GPIO pin for reset (-r) or shutdown(-h). I am using the watch_reset.sh with
                Message 7 of 8 , Jan 7, 2013
                • 0 Attachment
                  Here is a thread that provides all the needed shell scripts for watching a GPIO pin for reset (-r) or shutdown(-h).  I am using the watch_reset.sh with rc.local mods in my remote antenna switch for rebooting if the client-server connection gets hosed.   Be careful modding rc.local since it can cause booting to lockup. If you do mess up and boot fails, simply remove the SD card go to another computer with a card reader, mount the card and fix /etc/rc.local

                  http://www.raspberrypi.org/phpBB3/viewtopic.php?f=29&t=14255




                  On 1/7/2013 5:22 AM, Dave B wrote:
                   

                  On 6 Jan 2013 at 11:28, Raspberry_Pi_4-Ham_RADIO@yahoogroups.com wrote:

                  > __________________________________________________________
                  > Re: Raspberry Pi with battery backup
                  > Posted by: "Jeff Francis¢" jeff@... jeffrey_francis
                  > Date: Sat Jan 5, 2013 8:10 pm ((PST))
                  >
                  > If all you want to do is monitor the status of a single GPIO pin,
                  > all it takes is a half dozen lines of bash script shoved into a
                  > crontab. If you actually want to monitor a commercial UPS, there
                  > are packages like apcupsd.
                  >

                  Interesting.

                  For the Bash/Cron challenged amongst us, how about an example to chew on?
                  Please... In regards to monitoring a GPIO pin that is via Bash/Cron.

                  (There are just tooooooo many often conflicting hits when googling for
                  that sort of thing.)

                  There is a lot of interest in using the Pi on battery power, so something
                  like that could be very useful to have an example of (however crude at
                  first) so an orderly shutdown can be done, before the lights become too
                  dim..

                  Perhaps also, at the last gasp, to flip another GPIO pin, to actually
                  disconnect the supply (by FlipFlop and power fet?) from the Pi, so though
                  the OS is killed of, the Pi's residual power consumption doesn't wreck
                  the (otherwise still connected) batteries. Said FlipFlop could be
                  toggled back to the "Power ON" state by hardware when the batteries have
                  recovered enough (if unatended use is needed) or by mk1 push button.

                  73.

                  Dave (G0WBX)


                • Jeff Francis™
                  Here s a nice page showing how to do I/O from a number of different scripting languages, including simple shell scripts. Should have everything you need:
                  Message 8 of 8 , Jan 8, 2013
                  • 0 Attachment
                      Here's a nice page showing how to do I/O from a number of different scripting languages, including simple shell scripts.  Should have everything you need:

                    http://elinux.org/RPi_Low-level_peripherals#GPIO_Driving_Example_.28Bash_shell_script.2C_using_sysfs.2C_part_of_the_raspbian_operating_system.29


                    On Mon, Jan 7, 2013 at 6:48 AM, David Kjellquist <dave@...> wrote:
                     

                    Here is a thread that provides all the needed shell scripts for watching a GPIO pin for reset (-r) or shutdown(-h).  I am using the watch_reset.sh with rc.local mods in my remote antenna switch for rebooting if the client-server connection gets hosed.   Be careful modding rc.local since it can cause booting to lockup. If you do mess up and boot fails, simply remove the SD card go to another computer with a card reader, mount the card and fix /etc/rc.local

                    http://www.raspberrypi.org/phpBB3/viewtopic.php?f=29&t=14255





                    On 1/7/2013 5:22 AM, Dave B wrote:
                     

                    On 6 Jan 2013 at 11:28, Raspberry_Pi_4-Ham_RADIO@yahoogroups.com wrote:

                    > __________________________________________________________
                    > Re: Raspberry Pi with battery backup
                    > Posted by: "Jeff Francis¢" jeff@... jeffrey_francis
                    > Date: Sat Jan 5, 2013 8:10 pm ((PST))
                    >
                    > If all you want to do is monitor the status of a single GPIO pin,
                    > all it takes is a half dozen lines of bash script shoved into a
                    > crontab. If you actually want to monitor a commercial UPS, there
                    > are packages like apcupsd.
                    >

                    Interesting.

                    For the Bash/Cron challenged amongst us, how about an example to chew on?
                    Please... In regards to monitoring a GPIO pin that is via Bash/Cron.

                    (There are just tooooooo many often conflicting hits when googling for
                    that sort of thing.)

                    There is a lot of interest in using the Pi on battery power, so something
                    like that could be very useful to have an example of (however crude at
                    first) so an orderly shutdown can be done, before the lights become too
                    dim..

                    Perhaps also, at the last gasp, to flip another GPIO pin, to actually
                    disconnect the supply (by FlipFlop and power fet?) from the Pi, so though
                    the OS is killed of, the Pi's residual power consumption doesn't wreck
                    the (otherwise still connected) batteries. Said FlipFlop could be
                    toggled back to the "Power ON" state by hardware when the batteries have
                    recovered enough (if unatended use is needed) or by mk1 push button.

                    73.

                    Dave (G0WBX)





                    --
                    -=jeff=-
                  Your message has been successfully submitted and would be delivered to recipients shortly.