Please post your questions about the power controller here.
115 comments
-
Jan Bechmann Hi - i think its a great product idea and i consider to buy it
I have tried to understand how the powercontroller actually initiates a shutdown of the Pi before cutting its power. I have found that the communication between Pi and powercontroller (pc) is handled over i2c. I was able to understand that hifiberry os will detect and control the pc by reading and writing to its registers. I also saw that a pc-shutdown.service exists. But to my understanding that works only in the direction of the power controller (I use shutdown via hifiberryos webbrowser and the pc will cut power after 20s)
I could not understand yet how the information of pressing the power button will be transmitted to hifiberryos and induce a controlled shutdown before the power gets cut. Can you point me in the right direction please?
Thank you very much for your help
My system:
Pi4 2GB
DAC2 HD + DSP Module
HiFiBerryos 20210408
Linux 5.4.83-v71 -
HiFiBerry team In HiFiBerryOS, the audiocontrol daemon handles communication with the power controller:
https://github.com/hifiberry/audiocontrol2/blob/master/ac2/plugins/control/powercontroller.py
When it receives a long press from the power controller (via interrupt pin and I2C), it does 2 things:
1. It sets a shutdown timer of 30 seconds
2. It initiates a shutdown of the Pi in software
The Pi will shut down normally and after 30 seconds the power is turned off. If for some reasons the shutdown of the Pi fails, the power will still be turned off -
David Stiles Hi, great product. I am looking forward to using it.
I have a question in relation to the AMP100. I understand that not all 40 GPIO pins pass through to the DSP Add-on connector. Do the pins required for the Power Controller pass through?
-
HiFiBerry team The production version of the Amp100 will have an extra header with the pins required to communicate with the power controller.
-
eaedev Hi!
Really interested in the power controller. I am planning to use it with hifiberryos and a amp2.
Wondering if you can control volume with the rotary encoder.
Thank you!
-
HiFiBerry team In HiFiBerryOS, the following functionality is implemented:
- short press: play/pause
- long press (2s): shutdown
- rotate: volume -
eaedev Sweet! Thanks!
-
Rien Received my powercontroller today! Flashed the latest firmware using only the Pi (maybe good to mention that jumper JP1 needs to be set when powering via the Pi itself). When connecting everything together (Pi 4b, Amp2 en PC) while powering via the Amp2 sound is absent, unless when turning the rotary encoder: then it stutters.
I assumed powering the PC via the Pi should be possible? (I would like to get a proper DC barrel socket to connect to the terminals of the PC instead of cutting of the barrel plug)
-
Berry White Hello,
is the power controller connectable to a Beocreate?
This device uses the GPIOs also. -
HiFiBerry team @Rjen: If you use it with the Amp2, you should NOT set the jumper. How exactly did you connect the board?
-
Rien I understand that when I power everything (Pi, Amp2, PC) via the powercontroller I should net set the jumper because of the high voltage.
I tried attaching the PC on top of the Amp2 and Pi without providing any power the PC, hence why I set the jumper. Power was provided to the Amp2 directly.
-
Petr Poupa Hello,
is the Power controller compatible with my setup?
My setup is Rpi 4b and HiFiBerry DAC+ ADC Prothank you for your answer
Petr -
HiFiBerry team Yes, this should work fine.
-
Petr Poupa Is it plug and play or does it need any programming?
-
HiFiBerry team There is no plug and play. This is a beta test and we expect people to be able to flash firmware and do some debugging. The beta test is only for advanced users. The might change for the final product...
-
HiFiBerry team Rien: Looks like a GPIO conflict with the Amp2. I'll see if we can move the INT signal to another pin in the firmware.
-
Petr Poupa Ok, I will wait for the final product :)
-
Berry White Hello again.
I am still trying to see if I can use the power controller with a Beocreate.
In the Beocreate documentation I read that pins 2 and 3 are used to "Control communication with the board"
So I guess it is not easy, or even impossible? -
HiFiBerry team Berry White: It won't work now, but we might be able to change the GPIO usage a bit to allow it to be connected via the GPIO header of the Beocreate.
-
Berry White Thank you. I will follow the developments.
-
TLP https://www.hifiberry.com/docs/data-sheets/datasheet-powercontroller/ says it should be possible to connect Beocreate... I hope the pins are arranged soon.
-
Jan I also bought the power board misled by the datasheet that it would be compatible with the Beocreate. Please, could you at least publish the pinout of the GPIO connector on the power board, so that the more technically inclined among us can make an adaptor cable for the GPIO on the Beocreate board? As far as I saw, it uses pins that are not available, such as the RX/TX lines - so one option would be to craft a connector on the back of the RasPi, but without a pinout or completely reverse engineering the board, its not possible to know if there would be other conflicts and how to do it. Do you have a timeline for official support of the beocreate? Are there any other roadblocks you are aware of, e.g., software support by HifiberryOS for that particular board?
-
HiFiBerry team The pinout of the GPIO connector is exactly the same as the first 10 pins of the 40pin GPIO connector of the Pi.
There is no timeline for any feature. They will be released when they are ready. As priorities can change over time, we wpon't commit any release dates.
In general: To program the firmware to the board, you need to connect the power controller directly to the Pi as the programming pins RX/TX are not available on the Beocreate. Due to the different GPIOs that are or are not available on some boards, we're still working on a feature that allows to map the interrupt pin to one that's available. This will still need some time, but it will be included in the next HBOS release. -
HiFiBerry team Cabling documentation has been updated now for the Amp2:
https://www.hifiberry.com/docs/hardware/power-controller-cabling/
Note to communicate correctly with the Amp2, you will need the latest firmware (r5) and the latest audiocontrol software. We'll have a new experimental HiFiBerryOS release with both published soon. -
HiFiBerry team The experimental release with the new software is online:
/opt/hifiberry/bin/update --experimental -
Rien Installed the experimental release and flashed the new version; stuttering is gone, but turning/pressing the knob does not affect the currently playing music. Is there some setting that needs to be set manually?
-
HiFiBerry team You might not have the full settings in /etc/audiocontrol2.conf
Make sure, you have this:[controller:ac2.plugins.control.powercontroller.Powercontroller]
intpin=2 -
David Stiles I am trying to install power controller with Pi 3b+ and ADC running Hifiberryos 20210408
I flashed the firmware successfully using powercontrol.ino_atmega808_16000000L.hex. Checking comms with i2cget -y -f 1 0x77 1 gives 'could not open file' error. I have no lights on the Power Controller. Web interface system Information says Power Controller not detected. System works normally otherwise. Same situation after restart.
I tried powering system via Power Controller feeding into AAMP60 (jumper removed) and system is still as above. The only difference is a short press on power controller now shuts system down.
Any advice on where am going wrong is welcome
thanks
-
HiFiBerry team Looks like either it wasn't flashed correctly or is not connected correctly. Do you see the LEDs flashing when you apply power?
-
David Stiles Thanks for your reply. I initially just saw a brief blue flash each time power was connected. Now, after a few hours running there is a constant bright blueish white light.
Cable is connected as per photo in data sheet and I have checked continuity of all pins.
I flashed it with power from the Pi and jumper installed, using PuTTY and had confirmation of success. I uploaded the hex file into root directory using windows Powershell. Each step in instructions appeared to work up to the i2cget command to confirm communication. Should I flash it again, perhaps connected directly to pi without ADC?