Close
0%
0%

WiFi Webradio on ESP8266 or ESP32

KaRadio
A fully featured wifi web radio player with only low cost boards.
with or without a vs1053 board

Similar projects worth following
Control with any browsers (ie edge, chrome mozilla etc...).
or with an external hardware panel or with the uart interface or with telnet.
Memory for 255 stations
OTA (On the Air) upgrade,
Read direct mp3 or ogg or WMA streams or playlist .pls .m3u, asx and .xspf
Read up to a 320 kb/s stream,
Encoder, IR, lcd ...
Embedded wifi configuration via the web or serial or telnet.
Metadata displayed (ie Title of the current song if given in the stream),
Permanent setting (sound setting, stations, wifi)
Server multi clients with automatic refresh (websocket),
The stations may be downloaded and uploaded within the web site,
Stations sort management by drag drop.
very quick responsive web by caching local information in the browser and websocket.
additional hardware: a led indicates the state of the equipment
Optional: control switches, lcd display, additional ram for buffering

See http://www.instructables.com/id/Wifi-Webradio-With-ESP8266-and-VS1053 for the description of the minimal prototype.

See Github for sources

See github source for the ESP32 version ( vs1053 or i2s or pcm or internal DAC)

See A project derived from KaRadio32 in progress.

See the lcd +IR software's on Github AddOn

See some realizations of users at KaraDio

A nextion touchscreen display for KaraDio from yo2ldk : Here

For more informations or questions, you can enter to the Karadio facebook group


KaRadio32 Release 2.3

Release 2.3 Rev 0 - Built on 2022/02/23

New:

  • 2.3 R0:
    • RAM optimization
    • Audio buffer size incremented.
    • Bugs correction: HTML chunks processing and Meta computing
    • Stack crash on http instant command removed
    • AAC Decoding improved
  • 2.2 R1:
    • Introducing WIFI QoS Ip precedence AC_VI
    • SPDIF output improved
    • DAC bugs removed.
    • AAC Decoding improved (but not perfect)
    • New patch for the vs1053. Play OGG too.
  • 2.2 R0:
    • Many internal optimizations
    • ascii unicode #&xxxx; decoded
    • aac decoder improved.
    • Added html commands volume+ and volume-

    KaRadio: Release 2.1

    Release 2.1 R0 - Built on 2021/02/15

    • 2.1 R0:
      • Security: the ssid passwords are no longer sent on each "Setting" display, but only when changed.
      • Bug fixed: in parse playlist. Possible memory leak. Thanks to HmarikBel
      • Bug fixed: Special char in station name was incorrectly sent.
      • Some minors improvements.
    • 2.0 R0:
      • Better handling of the large "header moved"
      • Better monitoring
      • timezone suggestion on the setting page

    History:

    history

    For ESP32 see the github page KaRadio32.

    ESP8266 Simplest prototype:

    - Optional external ram (23LCV1024) support (1:CS/=GPIO16 2:MISO=GPIO12 3:NC 4:GND 5:MOSI=GPIO13 6:SCK=GPIO14 7:GND 8:3.3v)

    Attention:
    The optional led is now on GPIO2. The blue led on the ESP8266 is blinking at the same rate.
    GPIO16 is now the Chip select for the external ram if any.
    The external ram is detected at boot time if present.

    To upgrade to this release, please flash user1.4096.new.4.bin at 0x1000 ,
    user2.4096.new.4.bin at 0X81000 and blank.bin at 0x7e000 & 0x3fe000
    After that, all next updates are done with the On The Air (OTA) feature.
    New binaries are hosted at http://karadio.karawin.fr .

    Loading the esp8266

    First use

    • If the access point of your router is not known, the webradio initializes itself as an AP. Connect your wifi to the ssid "WifiWebRadio",
    • Browse to 192.164.4.1 to display the 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. Don't 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 at the first start is 192.168.1.254
    • a sample of stations list is on https://github.com/karawin/Ka-Radio/blob/master/ESP8266-Firmware/WebStations.txt . Can be uploaded via the web page.

    Feedback

    Please tell me if you succeeded or something more can be done, thanks.
    The second step will add some hardware buttons (vol + -, station + -, play ...)

    Wiring:

    From ESP8266_ESP12( 3.3 v) or nodeMCU(5v) to VS1053 (5 v)

    REST

    ADC

    CH_PD to 3.3v

    GPIO16 (a 1Hz output)

    D5:GPIO14 to VS1053 SCK

    D6:GPIO12 to VS1053 MISO

    D7:GPIO13 to VS1053 MOSI

    TXD to CH340G UART rx

    RXD from CH340G UART tx

    D1:GPIO05 to VS1053 XDCS

    D2:GPIO04 to VS1053 DREQ

    D3:GPIO00 to VS1053...

