FM Radio Add-on for Raspberry Pi
by jayakody2000lk in Circuits > Raspberry Pi
1252 Views, 5 Favorites, 0 Comments
FM Radio Add-on for Raspberry Pi
The QN8035 is a stereo FM radio receiver launched by the Quintic Corporation. Compared to other popular digital FM tuners (RDA5807, TEA5767, etc.), this tuner does not seem to be as popular among the DIY community.
In this instructable, I will describe my test setup and software applications built around this IC. After a few days of testing, I construct a fully functioning Raspberry Pi 3 based FM radio receiver using this IC.
Supplies
- C1 - 100pF Ceramic disc capacitor : Quantity - 1
- C2, C3 - 2.2μF / 16V Capacitor : Quantity - 2
- C4 - 0.01μF Mylar capacitor : Quantity - 1
- C5, C6 - 0.001μF Mylar capacitor : Quantity - 2
- C7 - 10μF / 16V Capacitor : Quantity - 1
- C8, C9 - 0.1μF Capacitor : Quantity - 2
- C10 - 56pF Ceramic disc capacitor : Quantity - 1
- C11 - 22pF Ceramic disc capacitor : Quantity - 1
- R1, R4 - 100Ω 1/4W Carbon film resistor - 5% : Quantity - 2
- R2, R3 - 220Ω 1/4W Carbon film resistor - 5% : Quantity - 2
- R5 - 1MΩ 1/4W Carbon film resistor - 5% : Quantity - 1
- R7 - 10MΩ 1/4W Carbon film resistor - 5% : Quantity - 1
- Y1 - 32.768kHz Crystal (AT310) : Quantity - 1
- Q1 - 2N3904 (TO-92) : Quantity - 1
- U1 - QN8035 (MSOP10) : Quantity - 1
- J1 - PJ324 - 5 Pin 3.5mm Stereo audio jack socket : Quantity - 1
- J2 - 2-Pin, 2.54mm Pin Header : Quantity - 1
- J3 - 3-Pin, 2.54mm Pin Header : Quantity - 1
- AE1 - 1-Pin, 2.54mm Pin Header : Quantity - 1
- MSOP10 (0.5mm) to DIP10 converter PCB : Quantity - 1
Schematic and PCB
We designed this receiver on a single-side PCB to minimize soldering inconvenience. The dimensions of the PCB are 58mm × 26.75mm.
Downloads
QN8035 Tuner Board
The core components of this radio receiver are the QN8035 tuner and 32.768kHz oscillator. This entire radio design is to be powered by a 3.3V power supply. In our prototype, we drive this radio receiver using 3.3V supply terminals provided on the Raspberry Pi board.
The I2C bus has been used to interface the Raspberry Pi and QN8035 tuner IC. On Raspberry Pi, the I2C pull-ups are not necessary with this module. For other development boards, please check the pull-up resistor requirement from the documentation/schematic.
The complete construction and configuration steps of this tuner are shown in the video presented in this section.
Connecting Raspberry Pi and QN8035 Tuner
In setting up our tests, we used a 30cm long wire antenna with this radio receiver and received extremely stable reception. With a proper FM antenna, we got all the stations in the FM broadcast spectrum and were able to capture almost 95% of the channels and RDS data without any problems.
QN8035 and Raspberry Pi 3 connections are illustrated in the diagram at top of this section.
Tuner Applications
Initially, we developed a simple console application to test this tuner. This application and its source code are available at github.com/dilshan/qn8035-rpi-fm-radio. Binary executable compiled for the 32-bit Raspberry Pi operating system can also be downloaded in the release section of the above repository.
The terminal application is written using GCC and WiringPi library. Be sure to enable I2C support on Raspberry Pi using the "raspi-config" tool before testing this application.
After testing the QN8035 with the above application, we developed a GUI tuner application using GTK. This application provides all the features provided in the console application and which includes:
- Manual and automatic station scanning.
- Decode RDS PS (program service) data.
- Volume control.
- Display RSSI and SNR readings receive from the tuner.
Both these GUI and terminal applications have the RDS PS decoder to display the program/service name. As we have observed, the QN8035 RDS registers populate if it receives strong signals only. In some weak points, we observed that the RDS buffer received lots of incorrect data.