logo elektroda
logo elektroda
X
logo elektroda

Internet radio and audio file player on ESP32-S3

MAJSTER XXL 264132 2675

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):
  • #2581 21869841
    supsak
    Level 13  
    Posts: 81
    Rate: 5
    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 28  
    Posts: 2065
    Help: 75
    Rate: 950
    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....
  • #2583 21871471
    ejcon
    Level 16  
    Posts: 268
    Help: 3
    Rate: 61
    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.
  • ADVERTISEMENT
  • #2584 21871537
    robgold
    Level 23  
    Posts: 709
    Help: 10
    Rate: 286
    @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  
    Posts: 268
    Help: 3
    Rate: 61
    Black device panel with two knobs and a screen showing Radio Italo 4 You and audio playback details Audio device display showing “Radio Italo 4 You,” track details, and temperature readings.
    >>21871537
    I needed to write off the station log files and somehow it worked out.


    Screenshot of a dark dashboard for custom weather location and device status
    Edit custom weather for a particular location.

    Added after 3 [hours] 27 [minutes]:

    Here is the final version of the editor with additional features
    Thanks to MAJSTER XXL from soficki which I had the opportunity to tweak visually


    Dark editor UI with screen preview and color picker fields, including “Clock” and “Station and bank labels”.
    Attachments:
    • ESP32_internet_radio_v3_ArduinoEDIT.zip (135.9 KB) You must be logged in to download this attachment.
  • #2586 21872339
    dawidkosciesza
    Level 11  
    Posts: 54
    Rate: 14
    Another Radio for a colleague ;)

    Black radio with wooden top on a table, display reading “Radio Italo 4 You” and a front knob Black rectangular radio with two speakers, a display, and a knob on a wooden table Wooden radio with black front and small display on a wooden table, with a red cable Homemade radio in a wooden case with display and knob on a wooden table Homemade radio in a wooden case with display and knob on a wooden table



  • #2587 21872345
    efi222
    Level 21  
    Posts: 687
    Help: 12
    Rate: 1154
    >>21872339
    How do these rubber passive mebrans perform?
  • #2588 21872355
    dawidkosciesza
    Level 11  
    Posts: 54
    Rate: 14
    >>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 ;)
  • ADVERTISEMENT
  • #2589 21872357
    robgold
    Level 23  
    Posts: 709
    Help: 10
    Rate: 286
    >>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 11  
    Posts: 54
    Rate: 14
    >>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  
    Posts: 709
    Help: 10
    Rate: 286
    >>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  
    Posts: 14
    Rate: 3
    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  
    Posts: 268
    Help: 3
    Rate: 61
    >>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
  • #2594 21872637
    robgold
    Level 23  
    Posts: 709
    Help: 10
    Rate: 286
    >>21872538 You probably have a CNC design of some kind, because with a laser you don't carry any load. Looking at what colleague @dawidkosciesza has cut out, it seems that 10W also does the job. For "thicker" subjects I have a CNC.
  • ADVERTISEMENT
  • #2595 21872645
    ejcon
    Level 16  
    Posts: 268
    Help: 3
    Rate: 61
    I didn't build it myself from scratch. The design is mine as well. It's 4-axis, it was supposed to be a multi-tasking cnc machine, I have a spindle alternating with a laser, I have a 20W and an 80W, you really don't do much with it, I use it for pcb, it doesn't even burn paint.
  • #2596 21872672
    robgold
    Level 23  
    Posts: 709
    Help: 10
    Rate: 286
    >>21872645 And are you sure that it has 20 and 80W of power ? Have you measured it with something? With lasers it varies and 80W seems impossible in such a small box as in the picture. I would rather expect that this is a conversion from co2 laser to LED and then it is about 8-10W but maybe I am wrong.
  • #2597 21872707
    ejcon
    Level 16  
    Posts: 268
    Help: 3
    Rate: 61
    That's what the Chinese guy wrote, the optics were right at the beginning he was still burning the paint not badly but then it was just drugs that set it on fire so I don't believe the Chinese guy could burn something like that with that 80W for sure because it makes a pretty clear mark on the stainless steel with the engraving in the galvanizing is a fight of about 0.3mm so I'm just writing what I have and that's it
    Screenshot of AliExpress listing for AENBUSLM 80W 450 nm laser engraving head, price 377.59 PLN
  • #2598 21872947
    dawidkosciesza
    Level 11  
    Posts: 54
    Rate: 14
    As for the laser engraver this power is enough for me.
    I bought it on ali in promki for 600zl :D
    I cut mostly in 3mm plywood and 3mm black acrylic. The plywood and this acrylic goes in one cut. The 6mm plywood already has to go twice.

    As for other materials, you can't cut PCB, it burns too much. Acrylic in other colours has to be cut several times. White and blue are not affected by laser at all. From what I have read it is related to the colour of the laser beam.

    Mirrored surfaces should preferably be painted black and then engraved, and the paint washed off after processing. Care should be taken as without painting you can destroy the laser by reflecting the beam back to the head.

    @robgold here is a link to the diffuser I use, I cut it by machine because unfortunately it melts and burns under the laser.

    https://a.aliexpress.com/_EH59KTO

    Added at 11 [hours] 12 [minutes]:

    Today I was struggling with a radio I made for my Dad. I had a big problem there with noise and screeching. The radio has a TPA3110 amplifier and is powered by a pack in series of 3x18650. A supply of about 12.6V goes to the amplifier and a step-down converter powers everything else.

    In my search for a solution I came across a post like this:
    https://forum.arturhome.pl/t/problem-z-dzwiekiem-esp32-tpa3110/13487/11

    The author of the topic as he wrote himself: "I got rid of the speaker farting by disconnecting the ground from the PCM module"

    Also I checked this trick today at my place and Eureka. All the noise and interference is gone!

    What do you guys think about this solution? I'm curious to know whether it affects the sound quality or the PCM operation?

    On that forum, someone also mentioned a separate 3.3V supply for the analogue section in the PCM5101.

    PCM510x pinout top view with a table listing terminal functions and descriptions.
  • #2599 21873606
    DJCheester
    Level 28  
    Posts: 2065
    Help: 75
    Rate: 950
    Specifically, what ground have you disconnected from the module, the one between the L and R channels or the one from the power supply or both? How does it work without GND ? Can you describe it ?
  • #2600 21873647
    robgold
    Level 23  
    Posts: 709
    Help: 10
    Rate: 286
    >>21872947 I wrote here to insert a 10Ohm resistor in the PCM ground. I have the PCM itself done separately with a 3.3V supply for the digital and analogue parts. Unfortunately their grounds are tied together on one plane. Putting resistors into the speaker output is a no-go. How do you have this TPA amplifier ? The modules from Ali have a preamp inserted and it makes a lot of noise.

    What do you use to cut this diffuser so as not to rag the edges ? CNC comes to mind but cutting a thin ring is not so easy.
  • #2601 21873678
    DJCheester
    Level 28  
    Posts: 2065
    Help: 75
    Rate: 950
    The one with the resistor is what I've read, only it puzzles me how, in general, without a ground, Dawid's colleague connected it.

    Regards...
  • #2602 21873693
    dawidkosciesza
    Level 11  
    Posts: 54
    Rate: 14
    >>21873678
    Without the power ground, I left the bridge alone between SCK and GND. Apparently in that case the PCM then uses the ground between channels L and P. Sort of like a backwards ground from the amplifier.
    I was shocked myself that this worked.

    >>21873647
    You're right, it's hard to cut it out nicely, that's why he uses a trick like the one in the photo.
    Inside a wooden enclosure with a PCB, ESP32 module, and multiple connected wires
  • #2603 21873933
    efi222
    Level 21  
    Posts: 687
    Help: 12
    Rate: 1154
    >>21873693
    I have a similar connection arrangement. PCM5102 - only the digital ground is connected. Then the analogue tone circuit and onto the TPA3110 amplifier. TPA - power supply ground only. This works without interference. Interestingly the signal wires are twisted single wires with a wire connected on one side to ground.
  • #2604 21874839
    Anonymous
    Level 1  
  • #2605 21874840
    efi222
    Level 21  
    Posts: 687
    Help: 12
    Rate: 1154
    efi222 wrote:
    I have a similar connection arrangement. PCM5102 - only digital ground connected.

    Ladies and Gentlemen. I was preparing the board gerbers today and noticed that I incorrectly stated earlier that the analogue ground is unconnected. Both grounds are shorted. I apologise for misleading you.
  • #2606 21874974
    markon7
    Level 12  
    Posts: 11
    Rate: 3
    >>21871632 Hi, could I please have the .bin file of this software, if possible, Thanks
  • #2607 21875298
    robgold
    Level 23  
    Posts: 709
    Help: 10
    Rate: 286
    >>21874839 Yes there are two grounds but both are connected and not at the power supply but on the PCMa board. This makes it very easy to create unnecessary ground loops for yourself. In the original Evo board there are still problems with the OLED inverter despite leading them out separately.
    https://github.com/dzikakuna/ESP32_radio_evo3/blob/main/Photos/ESP_radio_rev1.0_PCBvis2.png

    Interestingly I have now ordered the display boards themselves of a slightly different design and with them there is complete silence.
  • #2608 21875303
    ejcon
    Level 16  
    Posts: 268
    Help: 3
    Rate: 61
    >>21874974
    I'll try to throw you something.
    Attachments:
    • esp32.esp32.esp32s3.zip (15.63 MB) You must be logged in to download this attachment.
  • #2609 21875413
    Anonymous
    Level 1  
  • #2610 21879791
    ryba_82
    Level 11  
    Posts: 9
    First of all, I would like to thank my colleagues MajsterXXL and Robgold for a very cool project. To the other participants in this thread, I would like to congratulate the level of discussion, which is not at all obvious in Elektroda.
    This is what made me dare to write and share a few observations about my colleague Robgold's version.
    Interference from the OLED's inverter. It is extremely poorly designed. My observations indicate that the OLED has a high level of radiated interference, which indicates that the frequency of the inverter is quite high.
    The rescue here turned out to be the insertion of ferrite beads in the power supply series (ground and plus) right next to the pins on the OLED board. I inserted such beads as I had on hand. Impedance 130Ohm at 100MHz
    Interestingly, I have 3 OLED displays and only in one case did these beads need to be inserted. The other 2 were quieter and inserting the beads had no effect.
    As for conducted noise and what you hear in the speaker - here I had two candidates: OLED (inverter and SPI) and ground loop.
    If one assembles according to colleague Robgold's schematic (GitHub), there are several possible ground loops when connecting the DAC.
    As you can see, the SCK pin is supposed to be to ground. If someone pulls this wire to minus and at the same time the other wire as GND and God forbid still AGND or the RCA sockets to GND, then problem ready, because digital and analogue ground are already shorted on the DAC board.
    My version of the PCM5102 board has extra solder fields for the SCK jumper to ground. So I only have one GND wire to the PCM5102 board.
    By the way, you can also skip the FMT connection from the ESP32 - when configuring the PCM5102 board, set the FMT jumper to L, which is to ground.
    If we still have a silent buzz, inserting a 220uH choke (140mA, R_DC=5ohm) in series with the PCM5102 ground and power supply can help.
    The SPI bus is also a possible source of noise. Here, increasing the value of the series resistors to 22-33 ohms will help. In my case, 10 ohm resistors are sufficient.
    And one more note - the prototype is at my place connected to an external HiFi amplifier, input impedance 1MOhm.
📢 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