logo elektroda
logo elektroda
X
logo elektroda

Internet radio and audio file player on ESP32-S3

MAJSTER XXL 106173 1246
ADVERTISEMENT
Treść została przetłumaczona polish » english Zobacz oryginalną wersję tematu
  • #751 21456460
    robgold
    Level 20  
    @wirbud
    I did a test on my yoRadio and ESP32S3 module. It doesn't start on pin settings compatible with our design. SCK and MOSI must be on pins 11 and 12 for yoRadio.

    Internet radio display showing the station Antyradio. .
  • ADVERTISEMENT
  • #752 21456461
    wirbud
    Level 13  
    >>21456460 toss the text of myoptions.h regarding the screen Thanks to
  • ADVERTISEMENT
  • #753 21456465
    efi222
    Level 19  
    robgold wrote:
    Generally, I sometimes get the impression that this radio is not about having a radio but about having entertainment for winter days by writing soft. just having a radio is like a side effect
    .
    Because it's usually the case that the journey is more interesting than the arrival itself ;)
  • #754 21456467
    robgold
    Level 20  
    Please, it's only my test radio so pay attention to what's with the commentary.

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

    That's really all it takes:
    Code: C / C++
    Log in, to see the code
    .
  • #755 21456503
    DJCheester
    Level 26  
    Gentlemen I read the news in the topic, I have a radio on PCB. You write that you have fixed the problem of FLAC streams ?

    Does it work without changing the pin configuration ?
    I downloaded the liblwip-fix and liblwip-20241019_3.0.5 files
    Alternatively, please give me instructions where to swap them with the original ones ?

    After swapping, I understand that I have to compile the sketch again using these swapped files and upload it to the ESP32 ?

    Greetings ...
  • #756 21456542
    wirbud
    Level 13  
    Same effect - looks like a TV screen in the old days where the vertical sync was broken. Horizontally the dots seem to be in the right lines. Vertically completely out of order. A bit like pixels scrolling from bottom to top.

    Added after 3 [hours] 58 [minutes]: .

    >>21456503 .
    BLWIP-FIX.ZIP 2. Unzip and copy liblwip.a to a directory (you have a username, hardware version may be different): C:UsersAppDataLocalArduino15packages32hardwareespesp322.0.17tools.liblwip.a - for ESP32 or C:UsersAppDataLocalArduino15packages32hardwareesp322.0.17UsersuserAppData - for ESP32S3 (there should be an old liblwip.a file in this directory, which we will replace with the new file) 3. Restart the Arduino 4. Recompile the E-radio as before and load into the ESP32
  • #757 21457082
    andy175
    Level 12  
    Hello Gentlemen and please bear with me.
    My grandson asked me to help him to make a simple radio on ESP32 chip and PCM 5102 A I2S from YouTube "Electronics and Gadgets". We do everything as in the posted description, the program (sketch) compiles correctly and uploads to the ESP. The jumpers on the PCM are also soldered correctly, but when connected to the power supply, the blue LED goes off after a while and a gentle buzzing can be heard from the speakers. All in all, we already have several ESP circuits with the CH340 and CP210 chip. In the sketch I have already changed dozens of radio stations according to the author's suggestion, but the effect is nil. Some time ago I made a weather station with my grandson on the ESP8266 chip and there it connects to Wi-Fi without any problem. I am a mechanic by training but wanted to help my grandson. I asked in the comments what else could be done, but no answer. Greetings to all and please be understanding.
  • #758 21457096
    hevet
    Level 16  
    @andy175 do you mean the version without the display?
    And if you unplug the PCM5102, the same diode dims on the esp32? Have you connected SCK to GND?
  • #759 21457132
    andy175
    Level 12  
    After disconnecting the ESP from the PCM 5102, the blue LED also goes out after a while. And connecting SCK to GND doesn't bring any change either. But I sincerely thank you for your quick reply and look forward to any suggestions.
  • #760 21457137
    hevet
    Level 16  
    And what power supply are you connecting to?
  • #761 21457145
    andy175
    Level 12  
    Man power supply made from a computer power supply with 3.3v, 5v and 12v outputs of course I use the 5v output.

    Added after 5 [minutes]: .

    I didn't read early so this is about the simple radio without the display.
  • #762 21457166
    hevet
    Level 16  
    I understand that you connect under 5V and GND on the ESP32? And if you connect via USB cable the Radio works?
  • ADVERTISEMENT
  • #763 21457179
    andy175
    Level 12  
    I do it as in the example from You Tube after connecting the cable from the USB then the blue LED goes off after a while.

    Added after 58 [seconds]: .

    And of course the radio doesn't work.
  • #764 21457223
    hevet
    Level 16  
    And if you win something else to esp32, does the same thing happen?
  • #765 21457230
    andy175
    Level 12  
    As I wrote earlier I am a complete amateur but when I uploaded to esp blink the connected diode with resistor flashed.
  • #766 21457335
    wirbud
    Level 13  
    >>21457230 what kind of board do you have - do you have 30 or 38 pins (feet) The 38 ones still have feet above the standard ones - maybe you moved the DAC a foot or two?

    Added after 1 [hour] 32 [minutes]: .

    Situation with my yoradio screen - after disconnecting the CS pin (leg 16 of the SSD1322 screen) something more sensible appeared. I can also disconnect the RST leg (leg 15). is the same. Half a mirrored image. After it walks a little and goes off.
    Changing the station with the encoder boosts the screen and it lights up again for several seconds. Maybe someone can help? (On the ESP32 it runs normally. On the radio from our thread it also goes on.
    Only when I switch to yoradio it is bad. (SPI on 11-13).

    Distorted screen on an ESP32 network player with visible interference. .
  • #767 21457525
    andy175
    Level 12  
    The boards I have ESP 32 with 30 legs are ESP32-Wroom-32 (ESP32S), ESP32-Wroom (ESP32 DEVKIT_C), with 38 legs ESP32-Wroom-32D ESP32_Devkit C_V4). ESP32-Wroom-32 and Espressif ESP32-S3-Wroom-1 (ESP32-S3) In brackets are descriptions of the underside of the boards.
  • #768 21457553
    robgold
    Level 20  
    @wirbud, connect the reset pin to the ESP reset pin, on the boards it's called EN (Enable) and press the reset button on the module. Connect the CS signal back, of course.
  • #769 21457642
    wirbud
    Level 13  
    >>21457553
    THANK YOU ROBGOLD for your support !!!

    Unfortunately this is the first thing I did - It took much longer for the screen to shine on the EN with the RST bunched up. In the sketch I did not change the 41 leg. Then I changed it to -1 (as it is connected from EN plate. There was no revolution. A hard case.... So I'm thinking that if this is how the FLACs go I'll go back with this SSD1322 on the ESP32. Only the I2S library for AAC needs to be changed to go with this scarier ESP32. I've already got a version of yoradio-ALL(Maleksm)-v0.9.434m(15.02.25) - a lot more audio formats than in the library from December 2024. Interesting fact - Maleksm split the tasks into 2 cores - in one only audio handling goes in the other all the rest !
  • #770 21457653
    robgold
    Level 20  
    Welcome,

    I have uploaded the new Evo 3.15 file to GitHub Link , changes:

    - for stations not broadcasting StationString (information about the song currently playing), e.g.: all Polish Radio stations, all EuroZet group stations, the StationName is displayed with additional tags in the form of "-- StationName --" and if the text exceeds the screen size it will scroll. This looks nice, for example, in the case of Polish Radio stations. If the radio station in question is completely "uninterested" and does not even broadcast the StationName, three dashes "---" are displayed, a clear signal that we have no information from the stream owner.

    - On the front of the "client" I have implemented reorder functions for encoder 2. You can now switch how you want encoder 2 to work.
    Option 1 permanently:
    in the code in the variable declarations change the following variable from true to false:
    Code: C / C++
    Log in, to see the code
    .
    In the first option, with TRUE, turning the encoder changes the station and clicking on the volume; with FALSE, turning the encoder changes the volume and clicking on it shows us the list of stations.

    Option2:
    If someone just wants to play around and see how it works, without any changes to the code, after starting the radio hold down encoder 2 for about 5sec. We will get a message about the change of the encoder sequence an OLED display. Ultimately this variable will be stored on the SD card, everyone will adjust it for themselves :) .

    further...
    - Corrections in the code, now switching to radio/clock is done immediately
    - Being in the bank menu and pressing the button assigned to the Direct command (rcCmdDirect) changes whether the bank is read from the SD card or updated from GitHub.
    - Being on the radio screen also with the same button (Direct) we dim the display and in the Equlizer menu we reset (0) the settings of all filters.
    - The radio from now on reports in your routers as "ESP32 Radio" and not the strange ESP hostname with the serial number.


    By the way you can share the rework of the Sony Tuner, front panel and printed adapters slowly on completion :) .
    Sony tuner screen displaying radio station PR-3 Polskiego Radia.
    Sony radio with display showing Radio Centrum Lublin station. .

    Another addition like this, from tomorrow I will upload the corrected banks:
    Banks 15 - quite a few stations flew out (were dead) FLAC stations rewritten to Bank 16
    Bank 16 - this will be a high resolution bank, HQ or just with FLAC stations.
  • #771 21457777
    wirbud
    Level 13  
    robgold wrote:
    In the first option at TRUE by turning the encoder you change the volume and by clicking you get the station list, at FALSE by turning the encoder you change the station list and by clicking you adjust the volume.
    .
    My equipment negates and spins everything but the sound. I have the opposite encoder behaviour. True - gives station change when spinning.
  • #772 21457876
    robgold
    Level 20  
    >>21457777 This behaves correctly, perhaps I have confused things:

    When the parameter is =1 (true) then the functions are called: handleEncoder2StationsVolumeClick(); which means Stations when spinning Volume at click.
    For =0 (false) is called -> handleEncoder2VolumeStationsClick(); meaning Volume when spinning and station list when clicked.

    IR RECEIVER .
    Such an important note for anyone using a cheap off-the-shelf IR receiver module (VS1838B or HX1838) in a metal case on an Arduino board. After reading a couple of interesting threads about these receivers, I ordered myself an original Vishay TSOP2238 and 34138 (90st operating angle 2.5V to 5.5V) from TME.
    It is unbelievable how well this Vishay works, it always catches the code correctly, no reaction to the WiFi antenna with the metal one forever the reception LED was flashing because it was catching everything like an antenna).

    I recommend replacing it. Apparently the cheap ones are maybe for playing with 1m good but not building something more serious.
  • #773 21458080
    DJCheester
    Level 26  
    Hi robgold this looks beautiful and the yellow OLED matches the retro equipment.

    As for the IR receivers I have exactly the same opinion and that is why I used the TSOP31238 38khz. I always use this one at 38kHz and it works beautifully there is range and it doesn't collect rubbish. The Chinese ones I've already run across when writing skits on the Arduino.

    Regards...
  • #774 21458085
    ArturAVS
    Moderator
    DJCheester wrote:
    the yellow OLED matches the retro hardware.

    It's more due to the filter, by the way, it oozes VFD. Beautiful work.

    I would add a display saver, if nothing has been pressed/activated in, say, five seconds, we reduce the brightness by 25%, the same just a few minutes then we reduce it by 50%. Above 30 minutes, turn off completely. This should significantly increase the life of the display.
  • ADVERTISEMENT
  • #775 21458147
    robgold
    Level 20  
    There is actually a yellow OLED there and the colour is just because I had to have one that would pass through the filter from the VFD display that was there before. The white is completely attenuated. The final result looks like it was factory. reminds me a bit of the older Yamaha equipment, because they had that colour in the audio equipment.

    @ArturAVS
    The option with this dimming seems simple to implement so I may try to add that. The question is whether these OLEDs of today really have such low longevity. I recently repaired my Denon F109 series streamer and there turned out to be sitting the same OLED we use in this radio. The player is over 10 years old now and still shines like new. Admittedly, it is not heavily used, because the speed of starting it up and searching for a stream is beyond my nerves, but sometimes it plays. As a matter of fact, the whole series of these Denons F109, 720 probably uses this display and on OLX they all shine :) .
  • #776 21458163
    ArturAVS
    Moderator
    @robgold Prophylactically, however, I would add.
  • #777 21458309
    DJCheester
    Level 26  
    wirbud wrote:
    BLWIP-FIX.ZIP 2. Unzip and copy liblwip.a to the directory (you have a username, hardware version may be different): C:UsersAppDataLocalArduino15packages32hardwareespesp322.0.17tools.liblwip.a - for ESP32 or C:UsersAppDataLocalArduino15packages32hardwareesp322.0.


    Hello so I only need the archive liblwip-fix.zip ?
    This second file is unnecessary ? liblwip_20241019_3.0.5 ?

    With me I have the 2.0.17 version of ESP libraries and in both the first ESP32 link and the second ESP32S3 link I already have the liblwip.a file but they are not the same in S3 takes more ?

    Then what should I replace with this Fix file in the two cases ?

    And one more question, because on the second computer I have a version of the library 3.1.1 (on 64bit), should I also replace there the same liblwip.a file with this fix ?

    Greetings ...

    Added after 16 [minutes]: .

    Hello again on my second computer I have Win7 64Bit and Arduino 2.1.1 and ESP 3.1.1 libraries

    And there is no such folder there anymore

    C:UsersAppDataLocalArduino15packages32hardware2.0.17tools32.1.
    C:\Users\user\AppData\Local\Arduino15\packages\esp32\hardware\esp32\2.0.17\tools\sdk\esp32s3\lib\

    After version 3.1.1 there are tools and then there is just this

    Screenshot of a Windows folder with files and directories related to Arduino and ESP32. .

    Greetings ...

    Added after 7 [minutes]:

    hevet wrote:
    If anyone fancies the code without encoders and player then please Link.
    You should also swap the Audio library with mine, as I've extended the equalizer range from -40 to +12.

    Version @robgold
    .

    With this firmware, should I replace the library attached in this file with the original robgold one ???
    What does it do, does it improve anything ??

    And lastly, as robgold's software is updated all the time (as long as it's not difficult to do so), could you tell me what needs to be changed in the software to get rid of the encoder completely ???

    This is so that you can make the changes yourself - as long as it is not a very complicated operation ??

    Best regards ...
  • #778 21458489
    hevet
    Level 16  
    If you have version 2.0.17 then the first file, the second is for version 3.0.7 at most, it won't work on 3.1.1.
  • #779 21458492
    DJCheester
    Level 26  
    Acha that is, it remains to uninstall the ESP32 v3.1.1 library and install the last of version 2, i.e. V2
    0.17.

    Or v.3.0.7 and use the second file of the one with the date in the name.

    Thanks for the clarification.

    Regards...
  • #780 21458493
    hevet
    Level 16  
    You can upload 3.0.7 and replace the files from the second fix.

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.
Summary generated by the language model.
ADVERTISEMENT