ESP32 Internet Radio Update

ESP32 Internet Radio Update

Dear friends welcome to another video! This is Nick from and today I am
going to show you the updated version of the ESP32 Internet radio. Let’s get started! A few weeks ago, I built this Internet radio
device using an ESP32 board and an MP3 decoder module. You can check the detailed video of this project
by clicking on the card here. The project was working great but there were
a couple of issues that were bothering me. First of all, I was not satisfied with the
sound. There was a lot of noise in the audio signal. Check it out: …………………..
The noise is very loud. After searching for a solution a discovered
that the problem can be solved with a 50 cent part, an Isolation Transformer, this little
part here. You can find a link it in the description
of the video below. A transformer is an electrical device that
allows an AC input signal (like audio) to produce a related AC output signal without
the input and output being physically connected together. The isolation transformer has the same number
of windings on each coil. As the impedance is identical for the primary
and secondary coil, the signal level does not change, so it allows an audio signal to
pass unmodified from the primary to the secondary coil while blocking DC voltage and radio frequency
interference. That’s it! Goodbye noise! All we have to do is to connect the Isolation
Transformer here, at output of the audio signal of the MP3 decoder module. Let’s now hear the sound of the project
after adding the transformer: ……………… The noise is gone! Great! You can find the updated schematic diagram
in the description below. So, the project structure is now like this:
The ESP32 gets data from an Internet Radio stream, and it sends the data out to the MP3
decoder module. We then clear the audio from noise using the
Isolator Transformer. The noise-free sound is then sent to the amplifier
and lastly to the speaker. Now we have clear sound at the speaker! Cool! After fixing the noise issue, I modified the
code to save the radio station we are listening to after 1 minute to the FLASH memory of the
ESP32 board. This way, the next time we power up the project
it will remember the radio station we were listening to and we won’t have to tune in
again. For this I am using the EEPROM library and
it works great! I have also made some minor changes to the
code and it now works with the ESP32 V1.02 package for the Arduino IDE. As always you can find the code of the project
in the description of the video below. The electronics and the software are ready. Now I have to work on the enclosure of the
project which is going to be similar to this impressive Art Deco Radio. I can’t wait to see this project completed! I am really excited about this project. I will see you soon! If this is your first time here, I would love
to have you subscribed. In this channel, I post videos about DIY projects
twice a month. I love making things, and I believe that anyone
can make things, anyone can become a maker. That’s why I created this channel, to share
my knowledge with the community and learn from the community. I hope you will join us. I will see you in the next video!

