Close
0%
0%

WiFi Webradio with ESP8266 and VS1053

A wifi web radio player with only low costs boards.
KaRadio, listen the world.

Similar projects worth following
Control with any browsers (ie edge, chrome mozilla etc...).
or with an external hardware panel or with the uart interface.
Memory for 255 stations
OTA upgrade
Read direct mp3 or ogg streams or playlist .pls .m3u and .xspf
Read up to a 320 kb/s stream,
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,
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 (gpo2->resistor->led->3.3volt). Speed blink: init, 90%in 10%out: connection in progress, 10% in 90%out: Equipment ready.
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 the lcd +IR software's on Github AddOn

A nice telnet+IR extension from Gábriel Kovács gabeszakem@gmail.com: ESP8266-WiFi-UART-Bridge-master.zip

A nextion touchscreen display for KaraDio from yo2ldk : Here

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


Release 1.2.1

New features:

- New uart command: sys.date Send a ntp request and Display the current locale time
- New uart command: sys.tzo Display or change the timezone offset
See Interface.txt-

New No needs to parse the url of stations on the web interface. Now it can be done automatically.

Built on 2017/04/16

Older releases:

- New uart command: cli.info Display nameSet, all icy and volume. Used to synchronize the lcd extension.
- cli.list command modified.

- Now Both AP SSID and AP Password are encoded to permit special characters like & : etc
- "Restore stations" corrected for some heavy lists
- Station information now give the number of the current station
- retry client connection modified to avoid blocking situation.

- Modification of the list of uart command. See uart and html interfaces
- New sys.patch command. Inhibit or permit (default) the load of a vs1053 patch for AAC stations.
- New sys.led command. Default is blinking mode, or Play mode: the led is on when a station is playing.
- Modification of the wifi.con command. Now the AP can be set in the AP
mode (192.168.4.1) without the need of the web interface.
- New print button on the Stations panel: Print the list of stations, number and name.
- New logo ;-)
- Many bugs removed thanks to users feedback's.
- Modification of the list of uart command. See uart and html interfaces
- New IR and LCD software
- Autoplay corrected

- Now 2 AP's can be set. The second one will be tested if the first is not detected.
- The Mac address of the radio is displayed
- An offset volume can be set for each station in Station editor.
- Added: a reset button for the equalizer
- Pb on Autostart not correctly checked: corrected
- New html command: instant="http://your url"
- The path of a station can now include some & parameters.
-- Uart command list now can take a parameter: the number of the station to display.
.If no parameter, the complete list is sent.
- New wake and sleep features. Two modes: Time mode: "hh:mm" to wake or sleep at a given hour, or the delay mode "mm".
- Many minors html adjustments.
- The user agent for http request can be set for some special streams.Example: http://pcradio.ru/player/listradio/pcradio_ru.xml
which need a user agent= pcradio.
This pcradio user agent is already implemented automatically in the code when a pcradio station is encountered.
- Drag an drop on the stations list: rearrange the list by dragging a line to another one. Save the change when asked.
- Themes toggle between light blue and dark marron theme with a click on the logo.
- Sleep mode to stop the play after a delay.
- Functions on the web page are optimized.
- Many minor improvements on the code and the web page.
- New uart interface command: cli.uart("x")
With x the uart baudrate at the next reset and permanently.
List of valid baudrate: 1200, 2400, 4800, 9600, 14400, 19200, 28800, 38400, 57600, 76880, 115200, 230400
The command will reply with
##CLI.UART= 115200# on the next reset.
- New Station selection with number
- Stations management in one page
- abort button on station edition.
- New html interface. Can receive basic commands (play, stop, volume from wget or browser)
- New I2S external DAC interface on the vs1053. The I2S is enabled by default to 48kHz. To change the speed permanently use the uart interface with the command :
cli.i2s("x") with x =0 for 48kHz, x=1 for 96kHz and x=2 for 192kHz
The i2s interface is available on the alientek vs1053 with i2s_sclk on SCLK (GPIO16),...

Read more »

octet-stream - 391.96 kB - 04/22/2017 at 11:57

Download

octet-stream - 391.96 kB - 04/22/2017 at 11:57

Download

boot_v1.6.bin

A new one. Don't know what is new.

octet-stream - 3.77 kB - 01/10/2017 at 11:04

Download

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

Download

esp_init_data_default.bin

Must be written only one time.

octet-stream - 128.00 bytes - 07/21/2016 at 15:18

Download

boot_v1.5.bin

