logo elektroda
logo elektroda
X
logo elektroda

Internet radio and audio file player on ESP32-S3

MAJSTER XXL 259488 2638

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):
  • #2281 21838322
    DJCheester
    Level 27  
    Posts: 2049
    Help: 75
    Rate: 949
    >>21838150

    In the file what I have provided are also pressings, you can make yourself a PCB by home method. In case of thermo-transfer you make only the bottom side and you have to use jumpers, in ready-made Chinese PCBs there are two layers and jumpers are already made on the top layer, you don't have to assemble them.

    This is how I made my prototypes.

    Three PCBs on a carpet: two white boards and one copper board, labeled “ESP32 Web Radio” with many holes.


    Prototype PCB with an ESP32 module, USB ports, microSD slot module, and pin headers


    Greetings...
  • ADVERTISEMENT
  • #2282 21838344
    robgold
    Level 23  
    Posts: 698
    Help: 10
    Rate: 284
    >>21838293 Arthur forgive me but I don't understand your question as why ? Until now, the Smoothjazz.com.pl station had 1411kpbs permanently encoded in the metadata as the bitrate. Now there is an actual upload calculated by the library from a variable bitrate and this averaged out to about 1Mbps.

    As far as wifi and bandwidth are concerned, theoretically yes, but practically, remember that we are working on ESP, where wider bandwidth means different work of resources, different current consumption, and we use pre-compiled libraries under FLAC.

    So far today I've played smoothjazz.com.pl on a compilation without littleFS and we'll see, So far it plays without any jams with the router on 20/40Ce settings.
    Perhaps this littleFS is affecting resources in some way choc I was doing RAM, PSRAM, stack monitoring and it didn't indicate any problems. It just suddenly gets a "hiccup" and then if you leave it like that it can crash the wifi shuffle.
  • #2283 21838415
    pipikupi1979
    Level 10  
    Posts: 15
    Thank you for your reply I have just checked and I confess I am a bit old school to my shame and on both boards I have the oled reset on the ESP reset plugged in hehe so I didn't really use it and did the use of I think 41 pins have any special functionality or purpose ?

    Added after 15 [minutes]:

    Important thing because I misled you version 53 worked that spiffs Without DS card I was compiled in Arduino ide and not uploaded from BIN and there it worked. It was the only radio that worked even yoradio struggled with it and didn't run on it either
  • #2284 21838429
    robgold
    Level 23  
    Posts: 698
    Help: 10
    Rate: 284
    >>21838415 The topic is close to my heart because it is the ONLY Polish station broadcasting in the FLAC standard. In addition, it broadcasts Smooth Jazz. It's possible to work with it, write code, design something in CAD ;) I'm still wondering if the continuous ESP operation with VBR doesn't cause that simply in the world the stabiliser on this poor DEV Kit board doesn't have enough current. However, AIDA Radio even though it is transmitting 2Mbps it is CBR and not VBR. I will be checking this thread as well.

    For now I found an interesting piece of information that using GPIO_Matrix causes, sometimes problems with littleFS. Interesting theory but I disabled some things in the code and another test with littleFS is flying.
  • #2285 21838438
    DJCheester
    Level 27  
    Posts: 2049
    Help: 75
    Rate: 949
    Robgold and why exactly was this change from SPIFFS (worked flawlessly for me) to LittleFS ?
    From a user point of view there is no noticeable difference ?
    And it is still possible that problems arise from this.

    The issue of Autostorage is also of little use in my opinion, because you still have to choose an option in the code. Until now, everyone has chosen SD or SPIFFS and I believe that this was the best solution. Anyway, I don't think it changes every day whether I use the card today or not. I don't have one and I don't think I ever will, unless an MP3 player comes along, in which case the SD option will come in handy.

    These are my comments, which I hope are constructive.

    Best regards....
  • ADVERTISEMENT
  • #2286 21838443
    robgold
    Level 23  
    Posts: 698
    Help: 10
    Rate: 284
    >>21838438 This was probably a convenience for myself because I have a rig without a card and with a card for testing. I'll agree that for the casual user the storage autodetection makes no sense. It just allows one BIN file to be prepared for people, who got it as a ready update to upload via the website and I didn't have to worry about whether a particular tuner had a card or not.

    When it comes to changing from SPIFFS to LittleFS there is a fundamental difference. Fire up the radio and try doing a page refresh on a FLAC station. You'll see how it jerks the audio. Simply put, SPIFFS blocks access for the audio library and doesn't cache anything for itself. On top of that, any error during recording can cause a lot of amabaras.
  • #2287 21838627
    DJCheester
    Level 27  
    Posts: 2049
    Help: 75
    Rate: 949
    robgold wrote:
    When it comes to changing from SPIFFS to LittleFS there is a fundamental difference. Fire up the radio and try doing a page refresh on a FLAC station. You'll see how it jerks the audio around. Simply put, SPIFFS blocks access for the audio library and doesn't cache anything for itself. On top of that, any error while writing can cause a lot of amabaras.


    I didn't even notice this because with me in the first place is the pilot site I visit occasionally.

    Good to know if better is better 😀

    Regards...
  • #2288 21838670
    ejcon
    Level 16  
    Posts: 253
    Help: 3
    Rate: 54
    https://github.com/Mario2054/EVO3_MOD2/tree/main you have the latest sofcik I cleaned up the unnecessary stuff I added others see for yourselves for malcontents to SDPLEYER the style of the radio there is also something.
    Well done robgold. Thank you.
    Attachments:
    • firmware.bin (2.47 MB) You must be logged in to download this attachment.
  • #2289 21838680
    amrowek
    Level 13  
    Posts: 239
    Rate: 10
    CodeBoy wrote:
    Since the problem for you is uploading the PCB file on the website, what do you want to do next?

    These are the basics of computer operation, and this radio then requires an environment to upload the rest, i.e. software, libraries etc.

    Why a negative attitude towards someone straight away? When you were born did you know everything at once, or did you learn along the way?

    I guess that's what the topic is for so that you can ask , add to your knowledge , or am I wrong and it's art for art's sake?
  • ADVERTISEMENT
  • #2290 21838700
    CodeBoy
    Level 33  
    Posts: 3269
    Help: 138
    Rate: 687
    amrowek wrote:
    CodeBoy wrote:
    Since it's a problem for you to upload a PCB file to the website, what do you want to do next?

    These are the basics of computer operation, and this radio then requires an environment to upload the rest, i.e. software, libraries etc.

    Why immediately have a negative attitude towards someone? When you were born did you know everything at once, or did you learn along the way?

    I guess that is why there is a topic so that you can ask , add to your knowledge , or am I wrong and it is art for art's sake?


    Then why do you write that you can't get along with a Chinese ? as there is no room for it there. You are writing fairy tales, combining like a horse uphill.

    You asked me on prv , I sent you what and how and still nothing. So why waste your time ?

    This is not a project for everyone, you can buy a ready-made radio, not everyone needs to know how to build everything yourself :) It will certainly come out cheaper and will work. Looking at your level of comprehension I don't see any chance of you running it. Unless you're getting ripped off, but that's all the more reason I don't have the time to play with it.
  • #2291 21838720
    amrowek
    Level 13  
    Posts: 239
    Rate: 10
    CodeBoy wrote:
    You asked me on prv , I sent you what and how and still nothing. So why waste your time ?



    Already ordered :-P

    browser and cookies were to blame.

    The issue of uploading the bin file remains.... ArudinoIDE or PlatformIO... I haven't uploaded the bin file yet .:-) ))

    um, I thought that's what the topic forums were for ...but I guess I'm wrong .

    ps
    apart from the competition ... I have never given an answer to someone (in another subject area), even if he/she did not succeed, I never wrote that I wasted his/her time. Well you see ... personal culture is falling. No wonder then that on other forums they write about rudeness in the electrode.
    i am sorry that I dared to take the time and it was wasted.
  • #2292 21838731
    DJCheester
    Level 27  
    Posts: 2049
    Help: 75
    Rate: 949
    Gentlemen, take it easy. A colleague gave it a go and let's give it a go too.

    Once you have soldered, you can upload the bin file without Arduino or platformio environment (omitting espcore and libraries and there is a problem with that) using Flash download tool.

    You will output the merged file and the radio will work. I'm sure someone on the forum will make you such a file when you solder the radio.

    Regards...
  • #2293 21838735
    amrowek
    Level 13  
    Posts: 239
    Rate: 10
    DJCheester wrote:
    You upload the merged file and the radio will work.

    I am waiting for the board of your project.... it is possible to assemble on a development board and detailed components from alli and spider on wires. Then the only problem is the pinology of the connections only . Since I succeeded with yoradio it ...

    Another issue that has come to light for me is the interference of the 2.4 GHz network by the repeater . Have any of you encountered this . Board esp32 30pin antenna built in not external when the repeater was switched on there was a cut in the audio playback. Repeater in the same room as the router (same wi-fi network name as on the router) as it serves as a network card for the N50 pawn.
  • #2294 21838742
    DJCheester
    Level 27  
    Posts: 2049
    Help: 75
    Rate: 949
    >>21802641

    Here I have made the gerber files available for production in China.

    A version with two ESP radio transmits over bt is also recently made available.
    This is the ejcona mod for the Robgold radio.

    Search above or on the previous pages of the topic.

    Greetings...
  • #2295 21838863
    krzychokup
    Level 11  
    Posts: 35
    Rate: 1
    [Binary ok. I tested but on ino error Compilation error: 'class AudioBuffer' has no member named 'changeMaxBlockSize' Knowingly or by mistake ?
  • #2296 21838877
    DJCheester
    Level 27  
    Posts: 2049
    Help: 75
    Rate: 949
    Do you have an I2S audio library with SRC files swapped with me ?
  • #2297 21838882
    ejcon
    Level 16  
    Posts: 253
    Help: 3
    Rate: 54
    I'm sending you these don't work?
  • #2298 21838885
    DJCheester
    Level 27  
    Posts: 2049
    Help: 75
    Rate: 949
    Unie these libraries from ejcona work and so do mine I mean the ejcona-mod code under Arduino.

    Greetings....
  • #2299 21839121
    JohnNagy
    Level 5  
    Posts: 14
    Rate: 3
    >>21838670 Thanks, but Flac is choppy on this BIN file. After compiling, ESP doesn't start, I think there's a partition problem, and I inserted the partitions.csv file.
  • ADVERTISEMENT
  • #2300 21839176
    krzychokup
    Level 11  
    Posts: 35
    Rate: 1
    It is OK. Libraries :)
  • #2301 21839823
    ejcon
    Level 16  
    Posts: 253
    Help: 3
    Rate: 54
    I have added a new version of the software and new support for the spammer and new panels https://github.com/Mario2054/EVO3_MOD2 adds the libraries needed to compile the platform and Arduino adds a new version of the BT transmitter with working acc and flac 16 24b does not work there are crackles
    Attachments:
    • EVO_WROOM_A2DP_TX_VOL100_USB_AUTO_SYSTEM_ok.zip (6.92 KB) You must be logged in to download this attachment.
    • libraries.zip (59.65 MB) You must be logged in to download this attachment.
    • 4d_systems_esp32s3_gen4_r8n16.libery.zip (59.71 MB) You must be logged in to download this attachment.
  • #2302 21839988
    JohnNagy
    Level 5  
    Posts: 14
    Rate: 3
    >>21839823 Thanks!!!

    This works, I compiled it in Arduino. There is only one problem, it doesn't save the Dimmer and the home screen in the settings, it always resets to 6, I don't have an SD card. Is that the reason? I haven't tried Bluetooth yet.
  • #2303 21840027
    ejcon
    Level 16  
    Posts: 253
    Help: 3
    Rate: 54
    I have an SD card and save everything there.I have not tried to save without it. SD uses SDPlayer so I have it connected at my place.
  • #2304 21840082
    hevet
    Level 18  
    Posts: 346
    Rate: 47
    I compared the performance of the new and old versions of the audio library for myself. The old version is the one before the eq changes, the new version from yesterday, the ram and psram consumption on RMF is at the levels seen below


    Screenshot comparing RAM and PSRAM usage: new library 60%/19%, old library 51%/16%
  • #2305 21840101
    DJCheester
    Level 27  
    Posts: 2049
    Help: 75
    Rate: 949
    Ejcona's latest MOD2 Arduino version v.3.19.70B.BT

    Compiles on Arduino

    Screenshot of Arduino IDE showing Ejcon‑MOD2 project for ESP32S3 and memory usage output after compiling

    The libraries are the same as in the original Robgol project

    Greetings ...
    Attachments:
    • Ejcon-MOD2.zip (176.16 KB) You must be logged in to download this attachment.
  • #2306 21840150
    JohnNagy
    Level 5  
    Posts: 14
    Rate: 3
    >>21840027 Something is wrong, it simply didn't save certain things, such as turning the brightness control on and off, setting the volume to 0 or 1. Also, the Oled display mode. After saving, it always jumps to screen 6. It saves other settings just fine. I've never had an SD card before, every version worked.

    I just tried config.txt and changed the Startup Display Mode to 0, after restarting it changes it back to 6.

    Another try. I plugged in an SD card, the same thing.
  • #2307 21840458
    robgold
    Level 23  
    Posts: 698
    Help: 10
    Rate: 284
    >>21840082 This I can see going for the better...i.e. the new eq with DSP Espressif "eats" more resources and loads probably more on the CPU.

    @hevet I uploaded these new libraries, the volume is OK. I don't even hear/see a difference overall. Only the VU meter "gets crazy" because it has very high values on every station :/
  • #2308 21840472
    krzychokup
    Level 11  
    Posts: 35
    Rate: 1
    I'm testing the radio and everything is cool, but when the Wi-Fi goes down? The author assumes it always is, which means that without a reboot or switching to another channel it won't get up on its own when the connection returns.
  • #2309 21840530
    robgold
    Level 23  
    Posts: 698
    Help: 10
    Rate: 284
    >>21840472 What does it mean when the network goes down? How many times does your WiFi "drop" at home? Because if that's what you have, then there's a problem with WiFi stability.

    There is no "re-connect" mechanism at the moment, as the Audio library already has one in place, but if it wasn't a simple streaming drop, but a lack of WiFi, then unfortunately the radio won't get up on its own.
  • #2310 21840555
    krzychokup
    Level 11  
    Posts: 35
    Rate: 1
    I have put in a loop and am testing

    static unsigned long wifiCheckTimer = 0;
    static bool reconnectFlag = false;

    if (millis() - wifiCheckTimer > 5000) {
    wifiCheckTimer = millis();

    if (WiFi.status() != WL_CONNECTED) {
    Serial.println("[WiFi] Lost connection");
    reconnectFlag = true;
    WiFi.reconnect();
    }
    else if (WiFi.status() == WL_CONNECTED && reconnectFlag) {
    Serial.println("[WiFi] Reconnected - manual station change needed");
    delay(500); // give time to log
    esp_restart();

    }
    }
📢 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