logo elektroda
logo elektroda
X
logo elektroda

Internet radio and audio file player on ESP32-S3

MAJSTER XXL 264075 2671

TL;DR

  • 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.
Generated by the language model.
ADVERTISEMENT
Treść została przetłumaczona polish » english Zobacz oryginalną wersję tematu
📢 Listen (AI):
  • #2641 21899954
    ejcon
    Level 16  
    Posts: 266
    Help: 3
    Rate: 61
    New software version EVO3 MOD KOL .There is still a lot of room for improvement but you have a look for yourself . Version on Panel ILI9488 connections as before. Enjoy testing.

    The visual side looks like this
    Screenshot grid of 20 radio player UI panels with visualizers, clock, info pages, and menus.
    Attachments:
    • EVO_Radio_Arduino_ILI9488_V7_WLASCIWY_META_AUDIO_LEVEL_COMPILE_FIX.zip (1.05 MB) You must be logged in to download this attachment.
  • ADVERTISEMENT
  • #2642 21900299
    ejcon
    Level 16  
    Posts: 266
    Help: 3
    Rate: 61



    NEW EVO3 MOD COLOUR TOOLING

    WORKS ON PANELS ILI9488 AND ST7796 you have to change the rotation in the code because the image is rotated 180 degrees
    Attachments:
    • EVO_Radio_Arduino_ILI9488_V7_FULL_ADOPTED.ino.merged.bin (16 MB) You must be logged in to download this attachment.
    • EVO_Radio_Arduino_ILI9488_V7_BT_ICON_ORIGINAL_SHAPE_FIX4.zip (1.07 MB) You must be logged in to download this attachment.
    • EVO_Radio_Arduino_ILI9488_V7_INFO_WEATHER_DANE_DEGREE_FIX.zip (1.07 MB) You must be logged in to download this attachment.
  • #2643 21900341
    efi222
    Level 21  
    Posts: 687
    Help: 12
    Rate: 1153
    And what kind of graphics? In terms of libraries?
  • #2644 21900347
    ejcon
    Level 16  
    Posts: 266
    Help: 3
    Rate: 61
    >>21900341
    LovyanGFX 1.2.21
    Audio Version 3.4.6

    Arduino IDE Library Manager showing “LovyanGFX” with version 1.2.21 marked as installed. LovyanGFX 1.2 audio version 3.4
  • #2645 21900357
    markon7
    Level 12  
    Posts: 11
    Rate: 3
    >>21900347 Hi, can you please upload the file, .bin, thanks
  • #2646 21900366
    ejcon
    Level 16  
    Posts: 266
    Help: 3
    Rate: 61
    >>21900357
    I added the bin in the post test don't forget the connections

    Connection to ESP32 S3 N16 R8 // -------------- OLED Display - pin definition -------------- #define SPI_MOSI_OLED 39 // MOSI pin (Master Out Slave In) for SPI OLED interface #define SPI_MISO_OLED -1 // no MISO for TFT display #define SPI_SCK_OLED 38 // SCK (Serial Clock) pin for SPI OLED interface #define CS_OLED -1 // CS residual screen to GND - dice on ILI9488 #define DC_OLED 40 // DC/RS screen on ILI9488 #define RESET_OLED 41 // RST screen on ILI9488 ST7796
  • #2647 21900476
    DJCheester
    Level 28  
    Posts: 2065
    Help: 75
    Rate: 950
    Hello Robgold, thanks for the new soft version. I have a question, did you add, besides the flag, any pin dedicated for the STANDBY/MUTE type amplifier ?

    Ejcon, a question, are you planning to control some LCD backlight pin for Power Off ? Well and the question of adjusting the edibility with the same pin you could PWM control the MOSFET for the LCD backlight.
    Do you have Bluetooth RX/TX in this version ?
    The idea is to implement audio transmission on the second ESP32 as you had in the previous mod on the OLED ?

    Greetings....
  • ADVERTISEMENT
  • #2648 21900496
    markon7
    Level 12  
    Posts: 11
    Rate: 3
    >>21900366 well it looks nice, but .bin is for ILI9488 and I have st7796 and have a mirror image
  • #2649 21900541
    ejcon
    Level 16  
    Posts: 266
    Help: 3
    Rate: 61
    In the web setting you have a rotation setting of 180 degrees, select it and update it, it works fine
    Web settings screenshot showing “TFT image rotation 180 degrees” and a “Weather location” field.

    Added after 7 [minutes]:

    >>21900476
    Yes in the softy is the BT control as before all is transferred from the Evo3 mod only on a new panel and here are the changes because everything is not yet completed but the work is in progress just like the previous softy should be the same functions.
  • ADVERTISEMENT
  • #2650 21900551
    markon7
    Level 12  
    Posts: 11
    Rate: 3
    >>21900541 yes, I know this rotation works up/down but I also have left/right
  • #2651 21900560
    ejcon
    Level 16  
    Posts: 266
    Help: 3
    Rate: 61
    >>21900551
    A correction must be made in codzie .
  • #2652 21900866
    robgold
    Level 23  
    Posts: 709
    Help: 10
    Rate: 286
    >>21900476 The backlight and amplifier control option is already in code 3.20.14.

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

    Clock synchronisation has also been improved in 3.20.14. Now in sleep mode when we have the clock displayed it should show the time correctly. ESP wakes up every 3h and does a re-sync of the clock. I forgot to add this to the list of changes and it is one of the most important things that has also changed.
  • #2653 21901130
    MAJSTER XXL
    Level 29  
    Posts: 2064
    Help: 164
    Rate: 424
    >>21900299 @ejcon In my opinion all these dynamic screens with bytes are an unnecessary expense, the fluidity is not there at all, and to stare at it- it just tires the eyes, better to harness the resources of ESP32 for smooth audio and network connection. If I were to do any analysis it would only be a screen on parallel communication, here's a comparison: https://www.youtube.com/watch?v=ZtCMIAmLSh8
  • #2655 21901277
    ejcon
    Level 16  
    Posts: 266
    Help: 3
    Rate: 61
    >>21901191
    Maybe something like this
    Wiring diagram for ESP32 with PCM5102A DAC and two ST7789 TFT displays sharing an SPI bus

    Screenshot of “External Analyzer / UART Spectrum” control panel with buttons and parameters

    Connectivity:
    2. TWO TFT PANELS ST7789 1.9" 170x320
    -------------------------------------
    Both displays share the same SPI bus. Only the CS pin differs.

    GPIO4 -> CS TFT left
    GPIO5 -> CS TFT right
    GPIO15 -> RX UART from master ESP32-S3
    GPIO16 -> TX UART to main ESP32-S3

    GPIO17 -> RST of both TFTs
    GPIO18 -> SCK of both TFTs
    GPIO22 -> DC of both TFTs
    GPIO23 -> MOSI both TFTs

    GPIO32 -> I2S BCK
    GPIO33 -> I2S LRC
    GPIO34 -> I2S DIN

    3V3 -> TFT and module power supply
    GND -> common groundTFT LEFT:
    Attachments:
    • EVO_V7_STYL22_WIDMO.zip (1.11 MB) You must be logged in to download this attachment.
  • #2656 21901400
    efi222
    Level 21  
    Posts: 687
    Help: 12
    Rate: 1153
    The mini spectrum code is a reworking of my earlier code. It could have been mentioned...
  • #2657 21901412
    ejcon
    Level 16  
    Posts: 266
    Help: 3
    Rate: 61
    >>21901400
    Sorry but I was writing quite late.
    Already adding info.
  • #2658 21901424
    efi222
    Level 21  
    Posts: 687
    Help: 12
    Rate: 1153
    ejcon wrote:
    Sorry but I was writing quite late.

    Bottom line.
    I've been writing for a long time that this S3 from the radio is sweating from an excess of bits and bobs. A separate ESP for effects is a good direction. Audio over i2c in the spectrum is great as much as it is limited to one device.
  • ADVERTISEMENT
  • #2659 21901459
    robgold
    Level 23  
    Posts: 709
    Help: 10
    Rate: 286
    >>21901130 I agree 100%. Byers, blinkers ...great. However, this is INTERNET RADIO and the most important thing is that this streamer is able to correctly play back also such HiRes stations with FLAC codec. In 99% after starting the station no one looks at the display. we "fire up" our favourite station and off we go.
    This is why I am recompiling our own lwip libraries for the project, so that the radio plays correctly even up to 2500kbps/FLAC.

    @efi222 The approach with a separate analyser is spot on.
  • #2660 21901465
    ejcon
    Level 16  
    Posts: 266
    Help: 3
    Rate: 61
    What do you think about making a circuit as follows
    1 main processor ESP32 S3 N16R8 radio Evo3
    2.2 ESP32 S3 N16R8 processor Graphic equalizer with spectrum analyzer controlled from the main processor via uart
    3 BT AUDIO ESP32 WROM transmitter controlled from the main processor via uart2
    A PCM9211 could be added before the equalizer to feed other digital signals.
  • #2661 21901477
    efi222
    Level 21  
    Posts: 687
    Help: 12
    Rate: 1153
    >>21901465
    Point 2 and 3
    If the uart is unidirectional one is sufficient Preferably UART2.
    In the receiving ESPs the RXs are bundled together.
    I have something similar done in another device with two ESP32s. I control them TX from the Esp8266 from the GUI.
    Only in the command headers you have to add to which ESP32 the command is flying to. And they receive all the commands and filter if it is to it.
  • #2662 21901944
    ejcon
    Level 16  
    Posts: 266
    Help: 3
    Rate: 61
    Spectrum software fix.
    Cod for the spectrum reworked from the code of colleague efi222.

    THANKS FOR A SHOOT OF GOOD WORK efi222
    Such a little gadget about the demo every time you run .
    A request not to remove this from the code .

    Breadboard prototype with wires and two blue LCD displays showing “efi222” and “Ecjon”




    TFT display showing “ANALIZATOR ZEWN.” menu on a red PCB, with cables and ribbon in the background.

    Tested
    Electronics test setup with circuit boards, wiring, and three color displays showing spectrum/VU meters Electronics prototype with wires and two small displays showing vertical signal level bars

    TFT screen showing “PCM9211 SOURCE” UI with “RADIO AUXIN0” message, surrounded by wires
    Attachments:
    • widmo_analyzer_pio_32BIT.zip (16.94 MB) You must be logged in to download this attachment.
  • #2663 21901970
    efi222
    Level 21  
    Posts: 687
    Help: 12
    Rate: 1153
    ejcon wrote:
    Such a little gadget about demn at every launch .
    Request to not remove this from the code

    No no... I really don't need to be on TFT at the start. It's enough that my nickname is in the main. You've done a great job too. I'll take a look tomorrow to see what you've come up with there :)
  • #2664 21902025
    DJCheester
    Level 28  
    Posts: 2065
    Help: 75
    Rate: 950
    Ejcon would you upload some video of it jumping 😀

    Greetings...
  • #2665 21902029
    ArturAVS
    Moderator
    Posts: 26059
    Help: 2295
    Rate: 7730
    DJCheester wrote:
    would you please upload some video of how it jumps

    And sweep 64-16000Hz. I'd love to see how much "analysis" there is in this analyser.
  • #2666 21902075
    ryba_82
    Level 11  
    Posts: 9
    >>21899630 Good morning

    I compiled a new version yesterday, core 3.5.8, using audio library 3.4.6 (instead of 3.4.5q) and substituted lwIP libraries. I compiled under Arduino 2.3.8.
    It works brilliantly, compared to the previous version it runs faster, and on my favourite stations, which by the way were probably the most cutting at startup: PR Two and Radio Chopin PR in aac320 and Cesky Rozhlas D major (flac) stopped cutting.

    I don't know what caused this improvement, whether the new core (the radio works more nimbly in general) or the new I2S Audio library, or perhaps the "robgold" libraries

    The earlier compilation (3.20.04) on the above stations had problems, especially right after loading the station, I was combining with different versions of the lwIP libraries provided by my colleague Robgold and on these stations (especially Cesky Rozhlas) it was cutting heavily. Surprisingly, other stations, even with higher bitrates (e.g. Linn) were running smoothly. I considered that the problem might be on the side of the broadcaster.

    To my colleague Robgold:
    I also think that additional fabs like spectrum analysers or pseudo-analogue VU-meters are not necessary, it is better to focus on basic functionality, so as to squeeze the maximum performance out of a chip that was supposed to be used in fridges and other IoT....

    Now I am even thinking about simplifying this project (1 bank, only a big station name on the display, maybe a clock, etc.) in terms of a radio for an elderly person, so that its operation is as similar as possible to an analogue radio (you know, except for WiFi configuration).
  • #2667 21902151
    ejcon
    Level 16  
    Posts: 266
    Help: 3
    Rate: 61
    >>21902025




    To improve stl 6.
  • #2668 21902157
    DJCheester
    Level 28  
    Posts: 2065
    Help: 75
    Rate: 950
    Ejcon did you compile this as recommended on core 1.04 with the changes as efi222 wrote because somehow these posts go dimly.

    In effi's or my compilation it is much better

    Take a look

    Audio in analogue

    Greetings....
    Attachments:
    • ESP32 Analizator Widma - 01.mp4 (70.03 MB) You must be logged in to download this attachment.
  • #2669 21902161
    efi222
    Level 21  
    Posts: 687
    Help: 12
    Rate: 1153
    DJCheester wrote:
    you compiled this as recommended on core 1.04

    This low core was because of the high ADC sampling. In higher versions this is messed up. But there is no ADC in the ejcona software.

    @ejcon and falling bars do you have every 3 pixels?
  • #2670 21902164
    DJCheester
    Level 28  
    Posts: 2065
    Help: 75
    Rate: 950
    That's what you explained to me, but you have to admit that it works without delay. I wonder if this is because of I2S?
