0% found this document useful (0 votes)
104 views15 pages

ESP32 Webradio ESP32 LyraT (En)

This document provides instructions for building an ESP32-based webradio and MP3 player using an ESP32-LyraT board. It includes parts lists and links to necessary libraries and code. Instructions are given for setting up the development environment, uploading code to the board, and configuring the web interface and MP3 playback from an SD card. The MP3 player functions by reading the folder structure on the SD card and playing files randomly from sequentially-named folders to avoid silence between songs.

Uploaded by

jackthonet
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
104 views15 pages

ESP32 Webradio ESP32 LyraT (En)

This document provides instructions for building an ESP32-based webradio and MP3 player using an ESP32-LyraT board. It includes parts lists and links to necessary libraries and code. Instructions are given for setting up the development environment, uploading code to the board, and configuring the web interface and MP3 playback from an SD card. The MP3 player functions by reading the folder structure on the SD card and playing files randomly from sequentially-named folders to avoid silence between songs.

Uploaded by

jackthonet
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 15

ESP32 webradio – mp3 player with webinterface

First some useful url’s.

How to program a ESP32 with the Arduino IDE


https://randomnerdtutorials.com/installing-the-esp32-board-in-arduino-ide-windows-instructions/

More info ESP32


https://randomnerdtutorials.com/projects-esp32/

Internet streaming adresses:


https://www.hendrikjansen.nl/henk/streaming.html#cz

Audio library
https://github.com/schreibfaul1/ESP32-audioI2S

es8388 library
https://github.com/maditnerd/es8388

ESP32-LyraT
https://docs.espressif.com/projects/esp-adf/en/latest/design-guide/dev-boards/get-started-esp32-
lyrat.html

https://docs.espressif.com/projects/esp-adf/en/latest/design-guide/dev-boards/board-esp32-lyrat-
v4.3.html

https://dl.espressif.com/dl/schematics/ESP32-LYRAT_V4.3-20220119.pdf
ESP32-LyraT webradio / mp3 player

Partslist :

1 x ESP32-LyraT
https://www.tme.eu/be/nl/details/esp32-lyrat/ontwikkelkits-overige/espressif/
https://www.mouser.be/ProductDetail/Espressif-Systems/ESP32-LyraT?
qs=MLItCLRbWsxPzPCja546ZA%3D%3D
1 x SD card FAT32 formatted.
When use as mp3 player High Speed SD card.
1 x 5V 2A power supply (smartphone charger is OK)
1 x smartphone for servicing the webradio
1 x headphone / audio installation.

Zet de dipswitch op het bord zoals afgebeeld op de foto.


Sorry afbeelding niet erg duidelijk.
2 ON 1,3,4,5,6,7,8 OFF

Download and install in the Arduino IDE :

Audio library
https://github.com/schreibfaul1/ESP32-audioI2S

es8388 library
https://github.com/maditnerd/es8388
Goto https://github.com/thieu-b55/ESP32-audiokit-webradio-webinterface

download zipfile : SD card files.zip.


download programm : ESP32_LyraT_webradio.ino

Unzip the zipfile and copy the 4 files (totaal, pswd, ssid en zender_data.csv) to the SD card and put
card in the SD card holder.

The following is only necessary is you want to use the mp3 player.

These are the settings for my Linux Mint operating system,

Change <gebruikersnaam> in your username.


In the /home/<gebruikersnaam>/arduino-1.8.6/hardware/expressif/esp32/libraries/SD/src/
folder open the file SD.h and change the frequency as shown in the screenprint.
frequency=25000000

Maybe things are different in your Linux distribution or operating system but look for the SD folder
in ../hardware/expressif/esp32/libraries/ another possibly installed SD librarie will not be used.
Open the program ESP32_LyraT_webradio.ino in the Arduino IDE.

Settings see screenprint. Port setting depends on your configuration.


Verify program
Upload programma (ESP32 in upload mode : push and hold RESET push and hold BOOT release
RESET release BOOT)
Before uploading the program there is an ON-OFF switch on the middle left of the board
don’t forget to turn it ON
This is a screenprint from the audiokit program the connections on the LyraT are different

After upload RESET


First you have to fill in your WiFi credentials

Connect your smartphone to the WiFi network :

ESP32webradio

Open the webpage at adress 192.168.4.1

Under the titel ESP Netwerk instellingen

in the field ssid fill in the name of your WiFi network


in the field pswd fill in the password for this network
Push Bevestig the ESP32 will reset
If everything is OK, the network ESP32webradio is no longer available. Connect your smartphone
with your WiFi network and open the webpage at 192.168.1.177.
A internetradio should be available at the audio output.
How does it works :

Choose a station

Below the text ESP32 internetradio webinterface

Here : Veronica Rock Radio is the station chosen at this moment.


If songdata is available it will be shown below the station.

With the <-> <+> en <OK> buttons you can choose another station.

In the list there is also the choise mp3 lijst maken en mp3 speler more about this at the end of the
manual.

Volume and EQ

L : low
M: middle
H: high

V: volume

L M H between -40 en 6
V between 0 en 21
confirm with <OK>
more info about volume and more
https://github.com/schreibfaul1/ESP32-audioI2S/wiki
Setup Stations

Already filled in stations or empty positions can be changed at your own choise. Maximum is 75.
In the field below <Instellen zender en url : ..> you can fill in the name of the station.
In the field below this you have to fill in the url of this station.
Confirm with <OK>.
mp3 player

This option can be used when you have connection with your WiFi network or with the
ESP32webradio network page 192.168.4.1 when you don’t have connection with a WiFi network.

To avoid untwanted silence between two mp3 files it is impotatnt to use a fast SD card and change
the SPI speed to 25Mhz. see page 3 of this manual

The mp3 files are played at random, to make this possible we have to do some things first.
When yoy have more than 100 mp3 files it is a good idea to divide these files in more folders.
Starting at mp3_0, mp3_1, mp3_2 and so on. How many of these folders you have is not important
but they must be in sequence. Firts mp3_0 then mp3_1 … the program stops searching when there
is no next following mp3_. folder.
When you have 1000 mp3 files you can divide these in 10 folders, from mp3_0 to mp3_9.
It is not necessary to have exact the same number of files in a folder but the more equal the better.

Important:
If this is not the first time you make a mp3 list you have to remove first all sonlijstx folders
from the SD card.

Screenprint from a SD card with mp3_. folders not read by the program.
After copying all your mp3’s to the SD card and if necessary removing all songlistx folders, place
the SD card in the holder.

In the part for choosing a station choose <mp3 lijst maken> and press <OK>

Reading starts
The progress of the reading can be followed bij pressing the reload sign at the right upper corner.

After finishing reading the webradio starts with the mp3 player.
Screenprint from the SD card after reading the mp3_.. folders

Important:
For avoiding endless loops with corrupt mp3 files, at startup the radio allways starts as
webplayer. To start mp3 playing you have to choose <mp3 speler> just like you choose another
station.

That’s all, enjoy the music


greetings,
thieu

You might also like