Web Radio

by Milen in Circuits > Audio

5679 Views, 17 Favorites, 0 Comments

Web Radio

Photo2967.jpg
M5stickC Internet Radio with LM386 amplifier

Months ago I saw the M5stickC development board at Banggood and bought one to play with. You can obtain it here. I tried a lot of sketches, but finally I went through this page, and decided to try to make a web radio. For this development board are available a lot of extensions called hats. There is a sound amplifier + embedded speaker hat. I ordered one and after the regular waiting of three weeks it came to me. Having it I was able to realize a finger sized Internet radio.

This Instructable show the way of doing it and how to make additional amplifier to improve the sound quality.

M5stickC + Speaker Hat

Photo2545.jpg
Photo2539.jpg
Photo2541.jpg
Photo2542.jpg

Having the M3stickC board and the speaker hat is not very complicated to do the Web radio.

The M5stickC can be programmed by Arduino IDE. The installation of the environment is described in this link. Additional information can be found also here.

Under the next links I included all needed arduino libraries for the project.

M5stickC-master.zip

ESP8266Audio-master.zip

ESP8266_Spiram-master.zip

ESP32-Radio-master.zip

You can install them also through the arduino library manager. Try to update to the last versions.

The arduino code can be downloaded also here.

In the following line you have to write your WLAN SSID and your password:

const char *SSID = "********";
const char *PASSWORD = "********";

You can add more radio stations in the code if you want.

Adding Audio Amplifier

speaker.jpg
Photo2546.jpg
HTB1_LioXHj1gK0jSZFOq6A7GpXaC.jpg
Photo2562.jpg
8pins.jpg
48206.jpg
dc jack.jpg
diode.jpg
LED.jpg
Photo2486.jpg
Photo2554.jpg
pot.JPG
res.jpg

With the speaker hat the radio works, but the sound is so weak, that in noisy environment is difficult to hear.

I decided to add more powerful amplifier and bigger speaker to reach better performance.

For that purpose i decided to use LM386 amplifier. I ordered in Internet a LM386 DIY kit, containing a PCB and needed parts. I had available a case coming from a DIY radio receiver kit and its speaker. All additional parts can be seen at the attached pictures. Of course some other type amplifier can be used for this project,

Mounting the LM386 Amplifier

Photo2552.jpg
board.JPG
Photo2549.jpg
circuit.JPG
Photo2566.jpg
Photo2565.jpg
Photo2571.jpg

I did not solder all devices coming from the amplifier kit to the PCB. I used a wheel potentiometer instead that from the kit. I added jack for headphones, supply jack and voltage blocking diode. It works in the following way: the amplifier board can be supplied in two ways

  • the M5stickC supplies the amplifier through its internal battery
  • The amplifier is supplied through the DC jack with external source, which can have till 15V supply. In this case, the diode cuts off this higher supply from the internal M5stickC battery preventing the burning out of the board. The amplifier is supplied with higher voltage than the development board and the sound quality is better. The best solution is to use a Schottky diode - the voltage drop over it is small and the amplifier board is supplied with the highest possible voltage from the M5stickC internal battery.

Finishing the Case

Photo2636.jpg
Photo2634.jpg
Photo2638.jpg
Photo2639.jpg
Photo2642.jpg
Photo2644.jpg

The interface pin header, which connects the amplifier to the M5stickC board I fixed with epoxy glue.

My daughter painted for me on the scale plastic window a small radio symbol to make the case looking better. I glued it with moment glue. The power LED I fixed in special hole in the case again with epoxy glue. With that all design works were done.

It Works Now...

DIY Web radio

On the video can be seen the Internet radio in its two variants in action. It can be noticed also when external power supply source is connected - the sound becomes more strong and clear.

Thank you for your attention.