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 addresses:
https://www.hendrikjansen.nl/henk/streaming.html#cz
Audio library
https://github.com/schreibfaul1/ESP32-audioI2S
es8388 library
https://github.com/maditnerd/es8388
ESP32 webradio mp3 player with ESP32 audiokit
Partslist :
1 x ESP32 audiokit
https://nl.aliexpress.com/item/32957553086.html?spm=a2g0o.productlist.0.0.389a3d4cBeg5oA&algo_pvid=266b27ae-6d55-46bf-9bf6-
94fba3f40677&algo_exp_id=266b27ae-6d55-46bf-9bf6-94fba3f40677-4&pdp_ext_f=%7B%22sku_id%22%3A
%2266450553790%22%7D&pdp_npi=2%40dis%21EUR
%2119.07%2114.27%21%21%21%21%21%40210318cf16534227642522102ee092%2166450553790%21sea
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 web-radio
1 x headphone / audio installation.
Zet de dipswitchen op het bord zoals afgebeeld op de foto.
Download and install in the Arduino IDE :
Audio library
https://github.com/schreibfaul1/ESP32-audioI2S
es8388 library
https://github.com/maditnerd/es8388
Go to https://github.com/thieu-b55/ESP32-audiokit-webradio-webinterface
download zipfile : SD card files.zip.
download program : ESP32_webradio_audiokit.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_webradio_audiokit.ino in the Arduino IDE.
Settings see screen-print. Port setting depends on your configuration.
Verify program
Upload program
First you have to fill in your WiFi credentials
Connect your smartphone to
network : ESP32webradio
password : ESP32pswd
Open the webpage at address 192.168.4.1
Below the titel ESP Netwerk instellingen
in the field ssid fill in the name for your WiFi network
in the field pswd fill in the password for this network
default IP address is 192.168.1.177 .
Below Gewenst IP address …
you can change the IP address make sure to stay in the range possible with your WiFi router.
Software does not check the values.
Push <Bevestig> and the ESP32 restarts automatically
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 or at the chosen IP address.
A internet-radio 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 song data 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 choice 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 choice. 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 unwanted silence between two mp3 files it is important 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 you 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. First 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 by 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-b55