Read more »

KaRadio32.bin

KaRadio32 2.3R0

application/octet-stream - 1.49 MB - 01/01/2021 at 21:11

Download

user2.4096.new.4.bin

KaRadio 2.1 R1 Partition 1

application/octet-stream - 424.75 kB - 01/11/2020 at 18:13

Download

user1.4096.new.4.bin

KaRadio 2.1 R1 Partition 2

application/octet-stream - 424.75 kB - 01/11/2020 at 18:13

Download

octet-stream - 3.98 kB - 09/17/2017 at 10:26

Download

octet-stream - 4.00 kB - 07/21/2016 at 15:19

Download

View all 6 files

View all 6 components

View all 11 project logs

  • 1
    Step 1

    Wiring:

    From ESP8266_ESP12( 3.3 v) or nodeMCU(5v) to VS1053 (5 v)

    REST:

    ADC : gound if control panel not used

    CH_PD to 3.3v

    GPIO16 led output

    D5:GPIO14 to VS1053 SCK

    D6:GPIO12 to VS1053 MISO (or so)

    D7:GPIO13 to VS1053 MOSI (or si)

    TXD to CH340G UART rx

    RXD from CH340G UART tx

    D1:GPIO05 to VS1053 XDCS

    D2:GPIO04 to VS1053 DREQ

    D3:GPIO00 to VS1053 XRST

    GPIO02

    D8:GPIO15 to VS1053 XCS

View all instructions

Enjoy this project?

Share

Discussions

fedepeleh wrote 09/01/2016 at 14:40 point

Hello! I install the Sram 23lc1024 and pin 7 to 3.3V, otherwise it was not recognize the memory.
And I make a query. I wonder if you can change the predominant color white of the website by the black background color?
Greetings and thanks for everything!

  Are you sure? yes | no

Jean-Pierre Cocatrix wrote 09/02/2016 at 09:34 point

yes for this chip, it is a /vhold to be wired to Vcc.
The 23lcv1024 is a vbat that must be grouded.
I can add a theme changer in the future.

  Are you sure? yes | no

Thomas wrote 08/28/2016 at 18:34 point

Your project is what ive been looking for for a long time. Thank you Soo much for your presentation . I have one question, can i use this module also: http://www.ebay.de/itm/VS1003-VS1053-MP3-Decoder-Modul-VLSI-VS1003B-passend-fur-Arduino-Raspberry-/331769380314?hash=item4d3efefdda:g:qvAAAOSwwE5WaexF ?

Thanks a lot 

Thomas

  Are you sure? yes | no

Jean-Pierre Cocatrix wrote 08/28/2016 at 20:46 point

Not sure. It is for VS1053, but the VS1003 is the old one. Your board has what kind of chip? It is not clear. 

  Are you sure? yes | no

discover1977 wrote 08/28/2016 at 16:05 point

Hello Just a great project.

The project in its current form is already self-sufficient.
But perfection is not the limit!
I would like to ask: Are there any plans to connect some of the popular display?
Also, I have a suggestion: Add in the initialization procedure VS1053 including I2S output. This allows you to use higher quality external DAC. I think many of this feature is needed.
Thanks again for your work.

  Are you sure? yes | no

Jean-Pierre Cocatrix wrote 08/28/2016 at 20:46 point

Good suggestions. I will work on them. Thanks

  Are you sure? yes | no

Dirk Spiller wrote 09/08/2016 at 19:22 point

I'd also like a display for mine. I have ordered some cheap Nokia 5110 Displays with SPI interface and it should be possible to connect them like in this project: https://github.com/Edzelf/Esp-radio But I have no idea how to modify the code here.

  Are you sure? yes | no

Jean-Pierre Cocatrix wrote 09/08/2016 at 19:55 point

Only GPIO16 is free if the external ram is not used. 
The code must be modified, yes, and completed a lot to display usefull informations. Not planned for the moment.

May be a future project with the esp32?

