Raspberry Pi Power Switch Button - Safe Shutdown / Start Up

Sdílet
Vložit
  • čas přidán 23. 07. 2024
  • Avoid risking corrupt SD cards in your Raspberry Pi if you normally just unplug the power to shut it down.
    This feature gives a soft shutdown and also re-starts the Raspberry Pi.
    The power at the GPIO pins remains active, but the USBs are closed down.
    I will be using this feature with Octoprint / Octodash in a Prusa Box 3D printer enclosure
    [info on Prusa Box at www.printer-box.com/?wpam_id=1 ]
    If you find this video educational and want to see more videos, then please press the SUBSCRIBE button.
    Next...installing the Pi/screen from this video into a PrusaBox enclosure.
    Credit to Howchoo. Please view this video for the details on running the script • How to Add a Power But...
    #raspberrypi
    #raspberrypipower
    #raspberrypipowerbutton
    #raspberrypishutdown
    #raspberrypipowerswitch
    #raspberrypipowerled
    #raspberrypiled
    #3dprinting
    #octoprint
    #octodash
    #prusabox
    #prusaboxenclosure
    #3dprinterenclosure
    #tukkari
    #raspberrypicase
    #raspberrypiprojects
  • Jak na to + styl

Komentáře • 28

  • @neoYAKER
    @neoYAKER Před 11 měsíci

    I just wanted to say thanks for the great how to! I was using this on my octoprint, and recently switched to Prusa Link/Connect. The switch and script still work great!!!! Thank you Colin!

  • @PierreVanGucht
    @PierreVanGucht Před 2 lety +4

    As usual, a very informative video!
    I'm really curious to see the full integration into the PrinterBox/PrusaBox!
    Thank you and keep going ;-) !

    • @colinhill
      @colinhill  Před 2 lety +2

      Thanks. I plan to add the modular front imminently.

  • @whitneydesignlabs8738

    Awesome!! Thanks so much for your video and the link to the howchoo write up. I just wired and installed on my Pi4 which is in vehicular use. Now, so much easier to shut down gracefully, with a physical button, instead of the GUI (or worse, turning off ignition key and hard-crashing the pi). I was prepared to copy and paste the code, run it at boot up etc etc. But the script did all the heavy lifting. Cheers!!!

  • @KaoticFdr1
    @KaoticFdr1 Před 2 lety

    Great video! Does this work with RockPi boards running armbian via docker? (I'm a complete Linux noob that was only able to install octoprint by following Print'n'Play's OrangePi guide)
    I'd like to do this and the PSU Relay plugin, but the plugin for the PSU doesn't work either.
    Any chance you could make a video on making the plugin work too?

  • @lycan6014
    @lycan6014 Před rokem

    thank you

  • @maksym3d
    @maksym3d Před rokem +1

    I see you are using the TX GPIO pin to power LED as described in Howchoo's manual. This unfortunately won't work if you connect Einsy to the Raspberry through the GPIO port. Instead, you can add this line to the end of /boot/config.txt to power the LED with an arbitrary GPIO pin (e.g. GPIO 24): dtoverlay=gpio-led,gpio=24,trigger=default-on,label=statusled0

    • @colinhill
      @colinhill  Před rokem

      Thanks for that. Currently having issues with the newer shutdown option which doesnt play well when also using Octodash czcams.com/video/ezVMWB9LdKo/video.html

  • @hugorobson4233
    @hugorobson4233 Před 2 lety

    Great video! I have pin6 occuppied with fans... is there any other position where I can connect the button?

    • @colinhill
      @colinhill  Před 2 lety

      Unfortunately i'm unsure, as i followed the video from howchoo. Are you able to use any of the other power pins (5v or 3.3v)

  • @stefanmerk5750
    @stefanmerk5750 Před 2 lety +2

    hi, thanks for showing. I have a question, can you do this with a touch (capacitive) button? By touching the button for 3 seconds? that would work and if so, how?

    • @colinhill
      @colinhill  Před 2 lety

      Stefan, i have no idea :)

    • @leglessinoz
      @leglessinoz Před rokem

      If all the touch switch does is short 2 connections then yes it'll work fine.

  • @Sa3dawisurf
    @Sa3dawisurf Před 2 měsíci

    Great video and explanation! question, which rasp OS are you using to boot straight to your application? thank you!

  • @iljacoveliers5834
    @iljacoveliers5834 Před 2 lety +1

    Thanks for the video !! What happens if you disconnect it from the power and then reconnect it ? Does the Pi start up, or do you have to push the button first ?
    Or does it only work when it's connected to power all the the time ?

    • @colinhill
      @colinhill  Před 2 lety +2

      It you pull the power then reconnect then the pi starts up. The button is a momentary push switch not an on off switch. The action of the switch runs a script to put the pi into a standby state.

    • @iljacoveliers5834
      @iljacoveliers5834 Před 2 lety

      @@colinhill ok. Thanks for the info.

  • @rubensevillano5707
    @rubensevillano5707 Před 2 lety +1

    Hi Colin, can you share or update the prusabox files? Modular panel for waveshare 5" with led hole and switch for start/stop Pi. And can you share the switch that you used? Thanks a lot!

    • @colinhill
      @colinhill  Před 2 lety +2

      Hi. The STL should be on the main modular front video, in description. www.thingiverse.com/thing:4942168 I'm not part of PrinterBox, so cannot add files to their website. I just post my mods on Thingiverse. Which country are you in? Someone asked me about switches in one of the recent video comments and I provided a link to Amazon.de or here is my Amazon UK link amzn.to/2WWy5bO.

    • @anubis_3d
      @anubis_3d Před 2 lety +1

      Hi Colin, I'm from Spain, I asked you about red switch to start/stop Raspberry Pi, thanks for answer me and for your work.

    • @colinhill
      @colinhill  Před 2 lety +2

      @@anubis_3d hi, switch is Momentary Push Button Switches SPST Normally Open Contacts, with 10mm hole required. I got it from eBay.

  • @robyrey67
    @robyrey67 Před 10 měsíci

    Thanks for this tutorial. Can I ask you how did you power the screen?

    • @colinhill
      @colinhill  Před 10 měsíci +1

      It's a DSI screen that connects via thin ribbon cable to one of the Pi ribbon cable outputs.

    • @robyrey67
      @robyrey67 Před 10 měsíci

      Thank you @@colinhill

  • @alwins1993
    @alwins1993 Před 2 lety +2

    Wich display did you buy?

    • @colinhill
      @colinhill  Před 2 lety +1

      Waveshare 5". I will add a link in the modular front video when I fit everything together

  • @alejandrosamudio7113
    @alejandrosamudio7113 Před 12 dny

    It works if I want to put an arcade button for the power on ?
    ./pi-power-button/script/install