ECE 5725:   Date: 12/10/2016

Digital FM Transceiver

Junyin Chen (

Zhenchuan Pang (

Xiaokun Yu (

Objective    top

The objective of this project is to construct a digital FM transceiver that is able to receive radio stations and transmit audios within a single Raspberry-Pi device. Also, the transceiver provides a touch-screen GUI to enhance user experience. Additionally, this project aims to connect to lecture materials of this class and capture the spirit of embedded operating system. Specifically, it makes the effort to leverage the support of linux operating system, which distinguishes this project with traditional bare-metal microcontroller projects in a significant way. For example, we used FIFO object to implement inter-process communication, I2C file descriptor to enable us to treat external devices as files and manipulate them at a higher level, and threads to guarantee the concurrency of the system while executing blocking tasks.

Introduction    top

The following video gives a quick view of our project, with an emphasis on the functionality.

At a high level, this project is composed of three components, a FM receiver that receives radio stations, a touch-screen GUI to make the interaction with users, and a transmitter that decodes wav files and transmits the modulated signal. The receiver is an external I2C device, the GUI is based on the pygame framework and requires proper installation of PiTFT screen, and the transmitter is a software transmitter that implements FM modulation in software without any external hardware except the Raspberry-Pi itself. The high-level block diagram is illustrated in Figure 1-1.

High Level Block Diagram

Figure 1-1 High Level Block Diagram

To help readers better understand our project, here we provide one simple example to illustrate how FM works.

Example Wave

Figure 1-2 Example Wave

Consider the above example wave stored in a wav file(The data here is not realistic, it’s solely for illustration purpose). Assume the metadata in the header of the wave file tells you the sample frequency is 1Hz.

We start with an easier case, thinking from the perspective view of AM. Assume the AM device is able to magically output negative voltages, ignoring the DC offset, and assume the DAC is infinitely accurate. Because the sample frequency is 1Hz, we change the output voltage of the AM device every 1 second. Therefore, at second 1, the AM device changes the voltage to 0.8415, at second 2, the AM device changes the voltage to 0.9093, etc. Figure 1-3 shows how AM wave of this example looks like.

Example AM Wave

Figure 1-3 Example AM Wave

For the AM wave, the sample frequency determines how frequently we are changing the amplitude, while for the FM wave, it determines how frequently we are making frequency deviation to the base frequency of the carrier wave. The value of the amplitude, for the AM wave, is the amplitude voltage itself, while for the FM wave, it determines how much deviation to make to the base frequency of the carrier wave.

To simplify things, here we assume the carrier wave is a 100.0 MHz square wave, and the maximal deviation is ±1 MHz. Similarly, we assume the FM device is able to generate infinitely accurate square waves with respect to frequency. Because the sample frequency is 1 Hz, we are changing the base frequency of the carrier wave every 1 second. Therefore, at second 1, the value is 0.8415, we make a deviation of 0.8415 MHz, at second 2, the value is 0.9093, we make a deviation of 0.9093 MHz. Figure 1-4 shows how the frequency of the output wave as time proceeds.

Time(s) Base Freq(MHz) Deviation(Mhz) Actual Freq(MHz)
0 100 0 100.0
1 100 0.8415 100.8415
2 100 0.9093 100.9093
3 100 0.1411 100.1411
4 100 -0.7568 99.2423
5 100 -0.9589 99.0411
6 100 -0.2794 99.7206

Figure 1-4 Example FM Wave Table

The legal frequency band is different for different countries, so our project assumes we are located in the United States. We assume receivable band is 87.5 MHz ~ 107.9 MHz, and each station channel has a bandwidth of 0.2 MHz. This assumption applies to the receiver, the GUI, and the transmitter. Our FM transceiver is able to receive channels within United States and transmit in US Frequency band (87.5 MHz ~ 107.9 MHz). The transmitted signal of our transmitter is able to be received within a range of 20 meters using a 10 cm wire as antenna, which is enough to demonstrate the power of our transmitter, but also not illegally overwrite registered commercial FM channels.