Simple ESP32 Internet Web Radio with OLED Display

ESP32 Web Radio

In this project, we will make ESP32 Web Internet Radio using ESP32 Board, Audio Expansion Shield & OLED Display. The combined ESP32 Audio inherited the DAC chip and SD card module.The I2S chip allows you to play songs stored on the Internet.The SSD1306 screen displays basic information about the song, and the scroll wheel switch on Audio allows you to switch and pause the music.

The Commercial internet radio receivers available in the market are relatively expensive and cost more than 100$. So I decided to make an Internet Radio that is functional, easy to make, and inexpensive. Earlier I made ESP32 Music Player which worked very well, so I decided to use the same device to make an Internet Radio.

Bill of Materials

All the components required for this projects can be easily purchased from Makerfabs. The components purchase link is given below.

S.N. Components Name Description Quantity Buy Online
1 Customized ESP32 Board MakePython ESP32 Board 1 Click Here
2 Audio Expansion Board MakePython Audio Expansion 1 Click Here
3 3D Casing ESP32 Audio Fixture Kit 1 Click Here
4 Speakers Speaker with 3.5mm Audio Jack 1 https://amzn.to/36h6pz9
5 5V Power Supply Power Bank 1 https://amzn.to/3lctVmR

Block Diagram of the ESP32 Web Radio

The block diagram of the ESP32 Internet Radio is given below. We use customized ESP32 Module along with ESP32 Audio Expansion Board. The ESP32 Connects to wifi and look for defined radio station online data.

The principle behind the project is that if we can deliver a chunk of streaming data in an exact quantity of 32 bytes to the board in the form of a stream, it will just keep on playing. That means the ESP32 is to connect the streaming site at the fixed port and then receive the streaming data in an exact chunk of 32 bytes at a time. On the other hand, the board will keep on processing the data like an inflow/outflow machine and the stream will continue to play.

Hardware Requirement & Assembly

For this project we need a customized ESP32 Board. MakePython ESP32 is a powerful, generic Wifi+ BLE MCU module that supports both C/C++ & Python programming. It is true “breadboard compatible”, with the very detailed pins explanation, it is easy to learn & use. The MakePython ESP32 is programmed via Arduino IDE.

Similarly, we need an Audio Expansion Board. The Audio expansion board is based on the UDA1334ATS audio DAC, to implement audio functions to ESP projects. It communicates with ESP32 with I2S, and output relative good quality audio.

Apart from these we modules we need 3D Casing which is designed using 3D Modelling Software. The 3D case makes the device compact and small. You can download the STL files from here: 3D Case STL File

Assemble all the hardware explained in ESP32 Music Player.

ESP32 Web Internet Radio

Now your ESP32 Web Radio is ready to rock.

Adding Esp32-AudioI2S Library to Arduino IDE

The UDA1334ATS IC on ESP32 Audio does not support MP3 hardware decoding. So this library is used for MP3 decoding and volume control. Not only can you read MP3 files from your SD card, but you can also play MP3 stations directly from the Internet.

Source Code & Program

Copy the code from below and upload it to the ESP32 Board. Before uploading there is some modification required in the code.


Источник: how2electronics.com