PiFM Radio Transmitter

This was one of the easiest projects on the RasPi that works very well. Using the PiFM application, you can turn your Pi into a low-power FM radio station! I was playing around with my new Pi B+ revision I just received and came across this project in the Raspberry Pi Cookbook. Here I will detail all that is needed for you to complete this project too.

The only one hardware change you need to make is to create the antenna by adding a short length of wire (<12″) to GPIO Pin #4 on the IO header. Warning: Do not do this with the Pi running, it will restart if you touch any two pins together!

After adding the wire, boot up and follow these steps starting from the command line in your home directory:

  1. mkdir pifm
  2. cd pifm
  3. sudo wget http://icrobotics.co.uk/wiki/images/c/c3/Pifm.tar.gz
  4. tar -xzf Pifm.tar.gz
  5. Set radio receiver to target frequency (here I use 103.0)
  6. sudo ./pifm sound.wav 103.0

As you can see this is very simple. After downloading the package and uncompressing it into a new directory, we can run the command providing two arguments, namely the sound file to play and the frequency to play it at.

The radio receiver does the rest of the work here. If you are like me, and have an analog radio, it does take a bit of fine dial tuning to get the right frequency. A digital tuner would be best here.

Hearing Star Wars play your success is a nice moment to share with a young budding engineer. My Son nearly lost it when the room filled with the theme song. He really didn’t believe I could have it working in under five minutes.


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s