power control an external amplifier - Printable Version +- Moode Forum (https://moodeaudio.org/forum) +-- Forum: moOde audio player (https://moodeaudio.org/forum/forumdisplay.php?fid=3) +--- Forum: Feature requests (https://moodeaudio.org/forum/forumdisplay.php?fid=8) +--- Thread: power control an external amplifier (/showthread.php?tid=4237) |
power control an external amplifier - kus0901 - 09-28-2021 There are several options available to use the GPIO to control the rasperry (as input), but I'm looking for the other way arround. I have an external amplifier I want to switch on / off by moode with an relay controlled by the GPIO pins. There is a script available see below, but it would be nice if that could be integrated into moode software / GUI direct, maybe even have the option to display a button which then activates a GPIO pin. moodeaudio.org > Moode Forum › moOde audio player › FAQ and Guides › Activate relay upon audio output with python RE: power control an external amplifier - Tim Curtis - 09-28-2021 The challenge is that there are many different scenarios for Amp On/Off. For example below is a script that can handle 2 Amps. IIRC it was run from some selections on the main Menu. Other users want the Amp to turn off when Menu, Power, Shutdown. Other requests I've seen are to turn the Amp off after a delay when music has stopped playing or turn it off based on Clock Radio off time. Code: #!/bin/bash If the feature could be generalized to easily accommodate the different usage scenarios it would prolly be something that could be added to moOde. ETA: Added the example script. RE: power control an external amplifier - Gekel - 10-07-2021 (09-28-2021, 07:56 PM)Tim Curtis Wrote: The challenge is that there are many different scenarios for Amp On/Off. For example below is a script that can handle 2 Amps. IIRC it was run from some selections on the main Menu. Other users want the Amp to turn off when Menu, Power, Shutdown. Other requests I've seen are to turn the Amp off after a delay when music has stopped playing or turn it off based on Clock Radio off time. ... and amps are all different. If you want to get the power state of mine, you need to send #01,1\r over a serial line (9600 baud), read the response and then flag the "power button" as on if the amp sends #02,1,01 as reponse, and off if the response is #02,1,0\r On top you could read out the input source selector, which adds 10 additional responses to a command... I don't see a chance to implement any amp steering software into the frontend of moode, because as said: too many options. The web page for steering mine (still working on it) currently looks the following way: It still lacks the power button to shut down the pi on command and to display the current state (on/off) and will run as webserver on an ESP8266 with the required connectors. The idea is to use the ESP to turn on/off the amp, mute it, change the input source and either automatically shutdon the pi when I turn the amp off (by constantly monitoring the power state of the amp or override this shutdown if I enable a yet to be defined switch, or shut it down on command (another power button). Side note: as I have no clue if the ESP can run the (async) webserver pluse the constant monitoring loops and handle the shutdown protection flag, I might have to use another SBC as man in the middle to forward the software requests to the amp (2x serial data in/out) and the pi monitoring/shutdown. An arduino pro mini 3.3V looks promising, even without sleep commands it only adds 13mA/3.3V to the total power consumption of around 75ma/3.3V the ESP requires - which by the way is way lower than the 200mA/5V a pi draws even when shut down. RE: power control an external amplifier - usename8 - 04-10-2022 (09-28-2021, 07:56 PM)Tim Curtis Wrote: I think it would be nice to add an on/off switch to the main menu (e.g. above the "Power" option), and once moOde done booting up, use this switch to turn the amp on or off as you like. |