logo elektroda
logo elektroda
X
logo elektroda

Internet radio and audio file player on ESP32-S3

MAJSTER XXL 259353 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):
  • #2551 21865854
    robgold
    Level 23  
    Posts: 698
    Help: 10
    Rate: 284
    >>21865827 That's why an oscilloscope is essential, because you would immediately check if those 3kHz (quite a lot for tests, it's better to start from 1k) enter the PCM correctly. As far as DSP is concerned, you should be interested in the TAS (TI TAS 5805) which I threw into the radio here; they have a very extensive DSP in them.
    As for input/output handling and conversion to i2s, I recommend the PCM9211 used in a lot of gear. I will be figuring out communications with it in the near future.
  • ADVERTISEMENT
  • #2552 21865978
    Anonymous
    Level 1  
  • #2553 21866028
    DJCheester
    Level 27  
    Posts: 2049
    Help: 75
    Rate: 949
    Kula / Majster I was thinking about the player function so that you can delete songs from the SD card because sometimes it would prztdało from the remote control when you are lying down and listening and a song is already boring.

    Greetings ...

    Added after 4 [hours] 45 [minutes]:

    >>21864002

    Robgold is there no interference from the OLED inverter when using these amplifiers ?
    I.e. is there silence when I press MUTE ?
    Do you have to configure it somehow with jumpers like PCM5102 ?

    Greetings ...
  • #2554 21866353
    pipikupi1979
    Level 10  
    Posts: 15
    >>21865854 Thanks for the information I will read and look for more information. And as for the oscilloscope I know unfortunately it is useful I have to get even for tuning equalizer filters will be useful this project is an attempt to find in myself motivation to develop at the level of programming and not just use a soldering iron. As a curiosity I managed to find on the Japanese stock exchange original module es9039q2m from astute group The auction lasts still 2 weeks so far the price has not yet gone beyond my forks so who knows I think that this chip would be an amazing platform for testing and ultimately for my project especially that it is not a Chinese module but a brand evaluation board with low jitter clock. But who knows.... Thanks a lot for the support with the information. Regards
  • #2555 21866962
    supsak
    Level 13  
    Posts: 81
    Rate: 5
    Hi.
    I would like to ask "Robgold"/I have asked a few times but have not got the answer/ or others who have the software version 3.20.04 and the Led diode on GPIO17 is connected to +3V, how does the flashing of the led behave.
    I have already updated the software 3 times and I have the same.
    At me during start-up the LED flashes, then it stays on, when I press the button pilotA-MIGA. v StANBY-POWER Off nesvjeczi.
    What do you need more than that to make it work as smoothly as Robgold in the design?
    that it would work in Stanby. As it is radio switched on it would not be possible to switch. The flicker would be at the push of a remote control, or start, or as nema wifi signalu.
    Greetings.
  • #2556 21866965
    DJCheester
    Level 27  
    Posts: 2049
    Help: 75
    Rate: 949
    And shouldn't there be a diode through a resistor of about 330R to ground and not to +3V ????
  • ADVERTISEMENT
  • #2557 21867001
    dawidkosciesza
    Level 11  
    Posts: 54
    Rate: 14
    DJCheester wrote:
    And shouldn't the diode be through a resistor of about 330R to ground and not to +3V ???

    Exactly :) If you gave the led the opposite way then that's how it will work - the opposite way :D
    Well caught DjCheester ;)
  • ADVERTISEMENT
  • #2558 21867078
    robgold
    Level 23  
    Posts: 698
    Help: 10
    Rate: 284
    >>21866962 As your colleagues have already written you. The LED is to be on the JOY connector connected to PIN 1 (GND) and PIN 3 (GPIO17). The control is high state, the ground is solid.
  • #2559 21867091
    supsak
    Level 13  
    Posts: 81
    Rate: 5
    Hi.
    The 330 ohm resistor is there and I have moved the diode as Robgold suggested on page 75 ...
    STATUS LED - experimental function
    I have inserted a STATUS LED on GPIO17. Connection cathode (-) to GPIO, + LED permanently to 3.3V. This is the Joystick (JOY) port on my EVO board.
    LED:
    - flashes as we receive an IR code (sometimes when changing banks it lights up), this is the implementation at the moment.
    - flashes when using the SD card
    - lights up permanently when in standby mode

    I understood from the text that it is connected to +3.3V.
    I will try to connect it back, it is to mass - and GPIo17.
    Thank you for explanation.

    Added after 7 [hours] 1 [minutes]:

    Czech.
    LED wired to massa a GPIO17 a vsicko works ./reverse/
    Thank you for your help
  • #2560 21867287
    robgold
    Level 23  
    Posts: 698
    Help: 10
    Rate: 284
    >>21867091 This description is from version 3.19.70. In 3.20.04 there was a change. The led is controlled in reverse. In version 3.20 the whole status is controlled differently. The LED should not light up when changing the bank (this behaviour was in 3.19)
  • #2561 21867452
    RonAd
    Level 10  
    Posts: 26
    Rate: 1
    Question- with the latest version 3.20.04, does the time diverge for you?
    It can delay the clock quite significantly.
  • #2562 21867493
    robgold
    Level 23  
    Posts: 698
    Help: 10
    Rate: 284
    >>21867452 That's right, the charms of the ESP32 which has a super inaccurate clock. I'm working on a fix for that but ultimately I think I'll be waking up the radio every 4-6h anyway and doing a sync with NTP. Other builds use external clocks to hold the RTC.
  • #2563 21867783
    Anonymous
    Level 1  
  • #2564 21867939
    dawidkosciesza
    Level 11  
    Posts: 54
    Rate: 14
    Another redesign :)


    Black portable speaker with handle, antenna, and radio display, held in a hand outdoors
  • #2565 21868004
    robgold
    Level 23  
    Posts: 698
    Help: 10
    Rate: 284
    >>21867939 Super. Did you sub-map the arrows to the ADC ? Does everything work ? Fellow Rafal on the FB group yoRadio seems to have designed such a pcb board for these switches. Is it from him or did you design something yourself ?
  • #2566 21868045
    dawidkosciesza
    Level 11  
    Posts: 54
    Rate: 14
    I used the up and down arrows as they are in the ADC, but changed the right and left to volume :)
    I made the board myself, but it's good to know that someone has already designed something because it's a bit of fun :D
  • #2568 21868164
    dawidkosciesza
    Level 11  
    Posts: 54
    Rate: 14
    Your suggestion would be good if using the next station and previous station buttons. And I use up down as a selection from the station list and it is more intuitive than sideways ;)
  • #2569 21868194
    robgold
    Level 23  
    Posts: 698
    Help: 10
    Rate: 284
    >>21868164 In this case, yes. Especially since there is now order and the list always displays from the currently playing station.
  • #2570 21868384
    supsak
    Level 13  
    Posts: 81
    Rate: 5
    Hi, I would like to ask Robgold, or other experts..., what should I set in order to save the status and volume, what is saved in "Storage memory" in "bank no.txt, status no.txt and volume.txt?
    I have an SD card, the soft vgrany najnovsi 3.20.04.
    V setting probovalem ustanboovicz "Save ALWAYS Station No., Bank No., Volume, default:O n i OFF" no it nezmjenalo.
    On which volume and station, the bank radio is switched on, on which it is switched on again. Nothing this change ...
    Thank you for your help.
  • #2571 21868431
    hevet
    Level 18  
    Posts: 346
    Rate: 47
    At my place the adventure with the player has started, for now without web support, but maybe one day. The radio now displays a small logo on the right hand side permanently.
    Player display shows Roxy Radio, track title, time 07:27:52, and a station logo on the right Small player screen showing “ODTWARZACZ”, 03:00/03:17, and a large clock reading 07:26:53
  • #2572 21868894
    robgold
    Level 23  
    Posts: 698
    Help: 10
    Rate: 284
    >>21868384 In my case both with SD card and whether littleFS memory saves the values correctly. Have you checked what is after changing e.g.: volume in volume.txt file ?
  • #2573 21868966
    dawidkosciesza
    Level 11  
    Posts: 54
    Rate: 14
    >>21868894
    Only to my colleague @supsak I think what he means is that he wants to have one station and volume level set permanently.
    I noticed that with the memorize option enabled it saves the last used station and volume every time.
    However, with this option turned off, the station is read from a file, but when switched off with the remote control or encoder (standby), it remembers permanently the then set station and volume. I hope I have written this quite clearly :D

    And I also found that in the settings it says that the auto dimmer option is standard on and is standard off (or vice versa I can't remember :P ).
  • #2574 21869444
    hevet
    Level 18  
    Posts: 346
    Rate: 47
    Somehow, it occurred to me.
  • #2575 21869451
    ejcon
    Level 16  
    Posts: 253
    Help: 3
    Rate: 54
    hevet wrote:
    Somehow, it occurred to me.


    Screenshot of an audio player showing “02 Dire Wolf” playing and a two-item FLAC playlist.

    Are you going to make it available or are you just going to brag about it?
    It seems to me that if you publish something it is with the thought that others will also benefit.
  • #2576 21869513
    hevet
    Level 18  
    Posts: 346
    Rate: 47
    I promise, I won't again. You think wrongly, there is no obligation to do so,
  • #2577 21869536
    robgold
    Level 23  
    Posts: 698
    Help: 10
    Rate: 284
    >>21868966 Because this is how it is supposed to work it is all about saving SD/littleFS/SPIFFS memory.

    With "always save" switched on - stations and volume are saved after each change. With "always save" switched off, saving is only done when the powerOff() function is called, i.e. when the radio is switched off from the remote control or the encoder.
  • ADVERTISEMENT
  • #2578 21869583
    RonAd
    Level 10  
    Posts: 26
    Rate: 1
    >>21869536

    A small suggestion: could it be possible to implement a function whereby when scrolling through a station with the encoder and stopping at a particular station, it activates it?
  • #2579 21869681
    supsak
    Level 13  
    Posts: 81
    Rate: 5
    >>21869536
    When I switch the radio off at night with "Power off" it means that the radio only remembers the last position and volume?
  • #2580 21869694
    robgold
    Level 23  
    Posts: 698
    Help: 10
    Rate: 284
    >>21869583 Specially it is so that randomly entering the station list or memory bank list will not change anything without approval. If you need this behaviour of the radio it can be easily added. All you need to do is to add more or less something like this in the return to main radio screen function in the main loop (void loop()):

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

    I wrote this "off the bat" without checking if it works but it should.
    Perhaps I will add something like this as an option to the configuration.
📢 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