Volumio + Hifiberry Amp2 stops sound (including 3. device)


I have a problem with a project with volumio and maybe here i can find help.

I run volumio, Ver. 2.x, on a Raspberry Pi 3B+. The Hifiberry Amp2 is connected to the Pi.
I connected the Hifiberry with the Pi via short Jumper wire cables.

Also, there is a Waveshare-Display (13.3 inch) connected to the display.
Everything runs fine.

I also run a python script which runs a motor on the device.
The motor has ist own power supply, so that it is not powered by the pi.
When i run music after the startup, before i run the motor, theres sound/ music.
It works. But when i than start the motor, the sound stops and doesnt come back.

When, after starting the pi, i first run the motor and then play music, theres no sound.
Volumio shows that music is played, but there is no sound.

I first powered the Pi via the Hifiberry amp2. After i recognized the problem, i drove the pi with an own power supply and the Hifiberry Amp2 with an own powersupply. I removed the 5V and 3.3V connections between the Pi and the hifiberry, to prevent a problem from this.
Everything works like before, but still the exact same problem.

I use none of this GPIOs, that are needed from the Hifiberry, for the motor:

From Hifiberry:

“GPIO2-3 (pins 3 and 5) are used by our products for configuration. If you are experienced with I2C, you might add other slave devices. If you a a novice, we don’t recommend this at all.
GPIOs 18-21 (pins 12, 35, 38 and 40) are used for the sound interface. You can’t use these for any other purpose.
GPIO4 is used to control the MUTE function of the power stage. Pulling it to low will mute the output.”
They are all connected from the Pi to the Hifiberry.

Does anyone have an Idea?

After the two seperate power supplys didn’t solve the problem, my only idea right now, is to avoid the problem in the way, that i would start volumio with a delay.

That doesnt solve the problem, but would avoid it, as most time i would only need the motor in the beginning after the start of the pi.

Does anyone know if ist possible to start volumio with a delay?
Best way for me would be with a python script.

Or does anyone maybe have a “real solution” to the problem?

(I also looked if a gpio plugin could solve my problem in some way, but i dont think so. Maybe theres one i havent found yet that could help.)

Thanks a lot in advance!

Does somebody maybe know if it is possible to start and shutdown volumio, out of python?
Not the whole RaspberryPi, only the “Volumio-Task”?

Thanks a lot!

I now recognized that the problem also appears, if i remove the power-supply from the motor. So its not a “power-problem”, that the motor “uses to much current from the pi” or something like this, i think.

I use GPIOs 13 and 26 for two buttons. If i press the buttons, theres no problem. So i think these GPIOs are not the problem.
The motor control uses the GPIOs 22, 23, 24.
As i sayd the sound stops when the motor runs/ also if the motor only “gets controlled” (without power supply, so without running).

I also tried to change all the GPIOs 22, 23, 24 in the python script to GPIO6. No Python error, but still the same problem (without using GPIOs 22, 23, 24; only GPIO6).

Does somebody maybe have a good knowledge, which GPIOs are really needed from the hifiberry. Are it maybe more than recognized in the documentation?
Thanks a lot!

No clue what motor means, please provide details.
Even though the motor is supplied with it’s own power source, you switch it via GPIO.
It’s sounds like the switching circuit for the motor draws to much current, causing everything to fail.
Since all works fine without this motor.
please post logs so we might capture why it’s failing.


thanks a lot for your answer!
First, here is the link to the volumio log:

There i startet the pi, so i started volumio. I played a radio station and had sound. Then i started the motor via a button and there was no sound anymore (volumio wasn’t paused or muted or anything).

The motor: STEPPERONLINE Nema 17 Schrittmotor

Runs with a A4988 driver.

Thanks a lot again!

there are a lot of errors in the log.

`Apr 05 19:29:56 volumio kernel: FAT-fs (mmcblk0p1): Volume was not properly unmounted. Some data may be corrupt. Please run fsck.
Apr 05 19:29:56 volumio kernel: FAT-fs (mmcblk0p1): Volume was not properly unmounted. Some data may be corrupt. Please run fsck.`

Apr 08 08:53:30 volumio kernel: Under-voltage detected! (0x00050005)
Apr 08 08:53:34 volumio kernel: Voltage normalised (0x00000000)

it seems to have a voltage drop down will screw-up the system

and maybe a corrupt disk because of it… what do you want more :slight_smile:

and a dns problem i guess

Thanks a lot for your help!

I think i fixed the “Volume was not properly unmounted…”- error.
I think the undervoltage-problem is still there.

But im not really sure that thats the sound- problem.

Im running a hdmi-display on the pi.That one also has a power supply.
At first i had the problem that it sometimes showed a “lightning-bolt”-symbol.
(i think its a message from the pi or volumio).

Than i used an other power supply for the pi: 5V, 2A.
The bolt was gone.

As i wrote before i powered the pi directly from the hifiberry amp2 and seperated.
Both time i had the same problem.

Here is the last dev-report:


the thunderbold is the undervoltage,.i will look at you new log but we need more eyes on it.
but with easter most are gone.

Failing endpoints: https://oauth-performer.dfs.volumio.org, 409 ms

i think u have a dns problem and a lot of things crashing still because of it.

Thanks a lot for the answer again!

I think the dns-problem isn’t the reason of the sound problem.
The sound also turns off, if i play music from nanosound from a cd. But of course i can be wrong.

I now tried a laboratory power supply on the hifiberry amp2 and supplied the rpi from the hifiberry again. I gave the hifiberry up to 24/25V and enough current.
It looks like the supply doesnt collapse when the motor starts.

Latest log:


unable to provide assistance here.
I guess you drive the motor by the A4988 driver.
This driver is connected to the GPIO? I have no information on the current drawn from the GPIO to steer this driver. The max current of the GPIO is 15-16mA. So I assume the driver is asking to much current

I think you are right with the current.

Is there a way to start volumio with a delay?
Not directly when the pi gets started?
That would solve my problem i think.

Or start it out of a python script?

Thanks a lot again!

All you can do is add a entry in userconfig.txt, but that would delay the complete boot process. (where x is seconds)


Seems the rPi should be able to use this driver, however never seen it in combination with the AMP2.

1 Like

Thanks again!

I had another idea because of the answer.

The solution for now is that i restart the whole raspberrypi after the motor stopped, via the python scipt. So i can play music.

The setup is, that the motor drives up the display (touchdisplay for volumio) out of a “musicbox”.
So after the display is up, the motor stops and the pi starts again and i can play music on volumio.
Thats a solution that works.
But of course it would be nicer if the boot process would have ended after the display is up. (thats the reason i asked if “only the volumio boot” could have been delayed; i could have started it “half the way up”).
But after its up i now have to do the restart because of the sound problem and do a second boot. Its ok but its not the pretiest solution. But of course thats not volumios fault!

I already did this to make the boot (the second one that can be seen) “pretier”: sudo systemctl disable getty@tty1.service
That worked!
Is it maybe also possible to show a picture instead of the blank screen on the volumio startup?