From-Scratch Build · Physical Computing
Some devices have no remote power control — just a physical button. This build gives a Raspberry Pi a tiny robotic finger: a servo motor that presses the power button of an audio amplifier automatically, so the amp wakes up the moment the Pi boots. Rebuilt from scratch to learn GPIO, servo torque and boot-time automation.
What it is
I wanted a Raspberry Pi to stream music to a stand-alone amplifier — but the amplifier only turns on via a physical front-panel button. There's no network control, no trigger input. So instead of replacing the hardware, I automated the press itself.
A small servo motor is mounted against the power button. When the Pi finishes booting, a script swings the servo arm, the arm pushes the button, and the amp comes to life. No human in the loop, and nothing about the amplifier had to change.
The core idea I wanted to learn: when a device can't be controlled in software, you can still control it in the physical world. A few degrees of servo rotation, timed to boot, replaces a finger.
The stack
A small project, but every layer taught me something. Here is what each part does.
The brain. It both streams the audio and, on boot, runs the script that drives the servo to press the button.
A hobby servo whose arm is positioned against the power button. Rotating it from rest to a set angle delivers the press.
A friendly Python layer over the Pi's GPIO pins. AngularServo handles the pulse-width timing that sets the servo's angle.
Tuned min and max pulse widths so the servo reaches the exact angles needed — and enough torque to actually depress the button.
A service unit runs the press script automatically at every boot, so the amp turns on with no manual step.
A printed bracket holds the servo firmly in place so its torque pushes the button instead of pushing itself away.
How it works
The sequence is short and entirely hands-off:
The Raspberry Pi boots up, ready to stream audio.
A systemd service launches the servo script automatically as part of startup.
The script rotates the servo from its rest angle to the press angle and back, using gpiozero.
The servo arm, held by its printed mount, pushes the amplifier's power button.
The amplifier powers up, ready to receive the stream from the Pi.
A second press to power the amp down on shutdown — left as future work in this build.
Setup notes
The fiddly part wasn't the servo — it was permissions and timing on the Pi:
gpio group so the pins can be driven without full root each time./dev/gpiomem has to be owned by the right group, or the servo simply won't move.In my rebuild the focus was the boot path: tune the pulse widths, confirm the press lands with enough torque, then hand the script to systemd so it just happens.
Reflection