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

boot_v1.7.bin

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

Download

blank.bin

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

Zoltán Tóth wrote 01/15/2019 at 16:44 point

Hello!

I want a firmware that runs the SH1106 LED display, unfortunately I couldn't solve it ... Thank you! Sorry for my weak English knowledge! If I were to get a link it would be the simplest ... The display is 128x64 size 1.3 ".

  Are you sure? yes | no

nox.air wrote 10/16/2018 at 15:58 point

Hello Jean-Pierre and everybody!

Could you advice me? I'm trying to do KaRadio32 with the ESP32 Devkitv1, but something's wrong. I suspect "Flash download tools" can't do with my ESP properly. 

First it couldn't download KaRadio32 to the ESP32 (esp_sync_blocking), but later I managed to erase (only pressing boot while ....._____....._____). Only after this I finally loaded KaRadio32 to my ESP32. I linked it to WiFi but monitoring worked during near minute and finished. Maybe the device is defected? But later I installed Mongoose OS to the ESP32. It worked and exchanged data via WiFi. I've not recieved an amplifier from Aliexpress yet, so can't test lineout.

Is there another loader for ESP32, not "Flash download tools"? And maybe I can do something else?

Thank you in advance!

  Are you sure? yes | no

makersting wrote 07/04/2018 at 12:54 point

Hello Jean-Pierre,

somehow I managed to get contact to the ESP via my mobile. When I first entered the wifi-settings, I broke up to fast: I only filled in the information for my home-ssid and its passowrd, then I accidently saved before I filled in the IP-adress of the router. Now I cant find the ESP any more in the WiFi-net. What can I do?

Thanx!

Edit: I maneged to fix the problem. Actualy it was a network problem, so it has had nothing to do with Karadio.

Thanx for the effort creating this great internet-radio, Jean-Pierre!

  Are you sure? yes | no

lellobov wrote 06/06/2018 at 13:05 point

kindly there is someone who can show me the schematic and code to used an LCD 16x2 and control with three keys. thanks

  Are you sure? yes | no

PIERRE wrote 05/24/2018 at 11:54 point

Hello, I build this project with a esp32 and all run for the best but i would like to move the VSPI pins (18/19/23/5) to the HSPI pin (12/13/14/15) for a simplification of a PCB design and  this don't run.

The web and telnet is OK, i can use the radio but nothing is display on the LCD.

(Type 197 ) 

I test the screen with another soft and it'ok.

I checked all the GPIO.H and all the files where SPI is called but i didn't found where i made a mistake.

Could you help me ? 

  Are you sure? yes | no

Jean-Pierre Cocatrix wrote 06/23/2018 at 22:54 point

How can I?Send the gpio.h may be

  Are you sure? yes | no

Jean-Pierre Cocatrix wrote 05/06/2018 at 11:07 point

Take it at http://karadio.karawin.fr/KaRadio32.bin
Thanks, I forgot to mention it.

  Are you sure? yes | no

TheotherMike wrote 05/06/2018 at 16:44 point

Thank you so much ! Sound over vs1053 as well as I2C-OLED are running now. So nice !!

Unfortunately after some minutes it stops music an does not respond until repowering..?

  Are you sure? yes | no

Jean-Pierre Cocatrix wrote 05/06/2018 at 16:46 point

See on telnet or uart log if an error is found..

  Are you sure? yes | no

TheotherMike wrote 05/06/2018 at 17:45 point

Mmh, using telnet/uart I was able to change to the correct display, did a system reboot and an ota update...so that all works nicely.  Log does not show any errors. Log states "playing". So I tested it with vs1053 patch (what is it for?) and without...same behavior, it suddenly stops audio after some short time.

  Are you sure? yes | no

Jean-Pierre Cocatrix wrote 05/08/2018 at 09:09 point

For all url?

  Are you sure? yes | no

TheotherMike wrote 05/08/2018 at 09:48 point

"For all URL?"

Seems so. Whole yesterday evening I tested and had Trouble even with local Radio streams. Webpage and LCD still running until a station Change, then it completely hangs. I will reorder some Hardware.... Interestingly I used exactly this VS1053 with an ESP8266 and your Software without issues...

  Are you sure? yes | no

TheotherMike wrote 05/14/2018 at 19:57 point

Hah, it is working now ! It seems to be an issue with the ESP32. I used a new one and now its perfect !! Also, I think its running faster now...

Best regards,

Mike

  Are you sure? yes | no

TheotherMike wrote 05/06/2018 at 09:31 point

Dear JP,

I have an ESP32-WROOM on my desk and want to built your radio.

Unfortunately, I cannot find the "build/karadio32.bin" in your github!? 

Where are the install binaries located ?

Thank you in advance,

Mike

  Are you sure? yes | no

Thomas wrote 03/21/2018 at 08:19 point

Hello JP,

are there any known stability issues in 1.6.3?

I tried to build a new  Karadio and after updating  to 1.6.3 i have bootloops.

Tried on different modules. After Reflashing back to 1.0.8 it works stable.

Any Idea?


Thanks

