Introduction: Wifi Webradio With ESP8266 and VS1053 (KaraDio)

Picture of Wifi Webradio With ESP8266 and VS1053 (KaraDio)

A wifi web radio player with only two low costs boards.

2017/08/25 New release 1.6: See The hackaday page
For more informations or questions, you can enter to the Karadio facebook group


Control with any browsers (ie edge, chrome mozilla etc...).or with an external hardware panel or with the uart interface.

Memory for 256 stations

OTA upgrade

Read direct mp3 or ogg streams or playlist .pls .m3u and .xspf

Read up to a 320 kb/s stream,

New web page, Fit well on mobile or computer.

Embedded wifi configuration via the web or uart interface

Metadata displayed (ie Title of the current song if given in the stream),

All settings saved (sound setting, stations, wifi)

Server multi clients with automatic refresh for all (websocket),

The stations can be downloaded and uploaded within the web site,

Very quick responsive web by caching local information in the browser and websocket.

a led indicates the state of the equipment . Speed blink: init, 90%in 10%out: connection in progress, 10% in 90%out: Equipment ready.

External DAC i2s interface on the vs1053 enabled.

Autostart on power on if the autoplay is checked.

Step 1: Step1: What You Need

Picture of Step1: What You Need

Parts required:

A nodeMcu V3 (on aliexpress)

A VS1053 module (aliexpress)

A Fiberglass board epoxy boards (aliexpress)

2.54mm 40 Pin Stright Female Single Row Pin Header Strip PCB Connector (aliexpress)

Some wires and Soldering Iron.

A pc or other with an usb port

and an usb to micro usb cable. (aliexpress)

An external amplifier or earphone.

A prototype can also be made using a breadboard and some jumper wires.

See The hackaday page

Step 2: Step2: Build the Webradio Hardware

Picture of Step2: Build the Webradio Hardware

Follow the schematic to wire the board.

Be careful, the vs1053 is hard to soldier. Pins are very close each other.
Use a very thin iron.

Check each wire before the next step.
The power comes from the micro usb of the nodeMcu linked to the pc or a 5 volts transformer.

Step 3: Step3: Loading the Software and First Use

Picture of Step3: Loading the Software and First Use

Loading the software

You need the ESP flash download tool.

Load it at the Espressif page

The binaries files can be found on Github or hackaday

Follow the image to configure the tool depending of the tool release

To enter the flash mode of the nodeMcu, press and hold the flash button, the press the reset button. You ca release the flash button.
Start the download with the start button of the ESP flash tool.

After a while, the Finish green indication is shown.

Press the reset button of the nodeMcu. If succesful, the nodeMcu les blinks.

First use

If the acces point of your router is not known,

the webradio init itself as an AP. Connect your wifi to the ssid "WifiWebRadio", Browse to to display the web page, got to "setting" "Wifi" and configure your ssid ap, the password if any, the wanted IP or use dhcp if you know how to retrieve the dhcp given ip (terminal or scan of the network).
In the gateway field, enter the ip address of your router.Validate. The equipment restart to the new configuration. Connect your wifi to your AP and browse to the ip given in configuration.
Congratulation, you can edit your own station list.
Dont forget to save your stations list in case of problem or for new equipments.if the AP is already know by the esp8266, the default ip is given by dhcp.
A sample of stations list can be uploaded via the web page and loaded to the webradio.

All future update will be made within the webradio interface via the ota feature.

Step 4: Some Images

Picture of Some Images

The esp8266 is an incredible processor. This project is made with the freertos environment and contains many tasks: a web client to connect to the radio stream, a web server to provide the browser interface 'and a child task for each client), an uart task to display and and send commands to the webradio, a task to manage an external panel command on the adc entry (schematic in the hardware directory on github), a task for each client websocket, etc.
It is a complex project, but the processor is really powerful. The only limit is the lack of ram, which can be removed by adding an external chip on the spi bus. See the hackaday page or github page.

The uart interface can show some debug informations and can send controls to the webradio.
For a command list see the uartinterface.txt file at


