I was playing with the PiFm on my Pi and successfully transmitted the sound.wav on a specific frequency. That is 94.5 . But when I am trying to do the same on 89.7 , it does nothing. I changed absolutely nothing but the frequency.

What would be the cause of this. Also...maybe not so relevant, when I Ctrl+C the PiFm the sound.wav stops playing from the radio but the regular program does not return.

  • Are you sure your receiver works well with 89.7MHz? Can you tune it to a broadcast station near that frequency (preferably below, since we know it works at 94.5MHz) Commented Dec 2, 2016 at 8:58
  • Also, as stupid as it may sound, have you tried to restart your RPi and transmit on 89.7 without first transmitting at 94.5? Commented Dec 2, 2016 at 9:00

3 Answers 3


Yes, PiFM is great and really, like Fred says, a wow project. Simply transmitting FM on GPIO is was an absolute first for me. It made allot of people, more interested in the Pi, which is great.

There can be a few reasons for your issues.

  1. It may be down to software problems, since there are no guarantees with it, since the Pi is not a certified FM transmission device. Inherently, in most countries it is illegal to broadcast above a certain power since it may interfere with other users, so its mostly personal, up to a few metres.
  2. Expanding on the licensing of FM. It may also be possible that FM range is being overpowered by another broadcaster. Even though you might be right there, next to it, the other FM signal will overlap if its licensed to broadcast at such power. It may sound silent, but it may be broadcasting inaudible bit data, for traffic? Radio Display or other commercial activity in your area.
  3. Some anomaly with your antenna might cause at that frequency may "corrupt" the signal so to say. Make sure your wire is the correct length, purest solid core copper, and straight (no kinks or loops) (solid core copper Ethernet cable is great!)

Really, in the case of personal FM transmission, it is mostly down to the fact that if it works on an FM frequency, utilise that one.

Some troubleshooting:

  • You say you only tried two frequencies? Try a few more but essentially there is no way to guarantee the frequency you want, will work with an unlicensed device like the Pi.
  • Try another wave file, another encoding (preferable 22khz)
  • Try another power supply on the Pi
  • Try moving right next to the receiver, but do not let the antennas touch. There could be a negative impedance issue and could fry either or both devices.
  • Thanks ppumkin, it is true that as long as it works at least with one frequency it is enough. What I did was use a couple of radios as remote speakers for a webradio stream. I'll try changing the encoding and the antenna. Commented Apr 30, 2014 at 7:55
  • #3 is highly unlikely: both frequencies are so close that it's safe to say the antenna that has worked well for one will also work for the other. Commented Dec 2, 2016 at 9:25

You didn't show your antenna, but assuming it's just a piece of wire attached to the pin, it's "tuned" very approximately to the frequencies you're transmitting. It won't work well for GPS or WiFi signals, but if it works for one of the FM broadcast frequencies it will work for others as well.

Two sources of issues remain:

  • the software. You mention stopping your program with Ctrl+C, which stops the broadcast but doesn't terminate the "regular program". Not sure what is that, but it looks like you may not free the resources correctly after the first run, which explains why the second run of the program fails. Try broadcasting again after a complete restart.

  • the receiver. While the second frequency you have tried is within FM broadcast range and must be covered by most receivers, there are exceptions. For example, this particular frequency may be already used for broadcast, resulting in interference, or you may have hit your receiver's image frequency. In both cases, modern FM receivers try to save your ears from cracks and whistles and simply silence the output, which is what you observe. So, try broadcasting at a different frequency.


PiFM is one of those really cool wow projects. I still want to get around to playing with it it's that cool. Unfortunately this means I don't know about the second part of your problem. Still, I have a basic understanding of radio so I can take a stab at what's going wrong with being unable to transmit on 89.7.

A simplified explanation of how radio works is that you vibrate the antenna at your frequency, varying it a little because it's FM - Frequency Modulation. Now the important bit here is that vibration. How much the antenna can vibrate is related to the length of it, the longer it is the more it can vibrate, and you can broadcast at a higher frequency. There's a bit more to it than that involving modes and multiples, but that's the fundamental.

What I suspect is happening to you is that your antenna is just a little bit too long (maybe 1 cm or so). When you try to broadcast, or vibrate at 89.7, the wave travels down the antenna at a frequency it really doesn't want to vibrate at - there's no resonance, so it wants more energy than the Pi puts out, so you get no signal.

There are calculators for working out the correct antenna length, but I think a rough rule of thumb is 300 divided by the frequency, so (300 / 89.7)/4 = 0.836 meters. Not sure about that rule though. Might get away with /8 and 0.418. Note the multiples of 2, that's a resonance/natural frequency thing.

  • 1
    There are so many errors that it would take longer to correct than the post. While it is true that antenna length is related to frequency, the sensitivity with a simple antenna is low.
    – Milliways
    Commented Apr 29, 2014 at 4:10
  • The antenna is really basic. Just a jumper wire that i use with arduino projects. It could surely be better :] . The project surely works , but more frequencies would mean more fun messing around with the neighbors. Commented Apr 30, 2014 at 7:59
  • @Milliways, could you give me some pointers as to what I've got wrong so that I could look into it more? I'm here to learn as much as to try and help others...
    – Fred
    Commented Apr 30, 2014 at 19:18
  • 1
    @Fred maybe my reaction was a bit harsh, I am sure you are trying to be helpful. I was reacting to the idea of encouraging anyone to illegally broadcast. Even at very low power, this would be illegal in the FM band and even though Class Licences exist for low power, this only applies to type approved equipment (the only exception are licensed radio amateurs). Even connecting an antenna to the Pi, without the intention to broadcast would be illegal in most countries, and likely to cause interference.
    – Milliways
    Commented May 1, 2014 at 1:07
  • 2
    @Fred Now to the technical issue. You correctly give the formula for a quarter-wave monopole, although this strictly applies above a ground plane. The 1/8 is misleading. NOTE that even an ideal ¼λ exhibits a broad resonance. An antenna cut to 100MHz would only lose 3dB from 50-200MHz and would be negligible in practice.
    – Milliways
    Commented May 1, 2014 at 1:08

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.