logo elektroda
logo elektroda
X
logo elektroda
Dostępna jest polska wersja

Czy wolisz polską wersję strony elektroda?

Nie, dziękuję Przekieruj mnie tam

Internet radio and audio file player on ESP32-S3

MAJSTER XXL 241017 2596

TL;DR

  • An ESP32-S3-based internet radio and audio file player uses an OLED display for a useful desktop accessory.
  • The build pairs an ESP32-S3-WROOM-1 board with a PCM5102A DAC, rotary encoders, switches, and RCA outputs, then evolves through v2 and v3 revisions.
  • Key hardware includes a 2.42-inch 128x64px white OLED, an ESP32-S3-WROOM-1-N16R8, and a PCB assembled on goldpin bases and sockets.
  • Stations load from GitHub in banks of up to 100 entries each, and v3 adds a colour screen, weather, calendar, RSS news, and remote control.
  • One prototype PCB had an ESP32-S3-WROOM-1 pin-spacing mismatch, so the pins were slightly bent to make it fit.
ADVERTISEMENT
Treść została przetłumaczona polish » english Zobacz oryginalną wersję tematu
📢 Listen (AI):
  • #2581 21869841
    supsak
    Level 13  
    Hi, it would be better if you added it to the radio setting.
    I do not understand where I have to go to the "main radio screen" and what do you add?
    Thank you for your help
  • ADVERTISEMENT
  • #2582 21870080
    DJCheester
    Level 27  
    Your colleague is referring to the void loop

    These are the basics of the basics see how you have all the code built.

    First the variable pin declarations etc.
    Then all the void functions with content
    Then the void setup.
    The program goes through this part at startup
    And finally void loop is the program loop where everything inside is executed over and over again. Another void function can be called from there.
    And this is how it works. I suggest you read some courses about Arduino and code construction. It will illuminate a lot.

    E.g. here

    https://forbot.pl/blog/kurs-arduino-podstawy-programowania-spis-tresci-kursu-id5290

    Greetings....
  • ADVERTISEMENT
  • #2583 21871471
    ejcon
    Level 16  
    My little redesign of the Majster softy added a bit of functionality.
    Screenshot of “SD card contents” page listing files with Open, Download, Preview, and Delete buttons.

    Screenshot of the “ESP32 Internet Radio” web panel with a Status section and a color settings form.
    you have the code to edit .
    Attachments:
    • ESP32_internet_radio_v3_Arduino.zip (127.57 KB) You must be logged in to download this attachment.
  • #2584 21871537
    robgold
    Level 23  
    @ejcon looks like you've implemented the file editor from Evo into the Majster version but following the trend in colour ;)
  • #2585 21871632
    ejcon
    Level 16  
    >>21871537
    I needed to write off the station's log files and somehow it worked out.
    Attachments:
    • ESP32_internet_radio_v3_ArduinoEDIT.zip (135.9 KB) You must be logged in to download this attachment.
  • ADVERTISEMENT
  • #2587 21872345
    efi222
    Level 21  
    >>21872339
    How do these rubber passive mebrans perform?
  • ADVERTISEMENT
  • #2588 21872355
    dawidkosciesza
    Level 10  
    >>21872345
    To have a perfect comparison one would have to build two identical ones with and without a membrane.
    But comparing to a similar radio I built earlier I have the impression that these diaphragms add a bit of that "bass".
    The sound is really pleasant and you can feel those low tones. Especially since the transducers are not from the high end but ordered from aliexpress ;)
  • #2589 21872357
    robgold
    Level 23  
    >>21872339 I am curious as to how you have printed the ring for the knob illumination. I have done a dozen different prototypes I have some of my solution but maybe it can be done even better.

    I also see that the status led landed in the knob and switch only in reverse polarity :)

    Front milled or do you have access to such a large printer ? Because it seems to be more than 256mm or maybe an illusion on the film ?

    It came out nice. About the diaphragms a colleague already asked, I'll just ask if you counted them or just put them together? In the sense of volumes for speakers and diaphragms?
  • #2590 21872375
    dawidkosciesza
    Level 10  
    >>21872357

    I made the ring quite simply. I have polycarbonate light diffusers 2mm thick. I also cut the hole for the knob a little wider and pasted this diffuser on the other side with the encoder fitted. The diffuser distributes the light well so all I had to do was direct the two LEDs left and right onto it.

    The LEDs are exactly in reverse polarity. I took advantage of the "mistake" of my colleague supsak.

    I cut the front and the housing with a laser, I have a Longer RAY10. It allows a 40x40cm operation.
    However, the radio itself is exactly 25x10x12cm.

    The litre of the enclosure unfortunately can not be calculated as you do not know the parameters of the speaker, and unfortunately our Chinese friends rarely add them ;)
    I was mainly guided to keep the dimensions as small as possible but assisted by the knowledge of chataGPT. The most important thing is that the enclosure is tight, stable and I think that soundproofing also helps a lot.

    A video of how it plays:


  • #2591 21872469
    robgold
    Level 23  
    >>21872375 The ring itself how to design it I know because I have :) These diffusers you have ready made or you cut from some type of plexi with laser ?
    Is 10W enough for cutting without burning the edges ? I'm thinking of buying some cheap laser and wondering what is worth investing in.

    Take some photo of the same diffuser. I am curious about this design. I for the time being print such things the right way by designing the LEDs place, thickness and fill.
  • #2592 21872470
    JohnNagy
    Level 5  
    Hello! I hope you don't mind me showing you my finished tuner. Thank you for the software. All buttons work, 19 of them. :-)
    It required a lot of filing and post-processing to cut plexiglass.

    Front panels of Yamaha TX-497 tuner and Yamaha R-S202D receiver with lit displays

    Yamaha TX-497 tuner above a Yamaha R‑S300 receiver on a shelf; displays show “Dance Wave Retro FLAC” and “LINE2”.

    Inside a metal enclosure with several PCBs and wires, including a blue board labeled “INTERNET RADIO”.

    Two silver Yamaha audio components on a shelf, with lit display and front-panel knobs
  • #2593 21872538
    ejcon
    Level 16  
    >>21872469
    You have to 80W this 10W Chinese it will not burn anything.

    Laser engraver/cutter with a metal workbed and a covered laser module on a gantry.

    Burned black geometric pattern on a light plywood piece, with visible scorch marks