📢 Listen (AI):

Topic summary

✨ The discussion centers on the development of an internet radio and audio file player based on the ESP32-S3-WROOM-1 module, featuring a custom-designed prototype PCB with OLED display and user controls including rotary encoders and buttons. Key challenges addressed include pin spacing discrepancies in the ESP32-S3 module footprint, integration of Wi-Fi connectivity with dynamic station list updates, and handling of Polish character encoding on the OLED display. The project uses Arduino IDE (version 2.3.2) with ESP-IDF support and requires enabling PSRAM. Audio playback supports MP3, AAC, and FLAC streams, with the ESP32-audioI2S library recommended over the incompatible Audio library. Users reported issues with SPI MISO pin assignment causing bootloader conflicts, resolved by reassigning MISO to pin 35. The project incorporates WiFiManager for network configuration, EEPROM and SD card storage for saving last played station and settings, and includes plans for tone control via an external KA2107 equalizer and a CS8673 amplifier module. Problems with encoder input stability and memory limitations for Bluetooth A2DP on ESP32-S3 were noted. The community suggested alternatives like KaRadio and ESP32-MiniWebRadio projects. Debugging tips include serial terminal logs for HTTP errors and flash memory erasure to resolve boot loops. The project is open-source on GitHub, encouraging forks and modifications. Additional features under development include browser-based updates, directory navigation, and potential audio recording to SD card.
Generated by the language model.
ADVERTISEMENT