gulalo (author)2017-11-13

Hi Karawin again,
A0 is connected to CTR. SW. but i tried also with connection to GND -- nedo help.
All wires are solderd.
At startup Bl. Led blinks twice, that´s it. Sometimes it plays for a few minutes then silence. Ping is then successful but Webpage
does not show.


External ram not detected
uart speed: 28800
Release 1.6.2, Revision 3
SDK 1.4.2(f57d61a)
data : 0x3ffe8000 ~ 0x3ffe88fc, len: 2300
rodata: 0x3ffe8900 ~ 0x3ffea358, len: 6744
bss : 0x3ffea358 ~ 0x3fff1778, len: 29728
heap : 0x3fff1778 ~ 0x40000000, len: 59528
Heap size: 30616
size_map: 4
Eeprom_start: 3e0000
Eeprom_start1: 3d0000
Flash size: 4194304
t0 task: 3fff8a10
t1 task: 3fff8c98
t2 task: 3fff92b8
t3 task: 3fff96a8
t4 task: 3fff9cf0
Heap size: 23832
mode : sta(2c:3a:e8:24:2e:d1)
add if0

karawin (author)gulalo2017-12-11

If the log stop here, it seems that the vs1053 is not detected. Check the dreq wire.

gulalo (author)2017-11-12

strange Problem.

Hi Karawin!

Since Release 1.6.2 i have a curious issue with my Karadio.
either it does not start to connect or when it connects then only for
a few minutes and then stops playing.
i flashed a new Wemos - no help.
i changed power supply 5V 2Amps -no help.
i changed MP3 shield from
to Adafruit
but no help.
I use the colour oled addon, it all worked for weeks before.
The same happens when i start without Display.
do you have an idea what can cause this behavior???
greetings GL
greetings GL

karawin (author)gulalo2017-11-12

Are you sure to have A0 connected to the ground?
An uart log or telnet log is better to answer

GáborS42 made it! (author)2017-10-30

Dear Karawin!

Do you plan on controlling this "Ka-radio" UDP?

send info udp:

"vol: 128 num: 14 stn:... tit: ...... sts: 0"

Because of the simplicity of integrating into the Loxone system I ask !?

Thank you in advance for your reply!

PS: A picture of the current state!

karawin (author)GáborS422017-10-30

I don't know loxone. It seems interesting.

GáborS42 (author)karawin2017-10-30

Loxone is a smart home system with a closed system focusing on its own devices!

They include loopholes such as udp and http get, post ... (there are restrictions)

Using these, a stable system can be created with a few sleepless nights!

for example Ka-radio

karawin (author)GáborS422017-10-30

KaRadio has an html mode of command or with uart or telnet
HTML interface for the Wifi Webradio
Any browser or wget can be used to send basic commands to the webradio.
A command format is http://yourip/?command[&command]
If a command return some informations, it must be the last of the list or alone.

Commands are:
version : return 'Release: x.x, Revision: x'
infos : return
'vol: 46 the current volume
num: 240 the current station number
stn: Hotmix 80 the name of the current station
tit: BANANARAMA - Venus ' the title of the son playing
sts: 1 the state of the player: 0 stopped, 1: playing
list=xxx : return the name of the station xxx (0 to 254)
stop : stop playing the current station.
start : start playing the current station.
play=xxx : with xxx from 0 to 254 play the station xxx
volume=xxx : with xxx from 0 to 254 change the volume to xxx
uart : uart baudrate at 115200 not saved on next reset
instant="http://your url" : instant play a site
the url must begin with http:// or https:// and be surrounded by " and no space char allowed.

Volume may be combined with other command.

Reminder: the url without parameter is the full web interface.

GáborS42 (author)2017-10-29


I have a little problem in no way want to give voice to yourself!

you will not make a mistake at startup! I've looked at wiring several times!

Does anyone have any idea?

External ram not detected

uart speed: 115200

Release 1.6.1, Revision 1

SDK 1.4.2(f57d61a)

