logo elektroda
logo elektroda
X
logo elektroda

Internet radio and audio file player on ESP32-S3

MAJSTER XXL 100914 1229
ADVERTISEMENT
Treść została przetłumaczona polish » english Zobacz oryginalną wersję tematu
  • #601 21438586
    TechEkspert
    Editor
    @Lechuuu do you have access to x-ray? Interesting point, maybe there would be a chance for an article on how to work with it and what you can get?
  • ADVERTISEMENT
  • #602 21438601
    Lechuuu
    Level 13  
    @TechEkspert I happen to be fortunate that professionally I do. I am attaching a photo of my ESP32-S3 with x-ray.

    X-ray image of an ESP32-S3 board showing internal electronic components. .

    TechEkspert wrote:
    @Lechuuu is there any chance of an article on the practical use of X-Ray?
    What applications, what has it been able to detect, what do you need to watch out for, how much does it cost, what size it is, how much power it draws, does it need to have a properly prepared room, etc.


    I work with one of these: Nikon XT V 160 .

    As for the article on this, there's not much to describe here and my use is very sporadic, on/off/take a picture type
  • #603 21438675
    robgold
    Level 20  
    Once a set of upgrades is a set :) .

    I have also thrown in a volume record into 3.15. This is a function that is called on demand. The recording only takes place when we confirm a value in the volume control menu with the OK/ENT button on the remote control. A corresponding message on the display informs us of this. It is read out when the radio starts and, for me, as a test under the "rcCmdRed" button. Changing the volume itself does not write it to the volume.txt file. If the file does not exist on the card then the default value after start =10 (range 0-21) is taken. The first time it is saved, the file is created. Link GitHub Evo3.15 .

    Display showing the message Saving volume settings


    @Lechuuu
    I'm looking at this X-ray photo and thinking how this is supposed to work as there is not even a complete PI filter at this ESP. There is only a coil and no capacitors to ground. Some kind of joke on the part of the manufacturer. Do you have a pure X-Ray or with a rotating table and head tilt function (aka pseudo CT) ? Nice "voids" came out on the ground pads under the circuit ;) .

    X-ray image of an electronic circuit with highlighted areas of missing components. .
  • #604 21439167
    efi222
    Level 19  
    When it comes to saving configuration values to EEPROM (to minimise wear and tear), it is a good idea to save new data only if it differs from that previously saved.
    I often use this method in my devices. Write is set to a fixed interval. For example, every half minute. Of course, this method is more suitable for infrequently changing data.
  • #605 21439621
    TechEkspert
    Editor
    @Lechuuu is there any chance of an article on the practical use of X-Ray?
    What applications, what has it been able to detect, what do you need to watch out for, how much does it cost, what size is it, how much power does it draw, does it need to have a properly prepared room, etc.?

    As if you don't want to write we can always record a podcast :) https://www.elektroda.pl/rtvforum/audio.php
  • #606 21439880
    wirbud
    Level 13  
    Dear Colleague Robgold,
    Can the radio in version 3.15 hang up? Is it potentially the fault of poor contacts of the contact board (I suspect so), or maybe the ESP32S3 of the Chinese which admittedly in yoradio and on Wolle radio actually did not cause problems..... It hangs up for me mainly on the volume change "Volume xx", or on "loading stream ...." even when I don't touch the encoders, and controls from the WEB browser?
    update - freezes OLED on Volume ,,,,, and in the browser you can still change bank, station change volume.
    Also my NEC 38 remote control does not work - connected to PIN 15 the diode receives a signal (blinks but nothing happens) The remote control in another application works.
    How do I change the bank using the encoders?
  • ADVERTISEMENT
  • #607 21439950
    robgold
    Level 20  
    @wirbud

    The web server is very primitive and can only handle one connection at a time. It also tends to throttle the main loop if you click a lot. I haven't noticed any major problems with it myself though. I'm assuming you have the Arduino set up correctly (PSRAM turned on appropriately to capacity - not every ESP module has OPI).

    The version that is currently on GitHub doesn't write anything by itself when turning the volume, so I suspect contacts. Changing banks appears when you hold down encoder 2 (the one from changing stations) for 3 seconds. In general, the audio library eats up resources and, in the case of a poor connection or stream, can make the whole radio very "sluggish".

    Check what appears in the terminal this will help us diagnose the problem. What range is the wifi indicator showing next to the watch at the bottom ?
  • #608 21439994
    wirbud
    Level 13  
    Cool this radio !!! I soldered most of the connectors and it is better. The screen fades to black or stays on Volume. But I think only when I move the encoders. Via the WEB side it doesn't do the screen fade. When the screen disappears the rest of the radio functions still work normally ! I can change stations with the encoders or from the web site. Volume also, even banks (super with those 2seconds.
    On the quality side - not once did I have an interruption of the audio stream! The yellow board with the TFT screen (CYD) interrupts frequently on e.g. Radio Drivers (AAC).
    Flac I wanted to check - and in front of it is MaXXima Bank 15 Station 40 http://maxxima.mine.nu:8000/maxx.ogg and here the radio restarts and so the evening ended.... loop without exit, How to exit ? Switching off does nothing.... returns to this station and resets over and over again.

    Radio display showing the station Radio Paradise Main and the track Arctic Monkeys - Fireside. .

    Added after 8 [hours] 52 [minutes]:

    Uploaded the Author's version of the thread - managed to compile for the first time !

    Comes down with the last played station from robgold. It seemed to me that all FLAC and the like from bank 15 go without jamming - but it turned out that FLAC displays and such CRo on FLAC stutters like hell. The encoders allowed me to switch bank, station and the screen froze. The radio continued to work but as if without the screen. Sometimes the screen goes blank but the radio works. Sound quality is great! Subsequent station changes with the encoder trigger an occasional reset and the radio starts up again.

    Graphically, there are a lot of zeros in sampling and bitrate, but there is no information about the codec for flac or ogg. AAC and MP3 were displayed to me.
    Screen support is clearly not working for me - regardless of version - Author or Robgold.
    Stream decoding doesn't work properly in the robgold version.
    Do I have a faulty display or ESP32 .... ground routing ;-) ? What to do here?

    The Major's project is sweeping in sound quality - (zero breaks in the stream - yoradio at 480x320 screen was losing seconds from time to time)
  • #609 21440440
    hevet
    Level 16  
    With me the radio on version 3.15 works ok, the volume save or equalizer settings save correctly. The remote control works fine, although sometimes I have to click 2 times to e.g. change the volume, I can see that @robgold changed the parameters a bit from the remote control. I changed myself a little bit the range of tone change from -40 d0 +12. In the audio library you have to change the same.
  • ADVERTISEMENT
  • #610 21440462
    wirbud
    Level 13  
    How do you get the remote to work? (I have this little thing from Ali with a receiver). At Majster's I had 2 buttons working - 0 reduced the memory bank and ^ down, but nothing else worked. At Robgold, neither button worked. You have to plug in the port monitor and enter the received codes of this remote? Yes? Thanks.
  • #612 21440466
    hevet
    Level 16  
    Yes you have to read the codes in the serial monitor, robgold has a completely different remote and on its codes nothing will work on your remote.
  • #613 21440492
    technics az7
    Level 2  
    >>21440462 if you have such a remote control then
    Remote control with numeric and navigation buttons. .
    Computer screen with code assigning remote control buttons to commands. works I checked

    Added after 19 [minutes]:

    >>21440492 I have this problem that it doesn't read my mp3 files from the SD card, which works, the station address lists are there and the radio plays and when I go into the file player there is nothing there despite adding some in mp3 format? The program uploaded from Majster.
  • #614 21440607
    MAJSTER XXL
    Level 29  
    @technics az7 The files should be in some folder in the root directory of the SD card with no subfolders. Show the contents from the serial terminal, which is returned in the logs. The SD card should be formatted to the FAT32 file system.
  • #615 21440613
    robgold
    Level 20  
    @wirbud

    There should be no difference in stream quality. Radio whether it's the Majstra or Evo version uses the same library for audio. It is also the same library that the famous yoRadio uses. This library has quite a few shortcomings when it comes to AAC and FLAC support. It is worth following the threads and reported bugs on the library author's website. In addition, some of the banks contain stations that "broadcast" outside the range of the library's capabilities, and there are also some that can "put out" the radio completely. This is where the SD card comes to the rescue. It is enough to download and edit the bank_nr and station_nr files on the computer, then the radio will start correctly on the new bank and station.

    Here you have for example: Maxxim radio:
    info FLAC decode error -10 : BITS PER SAMPLE > 16
    info syncword found at pos 5110

    There is no chance that it will play correctly. And if anyone wants to check for themselves I recommend Bank 6, stations probably 22, 23.... (Radio Derf ) will effectively block his radio :) .

    Since there has been a lot of rapture here about yoRadio I found some time ago an old WROVER module, TFT display, sacrificed one PCM and built this "miracle" on the fly. It has exactly the same problems in playing high-bitrate streams as what we are developing here.

    I've started slowly editing Banks, testing and cleaning up links that don't work. This is a very tedious and time-consuming job.
  • #616 21440769
    DJCheester
    Level 26  
    Hello today I fired up the radio and caught up with the remote control it plays stably, I added a wire next to the factory antenna, the range increased enough that it buffers smoothly, but I noticed that when the stream rips in my case it does and it's ESP's fault I've analysed this before then the remote control also works unstably. The best performance I get though is when I keep that finger on the antenna then the functions from the remote read correctly every time (I looked on the serial monitor what the ESP is sending)

    Overall cool thing about this radio and it works stable on a good stream, as for me it would be enough 99 stations on one bank only what would transmit and be reliable, as you write also thought about it to rip only those popular and cool links.

    Best regards...
  • #617 21440814
    technics az7
    Level 2  
    Hello, first of all I wanted to congratulate you on a really good job with this project.
    It returns something like this
    Screenshot of system messages with information about MP3 decoding and error messages. .
    LCD screen displaying the message ODTWARZACZ PLIKÓW - LISTA KATALOGÓW 1/0 with wires in the background. .
  • ADVERTISEMENT
  • #618 21440857
    wirbud
    Level 13  
    Remote control introduced - works. However, with the screen I have a CYRK - it lives a short life with the RADIO and then flies off. It either stops with the content or goes black out. Where to look for the problem?

    #define SPI_MISO 0 - when I substituted -1 the screen would pop up quickly and a digital signal would fly in the headphones as if I were uploading a Commodore program ;-) (
    When I commented out this line it didn't compile. Can't the RESET oled be connected to the ESP32 RST ?
  • #619 21440873
    DJCheester
    Level 26  
    The input and code is correct at least by colleague robgold because I tested this one. I'm betting on a communication problem between ESP and OLED or a faulty OLED or the OLED supply voltage goes missing somewhere.

    Greetings...
  • #620 21440922
    wirbud
    Level 13  
    >>21440873 the voltage does not disappear - because however, only the frozen content lights up. Sometimes it is black.... fact. But I reset with the button and see the beautiful notes on the stave again. I'm powering the OLED from 3.3 volts - maybe that's the problem? DAC also from 3.3V. Blutooth also 3.3V although it should be on 5V.
  • #621 21440923
    DJCheester
    Level 26  
    I have a 5v OLED try it like this

    Greetings...
  • #622 21440925
    hevet
    Level 16  
    The display works from 3V3 to 5V, but if you have that much connected to 3V3 then maybe there are some momentary voltage drops. Connect under 5V.
  • #623 21440935
    wirbud
    Level 13  
    Update - I switched the voltages to the correct 5V - no change. I switch the bank and the screen goes black.....
    Or after black it woke up with such mosaics.

    Digital display with complex background showing interference in the form of a mosaic. .
  • #624 21440943
    DJCheester
    Level 26  
    Are you sure you have a well compiled batch ?

    Maybe different libraries i.e. different versions ?

    Greetings ...
  • #625 21440954
    wirbud
    Level 13  
    >>21440943 Arduino 1.8.19. ESP32 version 2.0.17 and the rest of the libraries in the Libraries directory from robgold. They should be the same - although I don't know if robgold is using 2.0.17 or already 3.0.xxx boards
  • #626 21440956
    DJCheester
    Level 26  
    On 32bit it is only 2.17 versions 3x sá up to 64bit

    I compiled on an identical environment today win7 32bit and Arduino 1.8.19 and everything works libraries also colleague robgold

    Greetings ...
  • #627 21440959
    wirbud
    Level 13  
    the situation looks like this on the table - you may notice something ;-) ....

    Electronic set on a table with wires, display, and remote control.
  • #628 21440970
    DJCheester
    Level 26  
    It's hard to make out anything in this tangle of wires, that's why I didn't do the wires as they can fail to connect, I made PCB files available in the topic. I recommend such a solution, everything works as it should, I recommend to have a good look at the connections and possibly tighten the loose wires or replace them with other ones.

    Best regards...
  • #629 21440976
    hevet
    Level 16  
    I see Chinese cables that are of poor quality. After one insertion the pins expand and then hold poorly. I make the wires myself, bought the pins and have no problems with the connections.
    Display showing Radio Yanosik Rock and the song Poison by Alice Cooper. Electronic board with multiple colorful wires and modules. .
  • #630 21440978
    wirbud
    Level 13  
    >>21440956 and do you have the libraries from the Libraries directory all copied to the Libraries directory in the Arduino? Because when I had them all it wouldn't compile for me. Same errors - duplicated libraries etc.... I only have a few left from the robgold originals - the rest from the ESP32 manufacturer in the boards directory (the one deeply hidden in the system libraries)

    Maybe something with the board settings - I've got a chcinczyk which on the engravings boasts N16R8 but from the FCsomething number there is only ESP32 ;-) OLED also from ALi - but on yoradio it was laughing perfectly.

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