close-circle
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
close
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


Release 1.6.2

Built on 2017/11/02

New:

  • 1.6.2 Add of the rssi (Received Signal Strength Indication -30:best, -99:worst) at top right of the web page.
  • 1.6.1: Click on header to rewind to the top of a page.
  • Header stays on top of the web page
  • gzipped html tranfert. More stable and improved speed
  • The page content follows the header size.

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 XRST

GPIO02

D8:GPIO15 to VS1053 XCS

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

download-circle
Download

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

download-circle
Download

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

download-circle
Download

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

download-circle
Download

esp_init_data_default.bin

Must be written only one time.

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

download-circle
Download

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

  • 2
    Step 2

View all instructions

Enjoy this project?

Share

Discussions

koka5675766 wrote 5 days ago point

Hello. At me the offer to the author, to add the timer of inclusion and deenergizing on time.

  Are you sure? yes | no

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

Hello, for quality sound it is important to know the level of wi-fi signal. Is there a possibility to bring the level indicator wi-fi access the management page of Karadio.

  Are you sure? yes | no

jp cocatrix wrote 11/01/2017 at 18:05 point

I tried some time ago, but it broke somethings. I agree that it is a good feature. I will try again.

Done in 1.6.2

  Are you sure? yes | no

vis22 wrote 11/02/2017 at 20:35 point

Many thanks for your promptness. Updated to 1.6.2, the wi-fi indicator is working.

  Are you sure? yes | no

Thomas wrote 09/03/2017 at 12:33 point

Hi JP, i have a big problem. After upgrading from 1.1.7 to 1.6 I have no sound anymore. The slider for loudness goes from minus 127 to 0. Is there a change from a variable to a signed type? I tried to enable the patch as well but no success. Any further Idea what to try?

Thanks a lot and have a nice Sunday

Thomas

  Are you sure? yes | no

jp cocatrix wrote 09/03/2017 at 13:04 point

It seems that your vs1053 doesn't like the vs patch. To disable it on the uart interface or with telnet type the command
sys.patch("0")
and reset the esp8266<

The slider in db is from -127db to 0db

  Are you sure? yes | no

jp cocatrix wrote 09/03/2017 at 13:11 point

Or may be another problem on wire because it is the only cause i can imagine. See the log on the serial at the beginning to see if the vs is well detected.

  Are you sure? yes | no

Thomas wrote 09/11/2017 at 06:55 point

Hi JP, it seems to be a defect in Flash memory.

I tried several things. A reflash ended in a blinking Pattern twice a second and no serial output. So i assume the flash is dead. I replaced the ESP8266 board and now it runs good again.


Regards


Thomas

  Are you sure? yes | no

satos wrote 08/27/2017 at 13:26 point