data : 0x3ffe8000 ~ 0x3ffe88fc, len: 2300

rodata: 0x3ffe8900 ~ 0x3ffea2b4, len: 6580

bss : 0x3ffea2b8 ~ 0x3fff16d8, len: 29728

heap : 0x3fff16d8 ~ 0x40000000, len: 59688

Heap size: 30776

size_map: 4

Eeprom_start: 3e0000

Eeprom_start1: 3d0000

Flash size: 4194304

t0 task: 3fff8970

t1 task: 3fff8bf8

t2 task: 3fff9218

t3 task: 3fff9608

t4 task: 3fff9c50

Heap size: 23992

mode : sta(2c:..:..:....:f3)

add if0

SCI_Mode (0x4800) = 0x0

SCI_Status (0x48) = 0x0

VS Version (VS1053 is 4) = 0

SCI_ClockF = 0x0

device: 3fffa6e8

volume: 248


AP1:, AP2:

AP1:Station Ip:

Trying Muhely , I: 0 status: 1


state: 0 -> 2 (b0)

state: 2 -> 3 (0)

state: 3 -> 5 (10)

add 0

aid 4

pm open phy_2,type:2 0 0


connected with, channel 3

dhcp client start...


sleep enable,type: 2

ADC Div: 3 from adc: 11

autostart: playing:1, currentstation:238

##CLI.STOPPED# from playStationInt

##CLI.NAMESET#: 238 Hotmix Hiphop


##CLI.PATHSET#: /hotmixradio-hiphop-128.mp3



##CLI.VOL#: 248

##CLI.STOPPED# from Adc Stop

##CLI.ICY0#: Hotmixradio Hip Hop

##CLI.ICY3#: http:\/\/\/hiphop

##CLI.ICY5#: 128

##CLI.ICY7#: ice-samplerate=44100;ice-bitrate=128;ice-channels=2

karawin (author)GáborS422017-10-29

Connect adc to ground

GáborS42 (author)karawin2017-10-29

is connected!

GáborS42 (author)GáborS422017-10-29


the solution is sys.patch ("0")


АлексейС63 (author)2017-08-08

I have experiment with STM32F103CB and OLED SSD1306_128X64, but result was bad. A don't know what i can do with it. Do you have such situation?

Its look like an inversion of sda scl

i tried to inverse sda with scl, but screen not work at all. More i took another display OLED 1306, it display the same...


May be... It is hard to found the error. I retested two oled 0.96 and 1.3 with success yesterday.

The default value on github was not for a 1306. I have changed it today. Reload the ino and regenerate please.

Unfortunately I got the same result. I compared the new source with older version. These changes I tried earlier. Display was work with your project on Arduino Micro

djuscha (author)2017-06-10

Today I connected my remote control, but the seller has sent me another with the cross below. Now when I switch is key 5 stop and play buttons 4 and 6 volume and buttons 2 and 8 stations Can man change that somehow in the library or ino?

karawin (author)djuscha2017-06-10

Which ino?
See the code. Even if you know nothing is software, i think you can understand what to change
case 0xFF629D:
case 0x10EF48B7: /*(" FORWARD");*/ irStr[0] = 0;Serial.print(F("\r")); break;

case 0xFF22DD:
case 0x10EFA857:
case 0x10EF42BD: /*(" LEFT");*/ irStr[0] = 0;Serial.print(F("cli.vol-\r")); break;