The boot. Must be written only one time.

octet-stream - 3.16 kB - 05/24/2016 at 17:16

Download

View all 6 files

View all 10 project logs

  • 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

  • 2

View all instructions

Enjoy this project?

Share

Discussions

Vishal Dhayalan wrote 5 days ago point

Hi again, can you also tell me which files i need to flash onto the ESP8266 NodeMCU and any other details required in this process? There seems to be more files in the 'files' section, than shown in the images on instructables for this project... Thank you.

  Are you sure? yes | no

Vishal Dhayalan wrote 5 days ago point

Hi, is it possible to add IR-Remote alone, without a display? and i would like it to just run on the esp8266 NodeMCU, without an arduino, as I'm trying to run on a minimum setup with basic user controls. Love all the effort and time you've put into this! Thank you.

  Are you sure? yes | no

Paul wrote 04/14/2017 at 01:41 point

Hi, the ntp client is a fantastic new feature, for some reason the time is returning as UTC +1. When I add my tzo ("+8") the clock reads one hour ahead. I have changed my tzo to +7 to give me the correct time for now. Will you be correcting this in the future. We don't have dst where I live, so thats not the issue.

Thanks for all your hard work on this project :) 

  Are you sure? yes | no

cwojtala wrote 04/09/2017 at 12:12 point

I'm a little  bit confusedFirst: if i connect the buttons to the adc, do i have to change the firmware in the esp8266?

And second: i've odered this Module: 

VS1003B VS1053 MP3 Module Development Board Onboard recording function

 http://s.aliexpress.com/veUV3iiU 
(from AliExpress Android)

Does ist work with ist? If yes, how do i connect it to the ESP Board?

  Are you sure? yes | no

jp cocatrix wrote 04/09/2017 at 12:43 point

1/ No, it is auto detected in software.

2/ Not sure, it is a vs1003. Partial support only by Karadio. Some doesn't work at all.
Th wire is well noted on the board. Same as vs1053.

  Are you sure? yes | no

cwojtala wrote 04/10/2017 at 11:48 point

thanks. Knowing my luck, my board won't work. But i can tell when it arrive from china

  Are you sure? yes | no

Eugene wrote 04/18/2017 at 16:13 point

This board works correctly with this project, have the same one

  Are you sure? yes | no

fjs1 wrote 04/04/2017 at 12:47 point

A really fantastic piece of work !  It works better than all IP radios (commercial) I had before.

Congratulations et Merci !

Franz

  Are you sure? yes | no

jp cocatrix wrote 04/04/2017 at 12:50 point

Thanks.
Yes, a bit hard to code but so exciting...

  Are you sure? yes | no

vanilinman wrote 04/01/2017 at 23:01 point

I solved the problem of crackles.I shorten the loop of wires between the modules (I connected without a breadboard).Thanks for the tips.

  Are you sure? yes | no

vanilinman wrote 04/01/2017 at 21:48 point

Thank you. You are super. It began to play. Please tell me how to get rid of crackles in the headphones. I tried various sources of power, it does not help.

  Are you sure? yes | no

jp cocatrix wrote 04/01/2017 at 21:52 point

I don't have this problem.

