PDA

View Full Version : Help needed configuring Audiophonics power button shut-off in piCorePlayer



ftarz
2019-04-04, 20:38
I have an AUDIOPHONICS I-SABER V4 DAC ES9023 TCXO that is installed in a RaspTouch case with a Raspberry Pi 3B+ running piCorePlayer V4.1.0. The case power button is wired to the switch and LED pins on the DAC.

The DAC and RPi will power-up when I press the case power button, but the power button continues to flash constantly.

The DAC and RPi will shut-down only if I hold the power button for 5 seconds. But if I momentarily press the power button nothing happens.

I have the Audiophonics-powerscript and shutdown-monitor extensions installed in piCorePlayer but do not have any instructions for their proper configuration.

Can anyone provide some instructions for proper configuration in piCorePlayer?

Regards.

Frank

Man in a van
2019-04-05, 01:24
I have an AUDIOPHONICS I-SABER V4 DAC ES9023 TCXO that is installed in a RaspTouch case with a Raspberry Pi 3B+ running piCorePlayer V4.1.0. The case power button is wired to the switch and LED pins on the DAC.

The DAC and RPi will power-up when I press the case power button, but the power button continues to flash constantly.

The DAC and RPi will shut-down only if I hold the power button for 5 seconds. But if I momentarily press the power button nothing happens.

I have the Audiophonics-powerscript and shutdown-monitor extensions installed in piCorePlayer but do not have any instructions for their proper configuration.

Can anyone provide some instructions for proper configuration in piCorePlayer?

Regards.

Frank

Hi Frank,

hope this still works

https://forums.slimdevices.com/showthread.php?106755-Announce-piCorePlayer-3-10&p=872687&viewfull=1#post872687

ronnie

Man in a van
2019-04-05, 02:34
Hey Frank

I can confirm that the procedure still works, I have just made a fresh card and completed the install.

Remember that after loading the extension, you need to click the reset button.

Also remember to check the Audio output settings for the player after the reboot.

And don't forget you can set a favourite to start playing on power up (if that would be required).

I use a very short press on the power button to start and stop, led flashes for 10/11 Mississippi for stop and a few more for start (using the inbuilt wireless on a rpi3b).:)

ronnie

paul-
2019-04-05, 05:31
Which power board do you have? The new model? Link to what you have please.

The shutdown-monitor extension was designed for the new board, although it will be able to work with any board when we release 5.0

Man in a van
2019-04-05, 05:58
Which power board do you have? The new model? Link to what you have please.

The shutdown-monitor extension was designed for the new board, although it will be able to work with any board when we release 5.0

Ah, sorry, I forgot to mention that.:( rpi3B. standard edition of pCP


piCorePlayer | piCorePlayer v4.1.0 | linux 4.14.81-pcpCore_v7 | piCore v9.2pCP | Squeezelite v1.9.0-1121-pCP | Fri Apr 5 13:54:21 BST 2019


I have used it before, last year and the year before. :)

ronnie

pputzer
2019-05-07, 14:02
I've got the new Audiophonics PI-SPC II connected with the power button from the RaspTouch case and after some fiddling, it works - sort of. The button stops blinking on boot up, and the shutdown handler gets triggered when there is absolutely no load. As soon as a song is playing, it takes several minutes (seemingly forever) until the player gets actually shut down.

What's the best way to debug this? /usr/local/bin/shutdown-monitor is running. (I've got a lot of experience with Linux/Unix, but very little with the RPi eco system. With pCP,, my investigation has been hampered by the lack of persistent log files.)

paul-
2019-05-07, 18:04
Can you let me know how its connected and what rpi you are using, Ill setup a test here.

pputzer
2019-05-07, 23:14
Can you let me know how its connected and what rpi you are using, Ill setup a test here.

It's an RPi 3B+ connected via WiFi.

When I tried shutting off again last night, it did so only after a reboot finished. Maybe the overlay settings are not quite right yet? (Pin 22, active high, pull up). Should the pull up be "off" instead? From what I've read, "up" is the default, so that's what I chose from the raw dtoverlay lines given by the Audiophonics engineers in their earlier post.

paul-
2019-05-08, 03:39
The defaults should work for the module, as I used that board to develop the setup. But,Ill check it out.

pputzer
2019-05-08, 04:42
The defaults should work for the module, as I used that board to develop the setup. But,Ill check it out.

I meant the technical default (in the kernel), not the one in the GUI. Id have to check, but I think they at least differed.


Gesendet von iPhone mit Tapatalk

pputzer
2019-05-08, 13:37
I've experimented a bit more. "Pull" has to be set to "up", otherwise nothing at all happens when I press the button in its operational state. However, while it has worked when I did a test run, it now appears to only switch off the RPi after the next reset. Very strange.

paul-
2019-05-08, 14:17
The GPIO on the rpi has default values for the internal pullup/down resistors, we can change them, but not until the kernel finishes booting, that can be too late. You need to use a GPIO that matches. IN the case of Audiophonics, use the GPIO connections that they recommend.

