Re: HOW TO gracefully shutdown an RPi with DRAWS


Basil Gunn
 

at what voltage does the hat shutdown everything down?
In the N7NIX repo there is a script for the RPi/DRAWS setup that runs in
my truck.

https://github.com/nwdigitalradio/n7nix/blob/master/tracker/updown_log.sh

That script runs once a minute from a cron job and reads the A/D
converter on DRAWS connected to 12V. If the voltage is less than 13V I
know my truck is not running and the battery is not being charged. At
that point I do an APRS beacon, wait for 20 seconds and then do an RPi
shutdown.

shutdown -h now

The beacon includes the value of the 12V A/D converter and the GPS
satellite count.

I use a powerwerx ITS-12
https://powerwerx.com/automotive-dc-timer-lvd-battery-guard
set to 1 which will disconnect power 2 minutes after the truck has been
shut off.

I have a picture of my setup here:
https://github.com/n7nix/nixtracker/blob/master/README.md

K3VIN <ka8yiu@...> writes:

On Fri, Feb 5, 2021 at 11:25 AM, Basil Gunn wrote:


Yes the DRAWS hat has everything required to do a graceful RPi shutdown.

It has an A/D converter that measures the 12V source voltage.
Old post, but at what voltage does the hat shutdown everything down?

Kevin, K3VIN

Join udrc@nw-digital-radio.groups.io to automatically receive all group messages.