logo elektroda
logo elektroda
X
logo elektroda

Internet radio and audio file player on ESP32-S3

MAJSTER XXL 235731 2552
ADVERTISEMENT
Treść została przetłumaczona polish » english Zobacz oryginalną wersję tematu
📢 Listen (AI):
  • #2521 21863571
    DJCheester
    Level 27  
    That's right, but for the time being it's complicated to solder on the PAM board and there's no way you can pull it with a path on the PCB because there's no goldpin, but those willing to experiment can practice, wire to GPIO and test.

    Greetings...
  • ADVERTISEMENT
  • #2522 21863590
    dawidkosciesza
    Level 10  
    Well, unfortunately not. But for those willing, such an option would be interesting :D
  • #2523 21863608
    kula350
    Level 12  
    Meta on the horizon. Colours on the SD card the same with VUmetr, RND, RENEWING, FROM BEGINNING AND FROM ENDING also starts from SD. Our weather, Silesian.
    This is what it looks like from SD:
    LCD module on a workbench showing “Radio Złote Przeboje” interface with weather data, audio info, and a clock Color TFT screen on a board shows MP3 playback details and a large time display reading 11:40:38. TFT module showing “Player settings” menu with shuffle and resume playback set to ON TFT screen on a circuit board shows “VOLUME: 10” with a volume bar on a purple background.

    And yes without SD colour:
    TFT screen on a circuit board shows “eM Katowice,” VU meters, MP3 settings, and time 11:47:27 LCD screen showing “Player settings” menu on a red circuit board on a workbench LCD screen showing an MP3 folder list and audio parameters on an electronics workbench
    And this is how it is set up on SD:

    Screenshot of Notepad showing xcolors.txt with UI color definitions and hex values Screenshot of Notepad showing file “vu.txt” with the number “3” typed in Notepad screenshot showing settings.txt with banks, resume, rnd, and countdown parameters

    Encoder - volume, folder list, On/Of.
  • #2524 21863670
    DJCheester
    Level 27  
    Cool kula350 will you give the code ?

    Greetings ...
  • #2525 21863968
    dawidkosciesza
    Level 10  
    I am trying to build another radio just on PAM 8406 in AB version, tomorrow I should get the parts.
    My question and at the same time request, is it a big code change to sacrifice any GPIO to control the amplifier?
    If it is not heavily complicated it would be great if someone shares their knowledge :D
  • #2526 21864002
    robgold
    Level 23  
    If you don't need an analogue output at the same time as a speaker output (and I'm assuming that's the case with all sorts of 'radio for the kitchen' projects) why not use MAX 98357A amplifiers with digital i2s input and get rid of the analogue path completely, the noise problem, the cost of PCM or if you need something more powerful then the TAS5805. This circuit can with its power amplify a room around 20m2.

    Two MAX98357A I2S amplifier modules on a breadboard with green terminals and wires.
  • #2527 21864035
    DJCheester
    Level 27  
    Robgold you have these amplifiers, the radio works on them, the next version of the PCB for the kitchen radio in my vision is to use just two of these amplifiers without the PCM5102A and are you planning STANDBY because from what I gather in these amplifiers one pin handles everything i.e. probably connected to VCC is the left channel through a 470k resistor is the right channel and pulled both to ground gives muting. Do you, and how do you think, use the mute on two boards at the same time with different voltage levels on this SD pin bodajrze pin is called. Are two MOSFETs controlled by one GPIO ?

    I have made another amendment to the version of my next PCB on the PAM8406

    And so added component values
    Added 10R resistor on PCM5102A ground
    Changed IR receiver to JST 4pin connector with one pin omitted

    I haven't added the PCB version yet because I need to number all the previous ones somehow.

    Tomorrow maybe if time permits I'll fiddle with the chokes to see if I can work something out and get less interference.

    This is how it is now in 2D

    2D PCB layout showing ESP32‑S3, PAM8406 and PCM5102A with traces, connectors and labels

    And this is how the PCB will look

    3D render of a blue “ESP32 Web Radio” PCB with labeled connectors and module footprints
    Bottom view of a blue PCB with copper traces and many vias on a wood-like textured background

    Well assembled ;)

    3D render of “ESP32 Web Radio” PCB with ESP32‑S3‑WROOM‑1, audio outputs, OLED header, PAM8406 amp Bottom view of a green PCB with many traces and through-holes, plus four gold mounting standoffs

    Any more suggestions ')

    Regards ...
  • ADVERTISEMENT
  • #2528 21864080
    robgold
    Level 23  
    >>21864035 Yes, I have, that's my photo. Such typical amplifiers for integration. No quality craze. Suitable as a sound system for kitchen, bathroom, workshop, office. It is not an amplifier for room speakers. I mean it's loud but I hear that it's not that quality. Not this dynamic range.

    You can control from one GPIO. With a 5V supply you have to keep one amp above 1.4V on the other amp above ~ 0.85V. You can't exceed Vdd but with a 5V supply and controlling from 3.3V you can hardwire one to GPIO and the other through a resistor. At 3.3V this will be RSMALL (kΩ) = 94.0 x VDDIO - 100 i.e. ~210K as the documentation confirms:
    Screenshot of a table listing SD_MODE pullup resistor values for 1.8 V and 3.3 V logic levels

    Something would have to be introduced but still working on a new "pinology".

    I still have such an "invention" with PCM5100A it should play much better quality. I will be testing it out.
    I2S Speaker Module V1 board with PCM5100A and Dual PA on white background, labeled “4Ω 2.8W D class”.
  • #2530 21864102
    DJCheester
    Level 27  
    >>21864080 This module seems to be two in one, the converter is and the amplifiers only that the input of the amplifiers analogue. I wonder how the interference will be here. Maybe factory it's less. Well, and this GPIO would be useful. In fact, if you want to save GPIO, you could connect it to the LED standby using a negator on a transistor on the PCB and then when the LED standby is on, a low state would be on the amplifiers and vice versa.

    Regards...

    Added after 1 [minute]:

    >>21864101 o and it still has jumper fields for gain. Could be an interesting solution.

    Regards...
  • #2531 21864143
    robgold
    Level 23  
    >>21864101 Interesting module only that as I wrote it is not the quality that PCM gives. Additionally, in the comments on Ali someone wrote that it heats up and I suspect why. There I think "my friend" put a 3.3V stabiliser in a SOT-23 housing to power it ...question why ? It would need to be "tuned" right away and get rid of that :)

    the @DJCheester LED Standby also has an info function, i.e. flashes during startup, flashes when there's an error, can't be used for control. For this, in case of mute it would be good to switch off the amplifier as well.

    You set the gain in MAX once with a resistor and forget it, these jumpers are cool but you set it once on individual boards and that's it.
  • #2532 21864437
    dawidkosciesza
    Level 10  
    For your information, I ordered a PAM8406 and it turns out that the version that arrived has a selectable amplifier class and shutdown and mute options.
    But no potentiometers, well something for something 😅


    Purple PAM8406 amplifier module with large capacitor on a wooden surface

    Purple PAM8406 amplifier PCB with labeled pins on a wooden surface
  • #2533 21864557
    DJCheester
    Level 27  
    The module is not very useful with jumpers for mute or shutdown, but it is a pity that it is not on goldpins. As long as the class AB /D is set once and it is ok.

    And no potentiometers.

    The one with potentiometers remains for now.

    Greetings....

    Added after 2 [minutes]:

    Question did you use a red diode (1.8v) as a power LED what resistor did you put in series ?

    And did you give the switch power to ground only or did you still put a 100nf capacitor in parallel as protection against switch contact vibration.

    Regards ...

    Added after 2 [minutes]:

    If we change the amplifier then to this

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

    It has a gain pattern which will adjust the signal level.

    And the pcb5102A will remain as a line-out.

    Regards...
  • ADVERTISEMENT
  • #2534 21864688
    dawidkosciesza
    Level 10  
    DJCheester wrote:
    Question did you use a red diode (1.8v) as a power LED what resistor did you put in series ?

    And did you give the switch power to ground only or did you also put a 100nf capacitor in parallel as protection against switch contact vibration.


    I gave, from what I remember, a 1k resistor to light the diode gently.
    I didn't give any capacitor and so far everything works in my father-in-law's :) but it is maybe a good idea ;)

    As for these jumpers, I think it's already a cool solution. Of course goldpins would be better, but I guess soldering one wire to a jumper is something everyone can handle :D

    I gave up and didn't order the OLED screen from our colleagues in the East in a hurry.... Also I will have no way to test this amplifier well without a screen :(
  • ADVERTISEMENT
  • #2535 21864729
    simw
    Level 27  
    DJCheester wrote:
    He has on gain patterns which will adjust the signal level.
    And pcb5102A will remain as line-out.

    In yoRadio the number of volume levels is 255, maybe you just need to scale the EvoRadio to use only part of the gain. After all, PCM has a wide range of 2V RMS.
  • #2536 21864736
    robgold
    Level 23  
    >>21864729 And I will insist, that in Evo just turn on the option "Extended Volume Range" in Settings and we have a range of 42 steps. Really with the current audio library (3.4.5) where the volume is very logarithmically set all sorts of potentiometers on the amplifier make no sense at all but what do I know ;)

    255 in yoRadio I guess someone really wanted to use the whole byte and felt sorry to leave the bits empty :D
  • #2537 21864853
    simw
    Level 27  
    robgold wrote:
    Evo just turn on the "Extended Volume Range" option in Settings and we have a range of 42 steps

    Well I won't insist, but "extended" is, in the case of some amplifiers, unfortunately just "fudging" the issue. :) Unless I don't understand this solution.
    What if we extend the range and only operate on part of it, if sooner or later, someone gives too loud.
    What if, then, we introduce an additional limit in the form of MAX_VOLUME, which is defined by the user, e.g. at 13, which with an extended "Extended Volume Range" of 42 would give additional flexibility. I have checked, for PAM and PCM a divider instead of a potentiometer is sufficient and the gain control already does ok for my case. With the introduction of MAX_VOLUME the topic already disappears quite a bit, but as I wrote I will not insist, maybe it is just a "philosophy" for me.
  • #2538 21864872
    robgold
    Level 23  
    >>21864853 I don't really understand how you want to map 13 volume points to 42 points going in 1 point steps. In the case of 42 points you have as you would have adjustments every 0.5 at 21. It is already possible to set very quiet even stations transmitting at the limit of max vu and with the new library this adjustment works great.

    Tell me your problem with this regulation, because in my case the DAC plugged into the TAS or TPA3116 turned up to the maximum works perfectly. I can't imagine what is happening with this PAM.
  • #2539 21864874
    DJCheester
    Level 27  
    I am simply missing a resistive divider or potentiometers on the PCB and complain that the full volume we get depends on which station 6-8 rather than 21.

    I don't mind, but the new PAM8406 has potentiometers and everyone can turn them so that 1-21 coincides with min-max volume.

    I, for example, listen to stations with quiet transmissions and the audio indicators are up to 1/3 max, so I can easily adjust them to half scale.

    Regards....
  • #2540 21864880
    robgold
    Level 23  
    >>21864874 All the more reason to recommend the new library 3.4.5. It should solve the problem. It appears that this PAM has too much input gain.
  • #2541 21864887
    DJCheester
    Level 27  
    That's right, if it bothers someone a lot then you need to add 4 22k resistors two in series to form two dividers for the audio signal and you should have coverage of the entire strip 1-21.

    Regards...
  • #2542 21864901
    simw
    Level 27  
    robgold wrote:
    I don't really understand how you want to map 13 volume points to 42 points

    I think I used that "mapping" over the top.
    I meant something more straightforward.
    Since the maximum volume can be either 21 or 42, and at 13 we already have "cringing on the PAM, no potentiometer", when MAX_VOLUME = 13 the endcoder creation will only be in the range 1-13, which will not overdrive the power amplifier.
    By default, of course, MAX_VOLUME would be either 21 or 42, depending on the player settings.
  • #2543 21865242
    dawidkosciesza
    Level 10  
    I have assembled a circuit based on the PAM8406 in AB calsa and am very satisfied. The noise is almost inaudible at vol 1.
    I have only tested with a 2.08 inch screen. Unfortunately I do not currently have a larger one.
    I also soldered a wire to the SHDN input and it works great when it gets a LOW signal. Now I'm just waiting with a big request to @robgold to put such a possibility in the new software version and I'm already mega happy :D
    Small speaker and amplifier board with connected wires on a wooden tabletop Small OLED display reads “webradio 1 Vol 4”, connected by a ribbon cable to a board on a table.

    I think this is the best solution so far for using the project as a small "kitchen" radio ;)
  • #2544 21865276
    DJCheester
    Level 27  
    OK and you can see if you have ground or power on leg 9 because this is the mode of operation according to the pdf LOW is class AB high is D.

    Because on these modules what I recently ordered

    Blue audio amplifier module with PAM8406 IC and labeled input, output, and power pins

    There seems to be a 9th leg with mass.

    So it would appear that it is working here as an AB ?

    I will physically check this tomorrow.

    Greetings ...
  • #2545 21865416
    dawidkosciesza
    Level 10  
    I, via a jumper, have ground on pin 9 now. That is, the AB mode.
    It looks like your circuit is also working on AB. You would have to check with a meter because you can't quite see it on the picture.
    I chose this circuit because it seemed more decent. I think it has more filters, that big capacitor encouraged me the most 🤣even the speaker output has some filter elements.
    Purple audio amplifier PCB with IC, 1000µF 16V capacitor, IN pads, and L/R speaker output terminals
  • #2546 21865417
    dawidkosciesza
    Level 10  
    I, via a jumper, have ground on pin 9 now. That is, the AB mode.
    It looks like your circuit is also working on AB. You would have to check with a meter because you can't quite see it on the picture.
    I chose this circuit because it seemed more decent. I think it has more filters, that big capacitor encouraged me the most 🤣even the speaker output has some filter elements.
    Purple audio amplifier PCB with IC, 1000µF 16V capacitor, IN pads, and L/R speaker output terminals
  • #2547 21865423
    DJCheester
    Level 27  
    And see as I was browsing the listings it said Class D by default dealers can see they are writing silly things.

    Tomorrow I will check it with a meter and wire it instead of the PAM8403 because I already have this module and compare.

    I have such a capacitor on the main PCB 1000uF and on the output to the speakers there are only capacitors at your place and chokes in series would be useful, as time allows I will see and experiment with this amplifier.

    Regards...
  • #2548 21865565
    supsak
    Level 12  
    Hi. On my amplifier the leg of pin 9 - PAM8406 is not connected neither to + field nor to ground. It is vol

    Circuit board labeled “ESP32 Web” with ribbon cable, microSD slot, and a connected USB cable
  • #2549 21865613
    DJCheester
    Level 27  
    Every Chinese is probably different, as with these dimensions from the PAM8403 modules. Well nothing, I'll measure on mine tomorrow if not then you'll have to lift it up on your own and hook it up with the ground according to the documentation.

    https://docs.rs-online.com/7c06/0900766b81268cf8.pdf

    I'll get around to checking it tomorrow as time permits.

    Regards...
  • #2550 21865827
    pipikupi1979
    Level 10  
    >>21863127 hello. Yes I agree this pcm is not complicated only as it turned out the boards are messed up on the ground these small for example resistors should be 100om and they are 10k capacitors mixed up with the values as they fall. I fought with this topic for a few days letting the input signal 3khz and nothing on the output then I corrected the code and nothing and then it turned out that when I started checking the components on the board and replacing them with the right ones it worked from the start, only the filter on the input cut out everything at about 700hz upwards so there was no chance of anything going through. I have now ordered a large board which supposedly doesn't have this problem but whether it does or not I am considering an ws8782 on the input but that remains to be seen for now I have a 10 band dsp equalizer skeleton on a peaking IIR I am waiting for the pcm1808 and ws8782 to arrive and we will see what happens next. Nevertheless, thanks for your interest
📢 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