pputzer
2019-05-08, 14:28
The GPIO on the rpi has default values for the internal pullup/down resistors, we can change them, but not until the kernel finishes booting, that can be too late. You need to use a GPIO that matches. IN the case of Audiophonics, use the GPIO connections that they recommend.

Is there an explicit recommendation anywhere? I just tried to model the settings on that post in the other thread.


Gesendet von iPhone mit Tapatalk

pputzer
2019-05-08, 14:40
If you meant the GPIOs, Im using the button/power supply together with an Audiophonics HAT, which has special pins for this. So I am using the standard GPIOs, but I dont know what the overlay settings should be. (I think I know, but then the shutdown sometimes only happens after the next reboot finishes (which I trigger via the web interface), not on its own.


Gesendet von iPhone mit Tapatalk

pputzer
2019-05-11, 02:59
The defaults should work for the module, as I used that board to develop the setup. But,Ill check it out.

I've experimented a bit more. When disabling the overlays and instead using the pop-powerbutton.sh script from the home directory (after linking /bin/busybox to /usr/bin/getopt), the script works out of the box with the default values:


tc@piCorePlayer:~$ ./pcp-powerbutton.sh
No command line settings, Using defaults

piCorePlayer Power button shutdown script starting...
Asserting pins :
ShutDown : GPIO17=in, High
BootOK : GPIO22=out, High
piCorePlayer shutting down.

Power to the RPi is cut by the Audiophonics board. What would the corresponding overlay settings be?

paul-
2019-05-11, 04:56
The settings would be what is printed, just add pull down on gpio 17.

Thanks for letting me know about the getopt issue, there is a hard path set in the script.

pputzer
2019-05-11, 05:03
The settings would be what is printed, just add pull down on gpio 17.

Thanks for letting me know about the getopt issue, there is a hard path set in the script.

I'm actually not sure which overlay corresponds to which "Signal" (BootOK, ShutDown)?

paul-
2019-05-11, 06:30
Poweroff is gpio 22, active high

pputzer
2019-05-11, 06:40
Poweroff is gpio 22, active high

27315

With this setting, the power button never stops blinking after switching on power. Pushing it again does not trigger a shutdown. When shutting down the device from the web interface, it does not power off.

paul-
2019-05-11, 07:01
the shutdown is gpio 17, active high, and pull down

pputzer
2019-05-11, 07:41
the shutdown is gpio 17, active high, and pull down

Same result. According to Audiophonics images, these are the pin-to-GPIO mappings:

https://www.audiophonics.fr/20981-thickbox_default/audiophonics-pi-spc-ii-power-management-power-supply-for-raspberry-pi.jpg
https://www.audiophonics.fr/img/cms/Images/Produits/12K/12795/Schema9038.jpg

When I switch the cables around (connecting GPIO.04 from the PI-SPC to supposed GPIO.22 on the DAC and vice versa), these settings and the button actually make the pCP shutdown, but the power off is not (reliably) triggered, although all three LEDs on the PI-SPC are lit at the end of the sequence.

pputzer
2019-05-11, 08:05
Here's the actual cabling (when the button triggers a shutdown, i.e. reversed from what I read from the documented pin layout):

27316

Normal operations:
27317

Shutdown triggered (but not complete):
27318

Shutdown complete (but power not cut):
27319

paul-
2019-05-11, 09:43
The audiophonics documentation is confusing. And I didn't help, as I was referring to this power board.

https://www.audiophonics.fr/en/raspberry-pi-and-other-sbc-accessories/audiophonics-pi-spc-v2-power-management-module-for-raspberry-pi-p-10912.html

But my board has an IR remote on it, so perhaps it was never released......the silk screen is messed up on my board too. The cable connected to the "SoftShutdown" (Labeled GPIO4 on the documentation) They had a tag on the connector end that said GPIO17. I'm really not sure how to connect yours.

pputzer
2019-05-11, 09:47
The audiophonics documentation is confusing. And I didn't help, as I was referring to this power board.

https://www.audiophonics.fr/en/raspberry-pi-and-other-sbc-accessories/audiophonics-pi-spc-v2-power-management-module-for-raspberry-pi-p-10912.html

But my board has an IR remote on it, so perhaps it was never released......the silk screen is messed up on my board too. The cable connected to the "SoftShutdown" (Labeled GPIO4 on the documentation) They had a tag on the connector end that said GPIO17. I'm really not sure how to connect yours.

Interesting. Mine has an extra set of connectors at a 90 angle to the GPIOs, where one pin is labled "IR". It differs from the images of the power board at the Audiophonics site (but it looks like that's the only difference). I've already written to Audiophonics, but have not received a reply yet.

pputzer
2019-05-12, 09:18
The original wiring I had was correct. The missing piece was that the gpio-poweroff overlay needs "active_low" to be enabled (either the posting by Audiophonics contained a typo, or they changed the board later on). With the wiring according to the Audiophonics pictures and these settings, everything now works reliably:

27325

Thanks again for the great work on piCorePlayer, and for the help in here!