Check the ground wires (try another gnd entry may be) and try to short it (and all other....
Enjoy.

JP

  Are you sure? yes | no

vanilinman wrote 04/01/2017 at 20:54 point

Hello friends. Help is needed. I picked up the radio for Wemos D1 Mini following the instructions, but it does not want to play. The port writes:
##CLI.STOPPED# from playStationInt
##CLI.NAMESET#: 1 Record
##CLI.URLSET#: air.radiorecord.ru:8101/rr_320
##CLI.PATHSET#: /Icecast 2.3.3-kh10
##CLI.PORTSET#: 80
##CLI.OVOLSET#: 104
##CLI.STOPPED# from clientConnect

##CLI.VOL#: 254

  Are you sure? yes | no

jp cocatrix wrote 04/01/2017 at 21:02 point

url: air.radiorecord.ru

Port: 8101

Path: /rr_320

And it will work.

##CLI.STOPPED# from Post instant_play
##CLI.URLSET#: air.radiorecord.ru
##CLI.PATHSET#: /rr_320
##CLI.PORTSET#: 8101
##CLI.OVOLSET#: 0
##CLI.VOL#: 72
##CLI.ICY0#: Radio Record
##CLI.ICY4#: Dance
##CLI.ICY5#: 320
##CLI.ICY7#:  ice-samplerate=44100;ice-bitrate=320;ice-channels=2
##CLI.PLAYING#
##CLI.META#: Bounce Inc - Faith

  Are you sure? yes | no

Thomas wrote 02/18/2017 at 09:50 point

Hi JP, how is the correct Syntax to Change UART Baud over Browser?

  Are you sure? yes | no

jp cocatrix wrote 02/18/2017 at 09:54 point

  Are you sure? yes | no

Thomas wrote 02/18/2017 at 10:05 point

Hi JP, i already found but dont understand. Is it 192.168.2.136/sys.uart("19200") for example? This Dont Work so i guess my Syntax ist wrong

  Are you sure? yes | no

jp cocatrix wrote 02/18/2017 at 10:11 point

Two different interfaces: 
On browser:

192.168.2.136/?uart   revert the uart to 115200 until a reset. Useful in case you don't remind the current speed.

But on the uart interface (serial on tx rx)
sys.uart("115200")
Or other speed to change the uart baud rate on the next reset and forever until another sys.uart command.

115200 is the default. Before connecting a display controller, you must change to 28800.

  Are you sure? yes | no

Thomas wrote 02/18/2017 at 10:23 point

Ok, its a pitty. I  thought it could be adjusted on browser also. Is it possible to read the curren setting of baud on the browser? I unfortunatly have no communication between display controller and Esp . And want to check this first before Disassemble my Radio to connect it to a computer.

  Are you sure? yes | no

Thomas wrote 02/20/2017 at 11:07 point

Hi JP i know that your Standard setting is 28800. But i changed it both to 19200 because 28800 is not selectable with Arduino Serial Monitor. This works fine for me, also with IR Receiver on a pro Mni with 8 Mhz and 3,3 Volts.

In the past i had sometimes trouble with self changing settings on the Baudrate.

But in this case i checked now with computer, it hasnt changed.  I detached the esp Module and mount it again, and now Display works again.

It seems that my build on a protoboard is not much better than on a breadboard.

Regards

Thomas

  Are you sure? yes | no

Sergio wrote 02/13/2017 at 17:01 point

Hi JP, its posible to replace the VS1053 by a Bluetooth, to play the streams on some audio equipments or BT earphones?

  Are you sure? yes | no

jp cocatrix wrote 02/13/2017 at 17:17 point

To replace the vs1053? No, absolutely no, it is the stream decoder (mp3 aac etc).
But you can add a bluetooth transmitter after to send audio.
http://www.ebay.com/itm/EEEKit-Bluetooth-Transmitter-Receiver-Wireless-A2DP-Stereo-Audio-Music-Adapter-/192080524398
https://www.aliexpress.com/item/Bluetooth-launch-module-CSR57E6-bluetooth-audio-transmitter-module-DC5-24V/32780319150.html?spm=2114.01010208.3.25.IYofEc&ws_ab_test=searchweb0_0,searchweb201602_4_10065_10068_10000074_10000032_119_10060_10062_10056_10055_10000062_10054_10059_10099_10000013_10103_10102_10000016_10096_10000056_10000059_10052_10053_10107_10050_10106_10051_10000097_10000094_10000053_10000007_10000050_10084_10000100_10083_10000047_10080_10082_10081_10110_10111_10112_10113_10114_10115_10037_10033_10000041_10000044_10078_10079_10077_10000038_10073_10000035_10122_10121,searchweb201603_10,afswitch_2,ppcSwitch_5,single_sort_1_default&btsid=009badba-8b67-45c2-af4c-2ccb512e3c12
https://www.aliexpress.com/item/High-Quality-Mini-3-5mm-Bluetooth-Audio-Transmitter-A2DP-Stereo-Dongle-Adapter-for-TV-Mp3-Mp4/32783336194.html?spm=2114.01010208.3.83.nyyA3a&ws_ab_test=searchweb0_0,searchweb201602_4_10065_10068_10000074_10000032_119_10060_10062_10056_10055_10000062_10054_10059_10099_10000013_10103_10102_10000016_10096_10000056_10000059_10052_10053_10107_10050_10106_10051_10000097_10000094_10000053_10000007_10000050_10084_10000100_10083_10000047_10080_10082_10081_10110_10111_10112_10113_10114_10115_10037_10000041_10000044_10078_10079_10077_10000038_10073_10000035_10122_10121,searchweb201603_10,afswitch_2,ppcSwitch_5,single_sort_1_default&btsid=7bf82844-0d36-4b60-b01b-2619dfaded88

  Are you sure? yes | no

jan wrote 02/12/2017 at 15:40 point

Hi JP the ESP 8266 is not starting when I connect it to the USB port I have to press the reset button on the ESP 8266 to start it up  then its going oke

is it possible to get it started directly ? or by a command from Arduino

Is it possible to get time information sent to tx

  Are you sure? yes | no

jp cocatrix wrote 02/12/2017 at 21:29 point

Not sure to be able to do something for that. May be a weak usb?.
It works ok here.

The time is only on the browser for the moment. Do you need the time for displaying on the lcd?

  Are you sure? yes | no

jan wrote 02/12/2017 at 21:36 point

Yes i like the time on the Nextion diplay

  Are you sure? yes | no

jan wrote 04/15/2017 at 19:18 point

Thanks JP for the time for the display I not yet have it fix for my self butt will at it soon to the screen.

  Are you sure? yes | no

Sergio wrote 02/06/2017 at 05:02 point

Hi JP, since update 1.14 or 1.1.5and 1.1.6, i have something extrange with my player, after 30 min of playing the player stops alone. i have to push again the play button to continue listening a radio station. i testing for some hours and this problem happend every 30 min. can you check the sleep/wake code? Thanks.

  Are you sure? yes | no

jp cocatrix wrote 02/06/2017 at 06:50 point

When the stream disappear, a connection is retried once.
In Log you see:
##CLI.STOPPED# from try restart
##CLI.PLAYING#
##CLI.PLAYING#
##CLI.STOPPED# from data not played

The timeout is 10 seconds for a registered station and 2 seconds for an instant play.


The wake/Sleep code has nothing to do here.

  Are you sure? yes | no

Sergio wrote 02/06/2017 at 14:47 point

Thanks JP for your help, now i see this in log

##CLI.STOPPED# from try restart
##CLI.STOPPED# from clientConnect
##CLI.PLAYING#

But no sound on the speakers

i have to reset de player

  Are you sure? yes | no

jp cocatrix wrote 02/07/2017 at 13:16 point

You are right, a problem found when the stream disappears for a while.
I will debug. Thanks

  Are you sure? yes | no

yo2ldk wrote 02/03/2017 at 19:15 point

I publish my project with all need it to adapt the Nextion touchscreen on KaRAdio:

  https://hackaday.io/project/19707-nextion-touchscreen-display-for-web-player-karadio

  Are you sure? yes | no

jp cocatrix wrote 02/03/2017 at 20:15 point

Great.
JP Means Jean-Pierre ;-)

  Are you sure? yes | no

