Simple Button Circuit to Power ON & Safely OFF Raspberry PI

Published: 11 July 2018
on channel: Kevin Darrah
37,259
550

Pretty cool one here I came up with. Starting with this simple latch circuit I talked about a while back:    • Simple Transistor Latch Circuit + Eas...  

NOTE! Put a 1k resistor right at the base of those two NPN transistors. You never want to have two transistor bases tied together like that.

I wanted to use this to power up my raspberry Pi project, which is pretty easy, but I also wanted to use this to power down as well. Since you can't just kill power suddenly to the Pi, I enabled GPIO21 to go HIGH after a safe shutdown:


sudo nano /boot/config.txt
Adding in this line at the end:
dtoverlay=gpio-poweroff,gpiopin=21

Then from the processing sketch be able to monitor that same pushbutton and determine when to execute the shutdown command. That code zipped up here:
http://kevindarrah.com/download/laser...

And the pinout for the GPIO Header: https://pinout.xyz

Oh and make sure to check out the last video on exactly how I got the Pi setup the way you see it in this video:    • Raspberry Pi - MASSIVE TUTORIAL - Fre...  

Check out my Tindie store (trigBoard is available) https://www.tindie.com/stores/kdcircu...

Thanks to all the Patrons for dropping a few bucks in the tip jar to help make these videos happen!
  / kdarrah  

Twitter:   / kdcircuits  

For inquiries or design services:
https://www.kdcircuits.com


Watch video Simple Button Circuit to Power ON & Safely OFF Raspberry PI online without registration, duration hours minute second in high quality. This video was added by user Kevin Darrah 11 July 2018, don't forget to share it with your friends and acquaintances, it has been viewed on our site 37,25 once and liked it 55 people.