Thomas

  Are you sure? yes | no

Jean-Pierre Cocatrix wrote 03/21/2018 at 08:23 point

From 1.0.8 to 1.6.3, it is a big jump. I think that it will be useful to erase all the flash eprom, all 4MB.

  Are you sure? yes | no

Thomas wrote 03/21/2018 at 09:25 point

I have the binaries 1.0.8 laying around. And ever i build a new karadio i flash them and than i update via the Webinterface Update button.

But you're right. It is a big Jump. I will download new binaries from your Github, erease the whole flash and try again.

Flash Pattern is still identical?

1. Boot

2. User1

3. User2

4. blank

5. blank

6. default

7. default

Thanks

Thomas

  Are you sure? yes | no

Jean-Pierre Cocatrix wrote 03/21/2018 at 12:38 point

The saved data structure is not compatible with the old one.
<try https://github.com/TridentTD/ESP8266FactoryReset to erase all.

  Are you sure? yes | no

Kabron wrote 03/11/2018 at 07:08 point

I configured addon.h and gpio.h as following:

#define LCD_COLOR 128 //0x80
#define LCD_SPI 194 //0x40
#define LCD_I2C 0
#define LCD_NONE 255

#define PIN_LCD_CS GPIO_NUM_14 //CS
#define PIN_LCD_A0 GPIO_NUM_27 //A0 or D/C
#define PIN_LCD_RST GPIO_NUM_33 //Reset RES RST or not used`

compiled OK, stations receive OK
sys.lcd
##LCD is 194#
but after start I see very very slowly LCD filling with light blue and nothing more.

  Are you sure? yes | no

Jean-Pierre Cocatrix wrote 03/11/2018 at 08:35 point

Your mistake is on addon.h. It must not be changed.
#define LCD_SPI            64 //0x40

The lcd type is set by sys.lcd command.

  Are you sure? yes | no

Kabron wrote 03/11/2018 at 10:57 point

Thank you for fast reaction.

I corrected it with no result. Additional test results I putted on github page.

  Are you sure? yes | no

Slovator wrote 03/03/2018 at 15:17 point

Is it possible to add a radio on / off function at the specified time in the project on ESP32?

  Are you sure? yes | no

wlads wrote 02/24/2018 at 13:34 point

Thank you for the project.

I do not have enough cyrillic fonts, please add

  Are you sure? yes | no

pilnikov wrote 02/06/2018 at 14:51 point

Hello JeanPierre. Thank you very much for your great useful work for us. I want to modify my radio (add the WEB function to it) So I had an little idea about it, maybe she is not new, of course, but I decided to share it with you. My radio on the side can play files from USB, Micro SD, Bluetooth and AUX. Also my radio have a Ir RC. Aliexpress sells many similar low cost modules.  The idea of controlling my radio by 1 wire (through Ir line) - by small means we get more opportunities. 

How do you like this?

  Are you sure? yes | no

mauro.venturelli wrote 01/21/2018 at 11:10 point

Hello JeanPierre, first of all ,thanks for the beautiful project.

I've built one (KaRadio-32 with integrated addons) and an LCD ILI9341 194 // 240x320

Everything working fine but the image is shifted to right by abt 20 pixels,any possibility of fixing it ?

Thanks

Mauro

  Are you sure? yes | no

Jean-Pierre Cocatrix wrote 01/21/2018 at 12:57 point

Look at the lcd switched off. You will see that it is the lcd itself with a black array on left.

  Are you sure? yes | no

petitjp wrote 01/18/2018 at 20:35 point

bonjour Jean-Pierre 

Je m'appelle aussi Jean-Pierre : j'ai 66 ans et j'aurai besoin de votre aide pour adapter votre système pour ma mère de 86 ans... elle écoute France Inter en WiFi mais elle devient très maladroite...je vous dis quoi (je suis chti) par Mel : mode Ip. Merci

  Are you sure? yes | no

Eugene wrote 12/21/2017 at 14:18 point

Hello Jean-Pierre, thank you very much for your wonderfull project. I have some problem with lcd display ( ili9341) initialization . I can see just:

Karadio

(c) Karawin

IR+clcd V1.1

IP:

and nothing more. I use arduino pro mini + lcd ili 9341 + karadioUCglib. Uart speed 28800 same on arduino and esp 12f. (ucglibConf: Ucglib_ILI9341_18x240x320_SWSPI ucg(/*sclk=*/ 7, /*data=*/ 6, /*cd=*/ 5 , /*cs=*/ 3, /*reset=*/ 4); ) All worked on 5110 lcd. but i haven't it now. Can you help please? 

ps: sorry for my english =-)

  Are you sure? yes | no

Jean-Pierre Cocatrix wrote 01/21/2018 at 13:01 point

Probably a problem of uart if nothing seems received. I don't have a prototype to test it.

  Are you sure? yes | no

koka5675766 wrote 12/09/2017 at 07:27 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

Jean-Pierre 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

Jean-Pierre 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

Jean-Pierre 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

Jean-Pierre 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

Similar Projects

Does this project spark your interest?

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