https://github.com/issoupewd/fm-radio-receiver-with-arduino
This project is an FM radio receiver based on Arduino programming language, using the LGT8F328P microcontroller, the RDA5807M receiver module, a 0.96" OLED display, and a rotary encoder.
https://github.com/issoupewd/fm-radio-receiver-with-arduino
arduino electronics fm radio
Last synced: 4 months ago
JSON representation
This project is an FM radio receiver based on Arduino programming language, using the LGT8F328P microcontroller, the RDA5807M receiver module, a 0.96" OLED display, and a rotary encoder.
- Host: GitHub
- URL: https://github.com/issoupewd/fm-radio-receiver-with-arduino
- Owner: issoupewd
- Created: 2024-09-08T20:45:14.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2024-09-08T21:44:53.000Z (about 1 year ago)
- Last Synced: 2025-03-16T02:14:33.208Z (7 months ago)
- Topics: arduino, electronics, fm, radio
- Language: C++
- Homepage:
- Size: 1.4 MB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# FM Radio Receiver Project

This project is an FM radio receiver based on Arduino programming language, using the LGT8F328P microcontroller, the RDA5807M receiver module, a 0.96" OLED display, and a rotary encoder.
In this repository, you will find the schematic of the circuit and the code required for this project.

## Project Overview
For receiving , we use the FM module RDA5807M with the LGT8F328P microcontroller and a 0.96" OLED [128×64] pixel I2C display to show the frequency received by the radio. The reception is done within the authorized FM band authorized [88–108] MHz. To switch frequencies and change the received stations, we use the KY-040 rotary encoder. Finally, to amplify the received signal, we use the PAM8403 amplifier, which is connected to a speaker so that the received audio can be heard.
## Script Explanation
The main file is **FM_RX_main.ino** The other files are used for controlling the modules, such as **oled.ino**, **rda.ino**, and **encoder.ino** Create a folder named **FM_RX_main** and put all these files in it. Open **FM_RX_main.ino** to access everything.
The first step in the script is to declare the necessary libraries as follows:
- `` for I2C communication.
- `` and `` for controlling the OLED display.
- `` for controlling the encoder button.
- `` and `` for managing the RDA module.Next, we declare the variables, including the pins used, the frequency value, the maximum and minimum frequencies, variables for the state of the encoder, and the specifics of the models. Various functions are defined to control the system, and the OLED screen and RDA module are initialized.
The system starts by displaying the FM radio logo and tunes to the initial frequency of 98 MHz with a 100 kHz step, displaying the current frequency.
The system control involves several conditions managed by the encoder button:
- A single click jumps to the maximum frequency of 108 MHz.
- A double click sets the frequency to the minimum of 88 MHz.
- A long click can change the step from 100 kHz to 1 MHz or vice versa.The second block of conditions is controlled by the rotation of the encoder:
- Rotating to the right adds the step to the current frequency.
- Rotating to the left subtracts the step from the current frequency.Before sending the frequency value to the RDA module, a final condition ensures that the received frequency is within the desired range of [88-108] MHz. If it exceeds this range, it will revert to the minimum frequency; if it is below, it will jump to the maximum.
The obtained frequency value is then sent to the radio module and displayed on the OLED screen.