How to Build Pirate Radio with Raspberry Pi zero
In this article, we will walk you through the basics of setting up Raspberry Pi Pirate Radio using FM transmitter software and a cable. Basically, this piece of software allows you to send an FM signal through your GPIO pin. This means that you can set up your own little radio station, but note that because the signal is limited to mono, most of the wires are not the best antenna, so the sound quality and range are poor.
In addition, please note that with regard to the laws and regulations on FM frequency broadcasting, please ensure that you review the laws of your country before continuing this tutorial to ensure that you do not violate any law.
Required Hardware to Build Pirate Radio with Raspberry Pi zero
- Raspberry Pi zero w (Buy Amazon)
- Micro SD card (Raspbian Loaded)
- WIFI network connection
- Radio Case Pirate Radio Pimoroni (Buy Amazon)
Set up your Raspberry Pi pirate radio
Before we start this tutorial, we first need to connect a wire to the GPIO pin, also called the seventh physical pin. If you are unsure of the GPIO pins we are discussing, check out our GPIO guidelines.
This wire will serve as the antenna for Pirates of Raspberry Pi. For our tutorial we just used a simple breadboard wire, which is not the best antenna, but it is enough proof of concept. A 30 cm long 12 AWG wire should be playable in a small room.
Before installing our basic pirate station and installing the FM transmitter, we need to run an update on the Raspberry Pi using the following two commands.
sudo apt-get update
sudo apt-get upgrade
According to Pimoroni’s instructions, with a few exceptions, you can build this suite. As you can see from this picture, I replaced the nylon screws that came with the kit with metal screws. This is optional, but it makes the build more robust, as you will see in step 3. The second change is more important: do not use the title bar that comes with the kit. Follow the instructions in step 4 to replace the long pin female.
With these two changes in mind, continue with Pimoroni’s instructions on how to make a pirate radio station:
I used two metal machine screws to give an extra mechanical connection to the front panel, Phat Beat and Pi Zero. Then, for the sake of appearance, I changed other nylon screws shown on the front of the radio to match with the screws. To do this, you need six 6-32 x 3/4 “metal machine screws and nuts.
His Pirate Radio Kit comes with a. Male 2×20 lead soldering to the Pi Zero W and a female 2×20 lead soldering to the Phat Beat.
Follow the instructions included with the kit to install a 2 x 20 female in the Phat Beat.
As shown, do not use the positive pins on Pi Zero instead of the negative pins on long pins.
Adafruit’s product page for this long pin header: https://www.adafruit.com/product/1979
This head allows us to easily connect the button switch.
- The bottom panel is a transparent piece with an edge label on the left; behind it is a clear piece on the right.
- Track the required back, side and bottom dimensions from the assembled pirate radio.
- Cut the acrylic plastic to make these pieces. (There are a variety of ways to cut acrylic plastic, and band saws are handy, if any.) Cut outside the line and hit the sand on the line. If you mark it with tape, it’s easiest to see your line.
- Sand the edges to the final size using sandpaper – use a sander if you have one to get this step done quickly.
- Note that each side panel has holes. The holes in one panel are used to switch wires and the holes in the other panel are used to open/close the toggle switch. The hole size should match the size of the on / off switch.
- Draw the edges and edges on the back. I used the mahogany acrylic paint to the side and the rim with the neon blue acrylic craftsman’s paint.
- We will later glue these parts gently with hot melt glue.
This is how the pirate’s shell looks when done. The figure shows the six control switches on the switch panel and the on / off switch on the right. You will see how to add these switches in the next two steps.
The switch panel uses six momentary switches and a perf plate. I painted the top of the perf plate with a mahogany acrylic paint to match the side plate.
I use Adafruit’s “Colored Round Tactile Button Switch” as a switch.
These switches have a rounded cap, as shown in the other pictures. Select cap color to match the sticker provided with the kit.
In these pictures, you can see the initial position of the switch on the perf board. In the next step, we flipped through the orifice and soldered the cable.
Use 6 standard solid copper wires # 22 to solder a wire to one terminal of each switch. The wires are about 8 inches long and can be trimmed later, the red and green lines in these pictures.
Connect the second terminal of each switch to ground (bare/black in the picture).
Pimoroni offers stickers with Pirate Radio Kit. The displayed sticker identifies the switch function. As shown, paste the sticker onto the switch button.
This figure shows the switch panel before installing the side, back and bottom of the enclosure, and before the Pi Zero installation.
- If you are using an external speaker, switch the Phat Beat’s speaker switch to “Stereo” before installing Pi Zero. If this is your choice, you do not need to attach the pirate radio’s internal speakers.
- Install the speaker wire – Use the built-in speaker (mono mode) or external speaker (stereo mode).
- Insert Zero’s pin into Phat Beat’s head and Pi Zero to Phat Beat.
- Use metal screws to secure everything.
- Then prepare to connect the switch wire to the female on the Pi Zero. The next step shows how.
This procedure shows you how to connect the switch wire.
For more information, see https://pinout.xyz/pinout/phat_beat
In order to control the functionality of Pirate Radio, we will use these pins on Pi Zero:
- 5 Fast forward
- 6 Play / pause
- 13 REWIND
- 26 Volume down
- 12 on / off
- 16 Increase the volume
The pin number refers to the GPIO pin on Pi Zero.
Use the figure above to connect the switch wire to the 40-pin connector as shown. Trim the wires to length and remove the insulation from the end of each wire. Plug the cord into the appropriate socket on the plug.
This shows the appearance of the completed pirate radio mod.
The project places the VLC radio on your Pi and takes control of the buttons on the pHAT BEAT.
The recommended way to install this project is to use our one-line installer as this will ensure that the pHAT BEAT is set up for playback correctly:
Curly https://get.pimoroni.com/vlcradio | Celebrations
Also, if you are sure you have a working setup and just want to refresh this project to get all the latest improvements, you can run:
After installation, you should be asked to restart. If not, restart 🙂
When the VLC radio is ready, the VU should flash briefly. Press FF or REV to start playback.
If you want to add a stream or control play and volume (if you are not on the radio) (leave the username blank and use the password raspberry), you can also access the VLC server via http on port 8080.
The project provides a default playlist, but of course, you can (and may want to) tune into your favorite radio stations.
You can create a playlist.m3u and put it in your home folder (located at /home/pi/.config/vlc/), or if you do not want to log in via ssh, playlist.m3u can also be put in from another The computer’s SD boot partition and VLC daemon will copy it for your convenience.
Restart (or restart the vlcd service) after editing or creating the file for it to take effect.
You may also like to read these articles