Adding power switch to volumio

Greetings. How can I add a power off switch to my volumio music streamer…? ( Raspberry Pi 4 + IQ audio DAC pro.) Could someone kindly explain?

John

Depends on what you require from a power switch.
You can buy hardware so you have a soft and hard shutdown, add a switch to the power cord,…

1 Like

I use this method:

Switch:
https://www.digikey.be/nl/products/detail/e-switch/ULV7FWGSS341/9996196
You need a switch that clicks when pushed, stays in that position, not a momentary switch.
Other alternatives are available, with or without wire loom and connector.
Relay:

Power button requires the installation of two plugins:

  • GPIO Buttons
    • Enable Shutdown On
    • GPIO Pin 16
  • GPIO Control
    • System Startup Event On
    • GPIO Pin 13
    • GPIO State On
      When you push the switch, power is applied to the power supply and RPI. Once Volumio is started, 5 V is applied to GPIO pin 13 that closes the relay because GPIO pin 16 is connected to ground.
      When you push the button again, GPIO 16 is decoupled from ground, RPI, Volumio plug-in detects it and does a proper shutdown. This opens the relay and switches off all power.
      What puzzled me for a while where the pin numbers. The drawing shows the GPIO pins for Roon Audio, not for Volumio. You need to use GPIO pins 13 & 16.
      Physical layout for the pins:
      https://www.raspberrypi.com/documentation/computers/raspberry-pi.html
      Keep in mind that the GPIO numbers are not the same as the physical pin numbers.
      GPIO 13 is 33 and GPIO 16 is 36.
      I like it because when switched off, all power is switched off. Good for the environment :blush:. I don’t mind walking to my Volumio streamer to switch it on and off. A remote is not possible.

Hope this helps.

1 Like

Indeed… It’s a useful technique; I’ll give it a go.

Thanks
John

Most dacs/amplifiers has 12v trigger. With some extra hw and a 5v powerpack and a gpio pin it might be possible to shutdown the os on a descent way.

Kindly explain how to do it…

I am working at now using a 15000 mAh powerpack to keep the OS running a shutdown when the power-supply is switched off. Testing it with a OrangePi the idea to use a OR-port (some diodes) and using a GPIO pin. As long this pin is high power is coming from the battery. When the 12v triggered a relay will close and the Pi will get power and startup. During startup a GPIO-pin will be set high. So if the 12v is coming up the OR port is true and the relay between power pack will close so the Pi will startup. The 12v will also activate a second relay to switch on the power supply which is connected to the loader-port of the pack. How the switch off works by triggering the power switch of the Orange Pi. It will start a shutdown process. When the shutdown is done the GPIO will go low and relay between powerpack and the PI will disconnect. Hopefully I get this done in the upcoming weeks.

1 Like

Thank you for your response… If any schematic available, please share.

i have this on my iqaudio dac volumio music streamer

1 Like

Many thanks… But it is not available here in my country…