How to avoid voltage spike / dip that keeps rebooting my RPi Zero W


Hi folks,

Looking for advice on whether a capacitor would work (or some other component) in holding current for a few microseconds? And (if a capacitor) how many farads?

As can be seen in the pics below / linked, I was wondering whether a capacitor soldered between the VCC OUT and GROUND of the micro USB breakout board would work when the radio On / Off button is pressed?

I can confirm that the DC voltage being supplied from the AC / DC Transformer is a constant 5.24 volts at about .8 amps (I am using a RPi Zero W and a pHAT-Beat shield). This DC voltage is constant BUT dips / spikes when the radio is turned ON and OFF.

(Supply of 5.24V still occurs after the radio is turned off as it supplies voltage to the screen to show the time etc. Amps supplied still remains the same…)

BUT, when I press the ON / OFF button - the PI reboots so I ‘presume’ there’s some spike / dip going on. I don’t have an oscilloscope at hand to verify.

All replies appreciated!



Curious as to what you have going on there?
Is the radio still functional, and if yes do you use it?
Also, it looks like the Pi Zero / pHat Beat are mounted on the bottom of the Radio?
The black red wires that disappear under the Pi Zero, what are they for?

If your using the Radio and Pirate Radio, switching back and forth etc. I think I’d want a power switch some place to feed one or the other, but not both at the same time. Your power supply may not be able to supply enough current to drive both at the same time, even though one of them is idle.


Hi @alphanumeric

Yes, the radio is still functional (for the moment anyway!)…

It’s a cheapish Lidl Silvercrest Under Counter Kitchen radio (like the one seen here - About €15 euro.

  • Radio is functional with RPi on or off.
  • Yes I use the radio but switch it off (LCD display remains lit while radio is off) in order to play the RPi (using the Pimoroni AirPlay streaming tutorial as described here -
  • mounted on the bottom, but as the radio is an ‘under cabinet’ type one - it looks cool especially with the VU meter LED’s lighting up through the diffuser cover.
  • the black and red wires are fed from the LED wiring as the LED itself is powered using a momentary push button on the SilverCrest Radio LCD panel. These wires were meant to be able to switch the RPi on and off using some GPIOZero code. I haven’t implemented this yet…

Yeap, a power switch might be necessary. I will check voltage and amps to the Silvercrest Radio (when same is turned on and the RPI is on too) and report back.

But I’m hoping I don’t and that voltage / amps for both RPI - and - SilverCrest Radio is enough for both to be powered simultaneously.

Obviously I’ll only want to play music trough the speakers from ‘one’ device - but would wish both devices remain on so as to stop the RPi from rebooting.

Would a ‘capacitor’ be a solution like described in my earlier post - if both the RPi and the Radio can be fed from the same supply?

Ta, Michael


A ripple filter capacitor may work. 1000uf and 5V or higher. The power supply should already have one or more though? Those big tall round ones.
Ok I get why you mounted it on the bottom. The buttons on the pHat beat got to GPIO pins on the Pi. You can connect your own switches to those GPIO and they will do exactly what the buttons on the pHat Beat do. Pinout is here,

I wired up my own mini arcade buttons. I put a Proto Zero between my Pi Zero and pHat beat to make wiring up the buttons easier. My build pictures are here,!AjOYwiwlwDtpgrJY6ORLsK5AVpwNuw

Arcade buttons are normally open momentary contact buttons, same as what’s on the pHat Beat Just bigger and easier to push. I have one wired for the shutdown function. Then I just leave it powered. When I want to listen to music I press another button thats wired to the RUN (reset) pins on the Zero. That reboots it and starts it up.


Two buttons on the back out of sight should work. One pushbutton to tell the Pirate radio to shut down, and a toggle switch to remove the power after that. Then switch the toggle switch back on when you want to use it again.
How do you have the power wired to the Pi? I ask because I see the USB breakout, and the USB cable, but don’t see the other end plugged into the Pi?


Power to the Pi is powered from the 5.24V out from the AC/DC transformer. Its a Micro USB to Micro USB power cable that goes through a small hole in the Silvercrest Radio chassis.

In the meantime I think I managed to blow some fuse or whatever on the Silvercrest Radio as there is now no sound from the radio going to the speakers. The LCD display still works fine, and the radio search and program functions all look fine. Just no sound,…

I think I may have shorted the Silvercrest Radio even though there is only a small .4V voltage being brought to the speakers from the RPi side. I presume the .4V continues being fed up to the Silvercrest Radio through the speaker wires from the Rpi speaker wires.

Ta, Michael


Hi @alphanumeric

Thanks for the link to the ‘Arcade Button Boom Box’. That gives me an idea. I have an old Creative Labs Sound Blaster 5 Surround System but the problem with it is that it has various outputs for old sound blaster PCI cards.

I’ll create a separate posting and invite comment on what to do with it.

Like your ‘boom box’ there’s lots of space on the inside of the subwoofer for components etc.

Ta, Michael


I was thinking having both devices attached to the one set of speakers might be a bad idea, but forgot to mention it. I got sidetracked with everything else that is going on. I’d disconnect the pHat Beat speaker wires and see if you get your radio sound back.
I’m an electronic technician by trade but audio is not my area of expertise. I do know that some audio amp outputs are not tolerant of having either side grounded. If you mix and match those that could be an issue. Grounding one of the two speaker wires blows the amplifier.

What I was asking about power wise, is how its hooked up at the Pi end? I don’t see the white USB power cord plugged into anything? If your feeding power in via the GPIO pins, or soldering the wires on the bottom side of the Pi zero, you don’t need that breakout or USB cable with one end cut off. Just run two wires right from the power supply to the Pi. I have several Pi projects where I feed power in via the GPIO +5V pin 2 or pin 4 and ground to pin 6.

The amplifier had died in that speaker set after many years of service. It was just sitting there waiting to be repurposed. I mounted my pHat Beat to a Ninja diffuser. Then mounted that where the sub woofer used to be. The pHat Beat VU meter is viewable through the speaker cloth. It looks like it was meant to be there. Not liking those tiny buttons on the pHat Beat, and not being able to get at them now anyway, I added my own easy to use buttons. I have since put some labels on some of the buttons. I scored one of those picade clear with white text label sheets. That got me my volume up down, and power etc. I know which button is which but my wife wouldn’t have a clue how to turn it off if I say fell asleep listening to it lol. My electronics was in one of the side speakers. I just striped that out and covered up the holes where the volume control etc was with black electrical tape. I have some stickers on there now, but I’m thinking of going back to the black tape.


Powers goes from 5.24V out from transformer > USB breakout board > Micro USB cable (both ends) > Micro USB power in on the RPi. I decided to go with the standard micro USB power in port on the RPi as it has better protection then the 5v GPIO port.

2nd photo in the link above shows the white cable unplugged…


Ok, wasn’t sure if it was just unplugged and tucked under or not. ;)
The Pi Zero doesn’t have a poly fuse so I “don’t think” it makes much difference where you feed the power in. On any other Pi model feeding power in via the GPIO will bypass the poly fuse. That can be good or bad depending on how you look at it. Your not restricted by the poly fuses current limit but your also not protected by said poly fuse. I do it for convenience. I have a couple of rovers that are battery powered via a powerboost board. My powerboost board is soldered to a Proto Zero which then plugs into the Pi Zero’s GPIO. No cables to mess with other than for recharging the battery.