Experimental FM transmitter using Raspberry Pi 2

If you have an extra Raspberry pi around and want to try something fun, you can use the GPIO on the pi to transmit at FM frequencies. For the rPi v1 you can use this link for instructions. For Raspberry Pi2 I found a great application which can be run from the command line, called PiFmRds . Not only will this broadcast audio from a number of sources, but it will also broadcast text, and can issue the station ID info! Really a neat experiment.

To use the Raspberry Pi 2 with PiFmRds follow these steps:

  1. Configure an SD card with Raspbian or other linux distro.
  2. Connect an antenna wire of appropriate length (or none for low range!) so as not to violate local laws
  3. For the next work, we’ll use the Terminal.
  4. To play any file format other than wav or ogg, install Sox
     sudo apt-get install sox 
  5. Install the sndfile library using
     sudo apt-get install libsndfile1-dev 
  6. Install pifmrds with the following 4 commands
    git clone https://github.com/ChristopheJacquet/PiFmRds.git
    cd PiFmRds/src
    make clean
    make
  7. Now you are ready to run the program ***when in operation, if you click on anything outside the terminal it will freeze the rpi. I recommend stopping the play service using CNTL+C before attempting to even use the mouse!
  8. for a list of commands on playing a file and setting a frequency, see the pifmrds page.

Here’s what you should see from PiFmRds, if everything works correctly:

Example output from
Example output from PiFmRds

*Bear in mind that running this in a way so as to provide signal @ 200ft from your location can violate FCC regs! (see this FCC notice ). Obviously, for a number of reasons, I recommend you take extra care to comply with regs.

Pi2 all hooked up!

-Austin


Posted

in

,

by