logo elektroda
logo elektroda
X
logo elektroda

Internet radio and audio file player on ESP32-S3

MAJSTER XXL 294621 2811

TL;DR LABEL_AI_GENERATED

  • Built an ESP32-S3 internet radio with an audio file player and OLED desk display, evolving through v1, v2, and v3.
  • Uses an ESP32-S3-WROOM-1, PCM5102A DAC, rotary encoders, and GitHub-hosted station lists split into banks of up to 100 stations.
  • The prototype uses a 2.42" 128x64px white OLED display, with a PCB made in Poland costing 130zl.
  • v3 adds a colour screen, weather, a calendar, RSS news from Polsat News Polska, and full remote control.
  • The first PCB had a pad-spacing mistake for the ESP32-S3-WROOM-1, so the module pins had to be bent slightly to fit.
AI summary based on the discussion. May contain errors.
ADVERTISEMENT
Treść została przetłumaczona polish » english Zobacz oryginalną wersję tematu
Listen:
  • #751 21456460
    robgold
    Level 23  
    Posts: 726
    Help: 10
    Rate: 290
    @wirbud
    I did a test on my yoRadio and ESP32S3 module. It doesn't start on pin settings compatible with our design. SCK and MOSI must be on pins 11 and 12 for yoRadio.

    Internet radio display showing the station Antyradio. .
  • ADVERTISEMENT
  • #752 21456461
    wirbud
    Level 13  
    Posts: 65
    Rate: 16
    >>21456460 toss the text of myoptions.h regarding the screen Thanks to
  • #753 21456465
    efi222
    Level 22  
    Posts: 779
    Help: 12
    Rate: 1219
    robgold wrote:
    Generally, I sometimes get the impression that this radio is not about having a radio but about having entertainment for winter days by writing soft. just having a radio is like a side effect
    .
    Because it's usually the case that the journey is more interesting than the arrival itself ;)
  • ESP32-S3 display pin settings for SSD1322

    #754 21456467
    robgold
    Level 23  
    Posts: 726
    Help: 10
    Rate: 290
    Please, it's only my test radio so pay attention to what's with the commentary.

    Code: C / C++
    Log in, to see the code
    .

    That's really all it takes:
    Code: C / C++
    Log in, to see the code
    .
  • Clarifying FLAC fix and library swap procedure

    #755 21456503
    DJCheester
    Level 28  
    Posts: 2089
    Help: 75
    Rate: 958
    Gentlemen I read the news in the topic, I have a radio on PCB. You write that you have fixed the problem of FLAC streams ?

    Does it work without changing the pin configuration ?
    I downloaded the liblwip-fix and liblwip-20241019_3.0.5 files
    Alternatively, please give me instructions where to swap them with the original ones ?

    After swapping, I understand that I have to compile the sketch again using these swapped files and upload it to the ESP32 ?

    Greetings ...
  • Replacing liblwip.a fixes ESP32-S3 display corruption

    #756 21456542
    wirbud
    Level 13  
    Posts: 65
    Rate: 16
    Same effect - looks like a TV screen in the old days where the vertical sync was broken. Horizontally the dots seem to be in the right lines. Vertically completely out of order. A bit like pixels scrolling from bottom to top.

    Added after 3 [hours] 58 [minutes]: .

    >>21456503 .
    BLWIP-FIX.ZIP 2. Unzip and copy liblwip.a to a directory (you have a username, hardware version may be different): C:UsersAppDataLocalArduino15packages32hardwareespesp322.0.17tools.liblwip.a - for ESP32 or C:UsersAppDataLocalArduino15packages32hardwareesp322.0.17UsersuserAppData - for ESP32S3 (there should be an old liblwip.a file in this directory, which we will replace with the new file) 3. Restart the Arduino 4. Recompile the E-radio as before and load into the ESP32
  • Possible power or wiring issue causing ESP32 reset

    #757 21457082
    andy175
    Level 12  
    Posts: 23
    Help: 3
    Rate: 7
    Hello Gentlemen and please bear with me.
    My grandson asked me to help him to make a simple radio on ESP32 chip and PCM 5102 A I2S from YouTube "Electronics and Gadgets". We do everything as in the posted description, the program (sketch) compiles correctly and uploads to the ESP. The jumpers on the PCM are also soldered correctly, but when connected to the power supply, the blue LED goes off after a while and a gentle buzzing can be heard from the speakers. All in all, we already have several ESP circuits with the CH340 and CP210 chip. In the sketch I have already changed dozens of radio stations according to the author's suggestion, but the effect is nil. Some time ago I made a weather station with my grandson on the ESP8266 chip and there it connects to Wi-Fi without any problem. I am a mechanic by training but wanted to help my grandson. I asked in the comments what else could be done, but no answer. Greetings to all and please be understanding.
  • #758 21457096
    hevet
    Level 18  
    Posts: 347
    Rate: 47
    @andy175 do you mean the version without the display?
    And if you unplug the PCM5102, the same diode dims on the esp32? Have you connected SCK to GND?
  • #759 21457132
    andy175
    Level 12  
    Posts: 23
    Help: 3
    Rate: 7
    After disconnecting the ESP from the PCM 5102, the blue LED also goes out after a while. And connecting SCK to GND doesn't bring any change either. But I sincerely thank you for your quick reply and look forward to any suggestions.
  • ADVERTISEMENT
  • #760 21457137
    hevet
    Level 18  
    Posts: 347
    Rate: 47
    And what power supply are you connecting to?
  • #761 21457145
    andy175
    Level 12  
    Posts: 23
    Help: 3
    Rate: 7
    Man power supply made from a computer power supply with 3.3v, 5v and 12v outputs of course I use the 5v output.

    Added after 5 [minutes]: .

    I didn't read early so this is about the simple radio without the display.
  • #762 21457166
    hevet
    Level 18  
    Posts: 347
    Rate: 47
    I understand that you connect under 5V and GND on the ESP32? And if you connect via USB cable the Radio works?
  • ADVERTISEMENT
  • #763 21457179
    andy175
    Level 12  
    Posts: 23
    Help: 3
    Rate: 7
    I do it as in the example from You Tube after connecting the cable from the USB then the blue LED goes off after a while.

    Added after 58 [seconds]: .

    And of course the radio doesn't work.
  • #764 21457223
    hevet
    Level 18  
    Posts: 347
    Rate: 47
    And if you win something else to esp32, does the same thing happen?
  • #765 21457230
    andy175
    Level 12  
    Posts: 23
    Help: 3
    Rate: 7
    As I wrote earlier I am a complete amateur but when I uploaded to esp blink the connected diode with resistor flashed.
  • CS and RST disconnect still leave mirrored SSD1322 display

    #766 21457335
    wirbud
    Level 13  
    Posts: 65
    Rate: 16
    >>21457230 what kind of board do you have - do you have 30 or 38 pins (feet) The 38 ones still have feet above the standard ones - maybe you moved the DAC a foot or two?

    Added after 1 [hour] 32 [minutes]: .

    Situation with my yoradio screen - after disconnecting the CS pin (leg 16 of the SSD1322 screen) something more sensible appeared. I can also disconnect the RST leg (leg 15). is the same. Half a mirrored image. After it walks a little and goes off.
    Changing the station with the encoder boosts the screen and it lights up again for several seconds. Maybe someone can help? (On the ESP32 it runs normally. On the radio from our thread it also goes on.
    Only when I switch to yoradio it is bad. (SPI on 11-13).

    Distorted screen on an ESP32 network player with visible interference. .
  • #767 21457525
    andy175
    Level 12  
    Posts: 23
    Help: 3
    Rate: 7
    The boards I have ESP 32 with 30 legs are ESP32-Wroom-32 (ESP32S), ESP32-Wroom (ESP32 DEVKIT_C), with 38 legs ESP32-Wroom-32D ESP32_Devkit C_V4). ESP32-Wroom-32 and Espressif ESP32-S3-Wroom-1 (ESP32-S3) In brackets are descriptions of the underside of the boards.
  • #768 21457553
    robgold
    Level 23  
    Posts: 726
    Help: 10
    Rate: 290
    @wirbud, connect the reset pin to the ESP reset pin, on the boards it's called EN (Enable) and press the reset button on the module. Connect the CS signal back, of course.
  • ESP32-S3 task split for audio and UI handling

    #769 21457642
    wirbud
    Level 13  
    Posts: 65
    Rate: 16
    >>21457553
    THANK YOU ROBGOLD for your support !!!

    Unfortunately this is the first thing I did - It took much longer for the screen to shine on the EN with the RST bunched up. In the sketch I did not change the 41 leg. Then I changed it to -1 (as it is connected from EN plate. There was no revolution. A hard case.... So I'm thinking that if this is how the FLACs go I'll go back with this SSD1322 on the ESP32. Only the I2S library for AAC needs to be changed to go with this scarier ESP32. I've already got a version of yoradio-ALL(Maleksm)-v0.9.434m(15.02.25) - a lot more audio formats than in the library from December 2024. Interesting fact - Maleksm split the tasks into 2 cores - in one only audio handling goes in the other all the rest !
  • Evo 3.15 adds station tags and encoder reorder options

    #770 21457653
    robgold
    Level 23  
    Posts: 726
    Help: 10
    Rate: 290
    Welcome,

    I have uploaded the new Evo 3.15 file to GitHub Link , changes:

    - for stations not broadcasting StationString (information about the song currently playing), e.g.: all Polish Radio stations, all EuroZet group stations, the StationName is displayed with additional tags in the form of "-- StationName --" and if the text exceeds the screen size it will scroll. This looks nice, for example, in the case of Polish Radio stations. If the radio station in question is completely "uninterested" and does not even broadcast the StationName, three dashes "---" are displayed, a clear signal that we have no information from the stream owner.

    - On the front of the "client" I have implemented reorder functions for encoder 2. You can now switch how you want encoder 2 to work.
    Option 1 permanently:
    in the code in the variable declarations change the following variable from true to false:
    Code: C / C++
    Log in, to see the code
    .
    In the first option, with TRUE, turning the encoder changes the station and clicking on the volume; with FALSE, turning the encoder changes the volume and clicking on it shows us the list of stations.

    Option2:
    If someone just wants to play around and see how it works, without any changes to the code, after starting the radio hold down encoder 2 for about 5sec. We will get a message about the change of the encoder sequence an OLED display. Ultimately this variable will be stored on the SD card, everyone will adjust it for themselves :) .

    further...
    - Corrections in the code, now switching to radio/clock is done immediately
    - Being in the bank menu and pressing the button assigned to the Direct command (rcCmdDirect) changes whether the bank is read from the SD card or updated from GitHub.
    - Being on the radio screen also with the same button (Direct) we dim the display and in the Equlizer menu we reset (0) the settings of all filters.
    - The radio from now on reports in your routers as "ESP32 Radio" and not the strange ESP hostname with the serial number.


    By the way you can share the rework of the Sony Tuner, front panel and printed adapters slowly on completion :) .
    Sony tuner screen displaying radio station PR-3 Polskiego Radia.
    Sony radio with display showing Radio Centrum Lublin station. .

    Another addition like this, from tomorrow I will upload the corrected banks:
    Banks 15 - quite a few stations flew out (were dead) FLAC stations rewritten to Bank 16
    Bank 16 - this will be a high resolution bank, HQ or just with FLAC stations.
  • #771 21457777
    wirbud
    Level 13  
    Posts: 65
    Rate: 16
    robgold wrote:
    In the first option at TRUE by turning the encoder you change the volume and by clicking you get the station list, at FALSE by turning the encoder you change the station list and by clicking you adjust the volume.
    .
    My equipment negates and spins everything but the sound. I have the opposite encoder behaviour. True - gives station change when spinning.
  • Vishay TSOP2238 fixes noisy IR reception

    #772 21457876
    robgold
    Level 23  
    Posts: 726
    Help: 10
    Rate: 290
    >>21457777 This behaves correctly, perhaps I have confused things:

    When the parameter is =1 (true) then the functions are called: handleEncoder2StationsVolumeClick(); which means Stations when spinning Volume at click.
    For =0 (false) is called -> handleEncoder2VolumeStationsClick(); meaning Volume when spinning and station list when clicked.

    IR RECEIVER .
    Such an important note for anyone using a cheap off-the-shelf IR receiver module (VS1838B or HX1838) in a metal case on an Arduino board. After reading a couple of interesting threads about these receivers, I ordered myself an original Vishay TSOP2238 and 34138 (90st operating angle 2.5V to 5.5V) from TME.
    It is unbelievable how well this Vishay works, it always catches the code correctly, no reaction to the WiFi antenna with the metal one forever the reception LED was flashing because it was catching everything like an antenna).

    I recommend replacing it. Apparently the cheap ones are maybe for playing with 1m good but not building something more serious.
  • #773 21458080
    DJCheester
    Level 28  
    Posts: 2089
    Help: 75
    Rate: 958
    Hi robgold this looks beautiful and the yellow OLED matches the retro equipment.

    As for the IR receivers I have exactly the same opinion and that is why I used the TSOP31238 38khz. I always use this one at 38kHz and it works beautifully there is range and it doesn't collect rubbish. The Chinese ones I've already run across when writing skits on the Arduino.

    Regards...
  • ADVERTISEMENT
  • #774 21458085
    ArturAVS
    Moderator
    Posts: 26397
    Help: 2302
    Rate: 7822
    DJCheester wrote:
    the yellow OLED matches the retro hardware.

    It's more due to the filter, by the way, it oozes VFD. Beautiful work.

    I would add a display saver, if nothing has been pressed/activated in, say, five seconds, we reduce the brightness by 25%, the same just a few minutes then we reduce it by 50%. Above 30 minutes, turn off completely. This should significantly increase the life of the display.
  • OLED dimming option and longevity discussion

    #775 21458147
    robgold
    Level 23  
    Posts: 726
    Help: 10
    Rate: 290
    There is actually a yellow OLED there and the colour is just because I had to have one that would pass through the filter from the VFD display that was there before. The white is completely attenuated. The final result looks like it was factory. reminds me a bit of the older Yamaha equipment, because they had that colour in the audio equipment.

    @ArturAVS
    The option with this dimming seems simple to implement so I may try to add that. The question is whether these OLEDs of today really have such low longevity. I recently repaired my Denon F109 series streamer and there turned out to be sitting the same OLED we use in this radio. The player is over 10 years old now and still shines like new. Admittedly, it is not heavily used, because the speed of starting it up and searching for a stream is beyond my nerves, but sometimes it plays. As a matter of fact, the whole series of these Denons F109, 720 probably uses this display and on OLX they all shine :) .
  • #776 21458163
    ArturAVS
    Moderator
    Posts: 26397
    Help: 2302
    Rate: 7822
    @robgold Prophylactically, however, I would add.
  • Questions about replacing liblwip.a and removing encoders

    #777 21458309
    DJCheester
    Level 28  
    Posts: 2089
    Help: 75
    Rate: 958
    wirbud wrote:
    BLWIP-FIX.ZIP 2. Unzip and copy liblwip.a to the directory (you have a username, hardware version may be different): C:UsersAppDataLocalArduino15packages32hardwareespesp322.0.17tools.liblwip.a - for ESP32 or C:UsersAppDataLocalArduino15packages32hardwareesp322.0.


    Hello so I only need the archive liblwip-fix.zip ?
    This second file is unnecessary ? liblwip_20241019_3.0.5 ?

    With me I have the 2.0.17 version of ESP libraries and in both the first ESP32 link and the second ESP32S3 link I already have the liblwip.a file but they are not the same in S3 takes more ?

    Then what should I replace with this Fix file in the two cases ?

    And one more question, because on the second computer I have a version of the library 3.1.1 (on 64bit), should I also replace there the same liblwip.a file with this fix ?

    Greetings ...

    Added after 16 [minutes]: .

    Hello again on my second computer I have Win7 64Bit and Arduino 2.1.1 and ESP 3.1.1 libraries

    And there is no such folder there anymore

    C:UsersAppDataLocalArduino15packages32hardware2.0.17tools32.1.
    C:\Users\user\AppData\Local\Arduino15\packages\esp32\hardware\esp32\2.0.17\tools\sdk\esp32s3\lib\

    After version 3.1.1 there are tools and then there is just this

    Screenshot of a Windows folder with files and directories related to Arduino and ESP32. .

    Greetings ...

    Added after 7 [minutes]:

    hevet wrote:
    If anyone fancies the code without encoders and player then please Link.
    You should also swap the Audio library with mine, as I've extended the equalizer range from -40 to +12.

    Version @robgold
    .

    With this firmware, should I replace the library attached in this file with the original robgold one ???
    What does it do, does it improve anything ??

    And lastly, as robgold's software is updated all the time (as long as it's not difficult to do so), could you tell me what needs to be changed in the software to get rid of the encoder completely ???

    This is so that you can make the changes yourself - as long as it is not a very complicated operation ??

    Best regards ...
  • #778 21458489
    hevet
    Level 18  
    Posts: 347
    Rate: 47
    If you have version 2.0.17 then the first file, the second is for version 3.0.7 at most, it won't work on 3.1.1.
  • #779 21458492
    DJCheester
    Level 28  
    Posts: 2089
    Help: 75
    Rate: 958
    Acha that is, it remains to uninstall the ESP32 v3.1.1 library and install the last of version 2, i.e. V2
    0.17.

    Or v.3.0.7 and use the second file of the one with the date in the name.

    Thanks for the clarification.

    Regards...
  • #780 21458493
    hevet
    Level 18  
    Posts: 347
    Rate: 47
    You can upload 3.0.7 and replace the files from the second fix.
Listen:

Topic summary

LABEL_AI_GENERATED
Discussion of a DIY internet radio and SD-card audio player built on an ESP32-S3 with an OLED display, rotary encoders, buttons, and a front-panel interface. The project uses Wi‑Fi to download station lists from GitHub/public stream databases, supports MP3 and later AAC/FLAC playback, displays metadata including Polish characters via a modified font table, and stores settings such as station/bank selection and volume. The thread covers PCB design in EasyEDA, ESP32-S3 module pin spacing issues, PSRAM and Arduino IDE setup, library compatibility problems, SPI/I2S wiring, SD card reader boot issues, encoder behavior, WiFiManager-based network setup, and troubleshooting of crashes, HTTP download failures, and audio initialization errors. Several improvements were added over time, including station selection by encoder, time sync, browser update support, and saving settings to card memory.
AI summary based on the discussion. May contain errors.
ADVERTISEMENT