# FM transmitter antenna length

I'm a new raspi user, and I'm starting to build some projects with hardware. I would like to try this FM radio station for example, but I have a doubt about the antenna's length. This is important because I don't want cause problems, or do something illegal. I've got a raspberry pi3 modelB, and would like use a normal jumpwire as antenna.

In one of the tutorials I've found this formula to calculate the antenna's length: centimeters = 300/MHz / 16*100, which should be 46cm antenna for a 103 MHz transmitter.

My doubt is this: I understand the first part of the formula, but what does the `/16*100` part mean?

More doubt: The tutorial says it's better to also divide by two, to stay in a 40 m range... How can I calculate the range of transmission? Does the voltage and antenna diameter increase the transmission range?

Last: May the signal be transmitted without a wire antenna at all? (i.e. eliminate the jumpwire, and use only the pin (PIN 4 GPIO on a 5V)?

• To the extent this question seems to involve regulation, I don't think we can answer for at least two reasons: 1. We don't know where you are and therefore don't know which jurisdiction's rules to apply. 2. There probably aren't experts in law hanging around here. I suggest that you break this question up into some smaller pieces if you want to try again. Dec 24, 2018 at 14:03
• thanx Brick basically I want to know how to calculate the trasmission range and if the formula posted is correct. Also important if the PIN 4 without antenna can transmit signal and eventually its range then , if it's true and how the voltage got an influence on the range once i know this, I can decide Dec 24, 2018 at 15:55
• Regardless of the legality the question has nothing to do with the Pi.
– joan
Dec 24, 2018 at 16:56
• For the length question, I suggest taking your question to electronics.stackexchange.com (where it probably already has an answer). If you want to know about the GPIO pins, then I suggest writing that into a question of its own. Dec 24, 2018 at 16:59
• @uhoh... agree, RPi SE is definitely a friendlier place :) Dec 28, 2018 at 13:58

Welcome to the Raspberry Pi SE site! Your question may be judged as off-topic for this site (not saying it will, but it may be), but personally, I'm happy that you've asked it. I say that only because radio applications for the RPi don't seem to get a lot of coverage here - which suggests to me that folks are missing out on one of the best application areas for this amazing little computer: Software Defined Radio!

That said, it seems that your question is mostly concerned with the antenna design, and calculations presented in the tutorial. I'll make that assumption, and formulate my answer accordingly. However, if I've missed the mark in my assumption, please let me know, and we'll adjust fire.

For the most part, the equations used in the tutorial you've referenced are based on general guidelines for antenna design. Briefly, here are a few items that you already know, but others might not:

• Wavelength is defined as the velocity of wave (near the speed of light for rf, or ~ 3x108 m/sec)) propagation divided by the frequency of the wave; L = v/f.
• Dipole antennas operate most efficiently when they are at or near resonance, and resonance naturally occurs at specific multiples of the wavelength, the shortest of which is 1/2 wavelength.

Armed with this information, we can calculate the length of a half-wave dipole antenna for resonance at 107.9 MHz:

L = v/(2*f) = 3x108/(2 * 107.9x106)

= 1.39 meters

And so if you built a dipole antenna to this length, connected it to the Pin 4 GPIO (PWM), and drove that pin at a center/carrier frequency of 107.9 MHz, you'd have a reasonably efficient (and probably illegal) transmitter. The software in the tutorial (`PiFmRds` and `Sox`) applies the frequency modulation to the combined baseband + RF carrier, pumps it out over the PWM GPIO pin, and now you've got a reasonably efficient (and probably illegal) FM radio transmitter! Which is very cool! (but probably illegal!).

### Finally to your question re. why the `16*100` factor:

First, the `100` factor is apparently due to the author's desire to express his result in `cm` rather than `m`! This conclusion due to the diff between the exponents for the speed of light (v = 3x108) and frequency (f = 107.9x106). But as he's already accounted for this (using 300 instead of 3), and he expresses his answer in `cm` rather than `m`, then it must be a conversion to `cm`. And note that if you ignore the `100` factor, you will get the same answer as the tutorial's author did, but in meters.

Second, I guess the `16` factor is to deliberately reduce the antenna to a size that makes it very inefficient, thereby reducing the radiated power, and perhaps keeping this radiated power below the legal limit.

Note however that the tutorial author muddies things again by dividing by `2`! This seems unnecessary as the antenna is no longer a half-wave dipole. In my opinion, this is either the result of a "copy-and-paste" operation gone wrong, or perhaps the author's (or my) failure to comprehend.

### How to calculate the range of transmission?

You would need to calculate the Effective Isotropic Radiated Power (EIRP). And since you're building an "electrically small", inefficient antenna, you would need to construct a model of the antenna (or find someone who's already done that). There are some free antenna models available that are reasonably good - EZNEC is one. Be warned that antenna modeling can be rather arcane and very time-consuming!

