Wifi Webradio With ESP8266 and VS1053 (KaraDio)

147K176307

Intro: Wifi Webradio With ESP8266 and VS1053 (KaraDio)

A wifi web radio player with only two low costs boards.

2017/08/25 New release 1.6: See The hackaday page
For more informations or questions, you can enter to the Karadio facebook group

Description:

Control with any browsers (ie edge, chrome mozilla etc...).or with an external hardware panel or with the uart interface.

Memory for 256 stations

OTA upgrade

Read direct mp3 or ogg streams or playlist .pls .m3u and .xspf

Read up to a 320 kb/s stream,

New web page, Fit well on mobile or computer.

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,

Very quick responsive web by caching local information in the browser and websocket.

a led indicates the state of the equipment . Speed blink: init, 90%in 10%out: connection in progress, 10% in 90%out: Equipment ready.

External DAC i2s interface on the vs1053 enabled.

Autostart on power on if the autoplay is checked.

STEP 1: Step1: What You Need

Parts required:

A nodeMcu V3 (on aliexpress)

A VS1053 module (aliexpress)

A Fiberglass board epoxy boards (aliexpress)

2.54mm 40 Pin Stright Female Single Row Pin Header Strip PCB Connector (aliexpress)

Some wires and Soldering Iron.

A pc or other with an usb port

and an usb to micro usb cable. (aliexpress)

An external amplifier or earphone.

A prototype can also be made using a breadboard and some jumper wires.

See The hackaday page

STEP 2: Step2: Build the Webradio Hardware

Follow the schematic to wire the board.

Be careful, the vs1053 is hard to soldier. Pins are very close each other.
Use a very thin iron.

Check each wire before the next step.
The power comes from the micro usb of the nodeMcu linked to the pc or a 5 volts transformer.

STEP 3: Step3: Loading the Software and First Use

Loading the software

You need the ESP flash download tool.

Load it at the Espressif page

The binaries files can be found on Github or hackaday

Follow the image to configure the tool depending of the tool release

To enter the flash mode of the nodeMcu, press and hold the flash button, the press the reset button. You ca release the flash button.
Start the download with the start button of the ESP flash tool.

After a while, the Finish green indication is shown.

Press the reset button of the nodeMcu. If succesful, the nodeMcu les blinks.

First use

If the acces point of your router is not known,

the webradio init itself as an AP. Connect your wifi to the ssid "WifiWebRadio", Browse to 192.168.4.1 to display the web 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.
Dont 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 is given by dhcp.
A sample of stations list can be uploaded via the web page and loaded to the webradio.

All future update will be made within the webradio interface via the ota feature.

STEP 4: Some Images

The esp8266 is an incredible processor. This project is made with the freertos environment and contains many tasks: a web client to connect to the radio stream, a web server to provide the browser interface 'and a child task for each client), an uart task to display and and send commands to the webradio, a task to manage an external panel command on the adc entry (schematic in the hardware directory on github), a task for each client websocket, etc.
It is a complex project, but the processor is really powerful. The only limit is the lack of ram, which can be removed by adding an external chip on the spi bus. See the hackaday page or github page.

The uart interface can show some debug informations and can send controls to the webradio.
For a command list see the uartinterface.txt file at

http://karadio.karawin.fr/Interface.txt

217 Comments

Is it existing samples with using I2S on ESP8266 for DAC module for instance PCM5102 and TFT display? Thank you for this project.
I put the same question to https://chat.openai.com/chat:
Yes, it is possible to use both I2C OLED and I2S DAC on ESP8266.

The ESP8266 microcontroller has support for both I2C and I2S communication protocols. The I2C protocol is commonly used for communicating with devices like the OLED display, while the I2S protocol is commonly used for digital audio communication, like with a DAC.
To use an I2C OLED display, you will need to connect it to the ESP8266 using the SDA and SCL pins. The ESP8266 has built-in I2C hardware, which makes it easy to communicate with an I2C device like an OLED display. You will also need to install the appropriate libraries and write the code to communicate with the OLED display.
To use an I2S DAC, you will need to connect it to the ESP8266 using the I2S interface pins. The ESP8266 also has built-in I2S hardware, which makes it easy to communicate with an I2S device like a DAC. You will need to install the appropriate libraries and write the code to configure the I2S interface.