41 thoughts on “ESP32 Internet Radio Update

  1. For stereo channels can we use two isolation transformers? And one questions out of topic, isolation transformers can reduce noise from bad computer mics?

  2. PAM8403 doesn't require a transformer, as it can drive 4 and 8 ohm speakers directly!
    Aren't these transformers for impedance matching?
    I am not into audio and amps, but it looks to me like output filtering stage is not working well.
    A Class D amp requires excellent LC filtering.

  3. Φίλε είσαι από Αθήνα…Αν είχες 95.2 Athens DJ θα φαινόταν ωραίο το βίντεο τώρα με το Real FM του Χατζηνικολάου χαλάει λίγο… Αυτό όμως είναι μικρολεπτομέρειες… Συγχαρητήρια για το project..

  4. Hi, great radio indeed. However, I would love to see a project in which you transform an ordinary cheap A4 Laminator into a toner transfer laminator machine for using into making PCB's @ home (very cheap and quick). The ideal temperature for the heated silicone rollers is around 160-180 degrees Celsius and you need to somehow reduce the speed off the synchronous AC induction motor (Ex. by changing the frequency between 30 to 90 Hz and a duty cycle of around 40-50%.) The above project would work nice with a small OLED I2C style and a rotary encoder. It would be nice to see the code needed for such a project. Tnx.

  5. Another Great video. I am gathering parts for this project but in the meantime I triedto compile your latest code and I ran into problems with the libraries. I read somewhere that ALL libraries should show source so there is no problem with possible multiple libraries like I'm running into. Like you did withe the VS1053 library. This isn't a negative comment, just a suggestion to help us use your code better.

  6. Nice video, greetings from Bulgaria. Can you make a video with esp32: How to make a wireless button counter (or a human counter) and show the increasing result on a C # desktop application. Thank you!

  7. Why you using external MP3 decoder if ESP32 have lot of power to decode it itself and also it can support AAC or OGG formats as-well ?

  8. This is not isolating transformer, this is a step down trans to perform level shiffting. Signal, that output from mp3 decoder is too high.

  9. I have been working with your sketch without the display but with same looking speakers and same amplifier board. Mine speakers are least expensive I could buy. I also experience what I characterize as high frequency "sizzle". I don't hear it in larger, higher quality speakers. Is it the transformer inductance, rather the the pri-sec isolation, that affects the reduction in high frequency noise? Thank you. Your presentations are easy to understand and follow.

  10. Hi,
    You may be happy to hear that we have designed the perfect pcb for this internet radio.
    You can find it here:
    Let me know what you think!

  11. I was able to get past my library poblem of last week , I had dowmloaded 2 of the VS1053 libraries and the compiler was confused, When I deleted one of the copies, the problem went away.

    I'm able to connect to the stations BUT line 123 of the.ino
    if (client.available() > 0)


    uint8_t bytesread =, 32);

    player.playChunk(mp3buff, bytesread);

    I'm ALWAYS coming up with a 0 and its doesn't play anything, just loops., I've tried several stations and they all give the same result. Any Ideas?

  12. In the void IRAM_ATTR NextButtonInterrupt() I was able to get the station up to 4? should only go to 3, I think in your check if(radioStaion<4) should be <3 . Maybe add a variable such as numberOfStations = X, then can use that variable rather that remembering the index number. Example: If(radioStation<(numberOfRadioStations-1)); also char *host[numberOfStations] =, then when adding stations only have to worry about changing 1 variable.

  13. Some of the stations don't come in. When I move closer to the router (increase WiFi Strength) they start to play. They connect OK but do not pass the if(client.available () > 0) test. It just keeps looping and not playing anything until this test passes, no error message?

  14. my esp32 board seems to be OK as the blink sketch works, but when I upload this sketch and check out the Serial Monitor I find that the board connects to the wifi, but then reboots repeatedly. I don't understand the error messages

    WiFi connected

    readFrequencyFromEEPROM(): 65535

    Guru Meditation Error: Core 1 panic'ed (LoadProhibited). Exception was unhandled.

    Core 1 register dump:

    PC : 0x400f2bb8 PS : 0x00060230 A0 : 0x800f2ce8 A1 : 0x3ffb1e50

    A2 : 0xfefefefe A3 : 0x3ffb1e9c A4 : 0x400d2a4c A5 : 0x3ffb1ed0

    A6 : 0x00000002 A7 : 0x3ffb8504 A8 : 0x00000000 A9 : 0x00000000

    A10 : 0x00000000 A11 : 0x3ffb8058 A12 : 0x00000001 A13 : 0x00000001

    A14 : 0x00060220 A15 : 0x00000000 SAR : 0x0000000a EXCCAUSE: 0x0000001c

    EXCVADDR: 0xfefefefe LBEG : 0x4000142d LEND : 0x4000143a LCOUNT : 0xfffffff9

    Backtrace: 0x400f2bb8:0x3ffb1e50 0x400f2ce5:0x3ffb1e70 0x400d2b7c:0x3ffb1e90 0x400d239f:0x3ffb1ed0 0x4013ec59:0x3ffb1f00 0x400d1b37:0x3ffb1f20 0x400d1c21:0x3ffb1f60 0x400d44c9:0x3ffb1fb0 0x40088a29:0x3ffb1fd0


    Anyone else having the same problem?
    thanks in advance

  15. I am enjoying playing this very much and am looking forward to making an enclosure. But I have only been able to work out the details for a few stations (mostly Shoutcast) I can't get bbc stations to play at all. Does anyone know how to play BBC radio stations?

  16. There is no transformer needed with a special trick:
    use the GBUFFER output of the VS1053 and the VREF input of the PAM8403:
    Result: Not even a hiss a click or something else, just crystal clean sound.
    But you need to desolder the PAM Chip and lift one pin (VREF)

  17. Another trick (VS1053 only – not VS1003!):
    You can use the stereo inputs as digital mixer for external sources like a bluetooth module. Google for "Plugin: admix right" you can download on the VS homepage.
    This is – more or less – the code:

    musicPlayer.setVolume(main_volume, main_volume);

    musicPlayer.applyPatch(plugin, PLUGIN_SIZE);// Add here …

    musicPlayer.sciWrite(VS1053_SCI_AIADDR, 0);

    musicPlayer.sciWrite(VS1053_SCI_AICTRL0, 1024); // mittelwert

    musicPlayer.sciWrite(VS1053_SCI_AIADDR, 0x0f00);

    encoderMIN = 0;

    encoderMAX = 64;

    encoderpos = 128;

    buttonflag = 0;

    while (!buttonflag) {

    if (encflag) {
    // setup volume
    encflag = 0;

    musicPlayer.sciWrite(VS1053_SCI_AICTRL0, 128 + 64 + encoderpos);




    #define PLUGIN_SIZE 105

    const unsigned short plugin[105] = { /* Compressed plugin */


    0x0007, 0x0001, 0x8f00, 0x0006, 0x0064, 0x2803, 0xc2c0, 0x0030, /* 0 */

    0x0697, 0x0fff, 0xfdc0, 0x3700, 0x4024, 0xb100, 0x0024, 0xbc82, /* 8 */

    0x3c00, 0x0030, 0x1297, 0x3f10, 0x0024, 0x3f00, 0x0024, 0x2803, /* 10 */

    0xc540, 0x0003, 0xc795, 0x0000, 0x0200, 0x3700, 0x4024, 0xc100, /* 18 */

    0x0024, 0x3f00, 0x0024, 0x0000, 0x0040, 0x0004, 0x07c1, 0x0003, /* 20 */

    0xc7d5, 0x0030, 0x1097, 0x3f70, 0x0024, 0x3f00, 0x4024, 0xf400, /* 28 */

    0x5540, 0x0000, 0x08d7, 0xf400, 0x57c0, 0x0007, 0x9257, 0x0000, /* 30 */

    0x0000, 0x3f00, 0x0024, 0x0030, 0x0297, 0x2000, 0x0000, 0x3f00, /* 38 */

    0x0024, 0x2a08, 0x2bce, 0x2a03, 0xc80e, 0x3e12, 0xb817, 0x3e14, /* 40 */

    0xf806, 0x0030, 0x0317, 0x3701, 0x3804, 0x0030, 0x1117, 0xf148, /* 48 */

    0x1c06, 0x0030, 0x1293, 0x2803, 0xcad1, 0xa64c, 0x0024, 0xf168, /* 50 */

    0x0024, 0x464c, 0x0024, 0x3b11, 0x8024, 0x3b01, 0x9bc4, 0x36f4, /* 58 */

    0xd806, 0x3602, 0x8024, 0x0030, 0x0717, 0x2100, 0x0000, 0x3f05, /* 60 */





  18. Please create a PCB for this project. Please also include free pin outs on the PCB. Then we can order, with parts from LCSC and have a complete device to tinker with.

Leave a Reply

Your email address will not be published. Required fields are marked *