Live data from Hacker News

Turn Raspberry Pi’s GPIO into an FM Transmitter (2012)

icrobotics.co.uk

71–80 of 89 posts

Re: Turn Raspberry Pi’s GPIO into an FM Transmitter (2012)

#71
post #68

Earlier quoted context omitted.

Nevertheless, the threat is to public safety communications. And not all Public safety use TDMA (or whatever). Aircraft communications is probably the most vulnerable, but so are HF/VHF marine operations, military and a host of others. TDMA amplifiers could well be a problem in your country, but the whole point of the discussion is that transmitting a wide band of RF hash will certainly be detrimental to thousands of…

Amplifiers are often protocol agnostic. Whether your amplifying TDMA, Trunked radio, CDMA etc. Aviation needs to modernize, I have zero sympathy for the aviation community getting constant hallpasses on ancient altimeters that lack filters to reject RF from nearby frequencies, leaded avgas, and abysmal working conditions for those stuck in the industry. The FAA dragging their feet in the USA trying to act like they s…

Aircraft use AM on VHF because it is still the most efficient mode.

Unlike FM it doesn't suffer from the "Capture Effect" so you can tell if a weaker signal is trying to get through on a busy channel. And unlike FM it doesn't suffer from the Threshold Effect where weak signals suddenly disappear into the noise.

And of course Digital modulation is ruled out by both of the above considerations.

The only mode which is more efficient (for weak signal communications) is Single Sideband, and that can't be used in aircraft due to Doppler shift.

It is true that local reception sites can help, but they are not possible over water. Perhaps one day satellite systems might finally replace aircraft AM. The problem at present is the cost for fitting to light aircraft.

Re: Turn Raspberry Pi’s GPIO into an FM Transmitter (2012)

#72

If you want to build fully legal applications that transmit FM you can use the Si4713. https://learn.adafruit.com/adafruit-si4713-fm-radio-transmit... John Park did a short video on it https://www.youtube.com/watch?v=PKP6Z-cEbFQ You can also buy a fully legal MP3 FM transmitter. https://radiofidelity.com/best-fm-transmitter-for-your-car/ Bitluni made a fun (illegal) AM radio transmitter with an esp32 https://youtu.be…

I want a damn CELLPHONE with FM/AM radio RECEIVER! So you can get radio when there is no cell or data service - like when camping or hiking etc.

I believe the iPhone has such a receiver but it’s not enabled.

Re: Turn Raspberry Pi’s GPIO into an FM Transmitter (2012)

#73
post #46

Earlier quoted context omitted.

Which spurious signals do you mean? I'm assuming you're talking about stuff well outside the intended sidebands that result from the modulation. If we were talking about AM I would assume you mean the audio signal isn't bandlimited and so high-frequency audio components get upconverted by the carrier frequency, but I don't know what the spectrum of an FM signal looks like. Are we talking about a broad comb that resul…

I'm talking about the broad band of spectral components (both close in and further out) which are generated by the synthesizer. These are a separate issue to any sidebands generated by the modulation process. see https://en.wikipedia.org/wiki/Phase_noise It's surprisingly difficult to generate a clean carrier which doesn't have a broad band of spectral components, but this is essential for the design of effective Rec…

A broad band of spectral components generated by the Raspberry Pi's clock generator because it has a lot of phase noise? Or do you just mean that in general that many circuits that generate clock signals can have phase noise but that you don't have any idea about this one in particular?

He doesn't seem to be using a mixer, so I don't think you'll get any spurs caused by mixing products in this case.

I'm no expert obviously but I'd think the phase noise of a PLL driven from a quartz crystal would be negligible.

Re: Turn Raspberry Pi’s GPIO into an FM Transmitter (2012)

#74

If you want to build fully legal applications that transmit FM you can use the Si4713. https://learn.adafruit.com/adafruit-si4713-fm-radio-transmit... John Park did a short video on it https://www.youtube.com/watch?v=PKP6Z-cEbFQ You can also buy a fully legal MP3 FM transmitter. https://radiofidelity.com/best-fm-transmitter-for-your-car/ Bitluni made a fun (illegal) AM radio transmitter with an esp32 https://youtu.be…

I want a damn CELLPHONE with FM/AM radio RECEIVER! So you can get radio when there is no cell or data service - like when camping or hiking etc.

Mobile phones have regressed in several areas. This is one definitely.

Re: Turn Raspberry Pi’s GPIO into an FM Transmitter (2012)

#75

If you want to build fully legal applications that transmit FM you can use the Si4713. https://learn.adafruit.com/adafruit-si4713-fm-radio-transmit... John Park did a short video on it https://www.youtube.com/watch?v=PKP6Z-cEbFQ You can also buy a fully legal MP3 FM transmitter. https://radiofidelity.com/best-fm-transmitter-for-your-car/ Bitluni made a fun (illegal) AM radio transmitter with an esp32 https://youtu.be…

The 'Roav by Anker Bluetooth FM transmitter' is amazing. So much better than the generic ones, and well worth the extra money. It provides a good signal, is easy to adjust, and works well for phone calls (not just music).

Does it output music in stereo with separate left right channels? The few I tried treat all audio as a mono source, throwing away the left or right track. Searching amazon reviews for this information has been frustrating because stereo can also refer to the head unit and speakers. The NULAXY had this issue for me.