jan wrote 01/31/2017 at 20:29 point

Hi I have a question is it possible to connect a Nextion touch screen to it to control the radio

I love the web radio and the possibility to  update it thru the web interface I like to use this project to at it in a shower project I`m doing at this moment the Nextion wil be built in to controle the shower like temp end the 6 massage jets I like to ad the web radio into this project     

  Are you sure? yes | no

jp cocatrix wrote 01/31/2017 at 20:40 point

https://hackaday.io/yo2ldk done  it. Contact him.

  Are you sure? yes | no

ldv82 wrote 01/31/2017 at 18:54 point

Send commands sys.patch ( "0"). How do I know if it is adopted? Thank you. Everything worked. But I did not understand why. Many times you enter a command sys.patch ( "0"), but it did not help. More will not upgrade the firmware unnecessarily in this.

  Are you sure? yes | no

jp cocatrix wrote 01/31/2017 at 20:03 point

##CLI.URLSET#: stream.pcradio.biz
##CLI.PATHSET#: /Ruki_Vverh-low
##CLI.PORTSET#: 8000
##CLI.OVOLSET#: 0
##CLI.VOL#: 79
Header: Moved
##CLI.STOPPED# from C_HEADER
##CLI.URLSET#: 85.25.43.52
##CLI.PATHSET#: /Ruki_Vverh-low
##CLI.PORTSET#: 8000
##CLI.ICY0#:  Ruki_Vverh
##CLI.ICY3#:  http:\/\/www.pcradio.ru\/
##CLI.ICY4#:  Misc
##CLI.ICY5#:  24
##CLI.ICY6#:  Liquidsoap Radio!
##CLI.ICY7#:  channels=2;samplerate=44100;bitrate=24
##CLI.PLAYING#
##CLI.META#:
##CLI.VOL#: 132
##CLI.META#: Руки Вверх! - Убегай

It play well! but only with the patch.
Without it, the vs1053 crash.

If the patch is loaded you see:

VS Version (VS1053 is 4) = 4
SCI_ClockF = 0xB800
I2S Speed: 0
plugin size 18ce 2 c67
plugin start: 7 1 8050 6
scandone

Do a sys.patch ( "1") to enable it again, and reboot.

Are you sure to have the last release? Do an OTA upgrade please.
This is an alpha command not yet documented.

  Are you sure? yes | no

ldv82 wrote 01/31/2017 at 20:26 point
Yes. Already there were rows in the log
plugin size 18ce 2 c67
plugin start: 7 1 8050 6
Tried sys.patch command ( "1") of the sample. Maybe it helped.

What is the difference sys.patch command ( "0") and sys.patch ( "1")?

  Are you sure? yes | no

jp cocatrix wrote 01/31/2017 at 20:42 point

sys.patch ( "0")  inhibe the patch loading at reboot

sys.patch ( "1")  load the patch at reboot.

Some vs1053 doesn't support the patch, so i added this advanced command.

  Are you sure? yes | no

ldv82 wrote 01/30/2017 at 12:21 point

JP cocatrix
Upgrading to version 1.1.5+ via OTA already have? I updated via OTA and just hang on AAC channels began again. And I do not have the firmware 1,1,5, which worked.

It would be nice to be able download the last stable version of firmware.

  Are you sure? yes | no

jp cocatrix wrote 01/30/2017 at 12:38 point

Sorry, i don't understand your request.
AAC Channel?
Send a log please.

I don't want to store old release. Just make the new one working for everybody.

  Are you sure? yes | no

jp cocatrix wrote 01/30/2017 at 12:55 point

This release adds the official patch for aac. If it is a problem, send

sys.patch("0")

And reboot again.
It seems that some vs1053b are not really up to date to accept this patch.

No mean to see it from the software. (vs version is 4 for all vs1053)

  Are you sure? yes | no

vis22 wrote 01/28/2017 at 11:28 point

Currently OTA passes starts WEB interface to 192.168.4.1. 

After entering the existing AP SSID: AP PASSWORD and Validate their begin to pour in on UART
Fatal exception (0):
epc1 = 0x401000bb, epc2 = 0x00000000, epc3 = 0x4028251f, excvaddr = 0x00000000, depc = 0x0 0000000


I returned to version 1.1.5 from 24.01.2017.

  Are you sure? yes | no

jp cocatrix wrote 01/28/2017 at 12:27 point

Tested with 2 old prototypes, and a brand new one succesfully.
May be another problem?

  Are you sure? yes | no

vis22 wrote 01/28/2017 at 08:44 point

Dear jp cocatrix, seems to firmware 1.1.5 is not workable, as is the case of OTA and the github.kom, had through UART revert to version 1.1.4.

  Are you sure? yes | no

jp cocatrix wrote 01/28/2017 at 09:12 point

Yes, true. A wrong update. Do an OTA again.
Thanks a lot.

Tell me if it works now.

  Are you sure? yes | no

vis22 wrote 02/04/2017 at 23:29 point

Sorry, but there is really only Problem with ESP8266-7 (tested on 3 copies). With ESP8266-12 no problem.

  Are you sure? yes | no

jp cocatrix wrote 02/05/2017 at 09:12 point

vis22 wrote 10 hours ago
Sorry, but there is really only Problem with ESP8266-7 (tested on 3 copies). With ESP8266-12 no problem.

Sure, it is linked for esp8266 with 4MBytes only for OTA. (esp12 is ok)
I never tell that it support other flash size.

  Are you sure? yes | no

Pierre-Francois Bonnefoi wrote 01/26/2017 at 10:18 point

Wonderful project : tried it, love it ! Two suggestions : implement mDNS for easy discovery and allow two manual IP configurations, one for each provided AP.

  Are you sure? yes | no

jp cocatrix wrote 01/26/2017 at 17:49 point

The free ram memory is critical. So i am not sure to implement mDNS.
Less critical is the ip conf for each AP.  For the moment I recommend to use a static DHCP lease to avoid the need of two fixed IP. With a well configured router, it is transparent. That's why I added the MAC address. I have to develop a new bank in eeprom to store more permanent configurations. The first one is full, that's why I postponed the second IP.

Thanks for your suggestions and appreciations.

  Are you sure? yes | no

Dominique GEORGES wrote 01/25/2017 at 23:21 point

Very good project : step 1 OK for me : module ESP8266 OK. Now I wait module VS1053 and go ! 

Thank you for your help. DOM from France !

  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