case 0xFF02FD:
case 0x10EF7887: /*(" -OK-");*/
// state?Serial.print(F("cli.start\r")):Serial.print(F("cli.stop\r"));
if (strlen(irStr) >0)
irStr[0] = 0;
/* if (state)
state = !state;
irStr[0] = 0;
case 0xFFC23D:
case 0x10EF28D7:
case 0x10EF827D: /*(" RIGHT");*/ irStr[0] = 0;Serial.print(F("cli.vol+\r")); break; // volume +
case 0xFFA857:
case 0x10EFC837: /*(" REVERSE");*/ irStr[0] = 0;Serial.print(F("cli.prev\r")); break;
case 0xFF6897:
case 0x10EF807F: /*(" 1");*/ nbStation('1'); break;
case 0xFF9867:
case 0x10EF40BF: /*(" 2");*/ nbStation('2'); break;
case 0xFFB04F:
case 0x10EFC03F: /*(" 3");*/ nbStation('3'); break;
case 0xFF30CF:
case 0x10EF20DF: /*(" 4");*/ nbStation('4'); break;
case 0xFF18E7:
case 0x10EFA05F: /*(" 5");*/ nbStation('5'); break;
case 0xFF7A85:
case 0x10EF609F: /*(" 6");*/ nbStation('6'); break;
case 0xFF10EF:
case 0x10EFE01F: /*(" 7");*/ nbStation('7'); break;
case 0xFF38C7:
case 0x10EF10EF: /*(" 8");*/ nbStation('8'); break;
case 0xFF5AA5:
case 0x10EF906F: /*(" 9");*/ nbStation('9'); break;
case 0xFF42BD:
case 0x10EFE817: /*(" *");*/ irStr[0] = 0;Serial.print(F("cli.stop\r")); break;
case 0xFF4AB5:
case 0x10EF00FF: /*(" 0");*/ nbStation('0'); break;
case 0xFF52AD:
case 0x10EFB847: /*(" #");*/ irStr[0] = 0;Serial.print(F("cli.start\r")); break;
case 0xFFFFFFFF: /*(" REPEAT");*/break;
/*Serial.println(" other button ");*/
}// End Case

djuscha (author)karawin2017-06-11

Super thank you!

Have now found and changed

One more question. Can you set favorite stations on the buttons 1-9
Would be so right?

case 0x10EF20DF: /*(" 4");*/ irStr[0] = 0;Serial.print(F(""4")\r")); break;

djuscha (author)djuscha2017-06-11

Station number 4 to the 4 button

Vishal Dhayalan (author)2017-05-21

Hi, i tried flashing the ESP8266 nodemcu but i get an error on the command prompt that runs alongside it:
Invalid head of packet <' '>
Exception in thread Thread-2
Exception invalid head of packet <' '>

And the download panel is stuck on the download green indication, no sign of any activity on the nodemcu.

Does this usually happen? How long does it take to flash the nodemcu usually? It's been stuck on this for awhile..

sorry, I'm not sure why the image quality has changed when i uploaded it but the images i took were good...

djuscha (author)2017-05-10

My radio has finally earned from 0.96 LCD and Russian tags. Buttons and IR has not done so far. There is one problem, after a while the radio turns off, Stoped on the display, Play through the WEB does not help, just off / on. What could be the problem?

Thanks again for such a great project and help!

karawin (author)djuscha2017-05-10

I have two different protos running 24/24. Try to improve your power supply?

djuscha (author)2017-04-28

"Arduino Pro or Pro Mini, ATmega328 (3.3V, 8MHz)" Arduino: 1.8.2 (Windows 10), Board:
Fork / exec C: \ arduino-1.8.2 \ hardware \ tools \ avr / bin / avr-gcc.exe: The file name or extension is too long.
Error compiling for the Arduino Pro or Pro Mini board.

Wanted to connect,

0.96" I2C IIC SPI Serial 128X64 White OLED LCD

but get compile error message .

what am I doing wrong?

karawin (author)djuscha2017-04-28

Which file name? the ino?

djuscha (author)karawin2017-04-29

Have all libraries reloaded and set. Go now
Many thanks!!!:)
Now I need baud rate
set to
Sys.uart ("28800")
I do not understand yet When I start after the fast Termite.exe, I see only hieroglyphs .. I have to set with Termite .exe irgent something?

karawin (author)djuscha2017-04-29

The default baud rate is 115200 to be set to the termite setting..

Efter, you can send the sys.uart command to set it to 28800 and reset the esp.

djuscha (author)karawin2017-04-29

