This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm whether you accept or reject these cookies being set.

A cookie will be stored in your browser regardless of choice to prevent you being asked this question again. You will be able to change your cookie settings at any time using the link in the footer.

Thread Rating:
  • 1 Vote(s) - 2 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Safe Power Down
#1
I have been thinking more about how to get cost effective safe power down and then power back up again when the DC power switch is restored.  I could use Pi Juice, but it is a little expensive and other UPS's didn't automatically restore the Pi on power restore - see attachment

This Schematic would use a second source as backup that to the main source and if the main source is cut, then the backup would ensure power to the Pi until power down, then the relay would cut it.  the relays are https://www.amazon.com/dp/B00LW15A4W, the Power supplies are https://www.amazon.com/dp/B01MQGMOKI

There would have to be some code added In the file /boot/config.txt (use sudo nano /boot/config.txt):

dtoverlay=gpio-poweroff,gpiopin=20,active_low="y" <-- this would make sure that the relay released when the Pi was safely powered off.

there would need to be some code to trigger the shutdown when pin 40 (GPIO 21) was at 0v and I am not sure how to do that - I guess it would start with:

dtoverlay=gpio-shutdown,gpio_pin=21

I think I may have to make pin 40 (GPIO 21) pull down? anybody know how to do that?

anyone have any concerns with the plan?

I do currently have a momentary switch that I have on Pin 40 (between Pin 40 and GND), that could stay in parallel

Thanks
Techstyle


Attached Files Image(s)
   
Reply
#2
I am interested in building something similar.

If there's a board design I'd be interested in the files.
Simon,

Electronic Engineer, Hobbyist Software Writer, Yachtmaster Coastal, Powerboat Instructor...
Reply
#3
Came across https://github.com/SensorsIot/SuperPower (I have no experience in this area).
Reply
#4
(2020-10-26, 06:10 PM)tkurki Wrote: Came across https://github.com/SensorsIot/SuperPower (I have no experience in this area).

Thanks! I looked at this but I think it is a little early.

I did order all of the other components except the diodes, I am not that familiar with the different diode types. Anyone suggest diodes I should use for this project?
Reply
#5
I am also interested in the type of diode.
Standard diodes (silicon) give a voltage drop of about 0.7 V (a little less for the germanium ones). Any possibility for diodes with less voltage drop, e.g. based on MOSFET like in battery isolators?
Reply
#6
(2020-10-29, 07:48 AM)Sailabout Wrote: I am also interested in the type of diode.
Standard diodes (silicon) give a voltage drop of about 0.7 V (a little less for the germanium ones). Any possibility for diodes with less voltage drop, e.g. based on MOSFET like in battery isolators?

I was thinking about a 1N5822 Schottky diode, less drop than you were thinking with around 0.4V drop at 2A and around 0.3V at 1A. With the programable power supply I have specified, I think i would tweak it up slightly to allow for this drop, around 5.2V perhaps.
Reply
#7
I saw a similar schematic but the user had redefined the location of the diodes that makes the voltage drop less of an issue.  see attached schematic.  on their schematic they had used 1 voltage regulator to go to 5v and were using resistors from 12V to 3.3V for pin signaling - I think this may be an issue because the boat battery voltage could vary to much and cause over voltage or early drop outs.  thoughts?


Attached Files Image(s)
   
Reply
#8
I got around to putting this circuit together, made an adjustment

   

I also made a video demonstrating the usage

https://youtu.be/45IxpEa0ZcM
Reply
#9
(2020-11-15, 09:28 PM)Techstyle Wrote: I got around to putting this circuit together, made an adjustment

I also made a video demonstrating the usage

https://youtu.be/45IxpEa0ZcM

Thanks for sharing your project.
I have ordered the parts and will take this on as a winter-project.
Reply
#10
Just a couple of updates:

1. The 'NC' port on the Relay, should actually be the 'NO' port
2. The LED/resistor between pin 40 and the 3.3v board ground doesn't trip everytime, as the voltage only drops to 1.25v. therefore, I have paralleled (or you can replace) this with a 1k resistor, shutsdown in <5 seconds then
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)