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

See some realizations of users at KaraDio

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.2

New features:

  • Volume correction for the control panel.
  • The volume is now saved every second if needed (less stress for the flash).
  • Stability

Built on 2017/05/22

Older releases:

- 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.

- 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...

Read more »

octet-stream - 392.50 kB - 05/22/2017 at 16:03

Download

octet-stream - 392.50 kB - 05/22/2017 at 16:03

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

View all 6 files

View all 6 components

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

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

vis22 wrote 01/25/2017 at 16:30 point

Many thanks.

  Are you sure? yes | no

vis22 wrote 01/24/2017 at 21:00 point

Many thanks!!!

I will try to connect the IR remote from the boom box.


P.S. Dear jp kokatriks, in the current version karadioU8glib.ino on github.com no strings the #define IR and the #ifdef IRLib2 ?

  Are you sure? yes | no

jp cocatrix wrote 01/24/2017 at 21:56 point

  Are you sure? yes | no

vis22 wrote 01/24/2017 at 18:05 point

Спасибо за совет.

Выход модуля питания 5V установлен конденсатор 220 мкФ.

Технический паспорт для vc1053 рекомендует конденсаторы 22 мкФ в силовых цепях.
Установленная на плате модуля С17 и С18 были сомнительными номинальным.
Под руки были только 100 мкФ.
В результате, цель достигнута, отказы прекратились.


Могу ли я узнать ИК-датчик схема проводки и способ настройки командных кодов ИК?

  Are you sure? yes | no

jp cocatrix wrote 01/24/2017 at 18:12 point

In u8glibConf.h of the software:

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
**** Instruction for the IR module *****************************************************************************************
------------------------------------
The model used here is from:
https://www.aliexpress.com/item/Hot-Selling-1pcs-New-Infrared-IR-Wireless-Remote-Control-Module-Kits-For-Arduino-Wholesale/32334118062.html?spm=2114.13010608.0.0.XzmgYk
or equivalent. Cost less than 1$

- Based on NEC protocol; Built-in 1 x AG10 battery;
- Remote control range: above 8m;
- Wavelength: 940Nm;
- Frequency: crystal oscillator: 455KHz; IR carrier frequency: 38KHz


// IR library
Install the library from https://github.com/cyborg5/IRLib2
Uncomment the #define IR  and the #ifdef IRLib2 at the beginning of the karadioU8glib.ino file.
----------------------

The IR receiver pins:
From left to right (pin at bottom, sensor in front of you)
Gnd VCC Signal

The signal must be connected to
For mini #define PIN_IRRECV  2  or 3
For micro #define PIN_IRRECV  2  or 3 or 7


In karadioU8glig.ino:
//  Uncomment the following line to see the code of your remote control and report to the case the value
//        Serial.print("Protocol:");Serial.print(results.decode_type);Serial.print("  value:");Serial.println(results.value,HEX);
If you want to use another remote, you can see the code of the keys and modify the switch case for the needed function.
See IRremote.h  to add the protocol you need for the remote.

The tx of the pro mini must be connected to the rx of the esp12 but
Warning; the esp rx pin is not 5V tolerant, so if your pro mini is a 5v version we need to adapt the level.
-------
See
http://www.instructables.com/id/Pi-Cubed-How-to-connect-a-33V-Raspberry-Pi-to-a-5V/

The value of the resistors is not critical. Only the ration 1/3 2/3 must be respected 1k and 2k for example)

Enjoy.

  Are you sure? yes | no

Sergio wrote 01/23/2017 at 23:40 point

Hi JP, 

Autoplay dosn't work correctly, every time I turn the player on, I have to press the play button, to start the radio playing

  Are you sure? yes | no

jp cocatrix wrote 01/24/2017 at 02:22 point

update please.

  Are you sure? yes | no

Sergio wrote 01/24/2017 at 11:00 point

With the last update, i don't have sound with any stations

  Are you sure? yes | no

jp cocatrix wrote 01/24/2017 at 12:22 point

Do another ota update, and enter the command on uart:
sys.patch("0")
And reboot again.

I wonder why your prototype doesn't like the vs1053 patch.
Are you alone in the world? May be some other problem on wire can explain it?

  Are you sure? yes | no

Sergio wrote 01/24/2017 at 14:28 point

Till i'm update the player  to the last update works ok, the only problem was that the autoplay doesn´t work ok. No wire problems, i´ll try with the uart command that you said. 

  Are you sure? yes | no

Sergio wrote 01/25/2017 at 00:10 point

now works, on 2 players i have to entered the command on the uart

Thanks, may be a problem with the VS1053 patch

  Are you sure? yes | no

jp cocatrix wrote 01/25/2017 at 09:16 point

The vs1053 patch is the official one. No problem with it. May be a spi error on transfert? The wires are longs between the esp and vs?

  Are you sure? yes | no

vis22 wrote 01/23/2017 at 17:45 point