Once you've got EIRP calculated, you can use that value in the Friis Equation to calculate power vs. range, or more simply calculate the free space path loss, and subtract that value from EIRP.

But understand this before you attempt these calculations: You're going to get a very small number, and the number you get won't be generally accurate at all. If I were doing this, I'd simply use the antenna size provided in the tutorial. I'd then use a small hand-held FM radio, tuned to the transmit frequency, and experimentally determine the range (Hint: It won't be very far from the transmitter using the antenna lengths provided in the tutorial).

### Does the voltage and antenna diameter improve the range transmission?

Increasing the voltage will increase EIRP, and thereby increase range.

Increasing antenna diameter will, in general, increase bandwidth very slightly, but will in general not increase EIRP.

### May the signal be transmitted without a wire antenna; i.e. only by the pin (PIN 4 GPIO on a 5V)?

Yes. This will (probably) further reduce antenna efficiency, and reduce range. Again, experiment as above using a hand-held FM radio.

• really thnx seamus for the answer! it actually seemes quiet complicated, so i'll leave the project and probably will try again in the future, when I'll be more expert and confident. Maybe it's better starting with something easier, like some 433mhz transimtter/receiver projects ... thnx again! Dec 28, 2018 at 13:31
• @onec0de: Oh I am sorry to hear that! It's really not that complicated... you can do this! Just ignore the negatives, and press on... the antenna only becomes a real issue if you're trying to maximize transmit range - and you're trying to do the opposite. Dec 28, 2018 at 13:59

I have much doubt that you can exceed the maximum permissible EIRP on the broadcast FM band in the US or Canada using a passive antenna connected to a GPIO pin. The RPi already generates a ton of RF in much higher and lower frequencies.

That is an interesting article -- very minimal outside help. That help is very key, however. One thing that should be done prior to antenna construction is to find a very quiet frequency -- you are not going to be able to work near any local ones. Not because you might interfere with them, but rather because they will drown your RPi out completely.

SDR -- is awesome, but only a tiny bit of it is transmit because of those same restrictions. If you have interest in RF -- SDR is the way to go. GNU Radio Companion is like having a radio shack on a RPi. I have 5 SDRs, including a HackRF One. If you have an interest in RF, an investment in SDR gear is a good idea. The software available for SDR in every band is -- just amazing. The cost of entry there is about \$20 and the same installation/configuration that any new subsystem entails.

If you just want to broadcast audio on FM -- there is already a very inexpensive option that can even use Bluetooth in some cases. They do not exceed US FCC regulations and you can buy them almost anywhere. They are intended for automobiles that lack an AUX audio input and cost next to nothing. The audio output on RPi is just horrible -- noisy on all of mine. (7 at the moment.) Maybe if you could output the audio from the RPi on Bluetooth and then the FM transmitter would get better audio.

Adafruit makes an FM transmitter for about \$20, but it uses the line audio.

433Mhz is another possibility -- there are tons of signals in that band and it is amateur friendly, too. I have an Acurite weather station that uses that band. So do fobs, garage door openers and tons of other things.

• my goal is not to build the perfect antenna, my goal is to learn something about RF. I chose the project on FM radio because I thought it was the only one to do without adding hardware, only with the RPI. but then I discovered that there are others, in input and output. anyway I'm in europe and I saw that the original project (this: icrobotics.co.uk/wiki/index.php/…) specifies that without an antenna the range is ~ 10cm, so no problem. in the meantime I purchased the 433mhz transmission and reception modules and are awaiting delivery. Jan 4, 2019 at 13:48
• You recommend using an SDR system but the point is being able to do as much as possible with the RPi only if therefore the raw pin can be used as an antenna, it means that the antenna length is not so relevant. Jan 4, 2019 at 13:48
• in this case I wonder if it is possible to use i.e. the gpio 4 as transmitter (settiing pin in out mode) and another pin near ie gpio 22 as receiver (settiing pin in in mode): what I would really like to do is analyze the frequency (in or out is the same) and see the wave through software (I discovered one called GTKWave that maybe it's okay), but I do not know if it's possible in my mind if I activate a gpio in output and do not connect any jumpwire I should have a very short antenna (the pin) and if I'm not mistaking it should generate a frequency ~ 50hz, right? Jan 4, 2019 at 13:48
• The RF power is not probably sufficient to reliably change state on a disconnected GPIO pin. The thing that allowed Tesla to be such a showman is the fact that there is practically no current in freely coupled energy. Also, there is a lot of circuitry designed to filter line current noise out, as it is unwanted in a stable system. You can hear all the audio noise in a RPi by plugging a powered speaker into the audio jack. I tried that to get my Rpi speaking and -- it works, but -- there is a lot of noise there. Jan 6, 2019 at 0:35
• hello jinzai thanx again for your answer, unfornuately I'm not yet into eletronics to really understand your last comment ;) anyway I'll wait for my new hardware to test something with 433mhz Jan 7, 2019 at 10:47