Teensy 3.6 (alone) as FM transmitter -- possible?

Not open for further replies.


Well-known member

I just stumbled across this brilliant hack, wherein people are turning the Raspberry PI into a FM radio transmitter:

This works by using the Spread-Spectrum Clock Generator feature (SSCG) of whatever chip the Pi uses (Cortex A7 or A53?). If I understand it correctly, the clock is tuned to an FM-band speed (88-106 Mhz). That clock is then used to PWM an output pin at a steady 50% duty cycle, creating the FM carrier frequency, and then digital audio data is used to tweak that clock speed, directly modulating the carrier frequency.

Hackers have dived into that project, and apparently it's working quite well on the Pi. They just wire a GPIO pin directly to an antenna, and it works! No other circuitry necessary. (I have to wonder whether this generates any ugly harmonic interference in higher frequencies.)

I'm curious if the Cortex-M4 in the newer Teensy could do this same trick. I see that the chip includes some sort of SSCG* feature, but I haven't been able to decode just how much control it gives. I'm not even sure whether the main PLL can be tuned to the 100Mhz-ish FM broadcast bandwidth region or not -- tho the spec sheet I read says it can go both faster and slower.

(If this is possible, I'm still not sure if I'd need to do it. A Pi is a cheap enough board, for which the software is already written and available. But on the other hand, it's fun to hack on the Teensy ... and the codebase for the Pi version is thick with all sorts of tedious arguing-with-the-operating-system code. I'd think a Teensy version could be much simpler.)


* You probably already knew this: Spread-Spectrum Clock Generation (SSCG) is a modern chip feature that lets you modulate the frequency of the chip's timers to reduce RF noise timer-driven circuits can create.
.. a bit different, but does not even use a pin ;) or antenna

(Hint: Increase the volume)
Last edited:
That is interesting, but can it play arbitrary digital audio? Or drive an antenna? The Pi project is a real, useable FM transmitter.
? As i said it was for fun only. It was not intended to be really useful. It uses the switches on the inbuilt cpacitors for the crystal.
You can't add an antenna. But it can be used as output for the audio-library and can play everything the audio lib can play..
(The code is on my github)

The Teensys' core-freq is too low to be useful for good quality FM via PWM.

But why bother... to build a FM-Transmitter you only need 2 transistors.
Last edited:
Hi Mykle, hi Frank,

yes, the Raspberry PI transmitter is a nice hack, it can be extended even to transmit SSB:


However, there are a few severe issues:

- in most (if not all) countries, the use is illegal: transmitting on the FM band is not allowed, even with self-built lowpower transmitters, simply because they do not have a FCC or CE approvement

- the signal is indeed VERY UGLY and contains many harmonics potentially interfering with important life saving radio services. Never use that Raspberry PI system without appropriate low pass filters and without a legal license

- even SSB transmission on the HAM Radio bands is only allowed for licenced Hams, outside the bands it is illegal for very good reasons. Even for a licensed ham, the produced SSB signal would in most cases not comply with the national & international HAM radio quality standards.

apparently it's working quite well on the Pi

--> yes, it does produce something called a "signal", but the quality is awful, the harmonics have the real potential to interfer with life saving radio services, so I do not recommend this.

There are Radio projects with the Raspberry Pi and the Teensy that are much nicer ;-).

73 de Frank DD4WH
What a Teensy 3.2 could do in good quality, is generating the analog stereo multiplexing for FM transmission. Running everything with a PDB_MOD value of 420 would give an ADC/DAC master clock of 48MHz / 421 which is 114014Hz. Enough precision to generate the needed 19kHz pilot carrier (+2.4Hz) and the modulating/switching carrier of 38kHz (+4.8Hz). The latter would be used to trigger alternating ADC conversions for the left and the right channels. The 12bit ADC and DAC resolution should allow a SNR of > 60dB, thus we'd be even on the "HiFi" side.

If I only had more time for playing around with these things...
Not open for further replies.