logo elektroda
logo elektroda
X
logo elektroda

Internet radio and audio file player on ESP32-S3

MAJSTER XXL 101520 1232
ADVERTISEMENT
Treść została przetłumaczona polish » english Zobacz oryginalną wersję tematu
  • #1051 21499275
    CodeBoy
    Level 33  
    Well mine cost 40zl so is it expensive ? The one Chester has is 200zl then agree ;)
  • ADVERTISEMENT
  • #1052 21499283
    hevet
    Level 16  
    The price is manageable, it cost me around 40PLN in promotion. The 5.5-inch is unfortunately closer to 150-200 PLN, an expensive option.
  • ADVERTISEMENT
  • #1053 21499288
    ArturAVS
    Moderator
    Slawek K. wrote:
    Well, as usual you have to cling to words, typical.
    Let me clarify, this is about the display commonly referred to as LCD, I have your permission to use such a synonym ?
    .
    No one is picking on you. LCD is a completely different technology and design, if any display with glass as a screen is LCD to you then congratulations. I don't know what this "common" nomenclature is all about. You can tell at a glance what type of display is on. Why are you so aggressive? LCD is not OLED, we are on a technical forum and let's call a spade a spade.
  • #1055 21499477
    DJCheester
    Level 26  
    Hi these remotes are quite perishable, intensive use will shorten the life of these buttons.

    I personally prefer rubber bands

    Remote control with buttons on a brown background. .

    For this radio I specially bought this set

    https://pl.aliexpress.com/item/1005007046071152.html

    And I assigned this remote control to the radio, it transmits in the NEC standard.

    Greetings ...
  • #1056 21499522
    robgold
    Level 20  
    @Slawek K. I will generally agree with you that OLED type displays used to be pretty much perishable. Often, after time, not even burn-in but simple degradation or unsealing threatened them. However, the last few years have brought some progress in this matter. Exactly the type of OLED we have under the name "3.12 inches" has been used successfully by Denon/Marantz in their network players for more than 10 years, and I have not encountered equipment on OLX in which this display would be burnt out or damaged. In addition, in our case the inverter works on 14V while Marantz equipment "chases" this matrix with an almost maximum voltage of 18V.

    We'll see how long it will last in such a radio playing a few hours every day. I am curious myself and intend to check it out.

    @ArturAVS
    Datasheet in picture form from Alibaba. You can find the SSD1322 driver itself on Google.
    The image shows the technical specifications of an OLED display. .
    3.12-inch OLED display with technical details. .
    Schematic diagram for a 3.12-inch monochromatic OLED display. .

    I would still recommend Kenwood's RC-406 remote control:
    Kenwood RC-406 remote control.
  • #1057 21499566
    Slawek K.
    Level 35  
    ArturAVS wrote:
    Why this aggression and aggression in you?
    .
    Are you sure with me ? ;)

    robgold wrote:
    @Slawek K. I will generally agree with you that OLED type displays used to be pretty much unbreakable. Often, after time, not even burn-in but simple degradation or unsealing threatened them. However, the last few years have brought some progress in this matter. Exactly the type of OLED we have under the name "3.12 inches" has been used successfully by Denon/Marantz in their network players for more than 10 years, and I have not encountered equipment on OLX in which this display would be burnt out or damaged. In addition, in our case the inverter works on 14V while Marantz equipment "chases" this matrix with almost maximum voltage of 18V.


    And that convinced me :) .

    Greetings
  • #1058 21499782
    Sharki38
    Level 9  
    Hi..... nice this RC-406 Kenwood remote, is it easy to implement into this radio project????? As I will be building my radio, I think I will just buy this remote. What IR receiver will be suitable for it? For the time being I'm watching the project and apologize if my questions are too obvious for many.
  • #1059 21499798
    Lechuuu
    Level 13  
    @Sharki38 The RC-406 remote control is great, I recently ordered 3 of these from Ali and they work great. You should also get yourself a TSOP2238 IR receiver from TME, which works smoothly and has high sensitivity (compared to other cheap poor receivers). The software of colleague @robgold has by default entered all the commands under the RC-406 remote control, also you do not need to modify anything - it will work immediately.
  • #1060 21499820
    Sharki38
    Level 9  
    >>21499798 .

    Thank you very much for the explanation, this is what I will do I will purchase this remote control and the IR receiver you suggested. In addition I will also get myself a couple of pieces, as I would also like to start another YoRadio project, which I am also looking at, if it is possible there too. Also, I like this project very much, although I don't know yet which enclosure to choose. You can see this is evolving all the time in favour of better quality, also thank you all for your input. One last question, do the FLAC streams work anymore, as I know there was such a problem with them at one time? Greetings to all and thanks again for the tips 🙂 .
  • #1061 21500205
    hevet
    Level 16  
    I also have this remote control and am satisfied.
  • #1062 21508025
    robgold
    Level 20  
    Welcome

    I wanted to share the new Evo radio update - version 3.17 actually 3.17.36 Link .

    What's new:
    - OTA update from the main website without entering recovery mode, without compilation
    - SD card file browser via www page
    - From this version, the configuration of the remote control codes is kept on the SD card in the remote.txt file
    - Full configuration of settings via website
    - Verbal time announcements (every hour if enabled in the configuration) we hear "It's time" and e.g. eighteen o'clock zero zero. There is both PL and EN version in the code, but the configurator currently works only with PL version.
    - I have introduced a version sub-revision for my own purposes. That is, 3.17.xx. This is only visible on the website.
    - As of version 3.17, there is no longer an mp3 player in the code and there is no second encoder. As I announced at the beginning of the development of "Evo" it is radio only.

    OTA Update - update via www .
    Three options appeared at the bottom of the www page: SD CARD, OTA UPDATE, CONFIG, enter OTA Update. The radio will turn off the audio stream, a message will appear on the OLED screen: "ESP-Radio, OTA Firmware Update", after selecting a file on the page the display will show the file name and the progress of the memory flashing. In my opinion this works faster than via UART.

    ESP radio OTA update page with file selection and upload buttons .
    ESP32 Web Radio webpage with a list of radio stations and control options. .
    Display showing firmware update for ESP-Radio. .
    Black OLED screen displaying the white text ESP-Radio, OTA Firmware Update. .


    File viewer on SD card .
    Clicking on the "SD CARD" option will open a simple file browser of the files on the SD card. Among other things, you can view bank files, configuration files, delete files and upload any new file. In this way, we do not need to remove the card and it can be built into the device.

    Screenshot of the SD card file browser for ESP32 web radio. .


    Remote codes on SD card - remote.txt file
    All remote control codes are from now on kept in the remote.txt file on the SD card. The file looks like the one below. I wanted to be able to easily do a "copy-paste" of what is defined in the code in version 3.16. In the absence of the file, the radio will accept the codes set in the program code for the RC-406 Kenwood remote control.

    It is very important not to modify the "order" of this file. That is, if we do not have a button for a given command, we set the FF address and the FF command, i.e. 0xFFFF; but do not delete the line in question. The program does not recognise commands from the file itself but assigns them sequentially so the order is also important. Each command MUST start with "0x" and end with a semicolon ";"

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

    Full configuration of settings via www .
    Enter via the web page (menu at the bottom as with other options). The following parameters can be set. The whole system is saved in the config.txt file and read from it when starting the radio. The AutoDimmer function is based on register settings, so it will only work for displays based on the SSD1322 driver. Ultimately I will use the contrast setting of the u8g2 library but I need to build a second radio board for testing.

    Settings: Display Brightness, Dimmer Display Brightness (0-15), Auto Dimmer Time (1-255 sec.), Auto Dimmer On, Time Voice Info Every Hour, VU Meter Mode (0-1), 0-dashed lines, 1-continuous lines, Encoder Function Order (0-1), 0-Volume, click for station list, 1-Station list, click for Volume

    ESP32 radio settings interface with a list of options and values. .


    Word time announcement .
    As one of you requested I have added options for the radio to read the time verbally. This is based on the audio library author's program. Now for those who have the RC406 remote control under the red handset button you can read out any time for yourself.

    What next ? .
    For the future, I would also like to move the URLs with the banks to the configuration file. So that as few things as possible are in the program code.
    Also, the HTML code of the individual pages will eventually land on the SD card, but this will make it impossible to use the radio server without the SD card. Question: does anyone use the radio with EEPROM settings only ?
  • #1063 21508053
    hevet
    Level 16  
    You've hit the ground running, I'm already getting down to testing :)

    @robgold in line 3672 (Platformio) is:
    myFile.println("Voice Info Every Hour On =" + String(timeVoiceInfoEveryHour) + ";");

    and I think it should be
    myFile.println("Voice Info Every Hour =" + String(timeVoiceInfoEveryHour) + ";");
  • ADVERTISEMENT
  • #1064 21508418
    robgold
    Level 20  
    >>21508053 This is just a description in the file. Auto Dimmer also has the name notation as "Auto Dimmer On" but I have changed this in the newer version because the selection function no longer has 0 -1 but on/off so it doesn't need to be called that much. I have also standardised the page names as: ESP Radio - SD card, Config, etc.
  • #1065 21508715
    hevet
    Level 16  
    @robgold at me unfortunately the function of telling the time every hour does not work properly, i.e. the time message is correct, but the stream does not restart after that, it displays after a few seconds the message "No audio stream".
  • #1066 21508734
    DJCheester
    Level 26  
    Hello, promising changes, admittedly I have not yet tested, but since we have a file manager through the site, which means access to the card, maybe in the future we could think in the direction of restoring the MP3 player controlled by remote control and through the site. Uploading files could be done via the website, and as far as the player is concerned, the simplest functions implemented at the beginning would suffice, i.e. the track list could be placed in a directory so as not to create a mess on the SD. The player, i.e. the basic PLAY PAUSE NEXT PREV and list functions and possibly RANDOM REPEAT REPEAT1 and normal functions. It would be good if such additional remote control codes were available.

    As for my opinion to transfer the pilot codes and links to the card, I do not know if it is so necessary, in total the pilot codes are programmed only once and it can easily be done during compilation, the links if someone wants to have their own then also the links will give their own in the compilation, and if not then leave it to fellow Robgold, I have edited and saved on the card and as long as I do not overwrite it I have my own.

    The upgrade via ota is very nice that you can upload your own file, which means that I can compile on my computer and remotely perform the upgrade.

    In general there is progress ;) .

    Greetings ....
  • #1067 21508809
    Lechuuu
    Level 13  
    >>21508715 At my place it already said hourly 3 times every hour, also works for me. And it reloaded the stream
  • #1068 21508830
    hevet
    Level 16  
    I don't know what it is with me. I have checked on several stations and the stream has not restarted on any of them.
  • #1069 21508881
    robgold
    Level 20  
    @hevet, the variable . is responsible for restoring the stream:
    resumePlay = true; It is set in the function voiceTime() This is nothing more than pressing the OK button on the remote control, if you have changed yourself something in this function then playback will not turn on. The resumePlay variable simply pretends to be the remote control code rcCmdOk.


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

    Press the ENT/OK button on your remote control (rcCmdOk) and it should reload your stream. If this does not happen, this is where I would look for the cause.

    @DJCheester
    No plans to add a player. Despite being a "child of the WinAmp generation" I think I'm used to Spotify by now.
    Also, while the upload function still manages somehow, I've noticed that the download despite the packet upload unfortunately sometimes sucks up all the RAM and does a reset. Generally this is not intended for uploading large files today. Rather, it was meant to be used to configure, modify what's on the card so that I don't have to go to the tuner, pull out the card.

    The remote control codes are on the card precisely so that you don't have to compile anything anymore. It is enough to load a ready-made BIN file via OTA.


    There is a minor inconvenience with the timer, there are stations which, after reloading the stream even though the connection has been re-established within those few seconds, will start playback with a commercial block.
  • #1070 21508894
    hevet
    Level 16  
    @robgold I didn't change anything, I have everything as you wrote in the code. After pressing ok, the stream refreshes for me.
    After reading a full hour, it looks like the "ok" simulation turns on, shows Loading stream, but after a few or so seconds it shows "no audio stream"
  • #1071 21508906
    robgold
    Level 20  
    As you have loaded the program compiled at home, download the BIN file from the build directory and load using the OTA function. Let us know if there is a problem on this file too.
  • #1072 21508912
    hevet
    Level 16  
    Ok I'll let you know, but it's after 14 ;)

    Added after 2 [hours] 2 [minutes]:

    @robgold On your bin file it works, just makes me wonder why my bin file is over 1.8MB and yours is 1.6MB for Platformio. Unless there are mixed up files because it is 1.8MB for Arduino.
    I checked again on my version and it worked once too, we'll see in an hour.
  • ADVERTISEMENT
  • #1073 21509137
    gabar5
    Level 12  
    @hevet on the remote control press "red handset" should bring up the time reading, without waiting for the full hour.
  • #1074 21509145
    hevet
    Level 16  
    Here the function works without a problem, it always switches back on, even when at full it did not want to work. The problem is with the automatic reading at the full hour. Ok, at the last hour it was ok, let's see if something has muddled up or if there is a problem after all.
  • #1075 21509149
    robgold
    Level 20  
    @hevet, files are ok, different levels of optimization, compilation. I noticed this too but both files work and both are the same version. On the web radio page at the bottom you can see the compilation sub-versions. I think there is currently 36 or 37 there, the BIN compilation I'm sure. It's done on TCP libraries with correction so that there is no problem with FLAC files on core ESP 3.0.7 which is why I wanted you to check the finished file.
    This reading of the hour is based on the voiceover functions of Google Translate. This is how the author of the audio library came up with it.

    I will probably "fly 3.17.42 or 43" in the evening. It has a few settings added (e.g. you can define displayMode, clock, radio, 3 lines) with which the radio starts, it also has the dimming function changed a bit so as to replace the changes in the SSD1322 registers by adjusting the "contrast" variable from the u8g2 library.
  • #1076 21509155
    hevet
    Level 16  
    @robgold I have swapped files to FLAC.
    Ok, and could you advise adding options for text scrolling speed. The value 65, is not very smooth, I change it to 30.
  • #1077 21509204
    robgold
    Level 20  
    @hevet yes but you have to change a bit in the program because in the same loop I do a couple of other operations like refreshing the VU or the clock flags.
    65ms seemed like a very optimal time. It's more or less the same rate most network stremars scroll through titles.
  • #1078 21509258
    hevet
    Level 16  
    Ok, if it's a lot of work, it's not a problem for me to change at compile time. :)
  • #1079 21509552
    DJCheester
    Level 26  
    robgold wrote:
    No plans to add a player. Despite being a "child of the WinAmp generation" I think I've already got used to Spotify.
    Also, while the upload function still manages somehow, I've noticed that the download despite the packet upload unfortunately sometimes sucks up all the RAM and does a reset. Generally this is not intended for uploading large files today. Rather, it was meant to be used to configure, modify what's on the card so that I don't have to go to the tuner, pull out the card.

    The remote control codes are on the card precisely so that you don't have to compile anything anymore. Just load the ready-made BIN file via OTA.
    .


    I was just asking about the player, the second question is whether this talking clock is somehow turned on or whether it works as before, i.e. switches to the clock board and whether it talks immediately every hour or not. Because I will say that at one time I made such a clock from AVT kits

    https://ep.com.pl/files/6350.pdf

    Nice, but in the long run it was unbearable, especially when it rattled at night. Then I made a switch to disconnect the speaker.

    Greetings...
  • #1080 21509582
    hevet
    Level 16  
    @DJCheester you can disable/enable the talking clock in the options via the website.

Topic summary

The discussion revolves around building an internet radio and audio file player using the ESP32-S3 microcontroller. The project includes features such as an OLED display, Wi-Fi connectivity, and audio playback capabilities. Users share their experiences with hardware setup, including issues with pin configurations, library compatibility, and troubleshooting compilation errors in the Arduino IDE. Suggestions for libraries, such as ESP32-audioI2S and WiFiManager, are provided to enhance functionality. Participants also discuss the importance of proper wiring, capacitor usage for encoders, and the potential for adding features like DLNA support and a web management interface for radio station management. Several users report on their progress, share code snippets, and offer solutions to common problems encountered during development.
Summary generated by the language model.
ADVERTISEMENT