How to Turn an Old Radio into a Smart Speaker with Raspberry Pi
I converted an old radio into a smart speaker that works with Apple and Android devices with a Raspberry Pi and Adafruit Speaker BonnetMaker Projects
My new smart speaker is great; built in 1969, it works with all modern Apple devices with almost no hassle. Of course, new is perhaps overstating this a bit, as I took a vintage 1969 pocket radio (an Aiwa AR-865) that I bought at a yard sale and converted it to work as an AirPlay speaker, much like an Apple HomePod.
Photo: Richard Baguley My Upgrade Process
When I am working on a project like this, I try to follow two simple guidelines:
- No change to the exterior of the product
- All changes are reversible
This means that, if I change my mind, I can remove the changes and restore the radio to its original state. This isn’t purely for aesthetic or historical reasons: it also makes it easier to upgrade the device further down the line to try something else. I may, for instance, want to add a feature such as a display, or install a more powerful SBC to handle more audio sources. By respecting the original design, I make it easier to un-do any changes and smooth out the upgrade process.
Removing the Radio
The first step was to carefully open the radio's case to see what was going on inside. Popping off the back cover to reveal the glorious circuit board, complete with the eight, count ‘em, eight transistors. For reference, the Pi Zero W 2 I am replacing this with has several million transistors.
Unfortunately, my examination also revealed that the circuit board was damaged. At some point, someone had left dead batteries in, and they had leaked acid as they degraded. That damaged the battery contacts and other components; the radio no longer works. That’s a pity, but I’ll keep the circuit board and see if I can fix it another time, mainly because of the fantastic hand-soldered and hand-routed design. They just don’t make ‘em like this anymore.
Photo: Richard Baguley Like most devices of this era, the radio was designed for easy repairs, so removing this circuit board only required removing three screws. Under the circuit board is the speaker, which is in perfect condition. That’s great because I am going to use it. I also removed the two dials for volume and tuning and the headphone socket and set them aside.
Adding the Raspberry Pi
Once the interior was clear, I started planning. The brain of the smart speaker is a Raspberry Pi Zero 2 W, a tiny single-board computer (SBC) that includes memory, Wi-Fi and most of the other clever stuff we need. To this, I connected an add-on board called the Adafruit Voice Bonnet, which has a small but powerful audio amplifier. This drives the original speaker from the radio, which is surprisingly good considering it is over 50 years old. The amplifier is a bit underpowered for the speaker, but it works well enough.
To power all of this from a battery, I used an Adafruit PowerBoost 500C, a neat little board that handles all of our power requirements in one: it takes power from a USB input and charges a lithium-polymer battery and can power the Pi Zero 2 W. So, I can run it from the battery, then charge the battery by just plugging it into a micro USB power source like an old phone charger. The battery is a small 2000 mAh 3.7 v Lithium Ion battery, though the PowerBoost works with any 3.7V Li-ion battery; this combination gives me several hours of battery life, but you could use any bigger or smaller battery, as long as it is a 3.7V Li-ion one. Finally, I connected the left speaker terminal of the Speaker Bonnet to the speaker of the radio with two bits of wire.
Photo: Richard Baguley Connecting the Smart Speaker to my Network
To connect the smart speaker to my home network, I used a lovely bit of open-source software called ShairPort Sync. This turns the Pi Zero 2 W into an AirPlay output device that works with any Apple device, allowing me to send sound from my iPhone to the speaker. I used the lite version of Raspbian OS on the Pi, as I won’t need the extra desktop stuff. To install, run the Raspberry Pi imager and go to Raspberry Pi OS (Other) on the OS menu and select Raspbian lite. After installing and booting up the Pi, use the following commands to update the system and install ShairPort:
sudo apt update
sudo apt upgrade
Next, set up the software for the Audio Bonnet. I recommend following the detailed install section of the Adafruit guide. That involves a bit of editing, but it isn’t particularly complex and is, ironically, easier than the simple setup.
Once the process is finished, test the speakers with the following command:
speaker-test -c2
One thing to note: you might only hear sound coming from “one side” while doing the test (IE: when it is “sending audio to the left speaker”) because we only have one speaker to work with here; this is a mono radio, and we’ll handle that in a bit.
Now that the Audio Bonnet is set up and working, install Shairport-Sync:
sudo apt install shairport-sync
I also made a couple of very small changes to the Shairport config to make the system work a little better:
sudo nano /etc/shairport-sync.conf
To correct our single speaker issue, on the line that reads:
// playback_mode = "stereo";
Deleting the leading // and changing stereo to mono will fix the issue:
playback_mode = "mono";
I also disabled standby mode by changing this line:
// disable_standby_mode = "never";
I deleted the leading // and changed never to auto
disable_standby_mode = "auto";
A quick tap on Ctrl-X and Y for yes saved the changes. These two changes set the system to output mono sound, and change the way that Shairport starts up to stop the speaker clicking when it first starts playing audio.
Finally, I set the system to run Shairport whenever it starts up:
sudo systemctl enable --now shairport-sync
Now that the system is up and running, I tested it by opening AirPlay on my iPhone and looking at the devices I could send audio to. One of them was called Aiwa: the name I gave to the device. When I clicked on this, the audio from my iPhone was redirected to the speaker of the radio.
The Finishing Touches
I could just stuff all this in the case and be done, but I wanted something a bit more elegant than that. So, based on the dimensions of the original PCB of the radio, I designed and laser-cut a piece to replace it. I then attached the components to this and mounted it in the case. I could have built a PCB here, but there aren’t that many connections, so a few bits of wire sufficed. I used wood because I had run out of plastic, and I kind of like the retro-style look.
Photo: Richard Baguley I also designed this so that the micro USB port of the PowerBoost is where the volume control was on the original board, using the now-empty slot as easy access to the micro USB port for charging. I added a simple switch wired to the “enable” pin of the PowerBoost that works as a power switch: when you flick the switch, the PowerBoost sends power to the Pi. Flick it again, and the power is cut off. It’s not as elegant as creating a proper power switch that signals the Pi to shut down, but it is a lot easier to connect.
Finally, I put everything together and turned the speaker on. Now I can enjoy streaming tunes and pretend to be a beatnik in 1969 listening to my fancy 8-transistor radio! Groovy!
There are plenty more things I could have added here, such as status LEDs and a more efficient way to turn the radio on and off; it would be better to create a proper power switch that shut the Pi down more politely, as it could corrupt the storage if it is writing to the card. There is also no volume control dial, and volume can only be set from the streaming device. I was planning to use the original volume dial, but that seems to have gotten damaged somewhere along the 50-year lifespan. I could replace it with a rotary encoder connected to the Pi.
I would also love to use the tuning dial for something. Perhaps I’ll expand the device to access streaming audio from internet stations, and use the dial to select stations. Or perhaps I’ll just upload the complete woodstock soundtrack and leave it playing forever for that genuine 1969 feeling…
Read more: Raspberry Pi projects:
- What You Need To Know to Get Started With Raspberry Pi
- How To Turn Your Raspberry Pi 4 into a Retro Gaming Console
- How To Create an AI Voice Assistant with Raspberry Pi
- How to Tame Your Raspberry Pi's Local AI
Richard Baguley is a seasoned technology journalist and editor passionate about unraveling the complexities of the digital world. With over three decades of experience, he has established himself as a leading authority on consumer electronics, emerging technologies, and the intersection of tech and society. Richard has contributed to numerous prestigious publications, including PCMag, TechRadar, Wired, and CNET.