I will add a display with a arduino pro mini on the uart interface of the webradio. So with the command panel, It will be complete..

  Are you sure? yes | no

ringokarner wrote 08/28/2016 at 06:21 point

Nice project! But I have a problem with some station. They work for a moment, and then the system restarts. What's the problem?  http://shout.babahh.com/ringfm , http://stream04.akaver.com:8500/retrofm_hi.mp3 , http://194.106.119.241:8500/skyplus_hi.mp3 .

Thank You

  Are you sure? yes | no

Jean-Pierre Cocatrix wrote 08/28/2016 at 19:32 point

Interesting. It seems that the meta data brokes the stack. I will debug it.

Thanks

  Are you sure? yes | no

Jean-Pierre Cocatrix wrote 08/29/2016 at 13:12 point

It is a bug in the chunked data decoding. I will debug it.

It works, but still a residual crash. I work on it.

  Are you sure? yes | no

ringokarner wrote 09/30/2016 at 16:51 point

1.0.9 version is stable! Thank You!  Waiting for new solutions! I have a few suggestions. Need to be translated into English :D

  Are you sure? yes | no

ringokarner wrote 10/20/2016 at 06:33 point

I found one station that is not working properly  http://96.43.138.2:8000

ThankYou

  Are you sure? yes | no

Jean-Pierre Cocatrix wrote 10/20/2016 at 08:52 point

Some 320 kB/s works, other not, and i don't know why. I need to analyse the wifi stream but i don't have the tools for that. I think it is an esp8266 software problem because mediaserv30.live-streams.nl:8086  and other works perfectly at that speed.

  Are you sure? yes | no

ringokarner wrote 10/26/2016 at 14:15 point

http://striiming.trio.ee:8008/myhits.ogg - it is a new radio station in our country. Worked only one day???

Thank You

  Are you sure? yes | no

Jean-Pierre Cocatrix wrote 10/27/2016 at 17:12 point

Working now... NO!

Hey great, you discovered a bug. Will be good in 1.1.1

  Are you sure? yes | no

ringokarner wrote 10/27/2016 at 18:18 point

Do not start to work automatically, need to press "play" ....but you're a genius!!! Thank You! I look forward to updates!

  Are you sure? yes | no

Jean-Pierre Cocatrix wrote 10/29/2016 at 13:14 point

Soon in 1.1.1 the /myhits.ogg will works

  Are you sure? yes | no

Tobi wrote 08/20/2016 at 21:25 point

Hi, thank you very much for this project. I just built it up and it works a treat! I plan to use it for music distribution in every room with a central RasPi based Radio-Server which is connected to a music source. In order to get it a bit more compact, I also planned to design a PCB but it seems like you already did this as well. Did you already tested the design? Again, thank you for this great contribution.

  Are you sure? yes | no

Jean-Pierre Cocatrix wrote 08/20/2016 at 21:37 point

Thank you for this feedback. I have not designed the pcb. It is a work of  PiotrSperka at https://github.com/PiotrSperka/ESP8266-WebRadio. I took the project to greatly improve the software, but I have not tested the pcb. I dont have the tools to do that.
As the design is simple, I think and hope there is no problem.

  Are you sure? yes | no

Sergio wrote 08/14/2016 at 02:11 point

Could make a tutorial on how to flash the device or a video tutorial about it

  Are you sure? yes | no

Jean-Pierre Cocatrix wrote 08/14/2016 at 19:39 point

I will make an instructable soon.

  Are you sure? yes | no

Ronin wrote 09/06/2016 at 22:25 point

great project, waiting instructable, thank yo

  Are you sure? yes | no

Sergio wrote 08/14/2016 at 02:09 point

Really nice project, 

  Are you sure? yes | no

fedepeleh wrote 08/08/2016 at 14:18 point

Hello! thank you very much for helping me! I appreciate it a lot !.
if not get the 23lc1024 memory, you could use an SD memory card as buffer?
Thank you!

  Are you sure? yes | no

Jean-Pierre Cocatrix wrote 08/08/2016 at 15:35 point

? A SD is a flash memory, not a ram. So, No.

  Are you sure? yes | no

fedepeleh wrote 08/06/2016 at 23:51 point
A query, when you turn the module after installing the memory 25q16bv, informs me that: => extraram state: 0 0xff yyyyyyyyyyyyyyyy. It is normal or am I doing something wrong?

 Regards.-

  Are you sure? yes | no

