Live 1057

Free Internet Radio Stations
ESP32 Internet Radio project with A 3.5″ Nextion Display

ESP32 Internet Radio project with A 3.5″ Nextion Display


Dear friends welcome to another project video! Today we are going to build an Internet Radio
device with a big 3.5” display using an inexpensive ESP32 board. Believe it or not, we can now build an Internet
Radio in less than 10 minutes and with less than 30$. There is a lot to cover so, let’s get started! Hello, guys, I am Nick and welcome to educ8s.tv
a channel that is all about DIY electronics projects. In this channel, I share everything about
the projects I build to help you develop similar projects or inspire you to start making things
because it is easy, fun and creative. Subscribe to the channel now if you do not
want to miss any future video. A few months ago, I completed this FM Radio
project which works great and looks even better in my opinion. If you want to see how I built this project
you can click on the card here. The problem is that, although this radio looks
cool it is not practical because I live in a small town in southern Greece and the big
Greek radio stations I prefer to listen to, do not have transmitters around here. So, I listen to my favorite radios online
on my laptop or tablet pc which is also not so practical. So, today I am going to build an Internet
radio device in order to be able to listen to my favorite radio stations from all over
the world! As you can see, a first version of the project
is ready on a breadboard. Let’s power it up. As you can see the project connects to the
Internet and then streams music from predefined Radio Stations. Let’s listen to it for a few seconds.…………..I
have tuned in to the Real FM radio station from Athens and by using these buttons we
can change the Radio Station we are listening to. I have saved my favorite radio stations to
the memory of the ESP32 so I can access them easily. With this potentiometer, I can change the
volume of the speaker. I display the Name of the Radio Station we
are listening to on a big 3.5” display with a retro User Interface. The project works fine and it is very easy
to build. You can build the same project in less than
10 minutes but you need to have some experience. If this is your first project, consider building
a simpler one first, to gain some experience. Check my channel for simple project ideas
and when you are more comfortable with the Arduino the electronics come back to build
this cool project. Let’s now start building our own Internet
Radio. We are going to need the following parts:
• An ESP32 board • A VS1053 Decoder module
• A 3.5” Nextion display • A PAM8403 amplifier module
• One or Two 3W speakers • Two push buttons
• A Breadboard • Some wires
The total cost of the project is around 40$ but if you don’t use a display the cost
of the project is around 20$. Amazing stuff. We can build our own Internet radio with just
20$! You can find links to all the parts I use
in the description of the video below. The heart of the project is, of course, the
powerful ESP32 board which offers Wi-Fi connectivity and a lot of memory. As you can see from the specs, the ESP32 is
a beast and it costs around 7$! The ESP32 board connects to the Internet and
then it receives MP3 data from the radio station we are listening to. The MP3 data is then sent to the MP3 decoder
module using the SPI interface. This module uses the VS1053 IC. This IC is a dedicated hardware MP3 decoder. It gets the MP3 data from the ESP32 and converts
it really fast into an audio signal. The audio signal that it outputs at this audio
jack is weak, so we need to amplify it. That’s why I am using a PAM8403 audio amplifier
to amplify the audio signal and then send it to a speaker. I have also connected two buttons to the ESP32
just to change the MP3 Stream we are getting data from and a Nextion display to display
the Radio station we are listening to. I chose to use a Nextion display for this
project since it is very easy to use. We only need to connect one wire to control
it. The Nextion displays are new kind of displays. They have their own ARM processor at the back
which is responsible for driving the display and creating the graphical user interface. So, we can use them with any microcontroller
and achieve spectacular results. I have prepared a detailed review of this
Nextion display which explains in depth how they work, how to use them and their drawbacks. You can watch it by clicking on this card. All we have to do now is to connect all the
parts together according to this schematic diagram. You can find a link to it in the description
of the video below. The connection is straightforward. There is one thing to note though. The MP3 decoder module outputs a Stereo Signal
but I am using only one audio channel in this project. In order to get the audio signal, I connected
an audio cable to the audio jack of the module, and cut it to reveal four wires inside. I connected two of the wires. One of them is the GND and the other one is
the audio signal of one of the two audio channels. If you wish you can connect both channels
to the amplifier module and drive two speakers. To send data to the display, we only need
to connect one wire to the TX0 pin of the ESP32. After connecting the parts, we have to load
the code to the ESP32, and we have to load the GUI to the Nextion display. To load the GUI to the Nextion display, copy
the InternetRadio.tft file I am going to share with you to an empty SD card. Put the SD card into the SD card slot at the
back of the display. Then power up the display, and the GUI will
be loaded. Then remove the SD card and connect the power
again. After successfully loading the code, let’s
power up the project. It displays the text “Connecting…” for
a few seconds on the display. After connecting to the internet the project
connects to a predefined radio station. The hardware is working as expected but now
let’s see the software side of the project. First of all, let me show you something. The code of the project is less than 140 lines
of code. Think about it, we can build an Internet Radio
with a 3.5” Display with 140 lines of code, this is amazing. We can achieve all this using various libraries
of course which contain thousands of lines of code. This is the power of Arduino and the Open
source community. It makes things easy for makers. In this project, I am using the VS1053 library
for the ESP32 board. At first, we have to define the SSID and the
Password of the Wi-Fi network. Next, we have to save some Radio Stations
here. We need the host URL, the path where the stream
is located and the port we need to use. We save all this info into these variables. I have included 4 radio stations in this example. In the setup function we attach interrupts
to the buttons, we initialize the MP3 decoder module and we connect to the Wi-Fi. In the loop function, first of all, we check
if the user has selected a different radio station than the one we are getting data from. If so, we connect to the new radio station
else we get data from the stream and send them to the MP3 Decoder module. That’s all! When the user presses a button, an interrupt
happens, and changes the value of a variable which tells which stream to connect to. To update the display, we simply send some
commands to the serial port. Now let’s take a look at the Nextion Display
GUI. The Nextion GUI consists of a background picture
and a picture which displays the name of the Radio Station. The ESP32 board send commands to change the
name of the radio station from the embedded images. It is very easy. Please watch the Nextion display tutorial
I have prepared some time ago for more information. You can quickly design your own GUI if you
wish and display more things on it. As always you can find the code of the project
in a link in the description of the video. This project is very simple. I wanted a simple Internet Radio project skeleton
to work with. Now that a first version of the project is
ready we can add many features to it to improve it. First of all, I need to design an enclosure
to house all the electronics. In this book about the Most Beautiful Radios
ever made there are very cool radios to choose from as an enclosure for this project. I think I am going to build an enclosure around
this spectacular Art Deco radio. What do you think, do you like the looks of
this radio or do you prefer something more modern? Do you have any other enclosure ideas? Also, do you like this Internet Radio project
and what features do think we need to add to it to make it more useful? I would love to read your thoughts and Ideas
so, please post them in the comments section below. 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!

