My Raspberry Pirate is now radio-active

RaspberryPirateRadio

Two weeks ago, Make Magazine published a simple hack that turns your Raspberry Pi
into a low-powered and portable FM transmitter/radio station.

For those of you not familiar, the Raspberry Pi is a single-board computer developed in the UK by the Raspberry Pi Foundation. The RasPi is a cleverly-designed, useful device–especially if you like tinkering with mobile computing. Best yet, the Raspberry Pi is very inexpensive; the basic computer costs a mere $40 US, though there are starter kits that include common accessories for $70-80.

One of the first things I did upon returning home, following nearly two weeks of US east-coast travel (which included the Winter SWL Fest), was to build my own Rasberry Pirate Radio. I had hoped to make the radio before my trip, but thought I wouldn’t have enough time. Had I known what I know now–that the Raspberry Pirate Radio is a super simple and easy hack–I would have made it anyhow and taken it along for the ride.

My antenna wire connected to pin 4. (Click to enlarge)

My antenna wire connected to pin 4. (Click to enlarge)

To be fair, what makes this project so simple is the fact that Make Magazine so beautifully documents the procedure on their website.  It also helped that I have a little familiarity with creating disk images–still, I’m certain that if I were a total newbie, I could have done all of this within 30 minutes…Which is just what I did.  And I’ll bet you can, too.

There are really only three steps required to make your own Raspberry Pirate Radio:

  1. Make a simple FM antenna and attach it to pin 4 on the Pi’s board. In my case, I had a small dual conductor connector attached to about eight inches of twisted pair wire. I simply connected one side of this connector to pin 4. Since my FM antenna is not cut to a resonant length, I know I’m compromising the FM transmitter’s range a bit…Still, it’s what I had on hand, and it works!
  2. Download Make Labs‘ disk image and flash it to your SD Card.
  3. Add music to the “Pirate Radio” partition of the SD card and edit the config file to your preferences. If you have the option to do this step on Mac OSX or Linux, the process is much easier than on Windows. But Windows users, fear not: Make Magazine describes, in detail, how to add files.

After I finished these steps, I simply plugged in my Raspberry Pi and tuned one of my radios to 89.9 MHz (the frequency I chose and saved to the config file). The Pi booted and started the Raspberry Pirate Radio script automatically.  Brilliant!

RaspberryPirate-FMRadio

It’s alive!

Being a shortwave radio nut, of course I loaded my Raspberry Pirate Radio with a few gigabytes of my off-air recordings that are a heavy on music (all of which you, too, can pull from our Shortwave Radio Audio Archive). It’s kind of fun tuning my bedside Tivoli Audio Model One to 89.9 MHz and hearing the Voice of Greece, with all of its shortwave audio characteristics. If I close my eyes, I can pretend the Model One has a shortwave band. Love it!  Just the thing to drift off to…

I’ve kept the Raspberry Pirate Radio running nearly 24/7 here at home. I’ve also had excellent luck running the radio mobile by using my Eton Rechargeable Battery Pack as the power source (Universal Radio also sells a higher capacity version, if you like). I’ve yet to test how long the power block will run the Raspberry Pi, but I imagine it will last for a couple of hours, at least.

RaspberryPirate-EtonBlock

If you want to take your Raspberry Pirate Radio in the car, it’s a simple matter to power it with a 5VDC USB power plug. You probably already have what you need, especially if you charge your mobile phone in the car.

If you’ve never experimented with the Raspberry Pi, this is a perfect first project for you. Just think about it: for under $50, you can make a simple-yet-effective FM radio station which shuffles your favorite music or recordings from any source–from obscure radio pirates to far more distant stations. Besides, once you have a Raspberry Pi, you’ll find there are thousands of other radio projects to occupy your rainy weekends.  Enjoy!

Many thanks to Make Magazine for posting this simple project!

Update: Several people have written concerned that the Raspberry Pirate Radio has no output filtering of its RF signal.  This is true. Though I have not tested it, I would have to assume that it could radiate on harmonic frequencies and potentially interfere with other radios. Though the broadcast footprint is very small, if you live in a high-density neighborhood, you will need to keep this in mind. I live in a very rural area and my nearest neighbor couldn’t possibly hear my Raspberry Pirate Radio.

I’m very curious if there’s a simple mod to filter the output RF. If you can think of one, please comment!

Spread the radio love

33 thoughts on “My Raspberry Pirate is now radio-active

  1. Stefano Mollo

    HI there;
    this is amazing!!!

    Questions:
    1) what if I want to transmit in NBFM (Narrowband FM)? Like 16 or 25Khz bandwidth ….
    2) what if I want to TX DRM+ or DAB+?

    Cheers, Stefano.

    Reply
  2. Jan Eirik

    actually hooked it up on the wrong pin the first time around. Surprised at how good a reception it was. Now, it goes all the way down though three floors of concrete.
    Using a reconditioned wifi-antenna from an old gigabyte motherboard.

    Might have to either ramp it down a bit when I take it with me to work in the company car.
    does anyone know if for instance a signal broadcasting on 88mhz can interfere with something that runs on 44mhz? Not too worried about civilian radio stations. I’m worried about inadvertedly interfering with the com tower when I drive past the air port, or something military (the military in norway used to operate at 25-75mhz when working with ANPRC radios. they got digital these days though, which runs on something else entirely I think. but still..)

    Reply
  3. Lynn Willis

    I’m using mine at work because I got sick of listening to the same thing over and over, intersperced with commercials. My problem is, I have a 32Gb card, but only about 1.2Gb is usable by the PirateRadio partition. Is there any way to expand this? I’ve tried using gparted, which tells me I have a larger partition, but when I go to put music on, it’s still acting like a 1.2Gb partition.

    Reply
    1. tgrantt

      This is way late, but I had the same issue. I booted my laptop with a Linux CD, (Puppy) and through in the SD card. Then I used GParted. I unmounted the 1.2gig partition, allocated the extra space to it, and Bob’s your uncle.

      Now, if I knew why the music is dragging, I’d be happy.

      Reply
  4. amaury

    hello

    i have tryd to extract it on my sd card (16GB) but the computer says that it is not enouhg storage how do you do that

    Reply
    1. Neil W2NDG

      Sounds like the card may have some sort of partitioning on it from a previous image. If there’s nothing on the card you need, I’ve always used Active Kill Disk: http://how-to-erase-hard-drive.com/
      AKD will low-level format the card, allowing you to reformat it to its full size. Just BE CAREFUL to make sure you are erasing the correct drive. If that still doesn’t work, the card could be damaged, or a mis-labeled counterfeit.

      Reply
      1. amaury

        thank you but i got a second problem to

        if i extract the file i get another file thats called ” piradio1-1″
        if i extract that into my sd card he will say that the file is damage what should i do ??

        Reply
        1. Thomas Post author

          Amaury, Neil is spot on. I think this is the source of your confusion. When you flash the image to the card, you’re essentially making a Raspberry Pi boot disk out of the card. If you follow the guide Neil mentions, it’ll put you on track. As the guide will point out, be *very* careful to only select the flash card as the disk to burn the image to. Typically, the application you use to flash the image defaults to the correct drive letter.

          Reply
  5. Neil W2NDG

    I tried this out a couple of weeks ago. It worked for me too. With an 18″ antenna it covered the house, and as far as the curb and driveway. Just for giggles, I hooked it up to my attic antenna, and got about 1/10th of a mile and more, but immediately disconnected it when I realized that, yeah, it CAN radiate a bit. Keep the antenna short, and you’ll be OK legally.

    One thing I noticed while streaming music was a sight warbling sound on long notes in the music. I think that is a by-product of the way it is modulating the signal. Otherwise, it was an interesting experiment.

    There are ways to get external audio into it if you look at the original project, but you’ll need an auxiliary sound card. I’m wondering how hard it would be to make some filters, and a small 5 watt amp, and turn a Pi into a 2 Meter fox hunt transmitter.

    Reply
    1. William Sitton

      There is a way to correct the slight warbling sound coming out from the modulation.

      To fix this you need to coil about 1/5 of the antenna, this should be done from the base of the antenna not the top. that should help keep the modulation down and the transmit rate a tad faster. I dont know much about signals but I do know that this could possibly fix it. this is all based on my knowledge so I’m not a expert 🙂

      Reply
  6. Dan Novak

    Great project, thanks for posting. I have 3 questions related to using this setup to possibly stream music throughout the home:
    Is the RF output generally strong enough to fill an average home?
    Have you tested the fidelity of the broadcast? (suitable for music)
    How difficult would it be to set up audio inputs on the Raspberry Pi to constantly stream an audio signal?
    thanks!
    Dan

    Reply
    1. Thomas Post author

      Hi, Dan,

      I find that the RF is enough to fill my home–the Raspberry Pi is centrally located. I’m sure I could increase the range by cutting a resonant antenna wire, but frankly I don’t need the extra gain.

      The fidelity is pretty good and even in stereo if you wish (you can change this in the config file). Since I’m streaming a mono recording, I transmit in mono. It’s certainly suitable for music and sounds quite good in stereo.

      I’m not sure how you would set up a constant stream from an external audio source. The current Raspberry Pirate script doesn’t support this, but I bet someone will modify it to work. I believe you would have to connect to the source via USB.

      Cheers,
      Thomas

      Reply
    1. Thomas Post author

      Good question, Dan. The only input the Pi has, besides the SD card, is two USB ports, so it would have to be done via one of those. The Pi does have audio (1/8″ stereo) and video out (via component and HDMI).

      Reply
    1. Thomas Post author

      Hi, Paul,

      I just put a note in the post warning people that since the Pi has no RF output filtering, harmonics could be a real concern. In my case, the RF footprint of the Pi only extends to within a few feet of the outside of my house. My nearest neighbor is far away and not line of site. I’m not sure I would use this in a high-density area until tested to be okay.

      -Thomas

      Reply
    2. Dylan

      You do not want to be using this as a long term, stationary FM transmitter. If any of your signals interfere with air traffic control, emergency services (police, ambulance), etc they will come looking for your signal and ultimately you. Looking at a spectrum analyzer with a frequency of 88.7MHz there are harmonics all across the VHF band. Centering on 121.5MHZ, your aviation band emergency frequency, there are harmonics and intermod products all through aviation VHF band (118-136MHz,) and VHF navaids (108-117MHz). If you use this you will splash onto these frequencies. If nobody complains, nobody will come looking for the signal. If this does interfere with aircraft, I guarantee you someone, (FAA in US, Industry Canada in CA) will come by with a DF and find you and you can be charged. Use with caution.

      Reply

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.