Jean-Pierre Cocatrix wrote 08/07/2016 at 07:36 point

No, it must be 1 0x30 0123456789.

  Are you sure? yes | no

Jean-Pierre Cocatrix wrote 08/07/2016 at 08:46 point

I checked your device. It is a flash memory, not a sram memory. It cannot works. Sorry.

  Are you sure? yes | no

fedepeleh wrote 08/06/2016 at 19:55 point

Sorry wrote bad, I have a memory Winbond 25q16bvsig

  Are you sure? yes | no

Jean-Pierre Cocatrix wrote 08/06/2016 at 21:32 point

Looks good.  It is a 2MB ram. Only 1 will be used, but 1 is enough. Enjoy.

  Are you sure? yes | no

fedepeleh wrote 08/06/2016 at 19:51 point

Perfect! what type of RAM can be installed? I have a Winbond 25q16dsig is compatible? or only works with 23lc1024? Thanks for helping me again. I appreciate it very much :-)

  Are you sure? yes | no

fedepeleh wrote 08/06/2016 at 07:12 point

Hello! thanks for the great help they have given me. I have another question to ask: 23lcv1024 RAM serves to increase the buffer of the player? if so, I can add a memory 23lc1024 replacing 23lcv1024? Thanks and regards.-

  Are you sure? yes | no

Jean-Pierre Cocatrix wrote 08/06/2016 at 09:04 point

Yes. The only change is for pin 7 (/HOLD)that must be wired to VCC.

The 23lcv pin 7 is VBat and must be grounded.

  Are you sure? yes | no

coelerix wrote 08/05/2016 at 19:54 point

I have problems to flash my ESP with the binaries. I can flash other fw like micropython without a problem. I use esptool.py. Is it correct to flash the following one after another:

boot  0x0000

esp_init 0x7c000

user1  0x1000

user2 0x81000

blank 0x7e000

blank 0x3fe000

I even tried to make one bin like this:

esptool1.py make_image -f boot_v1.5.bin -a 0x0000 -f esp_init_data_default.bin -a 0x7c000 -f user1.4096.new.4.bin -a 0x1000 -f user2.4096.new.4.bin -a 0x81000 -f blank.bin -a 0x7e000 -f blank.bin -a 0x3fe000 radio.bin