📢 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.

FAQ

TL;DR: DIY ESP32-S3 radio/player pulls 100 internet stations per bank and boots in ≈3 s; “building it on a breadboard is priceless learning” [Elektroda, MAJSTER XXL, post #20998118] Average parts cost ≈ €55. Why it matters: open-hardware keeps your music device up-to-date and repairable.

Quick Facts

• Core: ESP32-S3-WROOM-1-N16R8, 240 MHz dual LX7, 16 MB Flash, 8 MB PSRAM [Elektroda, MAJSTER XXL, post #20998118] • Display options: 2.42” 128×64 OLED (SSD1309) or 3.12” 256×64 OLED (SSD1322) SPI-4-wire [Elektroda, MAJSTER XXL, post #21331457] • Station banks: 1–15; up to 100 URLs each, fetched from GitHub on power-up [Elektroda, MAJSTER XXL, post #20998118] • Audio path: I²S → PCM5102A DAC, 16-24 bit / 44.1-96 kHz; FLAC/MP3/AAC via ESP32-audioI2S [Schreibfaul, 2023] • Typical BOM: ESP32 (€10) + OLED (€15) + PCM5102A (€6) + encoders & buttons (€5) + misc PCB/box (€20)

What hardware do I need for the v2 ESP32 radio?

Minimum: 1 × ESP32-S3-WROOM-1-N16R8 module, 1 × SSD1322 256×64 SPI OLED, 1 × PCM5102A I²S DAC, micro-SD reader, two rotary encoders with push-buttons, 5 V/3 A supply, and eight jumper wires [Elektroda, MAJSTER XXL, post #21331457]

How do I switch the 256×64 OLED to 4-wire SPI?

Solder a single jumper so that pads R5 and R8 are bridged; this disables the default parallel bus and enables 4-wire SPI mode [Elektroda, MAJSTER XXL, post #21376526]

Large FLAC files reset my ESP32—what’s the fix?

Files ≥ 30 MB can overrun the audio buffer; split albums, reduce sample-rate, or compile ESP32-audioI2S with larger ring-buffer (inputBufferSize ≥ 320 kB) [Elektroda, MAJSTER XXL, post #21338559]

How can I store the last played station?

Current build writes bank/station numbers to SD-card files (station_nr.txt, bank_nr.txt). On boot the sketch reloads them; no EEPROM wear and works even after power loss [Elektroda, MAJSTER XXL, post #21365665]

I see “Hostaddress is not valid” in Serial—why?

Your station string contains the name plus URL. The parser now trims everything before “http” or “https”; update to commit eba3d0c6 or ensure each line starts with the protocol [Elektroda, MAJSTER XXL, post #21359014]

How do I compile without SD-card attached?

Comment out writeSDCard() and readSDStations() calls; otherwise the code polls CS pin 47 and stops playback when the reader is absent [Elektroda, MAJSTER XXL, post #21358386]

Can I control the radio with just two encoders?

Yes. Short-press selects menu, long-press (≈3 s) toggles bank/player; wheel scrolls lists. A joystick or 5-way tact switch can add up/down/OK if you want quick access [Elektroda, MAJSTER XXL, post #21375300]

What is the typical boot and station-load time?

Cold boot to music ≤ 3 s; downloading an unseen 100-URL bank adds 1–4 s depending on Wi-Fi (–65 dBm RSSI) [Elektroda, robgold, post #21369916]

Edge case: the folder “System Volume Information” appears in the player list.

Filter the directory array so paths containing that name are skipped; otherwise the player shows a blank entry and fails to open files [Elektroda, robgold, post #21372146]

Can I print a ready enclosure?

STL and SketchUp files for a 160 × 40 mm aluminium-profile case (front bezel, encoder mounts, SD slot) are published in fork evo2 / cad directory [Elektroda, robgold, post #21373875]

Which libraries and versions compile cleanly?

• ESP32 board package 3.0.7 • ESP32-audioI2S 1.9.1 • U8g2 2.34.22 • Adafruit_SH110X 2.1.11 • WiFiManager 2.0.17 (change byte→uint8_t in DNS_PORT) [Elektroda, simw, post #21288589]

My OLED is blank although SPI works—what next?

Verify VCC 5 V (200 mA peak); set U8G2_R2 rotation; check that SCK, MOSI, CS, DC, RES go to GPIO 38, 39, 42, 40, 41 respectively on DevKitC-1 board [Elektroda, robgold, post #21376698]
ADVERTISEMENT