logo elektroda
logo elektroda
X
logo elektroda

Internet radio and audio file player on ESP32-S3

MAJSTER XXL 278244 2772

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):
  • #2731 21916377
    grzes_dst
    Level 12  
    Posts: 79
    Rate: 7
    Thank you colleagues @robgold, @efi222, @DJCheester, I downloaded the file from GitHub, it turned out I had that library with the files to swap, I was just doing it wrong.
    What helped the most was the installation demonstration, which showed exactly where to swap the files and of course the compilation already went through without a problem.

    Thanks again.
  • ADVERTISEMENT
  • #2732 21916709
    amrowek
    Level 13  
    Posts: 244
    Rate: 10
    Gentlemen, regarding the problem earlier, the fault of the DAC UDA 1334, change to PCM 5102 and it works, only the power board heats up and the yoradio turns on and off.
    But me on a different issue, but related to the DAC.

    Someone has used, tried the PCM 5122
    https://pl.aliexpress.com/item/10050104628149...-29919%3Bd%3Ae961d483%3Bm03_new_user%3A-29895
  • ADVERTISEMENT
  • #2734 21917222
    DJCheester
    Level 28  
    Posts: 2081
    Help: 75
    Rate: 954
    If there is an NEC standard it will work. The issue is whether 36khz or 38khz.
    You just have to assign yourself codes in the remote.txt file

    Greetings ...
  • #2735 21917275
    amrowek
    Level 13  
    Posts: 244
    Rate: 10
    >>21917222 thanks for the info, today I was doing a yoradio and I blew the 2.0 inch screen ...eh, I'm waiting for the package
  • #2736 21917401
    robgold
    Level 23  
    Posts: 724
    Help: 10
    Rate: 290
    >>21917205 The fact that a particular remote works on yoRadio does not mean it will work here. What is important is the NEC protocol. Any other protocol is not supported by our radio projects.

    @DJCheester The codes are assigned on the website (settings -> remote set), there is a special learning mode for this. It is no longer necessary to enter anything manually into the remote.txt file
    Activate the learning mode, click on a button and the radio automatically saves the data.


    Screenshot of Evo Web Radio remote control configuration with learning mode and a codes/value table
  • #2737 21917564
    DJCheester
    Level 28  
    Posts: 2081
    Help: 75
    Rate: 954
    robgold wrote:
    >>21917205 Just because a particular remote works on yoRadio does not mean it will work here. What is important is the NEC protocol. Any other protocol is not supported by our radio projects.

    @DJCheester The codes are assigned on the website (settings -> remote set), there is a special learning mode for this. It is no longer necessary to enter anything manually into the remote.txt file
    Activate the learning mode, click on a button and the radio automatically saves the data.


    Screenshot of Evo Web Radio remote control configuration with learning mode and a codes/value table


    Good to know I'm still stuck on 3.19.70 and there were no such bits and pieces there.

    Greetings...
  • #2738 21918120
    sq3evp
    Level 39  
    Posts: 6509
    Help: 217
    Rate: 863
    robgold wrote:

    Switch on the learning mode and click on a button and the radio stores this data automatically.

    Very good solution - this is how you can use any remote control?
  • #2739 21918133
    DJCheester
    Level 28  
    Posts: 2081
    Help: 75
    Rate: 954
    Anything that transmits code in the NEC standard, other standards will not be supported.

    Greetings ...
  • ADVERTISEMENT
  • #2740 21918879
    ejcon
    Level 17  
    Posts: 288
    Help: 3
    Rate: 63
    A visual tweak: swapping the ESP 32 C6 N4 and the NV3007 display. It seems to be a more dynamic layout – what do you think? Can we move on to the next module, or is there anything else you’d like to improve?


  • #2741 21918926
    DJCheester
    Level 28  
    Posts: 2081
    Help: 75
    Rate: 954
    It barely picks up any high frequencies; I don't think it'll get any better via I2S.
    Best regards...
  • #2742 21918942
    efi222
    Level 22  
    Posts: 760
    Help: 12
    Rate: 1198
    On these low-end displays, you can squeeze out 70 FPS on each channel in stereo. And anyway, they have very poor viewing angles.
    Video:
    >>21715016
    I2s is pretty much a non-starter here.
  • #2743 21919025
    DJCheester
    Level 28  
    Posts: 2081
    Help: 75
    Rate: 954
    Well, the problem must lie elsewhere on your end; on this spectrum it looks beautiful and dynamic right up to the very last bar – that is, the high frequencies at 16k – but unfortunately, on the EJN it’s a bit of a mess, just like in the analyser that was once added as screens 5 and 6 in Robgold’s radio – it didn’t run smoothly or dynamically there either.

    That’s why I’m sticking with the first version of the Effie analyser via analogue.

    Best regards....
  • #2744 21919065
    sq3evp
    Level 39  
    Posts: 6509
    Help: 217
    Rate: 863
    I don't know how the 16 kHz measurement is taken – is it sampled in some way? Perhaps there isn't enough processing power?
  • #2745 21919075
    DJCheester
    Level 28  
    Posts: 2081
    Help: 75
    Rate: 954
    See for yourself in the basic version, without any frills.

    Best regards...
    Attachments:
    • ESP32 Analizator Widma - 01.mp4 (70.03 MB) You must be logged in to download this attachment.
  • #2746 21919077
    efi222
    Level 22  
    Posts: 760
    Help: 12
    Rate: 1198
    sq3evp wrote:
    I don’t know how this 16kHz measurement works – is it sampled in some way?

    It’s a Fourier transform.
    @ejcon – with all due respect to your work. But there’s something wrong with the bar chart animation here. You can see it’s stuttering. Does this MCU do anything else apart from this spectrum?
  • ADVERTISEMENT
  • #2747 21919082
    ejcon
    Level 17  
    Posts: 288
    Help: 3
    Rate: 63
    It has an output-level silencer. A Pì controller and a connection that’s been stubbornly stitched in, along with Ota and update. Style editing. And I2S support. Nothing else.
  • #2748 21919087
    efi222
    Level 22  
    Posts: 760
    Help: 12
    Rate: 1198
    >>21919082
    Apart from i2s, what you’re describing seems rather passive.
    Are you using both cores?
    If it’s the Tft_espi library, perhaps you’re using full-screen sprites?
  • #2749 21919097
    ejcon
    Level 17  
    Posts: 288
    Help: 3
    Rate: 63
    The library is GFX
    The ESP32 32C6 N4 has only a Core 0
  • #2750 21919113
    efi222
    Level 22  
    Posts: 760
    Help: 12
    Rate: 1198
    >>21919097
    It’s unlikely to get any better with this setup.
    Measure the frequency of the programme’s main loop. That will give you the answer. With two displays, it should be at least 50Hz.
    There is a ready-made function for measurement in my spectrum source.
  • #2751 21919229
    James596
    Level 29  
    Posts: 1823
    Help: 139
    Rate: 525
    With all due respect, these visualisations are more like a random slideshow than an actual spectrum analyser.
  • #2752 21919365
    ejcon
    Level 17  
    Posts: 288
    Help: 3
    Rate: 63
    >>21919113 UART RXMON rx16=218 lvl16=1 cmds=47 last=AGC KD 0
    STAB heap=261724 minheap=261616 loopHW=30868 drawHW=23148 style=15 muted=0 mode=FFT aframe=15839 LOOP_FPS=34 AUDIO_FPS=34 AFRAME_FPS=34 FFT_FPS=34 DRAW_FPS=13 DRAWMS=60 PERF=2 NEWDRAW=1
    A1FPS loop: 34 Hz | audio: 34 Hz | fft: 34 Hz | core0/draw: 13 Hz | mode=FFT | fftalt=1 | free heap: 261724
    UART RXMON rx16=218 lvl16=1 cmds=47 last=AGC KD 0
  • #2753 21919620
    efi222
    Level 22  
    Posts: 760
    Help: 12
    Rate: 1198
    >>21919365
    That’s quite a lot of information.
    I’ve identified a 34 FPS loop
    If that’s the main loop’s rate, then when multiplexing displays it drops to half that, i.e. 17. That’s far too low.
    I don’t know what DRAW_FPS=13 is, but it doesn’t look too good either.

    Added after 33 [minutes]:

    I don’t know what prompted the switch to a single-core MCU and the change of graphics library to GFX. For VU animation, that’s probably enough as only the amplitude needs to be displayed.
    FFT involves heavy calculations and should be handled by a single core.
    The second one handles only graphics processing.
    And that’s when you get maximum bar display performance. With this division of tasks, and with the narrow displays you’re showing, the loop on the graphics-handling core runs at around 140 Hz.
  • #2754 21919707
    sq3evp
    Level 39  
    Posts: 6509
    Help: 217
    Rate: 863
    I wonder if it wouldn’t be better to use something more specialised? Was it using up processing power on graphics rather than on audio processing?
  • #2755 21919741
    efi222
    Level 22  
    Posts: 760
    Help: 12
    Rate: 1198
    ejcon wrote:
    The library is GFX

    But AdafruitGFX or LovyanGFX?
    Because the differences in speed are huge.
  • #2756 21919746
    ArturAVS
    Moderator
    Posts: 26217
    Help: 2296
    Rate: 7771
    Just for fun with DSP, I bought myself an ESP32-A1S v2. And for the life of me, I can’t get the codec to work. Has anyone else had a go with this board? Basically, it has everything on board except a display :D
  • #2757 21919772
    ejcon
    Level 17  
    Posts: 288
    Help: 3
    Rate: 63
    >>21919620
    I’ll be going back to WROOM; I checked yesterday and compared both displays, and both WROOM processors work much better. I was guided by the better performance of I2S because only that one handled the equaliser properly – no other gave the correct sound via I2S. I messed up the pin mapping – I was doing it all at once; you calculate them one by one, which is why the dynamics are better. Today I’ll tweak the WROOM program and we’ll see how the frequency response turns out.
  • #2758 21919808
    leonbotha69
    Level 7  
    Posts: 8
    Rate: 3
    >>21856609
    I uploaded the firmware last night and stumbled onto an issue.
    I am from South Africa and our internet connectivity is not as reliable as Europe.
    On boot-up, without internet connectivity, the unit is stuck in a loop trying to find the NTP server and reboot after a while.
    It connects to my home network, but without internet connectivity. 
    It never progress past that point.
    At this stage it is also not possible to access it via the web server.

    1. Is it possible to add the option to set own time servers, i just happen to run my own GPS based Stratum 1 server on my home network.
    2. If the NTP server is not found, still boot, but with clock error indicator.
  • #2759 21919816
    DJCheester
    Level 28  
    Posts: 2081
    Help: 75
    Rate: 954
    That’s good news 😀. If this harvester proves to be stable and performs well, we’ll consider a PCB for this upgraded version.

    Best regards...
  • #2760 21920098
    simw
    Level 27  
    Posts: 756
    Help: 94
    Rate: 286
    ArturAVS wrote:
    I bought myself an ESP32-A1S v2

    This is based on the old ESP32, it doesn’t have PSRAM, so it doesn’t really fit this thread; there’s some info online suggesting it’s not a particularly successful module, with an underdeveloped ‘Audio Kit’. I bought one myself a while back and it’s just lying in a drawer; once you’ve connected a DAC to the ESP32S3, it’s a piece of cake.
📢 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