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 1.9


KaRadio32:

Release 1.9 Rev6 - Built on 2020/01/11

New:

  • 1.9 R7
    • New telnet or serial commands: cli.wake, cli.sleep:
      cli.wake("x"): x in minutes. Start or stop the wake function. A value 0 stop the wake timer cli.sleep("x"): x in minutes. Start or stop the sleep function. A value 0 stop the sleep timer cli.wake: Display the current value in seconds cli.Sleep: Display the current value in seconds
    • sys.lcdstop, sys.lcdblv: sys.lcdstop and sys.lcdstop("x"): Timer in seconds to switch off the lcd on stop mode. 0= no timer sys.lcdblv and sys.lcdblv("x"): Value in percent of the backlight.
    • Fade in and out for backlight driven by a gpio.
    • New tool and hardware partition from Bazooka07: Update for boards/nvs_generator.sh use nvs_partition_gen.py tool directly from $IDF_PATH folder can process one or all boards in one shot. Update size for binary partition : 0x3000 now ! Look at : https://docs.espressif.com/projects/esp-idf/en/latest/api-reference/storage/nvs_partition_gen.html#running-the-utility
    • Decode url correctly for /webStation. included name #149
    • Esp-idf Release 3.3.1
    • https://github.com/karawin/Ka-Radio32/releases
  • 1.9 R6:
    • Parse playlist fix.
  • 1.9 R4:
    • wifi.auto command now disable the AP mode if already connected to an AP in the past.
    • I2S corrected for 32bit output stream. Thanks to har-in-air github user.
    • Instant play: new button "Add/Edit", and update fields on cli commands.

KaRadio: Release 1.9

Release 1.9 R6 - Built on 2020/01/11

New:

  • 1.9 R6:
    • Parse playlist fix.
  • 1.9 R4:
    • LWIP layer tuned. Better errno 11 computing.

History:

history

For ESP32 see the github page KaRadio32. Release 1.6 R4

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...
Read more »

KaRadio32.bin

KaRadio32 1.9 Rev 7 Updated

octet-stream - 1.43 MB - 02/14/2020 at 22:20

Download

user2.4096.new.4.bin

KaRadio 1.9 Rev 6 Partition 1

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

Download

user1.4096.new.4.bin

KaRadio 1.9 Rev 6 Partition 2

octet-stream - 421.50 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

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

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

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

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

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

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

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

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

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


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

  Are you sure? yes | no

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

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

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

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

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

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

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

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

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

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

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

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

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

Jean-Pierre Cocatrix wrote 01/12/2017 at 16:06 point

  Are you sure? yes | no

mangup wrote 01/10/2017 at 08:05 point

Thanks for update!

  Are you sure? yes | no

Thomas wrote 01/10/2017 at 05:15 point

Morning JP,

thanks a lot for your work in Karadio and your newest update.

Now my stop button is working again :-)

Have a nice day

Thomas

  Are you sure? yes | no

polgrv wrote 01/08/2017 at 17:50 point

jp cocatrix,

thank you for what you've shared with us!

One note: both here and on the GitHub README.md you report 192.164.4.1 as setup page on the staring AP mode. For me was 192.168.4.1, but I've not changed anything in your files. Is it possible the published IP is wrong?

If it could be useful, to upload your files on the ESP working on Linux, I downloaded from GitHub esptool.py, I added the dependency to get it working, I copied in the esptool folder all the .BIN files and I just executed this shell command after I connected my NodeMcu board to the USB port:

python2.7 esptool.py --port /dev/ttyUSB0 write_flash -ff 40m -fm qio -fs 32m 0x00000 boot_v1.5.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

This is my first running implementation (to replace the mono speaker I've already a small amp board and I've just to putt all in a box):

karadio_by_paolo

Boards from aliexpress, connection cable from an internal mainboard->front panel USB cable and a strip of female headers.

  Are you sure? yes | no

Jean-Pierre Cocatrix wrote 01/20/2017 at 16:44 point

Hello,

I haven't see your message befor. Sorry.

Yes a mistale in the README. Corrected thanks.

Thanks for the shell. I add it in the next delivery.

  Are you sure? yes | no

Thomas wrote 01/08/2017 at 08:31 point

Since my first Radio is still not fully build up i did a second one for the father of my Girlfriend.

I buld it up in a small stereo speaker which is used available for approx. 12€ on A...zon.

You can recognize it on the blue light of life :)

et="_blank">

  Are you sure? yes | no

Jean-Pierre Cocatrix wrote 01/08/2017 at 17:15 point

Well done!

  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