68 comments on “ESP32 Internet Radio project with A 3.5″ Nextion Display

  1. Premieres are the worst thing ever. Viewers are filled with excitement that a new video is up, only to be disappointed. Please do not do this again.

  2. "build an Internet Radio in less than 10 minutes and with less than 30$" ?
    Or download an app on your phone for free! I am not even sure people listen to Radio these days! Full of bullshit ads.
    Why not projects that are actually useful? Like using multiple ESP32 modules for home automation, using an MQTT broker like Mosquitto, that is secured will SSL, so it can be accessed from the internet?
    Not doing what other YT'rs like GreatScout do but a bit different! He showed how to build this Internet Radio many months ago.

  3. The premier feature seems annoying and mostly useless. YouTube isn’t TV. I don’t tune in at a certain time to watch a certain show. I watch when it is convenient for me. I could have watched this video if it had been posted normally. Because it is a premier I can’t watch it now. I suppose I may see it again once it is actually live, but since I’ve already seen it posted I may think I’ve already watched it and miss it. I just don’t see the point of this feature. It doesn’t work with my YouTube viewing style.

  4. Nick – you do not deserve all these negative feedbacks. Keep the videos coming.
    Nextion was used to display the status/radio station name for now? It would be great if a Potentiometer controls the radio channels on nextion ( lots of images )

  5. Nextion display has touch screen functionality so why you did not designed Graphical User interface(GUI).
    What's your idea about make a project about Graphical User Interface(GUI) using Nextion display?

  6. Brilliant project- thank you Nick. I can’t wait to build it. I have learned so much from your videos and I love your enthusiasm for sharing your knowledge. Keep up the great work. 👍

  7. "…with less than $30." I ws thinking that sounded great. Nextion displays are usually costly. Checked the link for the display. Uh, no. The display alone is $33. Using the links above the total cost is a bit more than $50. Oh well.

  8. A more compact version could be made using an oled display to make a pocket radio. Would this involve much in the way of changes to the code?

  9. Please keep is updated with how you get on coupling the vs1053 to the amp and finding a practical power supply for the finished product.
    The ground connection of the vs1053 headphone socket is not at zero volts but somewhere between zero and the supply voltage. So far I've completely failed to successfully couple my vs1053 to a digital amp and power them both from the same supply without instability.

    Nice project though. Good luck.

  10. Fascinating! I hope when you finish this you'll présent a more seriously retro version without the screen, but a big rotary tuning dial turning à pot. I reckon you could distinguish about 32 favourite stations, more than enough for me! I'd love the speaker to drive a wooden exponential horn, but that would take about 100 times as long to build. …. looking forward to the next episode, thanks.

  11. The PACIFIC “Elite” New Zealand looks like an awesome design to replicate! But of course, full disclosure, I’m a Kiwi. 🙂

  12. About the noise problem: It seems that some guys have managed to solve the noise issue. We can either use an Isolator Transformer or BA3121 isolation amplifier. I just ordered the parts to try them. I will keep you updated. More info here: https://github.com/Edzelf/ESP32-Radio/issues/66

  13. Hi Nick, this is not about ESP32 but the new , revised BrainPad by Gus Issa at GHI. Do you have one? Have you reviewed it? I am not a seller but interested in eduC8ting kids in coding. I have watched your Micro.Bit vids on this channel: well done ! If you can get a BrainPad and review it, that would be great. If you want further info; leave me a comment on my MakeCode and Hardware Channel or MakeCode on Reddit. Thanks for all you do . Frank

  14. Try adding touchscreen functionality of display used and instead of four predefined radio channels make some arrangement in the code that user-defined channels could be added even if has to be connected to pc for placing channels. hopefully, if its available from the radio itself to customize the channels then boom it will definitely be a very usable project

  15. Ok, the display show's only pictures. It could be better it will show the station and song name as text. Also a cover picture from the band that played if the radio station submit it.
    But this is a really cool thing!

  16. Was ESP8266Audio not an option in this case? (Works for the ESP32 as well) Was there a performance reason to use a hardware decoder?

  17. Hi Nick, I love your videos. I can see you're a very good teacher.
    I'd like to suggest if it would be possible to do the same project on stereo
    and using the bluetooth feature of the ESP32. It would be great for old people,

    I'd like to make a tango radio to my 92 year old step mother. It would give
    the feeling of a old radio but using the wifi.

  18. Πολύ καλή δουλειά, γίνεται να κατασκευαστή διπλό ? δηλαδή fm ράδιο και ίντερνετ ράδιο?

  19. Could you please tell me why u used external buttons when nextion is a touch display and u can used instead of those external buttons?

  20. Τελείως άσχετο με αυτό το βίντεο (απλά αυτό βρήκα ως το πιο πρόσφατο…) Με βοηθάει πολύ το κανάλι σου και η ερώτηση μου είναι αν γνωρίζεις καποια κοινότητα στην Ελλάδα που να ασχολείται με Arduino και η οποία να είναι ανοιχτή σε καινούργια μέλη και αρχάριους

  21. It would be awesome to create 2 virtual buttons on the Nextion display instead of physical buttons. That's something I have on my learning 'todo' list 🙂 Thanks for sharing!

  22. Hi I like all your videos! Can you make a Review about this smallest fingerprint module? It's R551 from Ali express.

    https://m.id.aliexpress.com/item/32884153429.html?pid=808_0014_0101&spm=a2g0n.search-amp.list.32884153429&aff_trace_key=907500bf6b41484bba7529b1cb6cc279-1547771003972-08376-UneMJZVf&aff_platform=msite&m_page_id=3446amp-gf1UMYuFSdPXjc3epJKu9w1548588590175

  23. Hello, can in use a Arduino mega + a wifi module + MP3 decoder+Amplifier+any lcd to reproduce this project? If Yes, what wifi module can i buy for it?

  24. What happen to you my friend? You lost juice for this? Hope everything is alright and wish you a nice day.

  25. Hi. Thanks for posting this. I will try this project out when the parts arrive. Are there any security issues to be aware of in this project. I have looked around to see if there is information on security for internet radios. The only thing I have found Is some tips from Bob Rathbone about Raspberry Pi based radios.

  26. Смысл такой LCD юзать. Еще бы телек прикрутил, и менял ток одну строчку)))

  27. https://www.youtube.com/watch?v=aDwrMeu4k9Y need help on this video (thought I'd comment here as it is an old post) I'm using this video for a college project but whenever I try and validate the code I get the following error:

    AppDataLocalTempccbUiPD0.ltrans0.ltrans.o: In function `setup'

    AppDataLocalTempRar$DIa4460.19328VoltMeter/VoltMeter.ino:31: undefined reference to `startScreen'

    AppDataLocalTempccbUiPD0.ltrans0.ltrans.o: In function `loop'

    AppDataLocalTempRar$DIa4460.19328VoltMeter/VoltMeter.ino:40: undefined reference to `ui'

    collect2.exe: error: ld returned 1 exit status

    exit status 1

    Error compiling for board Arduino/Genuino Uno.

    I'm very new to Arduino and I've not encountered the error until now, if anyone could help me with this it would be a great help thanks!

  28. k niko poly kalos ama boris na me boithisis se cati sto inkscape otan kanos save as se gcode kai to stilo sto gbrl controller moy lai pos to buffer is to small pos alazo to buffer size apo 65 se 256 ?

  29. Hi, I have a question, I have been subscribed to your channel for many years now, maybe I missed something I don't know, so that's why my question…. before you used to post new vids every week, then every 2 weeks and then every month (I believe after your marriage). Now I see this vid is already 6 moths old, can I ask what's wrong? Sorry if I ask this is just that I love your vids I miss them.Regards from Belgium.

  30. hi hello
    i have a question concerning the ir temp sensor…i was humbly requesting if u could help me..thanks in advance

  31. Interesting project. ESP32 is also bluethoth why not take advantage of it, it's my opinion

  32. I have uploaded an update video on this radio with a fix for the noise issue: https://www.youtube.com/watch?v=4bm22sN5hWE

    Check it out!

  33. Off to buy the parts, this has real portional and is a great first building block, thanks for sharing. One thing I hate about the commercial versions are the boxes/cases, the fact radio stations are limited and can't be edited/updated manually. Will check out the nextron display, I saw this some time ago, and passed on it, but I think it looks good. Thanks again.

  34. the NEXTION DISPLAY is already A$30 by itself! (prob USD20) so alas! need a CHEAPER DISPLAY to make this UNDER US$30 as per Nick's parameters…

  35. can i change to different ssid/pw, add/remove channels without hard code?
    search or scan new available channels in country group?

  36. is it possible to make the radio ask about Wi-Fi SSID and password at the startup so that we can connect it to any WiFi network?

Leave a Reply

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