logo elektroda
logo elektroda
X
logo elektroda

Internet radio and audio file player on ESP32-S3

MAJSTER XXL 226698 2424
ADVERTISEMENT
Treść została przetłumaczona polish » english Zobacz oryginalną wersję tematu
📢 Listen (AI):
  • #1831 21773223
    efi222
    Level 21  
    robgold wrote:
    normal component 0402 or 0201

    It can be assumed that all component sizes are normal. However, not everyone can grasp the 0805 components let alone the 0102. And there is no exaggeration here :)
    robgold wrote:
    Are you sure this is a jumper ?

    No. I was following up on a thread by kol. @amrowek
    Maybe he can identify the item . :)
  • ADVERTISEMENT
  • #1832 21773227
    dawidkosciesza
    Level 9  
    robgold wrote:
    Disable the SD_LED in the definition and replace it to have a SW_POWER button on pin 17


    I have no such SD_LED definition :P

    Apparently it is missing. The Power key works, but only turns on the radio. I checked that when it connects to the ADC keypad button it doesn't introduce any interference and then the power key works both ways :D (turns the radio on and off)

    But unfortunately my Standby LED doesn't work in the reverse option, ie LOW when switched off, HIGH when switched on.
  • #1833 21773311
    amrowek
    Level 13  
    efi222 wrote:
    I flooded these three pads

    Well, I did a 2-in-1 I shorted both antennas
  • #1834 21773324
    efi222
    Level 21  
    This 'jumper' for switching antennas on the ESP module is a resistor marked R16 and is about 3ohm. I have personally checked.
  • #1835 21773368
    robgold
    Level 23  
    @efi222 i.e. it's not a jumper and it might as well be a coil. You need to solder connect an RLC bridge at 1kHz and at 10kHz check the reading.

    @dawidkosciesza I think I added the LED_SD option later and this version is not yet on GitHub it is with me as RC (Release Candidate)
    Such a bit of a prosthesis once to call power OFF by remote control command and wake up by pin but since it works properly it's most important :)

    The reverse LED configuration doesn't work properly because doing a power ON calls a reset and this resets the GPIO registers. You need to, after a correct start, set yourself a high state in setup() which will be disabled in powerOFF and that's it.
  • ADVERTISEMENT
  • #1836 21773883
    robgold
    Level 23  
    Hello,
    i have uploaded on GitHub the new soft 3.19.52, what's new ?

    PLAY FROM URL
    There is now a new PLAY URL button in the menu, which allows you to open a page where you can test any stream from the Internet on the radio after entering an external link. I am not hiding the fact that this is how I test various interesting stations added by other colleagues creating Internet radios.
    Evo Web Radio interface with URL input and volume slider


    Start logo
    I have added options to add your own logo instead of notes. The program itself checks if you have your own logo on the SD card or in the SPIFFS memory, if so it will be displayed instead of the notes. How does this work? You need to create a logo in XBM format (e.g. using the free Gimp) with a resolution of 256x64px as a black and white 1-bit image. Save such a file under the name logo.xbm on your card or in SPIFFS memory and that's it. Just remember that above the logo, after 1 second, the text "Evo Internet Radio" will appear, so that someone who sees the radio at your place can reach the source of this radio and in the bottom line there will be information about the connection to WiFi and the IP and software version.
    OLED display showing Evo Internet Radio and DIORA logo


    WIFI MANAGER
    I have improved the mode of connecting to WiFi a bit. From now on, if you connect correctly, a large CONNECTED message will appear on the display for a moment, the IP number and the radio will reset itself.
    OLED display showing CONNECTED and IP address 192.168.1.165


    CONFIGURATION
    Two new options have appeared in the settings.
    The first:
    "Save ALWAYS Station No., Bank No., Volume" its deactivation will cause the radio to save the value of volume, last station and bank to memory only when "powerOFF" is switched off. This is to prevent excessive memory usage especially SPIFFS.

    Second option:
    There is an option to set yourself your timezone, it is stored in the timezone.txt file, in the case of Poland you don't have to do anything, the radio in the absence of detecting this file will create it itself the first time and store our timezone there. This is a nod to colleagues outside of our time zone so that they can change this in the configuration.
    Evo Web Radio settings page with highlighted save station and volume option
    Timezone settings menu with dropdown list in Evo Web Radio interface


    VU-indicator - mode 4
    In mode 4 (analogue drive indicators) when you press the DIRECT/OK button on the remote control, 10 rectangles will appear between the indicators, each indicating 1 second of audio buffer fill. In other words, this is a quick overview of how much data a given Icecast station/server allows to buffer. This is calculated in a simple way the buffer content in kb is divided by (BITRATE / 8). The result of course depends on the correct bitrate of the station. Those which have a fixed (frequency (44.1) * channels(2) * resolution(16) i.e. 1 411 200kbps) will show an incorrect buffer value.

    OLED display showing analog VU meters with L and R needle indicators and scale

    VU METER - mode 0
    I've added a mapping to VUmeterMode0 to eliminate clipping but I have a feeling this is a problem with the mp3 decoder, which outputs a uint16_t variable and sometimes gets overflow, so when split into two 8 bit values one may have a mismatched value in a given frame loop.


    SKETCH
    From now on in the sketch itself at the top under the header I will include information about the libraries used for compilation
    Project info and library list for Evo Internet Radio software.


    SPACE
    As you know "without LED you won't sell" so I added some LED type outputs - STANDBY_LED on GPIO16 and SD_CS which can be "pinned" on GPIO17
    Of particular interest is the SD_LED signal, which is cloned by the GPIO matrix in ESP from the Chip Select (CS) pin of the SD card reader when the SD card is defined and used. This way we are not physically pulling the CS signal on the board and at the same time we can keep track of SD card activity especially if we are using the SD card reader that is on the Evo board at the back of the chassis. Pins 16 and 17 are no coincidence as those who have a board made for the MajstraXXL v2 or Evo schematic have them routed to the Joystick connector.


    TALKS
    As I've already written, I sometimes "peep" at others to see what they're creating because it's always inspiring, and on the website of my friend JCS I found an interesting program called AirMusic for Android phones. It is an application that allows you to make your phone into an Icecast server and e.g. stream any audio you play on your phone to your radio: YT, Spotify, mp3, microphone. Useful e.g. when testing spectrum analyser.
    Internet radio display showing station name and song title


    I have placed the HTML code for both PlayURL and Timezone in the INO code. It's not the happiest solution, it's easier to edit and keep it as html on the SD card but on the other hand for someone new one file to compile gives basically a finished solution.

    I am attaching two example logo files. They are not on GitHub and are included here as a reference on how to create such a logo and not as part of the Evo radio.
    For such a logo to work you need to rename it to "logo.xbm".
    Diora.xbm Download(12.58 kB) Sony.xbm Download(12.58 kB)
  • #1837 21774055
    Lechuuu
    Level 13  
    >>21773883 super changes, this project is developing at a dizzying pace. I'm testing and from comments, I noticed that there are streams that work for example on a computer in the browser, on other audio librariesI2S also (yoradio), and here not. This problem was already present in previous versions of the software, but I did not report the problem.

    For example, Radio Kwidzyn (but there are also several other stations):
    https://s3.slotex.pl/shoutcast/7308/stream?sid=1


    The second thing I have noticed is the pointer VU - mode 4 - there are no vertical rectangles with me.

    I uploaded the .bin for myself via OTA, I did not test uploading from sketch

  • #1838 21774105
    robgold
    Level 23  
    @Lechuuu address https://s3.slotex.pl/shoutcast/7308/stream?sid=1 has a redirect in the library to https://s3.slotex.pl:7308/stream/1/?sid=1 I don't know why the radio, despite seeing the new link correctly, doesn't open it but closes it with the message stream title: HTTP/1.1 404 Not Found but when you type in the new one it plays correctly - Radio Kwidzyn.
    I opened a thread at Wolle's (author of the audio library) why the redirect didn't work correctly despite the correct link.

    In Mode 4 you have to press DIRECT/OK (the button assigned to "rcCmdDirect") to enable the buffer preview. Normally the buffer information will not be displayed to you. It is only there if you request it.
  • #1839 21774122
    Lechuuu
    Level 13  
    robgold wrote:
    In Mode 4, you must press the DIRECT/OK button (the button assigned to "rcCmdDirect") to enable the buffer preview. Normally the buffer information will not be displayed to you. It is only on user request.

    Well I scored a gaff - yes I read the posts, it actually works.

    robgold wrote:
    address https://s3.slotex.pl/shoutcast/7308/stream?sid=1 has a redirect to https://s3.slotex.pl:7308/stream/1/?sid=1 in the library I don't know why the radio even though it sees the new link correctly it doesn't open it but closes it with the message stream title: HTTP/1.1 404 Not Found but when you type the new one it plays correctly - Radio Kwidzyń.

    Well the stream works too, thanks.
  • #1840 21774134
    MAJSTER XXL
    Level 29  
    From the cycle of what was played..., someone on the forum earlier suggested the idea of logging events so I sat down to the topic to make an event.txt file on the SD card where the data of the current station and the material played is stored with an assigned time stamp. The lines won't be saved indefinitely but in a limited range, for now I've given 10 entries to start with, the oldest ones fly out and the new ones at the end of the list. When I polish the code a bit with descriptions, I will upload it to my github profile, it will be on me at version v3.
    Later I will add a call of this log to the radio screen using another new remote control button "Search" with the option to scroll with the up and down arrows.

    And this is how it looks on the serial:

    Screenshot of ESP32 serial monitor with logs of radio tracks and weather data
  • #1841 21774145
    robgold
    Level 23  
    >>21774134 Master a cool tale. I think I will also get something like this in the Evo :)
    By the way I had an adventure with radio in my life the software did its log exactly on this principle (and it was Dyna to this day very popular radio software used for example: by RMF) and audio copies were made.... note here hit on videotape in LP mode because it gave 6h recordings so only 4 tapes per day :)

    Any reference of the audio library to evt supports you logs or do you filter it even harder ?

    @Lechuuu Radio Kwidzyn has been added to Bank03 - Cities, it is at number 53.
  • #1842 21774161
    MAJSTER XXL
    Level 29  
    >>21774145 I simply wait for the new data to appear in the "displayRadio" function and there at the very end I threw in this event logging:

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


    Code: C / C++
    Log in, to see the code
  • ADVERTISEMENT
  • #1843 21774170
    robgold
    Level 23  
    >>21774161 In my displayRadio is not called every time the StreamTitle changes because it is handled by TextScroller but I get the principle so you have already given me an idea how to add it. By the way, I just added the save to SD card to add the LOG now, thank you :)
  • #1844 21774260
    kula350
    Level 12  
    Hello, I am having trouble with a display. I have a SSD1322 display, I am looking at the schematic and the display instructions. I can't seem to identify the pins and what and where they should be connected. Can someone enlighten me a bit?
  • ADVERTISEMENT
  • #1849 21774298
    robgold
    Level 23  
    @hevet a did you win a memory file with the logo ?
  • #1850 21774301
    hevet
    Level 18  
    I haven't uploaded, but you wrote that if I want mine you have to upload to memory, otherwise it's default.
  • #1851 21774307
    robgold
    Level 23  
    >>21774301 there should be notes...I'll have a look at it later.
  • #1852 21774311
    Jarosław 1808
    Level 12  
    Hello.
    I have this problem even with the test file.


  • #1853 21774349
    wieh76
    Level 12  
    @robgold When compiling the latest software, this error pops up:
    In file included from /media/wiesiek/backup/Wieh/Arduino/Projekty_wieh/Radio Internetowe/rewizje/radio_3.19/3.19.52/ESP32_radio_evo3.19.52/ESP32_radio_evo3.19.52.ino:29:
    /home/wiesiek/Arduino/libraries/ESP_Async_WebServer/src/ESPAsyncWebServer.h: In member function 'tcp_state AsyncWebServer::state() const':
    /home/wiesiek/Arduino/libraries/ESP_Async_WebServer/src/ESPAsyncWebServer.h:1478:49: error: passing 'const AsyncServer' as 'this' argument discards qualifiers [-fpermissive]
     1478 |     return static_cast<tcp_state>(_server.status());
          |                                   ~~~~~~~~~~~~~~^~
    In file included from /home/wiesiek/Arduino/libraries/ESP_Async_WebServer/src/ESPAsyncWebServer.h:38:
    /home/wiesiek/Arduino/libraries/Async_TCP/src/AsyncTCP.h:312:11: note:   in call to 'uint8_t AsyncServer::status()'
      312 |   uint8_t status();
          |           ^~~~~~
    exit status 1
    
    Compilation error: exit status 1

    This is probably the fault of the ESP Async WebServer library version 3.9.1, because when I change to 3.7.2 everything compiles beautifully.
  • #1854 21774372
    robgold
    Level 23  
    >>21774349 And did you delete sketch (the folder where Arduino keeps the pre-compiled parts of the project) ?

    In my radio works on
    ESP Async WebServer: 3.9.1
    Async TCP: 3.4.9

    It compiles without any problems. When picking up AsyncWeb, you need to pick up the ASyncTCP revisions. This goes hand in hand with.

    @hevet I checked and correctly notes appear at startup.
  • #1855 21774392
    wieh76
    Level 12  
    @robgold Now it's compiling. Blind me didn't update the Async TCP😀.
    Thanks.
  • #1857 21774502
    hevet
    Level 18  
    @robgold then I have a problem, the logo only displays when I upload it to memory, otherwise black screen at the start.
  • #1858 21775007
    robgold
    Level 23  
    >>21774502 @hevet
    please find ino this function and replace it. Apparently the SPIFFS memory can return "true" even if the file has a length of 0. You should have created traps. Somehow I missed that with the SPIFFS memory.

    Code: C / C++
    Log in, to see the code
  • #1860 21775031
    kula350
    Level 12  
    Greetings. Can such a card reader be used? It has slightly different markings. It already has resistors on it. SD card reader module with labeled SPI pins and a separate 6-pin header
📢 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.
Summary generated by the language model.
ADVERTISEMENT