Hello,
Sorry to ask a question that will seem silly to you
But what is the last list of bin files to flash please
Thank you and again well done!
Bonjour ,
Super sympa d'avoir répondu !
mais pouvez-vous svp me dire si c'est l'ensemble du répertoire ESP8266-Firmware qu'il faut flasher ou seulement quelques fichiers svp
je débute et je n'ai pas encore tester flash_download_tool_v3.8.5 je ne voudrais pas faire de bêtises :)
par exemple est-il possible de sauvegarder le firmware d'origine
en tout cas encore bravo pour votre projet , j'ai hâte de le faire
**************************************************************
Hello ,
Super nice to have answered!
But can you please tell me if the entire ESP8266-Firmware directory should be flashed or just a few files please
I'm just starting out and I haven't yet tested flash_download_tool_v3.8.5 I wouldn't do anything stupid :)
For example is it possible to save the original firmware
In any case again well done for your project, I can't wait to do it

Hello,

Il faut juste flasher les fichiers de l'image,
le boot, les deux new.4, l esp_init_data_default, et le blank, le tout à @ la bonne adresse..

Je sais qu'on peut sauver le soft d'origine, mais pas avec cet outil.
De toute facon, on peut le retrouver sur internet.

Mais je conseille plutot de faire la version esp32 qui est bien plus complete et permet d'ajouter tout un tas de périphériques comme un afficheur, des encoders pour volume et stations ou des boutons etc. Le tout configurable.

https://github.com/karawin/Ka-Radio32

A+
JP


Bonjour,
Merci encore pour la réponse c'est sympa
je vais essayer avec le NodeMCU que je possède puis lorsque j'aurai reçu un esp32 je vais suivre votre conseil
pour info , il faut bien prendre la dernière version de boot càd v1.7 ?

A+
C'est egal, n'importe quelle version
A+
Encore désolé de vous déranger mais j'ai besoin de votre aide svp
j'ai bien essayé de flasher les fichiers
mais j'ai cette réponse
et quelle est la procédure ensuite , y-t-il d'autres fichiers
( encore pardon mais je ne suis pas doué ...)

merci
Surement un fichier vérolé. Teste la taille de chacun

Bonjour,
J'ai mis les fichiers de "gauche" (
et voici le résultat
est-ce bon ?
encore mille excuses et merci pour ta patience, mais je n'arrive pas à piger pourquoi il y a 2 fenêtres de chargement , faut-il que je charge aussi ces fichiers ? ou est-ce suffisant ?

Cordialement

Hello! I have finished the radio and want to use the button control, but I don't know which GPIO the button is connected to in esp32. The drawing button of esp8266 file in your project is connected to ADC. ADC refers to which pin of esp32. Thank you!
This internet radio is great! love it! Production is complete. It's just that China's broadcast streaming media doesn't support the display of broadcast program information, and the display screen looks ugly and harmonious. I want to adjust the screen layout and enlarge the font, but I'm not familiar with programming, I'm only good at hardware.
I had trouble getting it to work, until I changed the SPI mode to DIO. It appears that some ESP8266 boards use flash chips that don't support QIO SPI. The board that I used is an unbranded Wemos D1 mini clone (V3.0.0). It looks exactly like a Wemos or Lolin board, but does not have a brand name on it (just D1 mini). The 4Mb flash chip is a BoyaMicro 25032BSSIG. The vendor ID is 68h and the device ID 4016h. See also: https://www.esp8266.com/viewtopic.php?p=87532
Hello, nice project!!!
Is there any way to replace the VS1053 with a SPDIF output ?
It works as a charm by following the suggested wiring. I just added a wire between A0 and ground.Thanks for this nice project.
Yes, it is on the picture on step 2.
Thanks. See the up to date on github.
More Comments