logo elektroda
logo elektroda
X
logo elektroda

Internet radio and audio file player on ESP32-S3

MAJSTER XXL 147723 1512
ADVERTISEMENT
Treść została przetłumaczona polish » english Zobacz oryginalną wersję tematu
📢 Listen (AI):
  • #1471 21744772
    wieh76
    Level 12  
    @robgold when it comes to programming the second encoder, don't count on me, because I'm rather "lazy" at programming. As you can see on the pictures
    i used an arduino nano for the "advanced" function of turning the radio off and on. One relay disconnects the 5V on the esp and the other the main transformer. Here are two files
    one that I sent myself, the other after corrections by the shop I got to accept for production. I have the hole for the IR on the other side because they made a mistake, they wanted to make a second one but didn't have to, I just designed the receiver on the other side. The display is screwed to glued M3 nuts, then a 1mm washer, display, isolation washer for the transistor😀, M3 screw probably 6mm long. The most problematic was centring the display because I gave the hole for it too small(you can see in the photo the right side slightly covers the watch), now I would give 2mm on each side more.

    Greetings
  • ADVERTISEMENT
  • #1472 21744864
    Jarosław 1808
    Level 11  
    Hello.
    I have a problem with the visibility of the SD card and so my question is whether the radio should see the card when there are no files on it and how should the power supply to the card be set to 3 or 5V.
  • #1473 21744972
    robgold
    Level 21  
    @Jarosław 1808 Do you have the SD card as a module with a slot (some ready-made arduino board) or the reader itself ?
    Take a picture, often on ready made boards there are soldered resistors that "interfere" with communication. The card should be visible as soon as the radio starts up. If there is no card, you will get an "SD CARD" logo on the welcome screen indicating a problem reading it and the radio will store stations and bank number in the emulated EEPROM.

    The card is powered from 3.3V. Here is the wiring diagram in the Evo (consistent with the v2 connection at the Major PDF Link

    Wiring diagram showing SD card module connected to microcontroller with marked signal paths

    @wieh76 thanks for sharing the files. I since I have a 3D printer I actually can't remember when I have milled something on the CNC.
    Did they give you only PDF files or also DXFs / G-code files ?
  • ADVERTISEMENT
  • #1476 21745133
    MAJSTER XXL
    Level 29  
    @hevet very cool you did it, when you publish the files I'd love to sneak something in. Did you process the radio itself or did you also scrape something in the file player? Do you call up that calendar card on demand from the remote control button or does it pop up on the screen by itself with a timer? I was also thinking how to get that other data from the calendar card onto the screen, as we already had it on the terminal, i.e. proverbs for today and what / what holiday / day today. It used to be that in grandma's calendars you would tear off the pages and you would remember some cool proverbs / sayings - now we have the same in the electronic version. Super job @hevet !
  • ADVERTISEMENT
  • #1477 21745147
    hevet
    Level 17  
    I got rid of the player completely.
    The calendar card or weather is called up with a key. I was thinking of a timer, probably in some future version.
    I changed a lot of things, I also added a library to handle the remote control. I have changed and added functions, breaking long text or breaking and centering, so there will be big inconsistencies. I also made Polish tails for the larger font. What you would be interested in, I will send you at your leisure.
  • ADVERTISEMENT
  • #1478 21745170
    robgold
    Level 21  
    @hevet Bravo. I see a third version will slowly be born. Such a combination of a colour version of the Major and features from the Evo ? :)

    I don't know if you have similar feelings @hevet @MAJSTER XXL but the hardest thing about a project like this is making a nice interface. It seems that just coding in C for better or worse will always get the job done and it doesn't show that much on the outside. However, "dressing" it up in a nice "image" is already a challenge, at least for me. This also applies to the mechanical part, i.e. the casing.
  • #1479 21745172
    hevet
    Level 17  
    You're right, I've changed the colour scheme many times myself, probably not the last word.
  • #1480 21745266
    DJCheester
    Level 26  
    Hello I've just finished soldering the PCB for the Majster version.
    And that's it for now as the display is stuck in the packet store for the weekend.

    Hand-soldered PCB with ESP32 and audio modules on beige surface

    Commissioning will unfortunately drag on for another week.

    Regards...
  • #1481 21745680
    irysbox
    Level 12  
    i will soon be assembling the bottom, top and back of the case i will post pictures i tried to program something myself but the AI still does not think enough for what i would like to do :) and i am so good in these libraries and c my conit was more of a visal basic :) after atari :) it would be useful in radio sleep and alarm functionality so if you have to develop something go in this direction :)
  • #1482 21745739
    DJCheester
    Level 26  
    hevet wrote:


    @hevet nice that you enriched it, tell me if you kept the GPIO pins connections the same as Majster ?
    And will it be possible to count on the code from you ?

    Greetings....
  • #1483 21745811
    QALAB
    Level 11  
    I started getting this error after updating the library on my Evo radio. What is the reason and solution? I'm installing the V3.19.19 software.





    Dodano po 1 [godziny] 1 [minuty]:

    >>21745811 The reason for the error in my video was solved after the AsyncTCP Update.
  • #1484 21745882
    hevet
    Level 17  
    @DJCheester I have the pins changed because I used a board from another project, but it's unlikely to be a problem to change them. I'm only using the extra pin for brightness handling, the SD card I don't have. For now I need to embrace github as I have various branches there.
  • #1485 21746314
    robgold
    Level 21  
    I envied my yoRadio colleagues, especially the author of the Maestro software, and decided to make my own prototype in smoked acrylic. The first tests are already behind me. Judge for yourself how it looks.

    Two black prototype front panels with cutouts for screen and buttons
    Display of a prototype internet radio with black casing and blue-lit interface
    Display of a radio prototype showing Antyradio station info and system parameters

    In Bank 16 I did the last few stations in the new format on a test basis. The bank and station number information is no longer in the station name. It appears as a digit before the name. The station number and bank are still visible at the top of the station list screen. Check if it was not better to come to this standard.

    The current standard so far:
    LCD screen with a list of radio stations in Bank 16 inside a tinted plexiglass case

    New proposal:
    Black tinted-plexiglass radio player with screen showing radio station list.


    @irysbox the full power ON/OFF function and the SLEEP function is already in the latest software version. I will upload to github today or tomorrow.


    Additional information:
    I managed to contact Mr. Peter from the station smoothjazz.com.pl , they corrected the metadata in the FLAC stream regarding the bitrate, the target is to be correct variable bitrate. By the way, I recommend it as someone who likes quiet music with which one can write code, work, tinker, and it is probably the only national station broadcasting in FLAC 16bit format, ~1Mbps.


    @MAJSTER XXL, @hevet and colleagues who create your own version based on v2, v3, Evo

    PILOT:
    I had the idea to ask the companies that produce universal remotes in our country for how much they could create a dedicated remote control for our radio.
    These are remote controls for which only the front side is printed and the so-called rubber matrix is adapted to the customer's requirements
    Please let us know what list of buttons we would need. Out of curiosity I will send such an enquiry, we will see how much would a piece of such dedicated remote control cost us.
    I am thinking here for example of the company Elmark Link and remote EL3 or EL8 small

    Three black universal remote controls with number and arrow buttons standing upright
    Black remote control with many buttons, including color and arrow keys


    At the moment I have put together such a list of the buttons needed:

    VolumeUp 0xB914; // Volume +
    VolumeDown 0xB915; // Volume -
    ArrowRight 0xB90B; // right arrow - next station
    ArrowLeft 0xB90A; // arrow to the left - previous station
    ArrowUp 0xB987; // up arrow - step up station list
    ArrowDown 0xB986; // down arrow - list of stations step down
    Back 0xB985; // Return button
    Ok 0xB90E; // Ent button - validation of stations
    Source 0xB913; // Switching source radio, player
    Mute 0xB916; // Sound mute
    Equalizer 0xB917; // Equalizer for sound
    Dimmer 0xB90F; // Screen brightness, two modes 1/16 or full brightness
    Bank 0xB90C; // Display bank selection
    Power 0xB988; // Power
    Sleep 0xB992; // Timer
    Display // Change DisplayMode

    Key0 0xB900; // Button "0"
    Key1 0xB901; // Key "1"
    Key2 0xB902; // Key "2"
    Key3 0xB903; // // Key "3"
    Key4 0xB904; // // Key "4"
    Key5 0xB905; // // Key "5"
    Key6 0xB906; // // Key "6"
    Key7 0xB907; // // Key "7"
    Key8 0xB908; // // Key "8"
    Key9 0xB909; // Key "9"
  • #1486 21746447
    CodeBoy
    Level 33  
    nice looking enclosure
    if you have it tested, you can upload the project :)
  • #1487 21746464
    hevet
    Level 17  
    I have green and red for weather and calendar, missing for sleep. So maybe it's like it is with remote controls as a rule, yellow, green, red, blue for special functions.
  • #1488 21746512
    wieh76
    Level 12  
    I have been testing the radio for a few days and have noticed two things.
    1. When switching the outermost stations in the list with the remote next/previous buttons, e.g. from 99 to 1, the station does not change but stays at 99. The same in the other direction.
    This happens on every bank.
    2. I updated the radio via OTA on a test basis, downloaded the latest 3.19.19.bin file from robgold's gihub. Everything went ok only the version that is now displayed
    is 3.19.17. This is a detail but I decided to mention it.

    Greetings

    Added after 3 [minutes]:

    @robgold enclosure beautiful if it wasn't for the fact that I already have one I would order from you🙂 .
  • #1489 21746529
    robgold
    Level 21  
    @wieh76 That's the way it's supposed to be, I've specifically made a block at the end of the list of a given bank so that when reaching the end stations they don't scroll, this can be easily corrected. Actually I can't remember now for what reason I redesigned it that way but early versions of Evo scrolled the list all the way through.

    As for the OTA, it means that the build file is from version 3.19.17, which means you have uploaded an older version. Try uploading the firmware file from the Platformio directory and it will also upload.
  • #1490 21746721
    Jarosław 1808
    Level 11  
    robgold wrote:
    @Jarosław 1808 Do you have SD card as module with slot (some ready made arduino board) or reader itself ?
    Take a picture, often on ready made boards there are soldered resistors that "interfere" with communication. The card should be visible as soon as the radio starts up. If there is no card, you will get an "SD CARD" logo on the welcome screen indicating a problem reading it and the radio will store stations and bank number in the emulated EEPROM.

    The card is powered from 3.3V. Here is the wiring diagram in the Evo (consistent with the v2 connection at the Major PDF Link

    Wiring diagram showing SD card module connected to microcontroller with marked signal paths Schematic PDF

    @wieh76 thanks for sharing the files. I since I have a 3D printer I actually can't remember when I have milled something on the CNC.
    Did they give you only PDF files or also DXFs / G-code files ?


    I have the board made according to the author's design.
  • #1491 21746733
    robgold
    Level 21  
    >>21746721 So you have my board.
    First important point, ignoring the fly that may have covered this up ;) make a jumper on the ESP PCB. If you want to power the board using USB on the ESP module then you need to supply 5V to the 5V bus (it powers an OLED for example). See that even the 5V LED does not light up. On the ESP module, in order for 5V from USB to appear on the leg labelled 5V there must be a jumper as shown in the picture.

    ESP module with USB connection and highlighted jumper on the PCB

    ESP board with marked jumper needed to supply 5V via USB
  • #1492 21746775
    Jarosław 1808
    Level 11  
    robgold wrote:
    >>21746721 So there you have my board.
    First important point, ignoring the fly that may have obscured this ;) make a jumper on the ESP PCB. If you want to power the board using USB on the ESP module then you need to supply 5V to the 5V bus (it powers an OLED for example). See that even the 5V LED does not light up. On the ESP module, in order for 5V from USB to appear on the leg labelled 5V there must be a jumper as shown in the picture.

    ESP module with USB connection and highlighted jumper on the PCB

    ESP board with marked jumper needed to supply 5V via USB

    Just for information, because I don't know if you know, you don't have to use an IP to view the radio page.
    On the local network the address works http://evoradio.local because mdns is implemented.

    Thanks for your help.
    I'll muse and after making a jumper I'll let you know 😉😆
  • #1493 21747986
    bolszoy
    Level 10  
    Hi. My radio /first version/ stopped working one day, and this version suits me best.
    I tried uploading binaries, and even compiling bib libraries myself - unfortunately I couldn't get through the errors related to libraries. Either failing or missing after deleting an unused one....
    And uploading the ready-made binaries had the effect that the radio kept resetting when trying to connect on 192.168.4.1, or connect to the network. I connect to a router that has 1 client. By the way, I wonder if the problems connecting the radio to the router, could be due to the settings in the arduino ide - CPU frequency: "240MHz (WiFi)? Is this the WiFi operating frequency that the ESP32 works with?
    I decided to upload v3 according to the instructions of one of my colleagues /pdf/, to see if I can do it and with what result. I don't understand why but on github there are no directories but only .h files?
    Nevertheless, in order not to wait for a ready-made one, I decided to download the libraries and try my own hand at it.

    Again, I have a compilation problem that I can't understand. Here are the errors I have on the output:


    C:³³³³³³³³Desktop_internet_radio_v3³Schematic_ESP32-internet-radio_v3³ESP32_internet_radio_v3-mainESP32_radio_v3_ILI9488_canvas³ESP32_radio_v3_ILI9488_canvas.ino:2411:6: error: variable or field 'my_audio_info' declared void
    2411 | void my_audio_info(Audio::msg_t m)
    | ^~~~~~~~~~~~~
    C:³³³³³³³³Desktop_Radio_internet_radio_v3Schematic_ESP32-internet-radio_v3-ESP32_internet_radio_v3-main_ESP32_radio_v3_ILI9488_canvas_ESP32_radio_v3_ILI9488_canvas.ino:2411:27: error: 'msg_t' is not a member of 'Audio'
    2411 | void my_audio_info(Audio::msg_t m)
    | ^~~~~
    C:³³³³³³³³Desktop_internet_radio_v3³Schematic_ESP32-internet-radio_v3³ESP32_internet_radio_v3-main_ESP32_radio_v3_ILI9488_canvas³ESP32_radio_v3_ILI9488_canvas.ino:2411:6: error: variable or field 'my_audio_info' declared void
    2411 | void my_audio_info(Audio::msg_t m)
    | ^~~~~~~~~~~~~
    C:³³³³³³³³Desktop_Radio_internet_radio_v3Schematic_ESP32-internet-radio_v3-ESP32_internet_radio_v3-main_ESP32_radio_v3_ILI9488_canvas_ESP32_radio_v3_ILI9488_canvas.ino:2411:27: error: 'msg_t' is not a member of 'Audio'
    2411 | void my_audio_info(Audio::msg_t m)
    | ^~~~~

    C:³³³³³³³³Desktop_internet_radio_va3Schematic_ESP32-internet-radio_v3ESP32_internet_radio_v3-mainESP32_radio_v3_ILI9488_canvasESP32_radio_v3_ILI9488_canvas.ino:2818:10: error: 'audio_info_callback' is not a member of 'Audio'
    2818 | Audio::audio_info_callback = my_audio_info; // Assigning custom callback function to handle events and audio information
    | ^~~~~~~~~~~~~~~~~~~
    C:³³³³³³³³Desktop_internet_radio_v3³Schematic_ESP32-internet-radio_v3³ESP32_internet_radio_v3-mainESP32_radio_v3_ILI9488_canvas³ESP32_radio_v3_ILI9488_canvas.ino:2818:32: error: 'my_audio_info' was not declared in this scope; did you mean 'audio_info'?
    2818 | Audio::audio_info_callback = my_audio_info; // Assigning custom callback function to handle events and audio information
    | ^~~~~~~~~~~~~
    | audio_info
    exit status 1

    Compilation error: variable or field 'my_audio_info' declared void


    My knowledge does not allow me to find the problem. Thank you for any help.
  • #1494 21748007
    DJCheester
    Level 26  
    Hi reading the log I see that a colleague is trying to compile a colleague's sketch with a colour LCD. Are the connections correct ? Because in the past colleague Majster had a different version of the radio on OLED display ?

    Greetings ...

    Added after 1 [minute]:

    I attached a pdf file in the past and it is already very outdated, it concerned the Robgold software version 3.15 since then a lot has changed to replace esp32 core and audioI2S library files

    Regards.
  • #1495 21748023
    bolszoy
    Level 10  
    There is a bare board without anything. i don't know which version for which display /I'm not getting into that yet/, but as I wrote I'm trying to compile to understand what I'm doing wrong. I do not hide that I preferred the first version, but I also have problems with libraries.
    Now I'm trying the same code again and the errors are like this:

    C:³³³³³³³³Desktop_internet_radio_v3Schematic_ESP32-internet-radio_v3³³³ESP32_internet_radio_v3-main_ESP32_radio_v3_ILI9488_canvas³ESP32_radio_v3_ILI9488_canvas.ino:221:8: error: no matching function for call to 'Ticker::Ticker()'
    221 | Ticker timer1; // Timer to updateTimer every 1s
    | ^~~~~~


    74 | Ticker(fptr callback, uint32_t timer, uint32_t repeat = 0, resolution_t resolution = MICROS);
    | ^~~~~~
    c:ersersBolszoyDocumentsArduinolibrariesTicker/Ticker.h:74:9: note: candidate expects 4 arguments, 0 provided
    c:UsersUsersBolszoyDocumentsArduinolibrariesTicker/Ticker.h:62:7: note: candidate: 'Ticker::Ticker(const Ticker&) '
    62 | class Ticker {
    | ^~~~~~
    c:UsersBolszoyDocumentsArduinoTicker/Ticker.h:62:7: note: candidate expects 1 argument, 0 provided

    222 | Ticker timer2; // Timer to getWeatherData every 60s
    | ^~~~~~
    c:// Ticker/Ticker.h:74:9: note: candidate: 'Ticker::Ticker(fptr, uint32_t, uint32_t, resolution_t)'
    74 | Ticker(fptr callback, uint32_t timer, uint32_t repeat = 0, resolution_t resolution = MICROS);
    | ^~~~~~
    c:ersersBolszoyDocumentsArduinolibrariesTicker/Ticker.h:74:9: note: candidate expects 4 arguments, 0 provided
    c:UsersUsersBolszoyDocumentsArduinolibrariesTicker/Ticker.h:62:7: note: candidate: 'Ticker::Ticker(const Ticker&) '
    62 | class Ticker {
    | ^~~~~~
    c:UsersBolszoyDocumentsArduinoTicker/Ticker.h:62:7: note: candidate expects 1 argument, 0 provided

    223 | Ticker timer3; // Timer to toggle display of weather data on last line every 10s
    | ^~~~~~
    c:// Ticker/Ticker.h:74:9: note: candidate: 'Ticker::Ticker(fptr, uint32_t, uint32_t, resolution_t)'
    74 | Ticker(fptr callback, uint32_t timer, uint32_t repeat = 0, resolution_t resolution = MICROS);
    | ^~~~~~
    c:ersersBolszoyDocumentsArduinolibrariesTicker/Ticker.h:74:9: note: candidate expects 4 arguments, 0 provided
    c:UsersBolszoyDocumentsArduinolibrariesTicker/Ticker.h:62:7: note: candidate: 'Ticker::Ticker(const Ticker&) '
    62 | class Ticker {
    | ^~~~~~


    C:³³³³³³³³Desktop_Radio_internet_radio_v3Schematic_ESP32-internet-radio_v3ESP32_internet_radio_v3-mainESP32_radio_v3_ILI9488_canvasESP32_radio_v3_ILI9488_canvas.ino:2899:12: error: 'class Ticker' has no member named 'attach'
    2899 | timer1.attach(1, timerCallback); // Set timer to call updateTimer function every second
    | ^~~~~~
    C:³³³³³³³³Desktop_internet_radio_v3³Schematic_ESP32-internet-radio_v3³ESP32_internet_radio_v3-main_ESP32_radio_v3_ILI9488_canvas³ESP32_radio_v3_ILI9488_canvas.ino:2900:12: error: 'class Ticker' has no member named 'attach'
    2900 | timer2.attach(300, getWeatherData); // Set timer to call getWeatherData function every 5 minutes
    | ^~~~~~
    exit status 1

    Compilation error: no matching function for call to 'Ticker::Ticker()'


    I don't understand why.


    "The pdf file I used to attach and it is already severely outdated it concerned the Robgold software version 3.15 since then a lot has changed to swap esp32 core files and audioI2S library files."


    That explains a bit....
  • #1496 21748040
    robgold
    Level 21  
    >>21748023 What versions of libraries do you have, which version of Arduino ?
    It looks like you are trying to compile on an older core ESP and an old audio library.

    What version of ESP board do you have, colour display or OLED ?
  • #1497 21748255
    bolszoy
    Level 10  
    Win11 arduino ide 2.3.6. bibioltes updated. Downloaded from dithub "ESP32_radio_internet_v3"

    "It looks like you are trying to compile on an older core ESP and an old audio library."

    How to check the core ESP? I have nothing on the ESp itself about the type.
    I don't have the audio library.
  • #1498 21748394
    DJCheester
    Level 26  
    In the library manager you have ESP by espressif installed and there is the version we (at least I) use 3.20

    And the audioI2S library the latest one you install and swap the files in the library directory you enter from the SRC directory and swap the ones downloaded from Github kol Robgold.

    Greetings....
  • #1499 21748395
    robgold
    Level 21  
    Today, prototype number 2 - that is, how to make a "premium" version of our ESP32 radio enclosure

    I used very faintly smoked plexiglass with a thickness of 2mm. According to my feelings this is probably the best you can use for such a design. The results for the Green are excellent, the yellow is nice but falls slightly into the green, the white OLED performs decently. Blue is the worst performing.

    White:
    OLED display in a dark plexiglass case showing SmoothJazz.com.pl station

    Blue:
    OLED display in a plexiglass case showing ESP32 radio UI with blue text

    Green:
    Green OLED display in a dark plexiglass enclosure showing FLAC audio information

    Yellow:
    Green OLED display in dark plexiglass enclosure showing music playback information


    Green is a bit reminiscent of old alarm clocks from times gone by where a green filter was used for VFD displays ;)
  • #1500 21748422
    irysbox
    Level 12  
    i would put a millimeter of filament at the bottom and top so there would not be an uneven cut in the Plexiglas unless you polish it to perfection :) and I see that you have the screws embedded in the laptop nuts I came up with a similar technique but I put the notch and the nuts square and the pin goes into the hole and the nut
📢 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