RDA5807

Arduino Library for SINGLE-CHIP BROADCAST FM RADIO TUNER RDA5807

View on GitHub

RDA5807 Arduino Library

It is a cross-platform Arduini Library for RDA5807. You can use it with oficial Arduino boards, ATtiny, STM32 , ESP32 and more. It works with I2C protocol and can provide you an easier interface to control the RDA5807 device. This library was built based on “RDA5807M - SINGLE-CHIP BROADCAST FM RADIO TUNER - Rev.1.1–Aug.2015”

This library can be freely distributed using the MIT Free Software model.

Copyright (c) 2019 Ricardo Lima Caratti.

Contact: pu2clr@gmail.com.

Contents

  1. Preface
  2. Library Installation
  3. API Documentation
  4. Schematic
  5. Source code - Arduino Sketches

Preface

The RDA5807 is a FM DSP integrated circuit receiver (50 to 115MHz) with low noise amplifier support. This device requires very few external components if compared with other similar devices. It also supports RDS/RBDS functionalities, direct auto gain control (AGC) and real time adaptive noise cancellation function. The PU2CLR RDA5807 Arduino Library was developed to take the most functionalities of this device. Plese, check the API Documentation for more details.


Presentation video

See the presentation video on youtube

The photo below shows a Breakout that uses the RDA5807. You can find it on eBay, AliExpress and Amazon.

RDA5807 Breakout board

RDA5807 features implemented by this library

  1. 76–108 MHz
  2. Seek tuning
  3. Automatic frequency control (AFC)
  4. Automatic gain control (AGC)
  5. Programmable de-emphasis (50/75 μs)
  6. Adaptive noise suppression
  7. Volume control
  8. Mute control
  9. Mono/Stereo control
  10. RDS/RBDS Processor (under construction)

See also

More Arduino Projects developed by author

MIT License

Copyright (c) 2019 Ricardo Lima Caratti

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE ARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Library Installation

The easiest method to install this library is via your Arduino IDE. All you have to do is:

  1. Select Tools menu;
  2. Select Manage Libraries option;
  3. In the text box (top windows), type PU2CLR or RDA5807;
  4. Select the PU2CLR RDA5807.

The images below show how you can install this library via your Arduino IDE from Manage Libraries tool.


Arduino IDE - Manage Libraries menu option


Arduino IDE - Looking for the library RDA5807

Installing via the repository

With this approach, you will have the most current version of the library. However, it may not be the most stable version. This is because the current version is always in development. Prefer releases. Do you need some old version (release) of this library? If yes, check here.

First, you have to download this library in zip format.
After, unzip the RDA5807-master.zip file in your Arduino Library folder.


Schematic

In general, the RDA5807 can be found in kit or breakout form. In this case, the circuit below can help you to connect the arduino to the RDA5807 shield. If you are using just the IC, you might want to check the RDA5807M - SINGLE-CHIP BROADCAST FM RADIO TUNER - Rev.1.1–Aug.2015; page 17.

Basic Schematic

Wire up on Arduino UNO, Pro mini or other based on ATmega 328.

RDA5807 / Description Arduino Pin
SDA / SDIO A4
SCL / SCLK A5

Wire up on Arduino, TFT7735 display and Push Buttons.

Basic Schematic with TFT

Device name Device Pin / Description Arduino Pin
Display TFT    
  RST (RESET) 8
  RS or DC 9
  CS or SS 10
  SDI 11
  CLK 13
RDA5807    
  SDIO (pin 8) A4
  SCLK (pin 7) A5
Buttons    
  Volume Up 4
  Volume Down 5
  Stereo/Mono 6
  RDS ON/off 7
  SEEK (encoder button) 12
Encoder    
  A 2
  B 3

RDA5807 breakout, ATtiny84, Encoder and Buttons schematic

Basic Schematic

RDA5807 breakout, ATtiny84, Encoder and Buttons wireup


RDA5807 pin Attiny84 REF pin Physical pin
SEEK_UP 3 10
SEEK_DOWN 5 8
ENCODER_PIN_A 0 13
ENCODER_PIN_B 1 12
SDIO / SDA SDA 7
SCLK / CLK SCL 9

References