However, I never see the WifiRatio AP :( What am I missing?

Thank you very much

  Are you sure? yes | no

Jean-Pierre Cocatrix wrote 08/05/2016 at 20:00 point

Is it blinking?

Check with an uart terminal.
It may take 1 minute to activate the WifiWebRadio AP.

#!/bin/bash
sudo /opt/Espressif/esp-open-sdk/esptool/esptool.py --baud 140000 --port /dev/ttyUSB0 write_flash  0x03fe000 "./bin/blank.bin" 0x0fe000 "./bin/blank.bin" 0x7E000 "./bin/blank.bin" 0x3fc000 ./bin/esp_init_data_default.bin 0xFC000 ./bin/esp_init_data_default.bin -fs 32m

#!/bin/bash
sudo /opt/Espressif/esp-open-sdk/esptool/esptool.py --baud 140000 --port /dev/ttyUSB0 write_flash  0x01000 "./bin/upgrade/user1.4096.new.4.bin" -fs 32m

#!/bin/bash
sudo /opt/Espressif/esp-open-sdk/esptool/esptool.py --baud 115200 --port /dev/ttyUSB0 write_flash  0x81000 "./bin/upgrade/user2.4096.new.4.bin" -fs 32m


  Are you sure? yes | no

coelerix wrote 08/05/2016 at 21:07 point

No, it's not blinking. And I waited for 5 min now. But you give me other addresses than in the description. So it is

0x03fe000 blank.bin

0x0fe000 blank.bin

0x7e000 blank.bin

0x3fc000 esp init.bin

0xfc000 esp init.bin

And then

0x01000 user1.bin

0x81000 user2.bin

? But you still need the boot.bin at 0x0000 or not?

Sorry for the stupid question, flashing multiple files is new to me. I know the Esp is OK,  I just flashed microphone and that worked.

Is there a reason why u used a different baud rate for user2.bin?

Thanks for your help. I am looking forward to get this going. Great development by the way !

  Are you sure? yes | no

Jean-Pierre Cocatrix wrote 08/05/2016 at 21:35 point

The boot blank and default  must be done only one time.

No constraint on the speed, the esp is in autobaud when flashing.

If the flash of the user 1 and 2 is succesfull, after a reset, the led is blinking.

YOu must have an esp12 with 4MB

Thanks

  Are you sure? yes | no

coelerix wrote 08/06/2016 at 19:10 point

Ok, I got it to work today. Thanks. Looking forward to assembling everything and listen to the webradio.

  Are you sure? yes | no

fedepeleh wrote 08/04/2016 at 22:23 point

I did it! Thank you very much for the help to build it. There is some possibility that it could control by serial port with an ARDUINO?

  Are you sure? yes | no

Jean-Pierre Cocatrix wrote 08/04/2016 at 23:37 point

Yes, see the uartinterface.txt document. It explain the uart control interface.

  Are you sure? yes | no

fedepeleh wrote 08/04/2016 at 05:04 point

Hello! and thank you very much for helping me trying to load the program into the ESP8266. This is new for me, because I usually I program in arduino. Appreciate it if you could make a tutorial on how to flash the device or a video tutorial about it. Many thank you very much for everything!

  Are you sure? yes | no

Steffen wrote 08/01/2016 at 07:22 point

Great project,

thank you very much for your work and your support!

  Are you sure? yes | no

fedepeleh wrote 07/27/2016 at 21:14 point

Hello! great job!
I'm from Argentina, and I would like to realize this project. Could you tell me how you can program the ESP8266. Because they are the programs but does not talk about the IDE.
Do you have a tutorial? that would be great.
Thank you very much and I await your Answer.-

  Are you sure? yes | no

Jean-Pierre Cocatrix wrote 07/27/2016 at 21:28 point

Hi,
No IDE, just flash following http://www.electrodragon.com/w/Category:ESP8266_Firmware_and_SDK#Updating_Firmware_Flash_Guide 

and (open the image below by right click on it)



  Are you sure? yes | no

bhogalandson wrote 07/19/2016 at 13:19 point

Thanks for getting back to me about playing standalone MP3s.  I wanted to see if the source to your project is available.  
Amazing job!
I have a VS1053 on order and I can't wait to try out your project when I get the VS1053 module.

  Are you sure? yes | no

bhogalandson wrote 07/19/2016 at 17:29 point

With some web searching I found your github project.  Note that the description of the project has a broken link to your github project.  

https://github.com/karawin/Ka-Radio

I am looking forward to putting together the project when my VS1053 module arrives.


I am trying to put together a little project using the ESP8266 + VS1053 board that can play Mp3s on the project sourced from a website when I invoke the device. 

Can you point me to where in your code I should go to see how to play an MP3 from a web server?   I tried browsing through your code listing, but I could not see which code is used by your instant play functionality.


  Are you sure? yes | no

Jean-Pierre Cocatrix wrote 07/20/2016 at 10:54 point

No specific code. Just point to a mp3 file and read it like any other stream.
Missing: a playlist sequential reading. Presently, only the first mp3 is read.

  Are you sure? yes | no

Jean-Pierre Cocatrix wrote 07/20/2016 at 10:54 point

Welcome ;-)

  Are you sure? yes | no

bhogalandson wrote 07/19/2016 at 05:05 point

Hi.  This looks like an awesome project.  
One thing I would like to find out is what I would need to modify in order to play individual Mp3 files residing on a web server (e.g., www.somedomain.com/mymp3file.mp3 ) instead of just listening to a webradio station.

  Are you sure? yes | no

Jean-Pierre Cocatrix wrote 07/19/2016 at 09:31 point

No problem, try instant play
Sample:  http://www.logz.org/fichiers/_mobile_34484_Going-Blind-Court.mp3
url: www.logz.org
port: 80
path: /fichiers/_mobile_34484_Going-Blind-Court.mp3

  Are you sure? yes | no

marcinmaster999 wrote 07/02/2016 at 16:27 point

Ok i found orginal files http://81.190.248.46

IR_Demo_For_ESP8266_RTOS_SDK.zip

  Are you sure? yes | no

Jean-Pierre Cocatrix wrote 07/02/2016 at 16:28 point

Got

  Are you sure? yes | no

Similar Projects

Does this project spark your interest?

Become a member to follow this project and never miss any updates