ARM Board Transmits FM

There is more than a casual link between computer people and musicians. Computers have created music since 1961 when an IBM7094 sang the song Daisy Bell (later inspiring another computer, the HAL 9000, to do the same).

[Vinod.S] wanted to create music on an STM32F407 Discovery board, but he also wanted it to play on his FM radio. He did it, and his technique was surprising and straightforward. The key is that the ARM processor on the Discovery board uses an 8MHz crystal, but internally (using a phase-locked loop, or PLL) it produces a 100MHz system clock. This happens to be right in the middle of the FM radio band. Bringing that signal back out of the chip on a spare output pin gives you the FM carrier.

That’s simple, but a carrier all by itself isn’t sufficient. You need to FM modulate the carrier. [Vinod.S] did the music playback in the usual way and fed the analog signal via a resistor to the crystal. With some experimentation, he found a value that would pull the crystal frequency enough that when multiplied up to 100MHz, it would produce the desired amount of FM deviation. You can see a video of the whole thing in action, below.

Surprisingly, even this isn’t a new idea. Back in the early days of computers, it was well known that AM radios would pick up noise from an operating computer and that the right program could produce music. There’s an article about doing just that on an old Altair (although the technique predates that) and even a video of the same. Speaking of videos, there is a video of the IBM computer that would go on to inspire HAL to sing from 1961.

We cover a lot of music-oriented projects, including ones that make music humans can’t. There are plenty of regular projects, too. One word of caution: spewing out 100 MHz signals from your microcontroller might not put you on the good side of your country’s radio regulatory agency. We’d be careful designing something like this into a real product unless you were sure you knew you could pass the legal test.

27 thoughts on “ARM Board Transmits FM

        1. “You need to frequency modulate the carrier”.

          It’s fine as it is. This double-acronym nonsense (yes, it’s not an acronym unless it’s pronouncable…) is bullshit by pedants who get it wrong. It’s well established to say “ATM machine”. It’s fine. That’s how language works. It’s English, not C++. The criteria are different. Abbreviations become words in their own right, you don’t expand them in normal use. Everybody knows that, except people who aren’t as clever as they think they are.

    1. I beg to differ; CSIRAC in Australia synthesised first in 1950-51, almost a decade earlier.

      It’s not recorded, but we still have the program.

      CSIRAC is an interesting beast, because;
      – It’s the only intact (but non-operational) 1st generation electronic computer
      – Possibly the first interpreted language, INTERPROGRAM, was used on it in 1960
      – it used 2000 valves, mostly 6SN7,[5] 6V6,[6] EA50 diodes and KT66s
      – It ran at 1000Hz
      – It had a serial main bus
      – It had its own conference in 1996, dedicated to preserving not only the machine, but also a trove of documents and experiences from the engineers and scientists who designed, built and used the machine up to 1964
      – There is an emulator for it (
      – There were games programmed for it (apparently there was a “guess 0 or 1” game a particular female tech became unusually good at despite its random nature)
      – you can go and see it; it is on public display inMelbourne, including the hard drive, Mercury delay lines, input and output tape, and CRT monitors;

  1. Why jerk around with the system clock frequency? That’s asking for trouble, especially if there’s a USB boot loader. There are capable timer-counters on the STM32F4 parts, maybe just diddle the preload register value instead?

    1. Ehh. You can easily run the STM32F405 on that board at 168MHz, Then diddling with the preload register you can get frequencies like 84, 56, 42, 33.6 and lower. It is not possible to modulate the signal in the 96.3-96.35 MHz range that you need for an FM transmission. (KHz, yes, MHz, no)

    1. You sir are a horrible person… I like your style. Besides, you got me thinking that a step up from a single transistor, the differential amplifier would help achieve FM with the right DAC. Although, I’m not sure that would be viable.

    2. But you have to understand the trick here. To transmit a stored audio you need a memory. In this project the audio is stored in the flash of the mcu and without using even the single transistor modulator, it is able to transmit 100MHz FM audio. Doesn’t it make any sense ?

Leave a Reply

Please be kind and respectful to help make the comments section excellent. (Comment Policy)

This site uses Akismet to reduce spam. Learn how your comment data is processed.