daisy bell

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.

One of the highlights from the Music Hack Day in Berlin was the Arduino singing “Daisy Bell”. If you don’t know, this is an homage to the HAL 9000 in the movie 2001: A Space Odyssey; an artificial intelligence that was taught the song in its first steps toward self awareness culminating in an attempt to kill its masters.