Re: Turn Raspberry Pi’s GPIO into an FM Transmitter (2012)

#76
post #62

If you want to build fully legal applications that transmit FM you can use the Si4713. https://learn.adafruit.com/adafruit-si4713-fm-radio-transmit... John Park did a short video on it https://www.youtube.com/watch?v=PKP6Z-cEbFQ You can also buy a fully legal MP3 FM transmitter. https://radiofidelity.com/best-fm-transmitter-for-your-car/ Bitluni made a fun (illegal) AM radio transmitter with an esp32 https://youtu.be…

I would like an USB FM transmitter which shows up as an USB audio card. You set the sound card output at your OS settings and everything it's broadcasted over FM. I know some of them exist for bluetooth audio, but not for FM.

This is an interesting challenge, would be a great homebrew project.

(If I wasn't already neck deep in interesting challenges I would consider picking this one up)

Re: Turn Raspberry Pi’s GPIO into an FM Transmitter (2012)

#77
post #75

Earlier quoted context omitted.

The 'Roav by Anker Bluetooth FM transmitter' is amazing. So much better than the generic ones, and well worth the extra money. It provides a good signal, is easy to adjust, and works well for phone calls (not just music).

Does it output music in stereo with separate left right channels? The few I tried treat all audio as a mono source, throwing away the left or right track. Searching amazon reviews for this information has been frustrating because stereo can also refer to the head unit and speakers. The NULAXY had this issue for me.

"Does it output music in stereo with separate left right channels?"

Sorry, I don't know. It's in my parents' car, so I won't be able to check until the next time I visit them.

Re: Turn Raspberry Pi’s GPIO into an FM Transmitter (2012)

#78
post #73

Earlier quoted context omitted.

I'm talking about the broad band of spectral components (both close in and further out) which are generated by the synthesizer. These are a separate issue to any sidebands generated by the modulation process. see https://en.wikipedia.org/wiki/Phase_noise It's surprisingly difficult to generate a clean carrier which doesn't have a broad band of spectral components, but this is essential for the design of effective Rec…

A broad band of spectral components generated by the Raspberry Pi's clock generator because it has a lot of phase noise? Or do you just mean that in general that many circuits that generate clock signals can have phase noise but that you don't have any idea about this one in particular? He doesn't seem to be using a mixer, so I don't think you'll get any spurs caused by mixing products in this case. I'm no expert obv…

In the case of PiFM, the clock generator is being operated out of spec by a wide margin - it is rated for operation up to 25 MHz, but the code operates it at 100Mhz.

That makes it do some weired things - and I suspect one of those is that when adjusting the clock frequency (by changing the divisors), sometimes it stops oscillating for many microseconds.

Not sure what impact that has in the frequency domain, but I can't imagine it's good...

Re: Turn Raspberry Pi’s GPIO into an FM Transmitter (2012)

#79
post #58

Author here. This code no longer works on new Pi's (it does a lot of low level very hardware stuff from userspace without a proper kernel driver). The code was written in a 24 hour Hackathon, so is very far from maintainable. However there are other projects to do the same which do work on new Pi's. There are ways to do a full software defined radio from a pi by using the I2S hardware, and that can transmit GPS, 433…

> There are ways to do a full software defined radio from a pi by using the I2S hardware, and that can transmit GPS, 433 MHz garage door openers, and various other things. Wait, we can do sine wave up to ~1.5 GHz using the built-in PCM/I2S peripheral?

The built in peripheral works up to about 100 MHz. Beyond that you use the third/fifth/seventh harmonic.

Because the pi is notionally outputting a square wave, there are plenty of high powered harmonics to use, and from a signal-quality point of view, they are just as good as the fundamental frequency.

Most people view harmonics, spurs and sidebands as unwanted, but with a bit of careful thought they can be controlled to be the exact signal you want...

Re: Turn Raspberry Pi’s GPIO into an FM Transmitter (2012)

#80
post #73

Earlier quoted context omitted.

I'm talking about the broad band of spectral components (both close in and further out) which are generated by the synthesizer. These are a separate issue to any sidebands generated by the modulation process. see https://en.wikipedia.org/wiki/Phase_noise It's surprisingly difficult to generate a clean carrier which doesn't have a broad band of spectral components, but this is essential for the design of effective Rec…

A broad band of spectral components generated by the Raspberry Pi's clock generator because it has a lot of phase noise? Or do you just mean that in general that many circuits that generate clock signals can have phase noise but that you don't have any idea about this one in particular? He doesn't seem to be using a mixer, so I don't think you'll get any spurs caused by mixing products in this case. I'm no expert obv…

A PLL is one of the worst for phase noise. It will have a divider chain which will produce jitter and harmonics of the ref osc, and must absolutely rely on careful tuning of the AFC loop to null out these spurs. And as the filter will be digital rather than analog, there is no chance of optimizing it.

But that is before we get to the modulation. That again will be digital (rather than analog) so by definition will be chock full of jitter, especially if the FM is generated by stepping the clock frequency in finite steps. Not only will this generate large amounts of jitter, but it will generate spurs of the PWM clock over a wide range of frequencies.

Post reply on HN