I have flashed mini arduino with Arduino Uno and then I tried immediately with Termite exe.Das did not work. Then I put everything together. And over Nodemcu again Termite started and entered Sys.uart ("28800") and that has worked. ;)
Now I have only the problem that the time is not true: (and Russian letters are not represented correctly

karawin (author)djuscha2017-04-29

At the beginning of the code of the ino file, you have to set the

// your timezone offset
#define TZO 1

to your timezone.
Recompile and flash again.

The tzo command will be sent automatically.

djuscha (author)karawin2017-04-29

#define TZO 1 changed to #define TZO 2, reflashed. The time is on 00-01-2000 :( I'm doing something wrong?

karawin (author)djuscha2017-04-29

nothing. Sometime the ntp call fails on timeout, but it is retried periodically

djuscha (author)karawin2017-04-30

Have done so and waited. No change. Time still shows 00-01-2000


karawin (author)djuscha2017-05-02

Obviously, the mini pro must be connected to the esp8266. Are you sure to use the up to date delivery?
The display is working? (station etc?)
Without detail, i can't find your problem.

djuscha made it! (author)karawin2017-05-02

Yes display shows all info ... only the time display hangs

karawin made it! (author)djuscha2017-05-02

I tested with exactly the same configuration (mini pro 3v 8Mhz)

And it show on termite in bridge between 2 usb (the nodeMcu and an usb adapter to the mini pro)

May be try to reload the ino at, but
Probably the tx to rx from mini pro to the nodeMcu is not well wired.

djuscha (author)karawin2017-05-06

Have now all newly made new Nodemcu new mini pro everything flashed. Oh yes new cables. And nevertheless the clock does not run.
What I have yet discovered when Nodemcu is connected to the computer and Termite runs when I enter command, the clock runs on my small display. However, the time after the reset or new start again away


karawin (author)djuscha2017-05-06

Probably the tx from mini pro to rx of nodeMcu is not well wired.

Stop termite, it can disturb the Rx from the mini pro.
If the clock manually entered works, that means that the reception of the mini pro works, but not the mini pro tx to rx of the nodeMcu

djuscha (author)karawin2017-05-07

Now I understand nothing ... in the u8glibConf.h stands
--NodeMcu-- --Mini Pro--
Tx Rx
Gnd Gnd
VU Raw
And now you write the tx from mini pro to rx of nodeMcu is not well wired. ?!
Have now new cable taken nevertheless the time does not run
So now everything has new, new flashed, new cables and still does not run the time :( what am I doing wrong? ;(

karawin (author)djuscha2017-05-07

Please add a wire from the tx from mini pro to rx of nodeMcu

The mini pro now send the commands sys.tzo , and
I forgot to add this comment in the u8glibConf.h because it is new. But it is obvious as you sent these commands manually, the mini pro do it too.

I make all these files in my free time for free so it is very heavy to think at all things.

djuscha (author)karawin2017-05-07

I am so stupid:) ... Now goes! I could have thought of second cables to connect.Super. Many Thanks!! Now I can test whether it is stable.
Thanks again for the support!

djuscha (author)djuscha2017-05-07

I may take wrong karadio U8glib.ino? I take the zip

karawin (author)djuscha2017-05-07

I removed the zip. Please reload the ino and h files. Not yet updated the comments.

florinn2520 made it! (author)2017-05-04

Final project

karawin (author)florinn25202017-05-05

Great. Just update the display with
It adds the date and time. (need the mini-pro -> esp rx wire.)

karawin (author)2017-05-02

So it works. The mini pro send the tzo and date command to the esp as you have done manually.

АлексейС63 (author)2017-04-09

I have a small problem with the module vs1003. When switch station, previous station continues playing until ends cache in buffer, then begins to play the current station. Display and the web interface shows the current station, but playing the previous one. Please tell me how can i fix this situation.

I wonder how it is possible. Are you sure that it is the Karadio software?
Send a log please.

About This Instructable



Bio: Old retired engineer
More by karawin:Wifi Webradio With ESP8266 and VS1053 (KaraDio)
Add instructable to: