This simple hack turns your Raspberry Pi into a powerful FM transmitter! It has enough range to cover your home, DIY drive-in movie, silent disco, a high school ball game, or even a bike parade (depending on the stragglers).
PiFM software not only boldly enhances the capability of your Pi, but does so with nothing more than a single length of wire. This hack starts with the absolute minimum you need to run a Raspberry Pi — an SD card, a power source, and the board itself — and adds one piece of wire. It’s the coolest Pi device we’ve ever seen with so few materials.
PiFM was originally created by Oliver Mattos and Oskar Weigl, and revised by Ryan Grassel. We’d like to thank the whole PiFM community for inspiration. MAKE’s contribution to the project, the PirateRadio.py script, now enables playback without using the command line, and handles all the most common music file formats automatically. It was written by MAKE Labs engineering intern Wynter Woods. You can find the source code here.
NOTE: The Raspberry Pi’s broadcast frequency can range between 1Mhz and 250Mhz, which may interfere with government bands. We advise that you limit your transmissions to the standard FM band of 87.5MHz–107.9MHz (see Step 3) and always choose a frequency that’s not already in use, to avoid interference with licensed broadcasters.
I’m having problems flashing the SD card. The file from Make contains an .iso file – PiRadio_1-1.iso, but Win32 Disk Imager only seems to work with .img files. Does anybody know how I can either use the .iso file or get the correct .img file?
Thanks,
Dave
Rename the ISO extentsion to IMG, and then use Win32DiskImager to write the image to the SD card. It works flawless. Filestructure is the same, but someone mixed up the extension
That worked fine. Thanks!
The iso file’s partitions are small, and I want to utilize my larger SD card to hold more music. I’ve tried gparted to resize the partition before and after flashing, and it always crashes. Any help/ideas?
Thanks
try booting the sd and type sudo raspi-config, then choose expand filesystem
I know it’s been awhile, but did anyone figured this one out?
Oh man, it’s been a while since I figured this out, but I think I used fdisk over ssh on the pi (or on my Ubuntu machine with SD card connected to it, IIRC either would work) to either make a new partition or resize the existing that utilized the whole filesystem. It may have also involved having that partition mount to a certain place in the filesystem that the python script would then scan (e.g. mount it to /music and have the python script music directory set to /music).
Sorry I don’t remember all the details, it has been two years since I figured it out, but I do know that fdisk did the trick. Hopefully that helps!
Does anyone know if the same thing is possible with a normal (old) computer using the legacy serial or parallel ports? It is possible to write raw bites to these devices. But I don’t know if sufficient speed and power is achievable. Is there anyone who knows if this is possible? And if it’s possible how?
I’m not sure you made any sense there.
What is the SSH password for the pi for the image I flashed?
i think it’s “root”
“root” didn’t work for me. Anyone know the password?
Username is ‘root’ password is ‘root’
Can you please make a video for the antenna part? I don’t quite understand it :/ how dumb I am
how can i add the music i didn’t understand
Is possible some Livesound output streaming. I m thinking long time about using PiFM for live production, is this some how posible???(if not please add this feature;))…
Hi, i have the same question, please it´s posible use for live production?
Oh sorry, my fault. I just wanted to ask, if I can broadcat realtime audio output (when I play from puredata for example…). Im soo newbie. Its called somehow like dev/dsp, I thik, or how read from place where sound output buffer is, or some another way, to do something like cat /dev/dsp > pifm, if you understand. Clearly, how to send sounds, performed in realtime to piFM. Many thaks.
koplsopl
There is a line in pirateradio.py that has audio input set as off, i’m sure if you change it to on and get a sound card with a input jack, it might stream what you what with a aux cable.
If you look at the code, you would have to also uncomment an if statement that is the bottom of the code for that to work
Here is my idea for a little bit better antenna. I started with an ASUS high gain wireless antenna that I had lying around and cut the wire to my preferred length. Then I took a female jumper and attached it to the wire. I used a heat shrink tube to make it more cosmetically appealing. Attached jumper to the pi. Here is what it looks like.
What is the login and the Password please?
user name + root
password + root
It looks good, but it still isn’t efficient. The antenna is made for the 2.4Ghz frequency. Use google how to make a proper FM antenna ;) I built this last week, having a range of 500 meters around the house
Holy! I like your natural habitat :)
can you please post a link to that article?
Necrobumping but 4 monitors????
all thats left is to attach that baby to your roof, and ta da! You get yourself and your neighbours a great time!
It looks good, but it still isn’t efficient. The antenna is made for the 2.4Ghz frequency. Use google how to make a proper FM antenna ;) I built one last week, having a range of 500 meters around the house
A 1/4 wave whip is 234/Fmc and is resonant. A 1/2 wve is about 468/Fmc. This is also highly resonant, and high impedance feed, so input power will be low.
468/F in mhz = Lenght/2 = actual radiator length
Whats the range like with that setup?
Will a radio antenna work with this to broadcast?
generally, yes. Even a RC Car antenna with alligator clips or a pig tail will work.
When I try to edit the SD card, Windows 8 goes directly to the “SYSTEM” partition. Is there any way that I could access the part of the partition that contains the music files?
Kind regards
Nicholas
not with Windows 8 unless you install more software. If you can; install Linux on another computer or dual boot and you can see the other partition. Don’t get a MAC though. They suck.
should both rapbian and the pirate software be on the sd card or just the pirate software
I have the same question; I really want to do this project but don’t understand why I cant have this on my existing raspbian NOOBS card. What am I not understanding?
just rename the .iso file to .img and use win32diskimager and both partitions will be created.
Thank you.
Hi I tired to flash the ISO and Even open in WinRar and it says that the Disk image is broken and I have redownloaded 3 times, Could somone give me an alternative or send me the zip if they have it
I have had mixed success with this one.. When i tuned it to my frequency, 103.8 , it intermodulates to 84.8 and 93.8. Both the intermodulated signals are licensed to commercial broadcasts, and the pi jams on those frequencies. Using it at a farm won’t harm, but using the piFM in the city will get you a fine in no time
usually, it’s not powerful enough to jam signals too far away.
If you put it on the roof ontop of a skyscraper, it will jam with no problems for everything underneath in a radius of 300 meter
Clearly we need to write a makezine article for some people explaining frequency propagation, mixing and interference.
Yes, please!
Give us some data as-built. “usually, it’s not powerful enough to jam signals too far away.” – about 30dB too vague
Arrrrg! Help… Followed everything, plug in RPi and it transmits a carrier, buy no music. I have MP3’s loaded in the Pirateradio partition.. If I change frequency in the config.txt, I get a dead carrier on the new frequency. Was there a start command on Arch that I missing…
Thank for any suggestions.
Ahh.. Apparently older MP3 files aren’t appreciated by the Pi… Transfers direct from iTunes works… You can call me DJ!
I must be missing something! I’m trying this under Windows 7 Professional. I downloaded the zip file PiRadio_1-1.zip. I extracted PiRadio_1-1.iso from it. I downloaded and installed SDFormatter. I put the SD card in the slot and formatted it successfully with SDFormatter. Now when I double click the .iso file, Roxio Creator comes up and wants me to insert a DVD. It does not give me the option of selecting the SD card even though I can see it in Windows Explorer. I also tried right clicking on the .iso file and choosing Windows Disk Image burner. It also will not let me choose the SD card. I have also downloaded and installed Win32DiskImager but it does not recognize the .iso file as a vaild image. Sorry if this is a newbie question (first time trying a Raspberry Pi) but how the heck do I get the image onto the SD card?
Elementary my dear Watson! Choose *.* instead of *.iso and select the file. Duh! It boots up now so on to the next step.
I found if you replace the .iso with .img and use Win32diskimager it was fine.
with Win32 disk imager.
How do I extend or transpose the range of broadcast frequences to cover frequences around 420MHz? I need to do some soldering / use an extension to the raspberry pi. Any guidelines?
Most people have a spare wireless USB modem (3G,4G,…) with a micro-SD slot. Has anyone made a SDR-dongle out of a wireless USB modem and the Raspberry Pi maybe even a GSM jammer?
GSM is at a much higher frequency, however, it is work a try to see with a spectrum analyzer what frequency will cause a spurious emission in the GSM band. But i doubt it. Also, GSM, GPS jammers etc are illegal and i caution you not to use them in a predictable manner.
Well they are not illegal to use if they have a range, which only covers your own premises. That put aside: What is a poor mans best solution, if he wishes to create a jammer or a set of jammers covering low frequencies 10kHz to several GHz (within a small range 1-100m)
So when I flash the MAKE iso to my sd, am I supposed to use a different sd card, or use the one that has my OS installed, sorry noob question.
Great article. I was wondering if any way to hook up an IPOD/Iphone as the input source instead of copying music to the SDCard?
do you want it to read the files from your ipod via usb? that might be possible if the correct drivers exist. probably not the easiest way though. if you actually want the ipod to process the sound and use the jack-out to then transfer the audio to the raspberry that’s probably possible too, but on default the raspberry doesn’t have an audio-in. so you will have to make a modification
I think the easiest options (besides the SD card) are putting music on a usb stick or on a portable hard drive (can be one that’s powered via USB) or on the SD card obviously.
Can i change track/song in any way? And what program is starting that Pirateradio automatically in your Disk image?
I found that to change the track i did a killall command for pirateradio.py i think it was. It’s not a graceful “track forward” command but kills the process. it appears to auto-restart to a new song. I wired a GPIO to a button and got that to work nicely.
how you do it?
Simple, Set a GPIO to input and when input comes in, A specific operation is triggered.
genius. How did you know how to do that?
Hi dylan, how did you do that ? if you can describe i step by step i will be glad for that.
where is the pirateradio.conf located and what other software is needed?
The ISO File is Broken !!
rename the .iso file to .img