May be. The power supply used DC-DC step-down module LM2596 powered by the voltage regulator +12 V boom-box.
ESP8266-12 randomly stopped communication with VS1053, assuming a fault ESP8266-12 replaced it ESP8266-7 effect it is not received, the modules behave as well. Only extra capacitors ensure their reliable operation.

  Are you sure? yes | no

jp cocatrix wrote 01/23/2017 at 18:13 point

May be a high frequency filter with a few pf, and a 22µf on the 5 volts only?

  Are you sure? yes | no

vis22 wrote 01/22/2017 at 19:04 point

The recommended VS1053 module has to install additional capacitors 22 microfarads in parallel of C17 and C18 to the supply chains. Without them, the module sometimes freezes.

  Are you sure? yes | no

jp cocatrix wrote 01/22/2017 at 19:25 point

Never seen on more than 10 prototypes. 

May be a power supply problem on your prototype before these regulators?

  Are you sure? yes | no

Paul wrote 03/14/2017 at 04:10 point

Hi, what caps do you recommend, just ceramic SMC's?

  Are you sure? yes | no

jp cocatrix wrote 03/14/2017 at 18:07 point

I never experimented a freeeze of the vs1053.

  Are you sure? yes | no

archetix wrote 01/20/2017 at 06:07 point

HI T4SPAM,

exactly


amp would be activated only during playback
(It prevents clatter at start-up)
the rest suppresses  filter


Please excuse my bad English
(CZech > EN Google translate)  :-)

  Are you sure? yes | no

Thomas wrote 01/20/2017 at 08:00 point

Great. Pin D4(GPIO2) is already in use for LED on Button Interface.

But we can use Pin Playing 12 on LCD MCU as well.

Regards

Thomas

  Are you sure? yes | no

archetix wrote 01/20/2017 at 09:16 point

Pin D4 (GPIO2) is already in use for LED on Button Interface ...

I would therefore suggest a new feature firmware for ESP8266
configuration GPIO2

LED out

or
amp control

thus enabling control amplifier without display

Please excuse my bad English


(CZech > EN Google translate)  :-)

  Are you sure? yes | no

jp cocatrix wrote 01/20/2017 at 10:27 point

Yes, I can also add a sys command to choose between the blinking default and the playing status on gpio2

  Are you sure? yes | no

archetix wrote 01/20/2017 at 12:47 point

HI jp cocatrix,

It would be great
Thank you in advance
Archetix

  Are you sure? yes | no

jp cocatrix wrote 01/20/2017 at 16:38 point

No problem. in the next release

sys.led("x")  with x=0 default blink, x=1 led On when playing (state saved in eprom)

Ok?

  Are you sure? yes | no

archetix wrote 01/20/2017 at 17:58 point

OK
Thank you very much

  Are you sure? yes | no

archetix wrote 01/19/2017 at 13:52 point

Hello I want to commend this great project.
I have a suggestion for a configuration option GPIO2
such as switch power amplifier
could be a useful function (standby mode)
Thank you...


  Are you sure? yes | no

Thomas wrote 01/20/2017 at 04:59 point

Hi Archetix, 

i also tried to use  a Pam based amplifier beacause it is very cheap.

But i has very frustrating klicking when loudness is low. i guess your cirquit can eleminate that, right?

Regards

Thomas

  Are you sure? yes | no

jp cocatrix wrote 01/20/2017 at 16:33 point

Well done for the ground to avoid loop!

  Are you sure? yes | no

vis22 wrote 01/15/2017 at 20:10 point

Thank you for your project, it is allowed to breathe life into my boom-box.

  Are you sure? yes | no

jp cocatrix wrote 01/15/2017 at 20:53 point

You are welcome.

  Are you sure? yes | no

Sergio wrote 01/15/2017 at 14:59 point

The new updates, load into WEb browser more quickly than old versions.

  Are you sure? yes | no

jp cocatrix wrote 01/15/2017 at 15:42 point

Yes, a bug in the websocket corrected.

  Are you sure? yes | no

Richard wrote 01/12/2017 at 15:48 point

I am finding the Nokia 5110 display a little unreliable.  

I've changed the CLI baud rate to 28800 and the display shows the correct station data some of the time, but as you move through the stations, the display will stop updating. 

The CLI data is still being sent as I can monitor it. 

Is it worth trying a slower baud?

  Are you sure? yes | no

jp cocatrix wrote 01/12/2017 at 16:00 point

With karadioNokia5110 or karadioU8glib?

It is not normal, but yes try a slower baud.

If it stop to display any change after stopping, something is wrong in your soft or wiring.

  Are you sure? yes | no

Richard wrote 01/12/2017 at 17:10 point

This was with the older Nokia5110. I just tried the U8glib version, but it's failing to build as Arduino IDE 1.6.5 can't find the U8glib header files...

  Are you sure? yes | no

satbk_2 wrote 01/10/2017 at 16:53 point

Hi all. Please tell me how can I connect the LCD module to this radio? Which module can be connected? Thank you

  Are you sure? yes | no

jp cocatrix wrote 01/12/2017 at 16:06 point

  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