Building An Internet Radio Is Quick And Easy With The ESP32

Terrestrial radio is all well and good, but it limits you to listening to local stations. [Nick Koumaris] lives in a small town in Southern Greece, and his favorite stations sadly don’t transmit in his area. Thus, an internet radio was the natural solution.

[David Watts] did a similar build, throwing the hardware inside a stunning Roberts RM20 radio from the 1970s.
While a Raspberry Pi is a common way to go in these situations, an ESP32 has enough grunt to do the job without the long boot times that come with running a full Linux distribution. Combined with a VS1503 MP3 decoder board and a PAM8403 amplifier, it’s more than capable of tuning in streams online. [Nick] went with a retro-look interface on an LCD, using a Nextion part for its onboard controller and in-built GUI tools. Taking inspiration from the project, [David Watts] executed a similar build, but instead used an Arduino Nano to interface the controls on a vintage Roberts RM20 radio instead.

While we’ve all got smartphones we can use to listen to content online, it can be nice to use a device that allows us to put on some music without constant notifications and chimes every time an email comes in or a government scandal erupts in a nearby country. When building your own radio, you can tailor the interface to suit your tastes – like this build that lets users scan the globe for a station to listen to. Video after the break.

20 thoughts on “Building An Internet Radio Is Quick And Easy With The ESP32

      1. But with a setup not much more complicated than the one he made, you could connect to a node, if there was one in the transmitter’s coverage area that does the FM broadcast band. Hmm..

    1. That’s true. But there isn’t a huge amount of music on shortwave radio and the sound quality is often lacking. (I admit that the situation is even more bleak in the US than in some other parts of the world; nobody is targeting us with shortwave broadcasts any more because there are so few listeners.) A much wider range of music is available on the internet and the sound quality is usually better.

      I’m not trying to discourage anybody from trying out shortwave, or amateur radio for that matter. But if your goal is to listen to music and you have a reliable internet connection available (it doesn’t need to be super-fast), building this project is likely a better choice.

    2. Congrats for the ATS-909 and sorry for the FT-817.
      Maybe you’ll somewhen get hands on a real TRX also, like an FT-101, TS-50 or an FT-857D.
      Or a homemade / pre-assembled CW-TRX like the Pixie.;)


  1. the sad thing is that most internet radio stations (and on air digital stations in australia, where the default standard was very low) are worse quality than my radio with a good fm antena..
    Though I agree that if you can’t get fm internet radio is the way to go!

  2. I think you’ve buried the lead, here, in a major way. I have no interest in making Internet radios, so I almost skipped this article completely. But I saw the radio’s user interface display, which was far beyond what I expect to see for projects using anything lesser than a Raspberry Pi as its brain. Which is lucky for me, because it prompted me to watch the video.

    The magic here is in Itead Studios’ “Nextion” display. Nextion is a touchscreen TFT LCD with a built-in 32-bit microcontroller, a microSD slot, and a serial interface. The developer uses the Nextion “editor” (actually a sort of IDE), which allows her to add controls and test them on its emulator. When she’s satisfied with the emulated results, she then transfers the files generated by the editor to a microSD card, plugs it into the Nextion, and powers it up. This prompts the Nextion to flash itself from the code on the microSD card. The card is then removed and the Nextion power-cycled, which causes the Nextion to run the flashed code. Its 9600 bps serial port then sends messages over the serial port as the user operates its controls, and updates fields and pages as it receives messages over that same port.

    This is a game changer! It means that simple projects using microcontrollers that don’t have enough memory to refresh and maintain their own Graphical User Interface are no longer limited to pushbuttons, rotary encoders, and HD77140 text displays.

    Turns out to be the coolest project of the week, even though I had no interest in it.

    1. Not really a game-changer – there have been display submodules around like this for ages. Look for ‘gpu usart’ on aliexpress – or there are more complex ones by the likes of 4D systems.

      1. Changes the game for ME, anyway. I searched on HaD for other projects using this sort of thing, and came up with several, none of which showed the user interface in their banner pics, nor were they otherwise interesting to me. So I had no idea that for little more than the price of a bare LCD, you could have a whole GUI system. I’m a little disappointed – how would I even imagine to search for “gpu usart”, if I was looking for such a thing?

    2. Some industrial displays (hmi panels) have a similar interface. Althought finding documentation on exactly how they work aren’t always easy, and the development softwares are usually propiretary. Sometimes you can get demo versions that work though. They often cost more than a decent laptop, but I was lucky and got a few surplus displays for free.

      1. Yes, okay, these HMIs are basically single-board computers with touchpanel LCDs, which is why they’re priced the way they are. I’ve known ever since the Raspberry Pi came out, that there was an under-$100 solution for adding graphical user interfaces to microcontroller-based projects. But that’s still way too expensive – I don’t want to spend $80 to add a display to a $20 project. The ones I’m talking about here, the “gpu usart”, or Nextion displays, use a single chip microcontroller with the LCD panel driver built-in. A 3.4″ 480×320 Nextion module goes for about $23. Which is barely more than what you can buy the bare LCD itself for.

  3. Curious if anyone has used the A1S ( without the carrier board to build any audio streaming devices?

    I’m thinking of all the speakers with 30-pin iPod/iPhone docks built in that are now “useless”, and wondering how hard it would be to put a bare A1S on a tiny carrier (voltage regulator and pin routing, and not much else) connected to a 30-pin female connector. I have confirmed that the bare module has line outs, that the dev kit then amplifies for speakers, so that part should be fine.

    The main question remaining is what sort of quality the A1S would output, and how much CPU it would need to do it. Does the A1S include e.g. an MP3 decoder, or an I2S decoder, or is it just using the built-in D to A converter?

    1. The linked board is part of espressif’s dev board line, you van did a full schematic on their website. Yes, it has a codec. There are a number of similar devices in the same domain which use this part number – be careful if buying from ali express etc. That you are getting the “Right” thing.

  4. You actually can do this without the vs1053. The esp32 has more than enough grunt to do the mp3 decoding on the fly from a web stream. All you need is a suitable i2s DAC and you are on your way.

    This is still a good project imo, but the vs1053 is likely a result of porting some code from an esp8266 solution.

    1. Actually, you can go “one step beyond”, skip the dedicated I2S DAC, and abuse the internal dual DAC. Sure, 8-bit audio sounds a bit gritty, but does the trick. Alternatively, one could use PDM and a low-pass filter (all implemented in earlephilhower/ESP8266Audio ‘s library, including decoding of also AAC and FLAC!)

      Now, if I could only get rid of some buffer-underrun-related bugs…

Leave a Reply

Please be kind and respectful to help make the comments section excellent. (Comment Policy)

This site uses Akismet to reduce spam. Learn how your comment data is processed.