Hi,I like your projekt very much.
Now i have a little problem with the OLED Display.
Sometimes it loses connection to ESP and the Text  becomes  static.
I use a Wemos D1 mini and the Arduino ATmega 328 mini pro 8Mhz 3.3V to
drive the OLED. I also use IR and the Switches.
When i set the uart speed again (sys.uart("28800") it works
for some time, only the displayed Ip at startup is then 0.0.0.0 But Sound is ok and the "real" IP is also reachable with the Browser.
I work with Version 1.6 and i believe it worked better with 1.4 in my Case. Any Ideas?

  Are you sure? yes | no

jan wrote 08/22/2017 at 18:04 point

Is it possible to make a soft reset from the ardruino 

  Are you sure? yes | no

jp cocatrix wrote 08/22/2017 at 20:08 point

from the arduino? I don't have an arduino on this project apart the addon for lcd and controls. Anyway, to send a reboot on the serial, the command is
sys.boot

  Are you sure? yes | no

ernie 881 wrote 06/09/2017 at 14:59 point

I personally think that the red VS1053B modules e. g. http://www.ebay.de/itm/VS1053-MP3-Module-with-SD-card-slot-VS1053B-Ogg-real-time-recording-for-Arduino-/272508590908?hash=item3f72c71b3c:g:1ogAAOSwUKxYa5fD are much better than the blue ones labeled "lcsoft studio" or "lc technology". These were or damaged at arrival or dead after a few hours and don't have pin 34 pulled down (mp3 enabled at startup see http://www.bajdi.com/lcsoft-vs1053-mp3-module/ ).

  Are you sure? yes | no

jp cocatrix wrote 06/13/2017 at 20:19 point

I own all models lcsoft, red one and alientek (more complete than other) and all play for month now without problem.

The pin 34 is not a problem with the software patch.

  Are you sure? yes | no

ldv82 wrote 05/30/2017 at 13:44 point

Most likely, this depends on the compatibility of VS1053 and DAC. You will use an external DAC instead of the built-in VS1053.

  Are you sure? yes | no

jp cocatrix wrote 05/30/2017 at 16:37 point

I am not an expert on DAC. All I know is:
##I2S speed: 0, 0=48kHz, 1=96kHz, 2=192kHz#
from the vs1053.

  Are you sure? yes | no

brony wrote 05/20/2017 at 04:53 point

Hi. Could you implement so called "radio buttons" to select preset stations?

  Are you sure? yes | no

aqvarius-sey wrote 05/18/2017 at 14:57 point

on version 1.1.5 strange problem. if you have installed memory and increase the volume of the radio goes silent. only a reboot helps. if the memory is to retrieve all works. checked all the connection is correct.

  Are you sure? yes | no

aqvarius-sey wrote 05/18/2017 at 10:05 point

hi! in the beginning I want to say thank you for a great project! I have a question to the Creator. updated from version 1.1.5 to 1.2.1. buttons connected to an analog input. problems: 1. when adjusting the volume there is no smooth adjustment while holding the button. 2. when you press short the volume randomly changes (jumps from low to high and back). in version 1.1.5 often, she cleared the EEPROM in the esp8266, you need to re-set the network settings, and list of stations.

  Are you sure? yes | no

AndrzejSc wrote 05/16/2017 at 14:32 point

I have a problem when change uart to 9600, after reset radio doesn't play. If I change back to 115200 it's play again. Debug informations is the same at both cases. Any ideas ?

  Are you sure? yes | no

ldv82 wrote 05/16/2017 at 09:44 point
What are the advantages of ESP32? Any new functions will be at the radio?

  Are you sure? yes | no

jp cocatrix wrote 05/16/2017 at 09:53 point

Don't know yet ;-)
Just for fun and may be bluetooth, but I have to learn it before.

  Are you sure? yes | no

ldv82 wrote 05/15/2017 at 13:54 point

jp cocatrix 

Do not plan a version STM32+SSD1306+encoder?

  Are you sure? yes | no

jp cocatrix wrote 05/15/2017 at 22:32 point

Yes, i'am working on it. Some technical problem with u8glib ...

  Are you sure? yes | no

jp cocatrix wrote 05/30/2017 at 16:33 point

Too busy to study the STM32. I have one but unpacked for the moment.

  Are you sure? yes | no

Roman wrote 05/13/2017 at 15:29 point

HI,Problem! Radio sometimes stops working (hangs)!!!!

Thanks

Best regards,
~~ Roman

  Are you sure? yes | no

Flex wrote 05/14/2017 at 15:04 point

Hey,

I’ve got a similar problem, sometimes stops the VS Coding and needs a reset. The NodeMCU and Website keep working well, but the speaker didn’t get a signal from the decoder. It seems to happen randomly, sometimes after 20min and othertimes the systems run over hours perfectly.


I use an NodeMCU connected to an Arduino (for the OLED and a FM transmitter), buttons and such an VS1053: http://www.ebay.de/itm/VS1053-MP3-Module-Development-Board-w-On-Board-Recording-Function-SPI-Interface-/291596880495?hash=item43e4874a6f:g:gm4AAOSwEK9Tw2qE

It could be a pointer issue of the VS, when I stream from my Shoutcast-Server with 320kbps stereo it feels like the problem comes earlier as if I stream with 98kbps mono signal.

Greets

Felix

  Are you sure? yes | no

cwojtala wrote 05/03/2017 at 11:49 point

Hi, i've got an issue. I flashed the esp8266 with the esptool like this:

esptool.py write_flash 0x000 boot_v1.6.bin 0x01000 user1.4096.new.4.bin
0x81000 user2.4096.new.4.bin 0x7e000 blank.bin 0x3fe000 blank.bin
0xfc000 esp_init_data_default.bin 0x3fc000 esp_init_data_default.bin

and it seemed to work. i can connect to the AP but when i fill in the SSID ans password an then click validate nothing happens, after a reset its still in ap mode....

pls hlp

chris

  Are you sure? yes | no

jp cocatrix wrote 05/03/2017 at 13:46 point

dhcp, or ip,mask,  gateway?

In dhcp the ip may be read on the uart interface.

  Are you sure? yes | no

cwojtala wrote 05/03/2017 at 13:59 point

i.ve tried both. it starts always in ap mode again

  Are you sure? yes | no

jp cocatrix wrote 05/03/2017 at 14:01 point

check with a terminal on the usb com port. You will see the error. Certainly a bad password.

  Are you sure? yes | no

cwojtala wrote 05/03/2017 at 14:51 point

dont ask m how but after a couple resets ist working now. what i observed is tha at the beginning there was no mac adress next to the wlan security options, but now is is there and its working. thx for this very cool project

  Are you sure? yes | no

jp cocatrix wrote 05/03/2017 at 14:23 point

notice that the validate will reset automatically. It is the validate on right of the Wifi & Network label

  Are you sure? yes | no

Vishal Dhayalan wrote 04/22/2017 at 22:51 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

jp cocatrix wrote 05/03/2017 at 13:50 point

Which one?

  Are you sure? yes | no

Vishal Dhayalan wrote 04/22/2017 at 22:48 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

jp cocatrix wrote 05/03/2017 at 13:48 point

no, not without arduino mini pro. But you can have IR remote without display. Just don't add it.

Thanks

  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

jp cocatrix wrote 05/03/2017 at 13:52 point

No, it is a simplified implementation.

  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

Similar Projects

Does this project spark your interest?

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