Introduction: Wifi Webradio With ESP8266 and VS1053 (KaraDio)

About: Old retired engineer

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