Close
0%
0%

WiFi Webradio with ESP8266 and VS1053

A wifi web radio player with only low costs boards.
KaRadio, listen the world.

Similar projects worth following
Control with any browsers (ie edge, chrome mozilla etc...).
or with an external hardware panel or with the uart interface.
Memory for 255 stations
OTA upgrade
Read direct mp3 or ogg streams or playlist .pls .m3u and .xspf
Read up to a 320 kb/s stream,
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,
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 (gpo2->resistor->led->3.3volt). Speed blink: init, 90%in 10%out: connection in progress, 10% in 90%out: Equipment ready.
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 the lcd +IR software's on the Setting panel of the webradio

A nice telnet+IR extension from Gábriel Kovács gabeszakem@gmail.com: ESP8266-WiFi-UART-Bridge-master.zip

A nextion touchscreen display for KaraDio from yo2ldk : Here

For more informations or questions, you can enter to the Karadio facebook group


Release 1.1.7

New features:

- Now Both AP SSID and AP Password are encoded to permit special characters like & : etc
- "Restore stations" corrected for some heavy lists
- Station information now give the number of the current station
- retry client connection modified to avoid blocking situation.
Built on 2017/02/09

Older releases:

- Modification of the list of uart command. See uart and html interfaces
- New sys.patch command. Inhibit or permit (default) the load of a vs1053 patch for AAC stations.
- New sys.led command. Default is blinking mode, or Play mode: the led is on when a station is playing.
- Modification of the wifi.con command. Now the AP can be set in the AP
mode (192.168.4.1) without the need of the web interface.
- New print button on the Stations panel: Print the list of stations, number and name.
- New logo ;-)
- Many bugs removed thanks to users feedback's.
- Modification of the list of uart command. See uart and html interfaces
- New IR and LCD software
- Autoplay corrected

- Now 2 AP's can be set. The second one will be tested if the first is not detected.
- The Mac address of the radio is displayed
- An offset volume can be set for each station in Station editor.
- Added: a reset button for the equalizer
- Pb on Autostart not correctly checked: corrected
- New html command: instant="http://your url"
- The path of a station can now include some & parameters.
-- Uart command list now can take a parameter: the number of the station to display.
.If no parameter, the complete list is sent.
- New wake and sleep features. Two modes: Time mode: "hh:mm" to wake or sleep at a given hour, or the delay mode "mm".
- Many minors html adjustments.
- The user agent for http request can be set for some special streams.Example: http://pcradio.ru/player/listradio/pcradio_ru.xml
which need a user agent= pcradio.
This pcradio user agent is already implemented automatically in the code when a pcradio station is encountered.
- Drag an drop on the stations list: rearrange the list by dragging a line to another one. Save the change when asked.
- Themes toggle between light blue and dark marron theme with a click on the logo.
- Sleep mode to stop the play after a delay.
- Functions on the web page are optimized.
- Many minor improvements on the code and the web page.
- New uart interface command: cli.uart("x")
With x the uart baudrate at the next reset and permanently.
List of valid baudrate: 1200, 2400, 4800, 9600, 14400, 19200, 28800, 38400, 57600, 76880, 115200, 230400
The command will reply with
##CLI.UART= 115200# on the next reset.
- New Station selection with number
- Stations management in one page
- abort button on station edition.
- New html interface. Can receive basic commands (play, stop, volume from wget or browser)
- New I2S external DAC interface on the vs1053. The I2S is enabled by default to 48kHz. To change the speed permanently use the uart interface with the command :
cli.i2s("x") with x =0 for 48kHz, x=1 for 96kHz and x=2 for 192kHz
The i2s interface is available on the alientek vs1053 with i2s_sclk on SCLK (GPIO16), i2s_sdata on SDIN (GPIO07), i2s_mclk on MCLK (GPIO05), i2s_lrout on LRCK (GPIO04).
- New Autostart: If autoplay is checked on the web interface, the current station is started at power on even with no web browser.

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...

Read more »

octet-stream - 381.30 kB - 02/10/2017 at 20:56

Download

octet-stream - 381.30 kB - 02/10/2017 at 20:56

Download

boot_v1.6.bin

A new one. Don't know what is new.

octet-stream - 3.77 kB - 01/10/2017 at 11:04

Download

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

Download

esp_init_data_default.bin

Must be written only one time.

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

Download

boot_v1.5.bin

The boot. Must be written only one time.

octet-stream - 3.16 kB - 05/24/2016 at 17:16

Download

View all 6 files

View all 10 project logs

  • 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

View all instructions

Enjoy this project?

Share      

Discussions

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

jp 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

jp 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

jp 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

jp 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

jp 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

jp cocatrix wrote 01/08/2017 at 17:15 point

Well done!

  Are you sure? yes | no

ldv82 wrote 01/06/2017 at 19:17 point

jp cocatrix

I have a suggestion to add a button in the interface to reset the default tone. 

To reset the EQ settings.

  Are you sure? yes | no

jp cocatrix wrote 01/06/2017 at 20:41 point

ok, Easy ;-)

  Are you sure? yes | no

balaji wrote 12/29/2016 at 08:42 point

Hello, 

I liked your project very much. 

I have one question will this method work with Adafruits VS1053 mp3 codec
https://www.adafruit.com/product/1381


Thanks in advance

Balaji

  Are you sure? yes | no

Thomas wrote 12/28/2016 at 08:04 point

Hello together,

has anyone a idea how to play a local playlist, running on a computer in the own network?

I tried 192.168.2.176\radio\Madonna\Madonna.m3u

Im using Windows 7 and the folder is enabled for anybody

Regards

Thomas

  Are you sure? yes | no

jp cocatrix wrote 12/28/2016 at 09:16 point

M3U is a playlist. Edit it and don't forget to add 192.168.2.176\ before the real stream mp3 or ogg or other. Or simply call it with the direct mp3 name.

  Are you sure? yes | no

Thomas wrote 12/29/2016 at 07:13 point

Thanks for your hints but i did not catch it.

I have created a folder wit a mp3 in it   D:\1\1.mp3

Folder 1 is enabled as 1. So in my opinion the path should be:

192.168.2.176\1\1.mp3

If i enter this into a new station he doubles the last entered statoin from above.

Can you tell me what i have to enter exactly for my shown example?

Thanks

Thomas

  Are you sure? yes | no

ldv82 wrote 12/28/2016 at 11:58 point
"Stream What You Hear" program sends sound from your computer sound card to the stream, but does not work well with me. Still, you can use VLC player to make the flow of the local network. I liked the other way. Shoutcast-dsp-1-9-0-windows (Winamp plugin) and SHOUTcastGUI (a simple server). All that will be playing in Winamp, will be transferred to the stream network.

  Are you sure? yes | no

Thomas wrote 12/29/2016 at 07:16 point

Hi Idv82, i will try later.

First i will understand the other way

Regards

Thomas

  Are you sure? yes | no

jp cocatrix wrote 01/04/2017 at 15:11 point

No change on adc. The empty value is 1V, (I measured 0.98 on my proto)

The stop is at 0.19 here and play at 0.36

But it is possible to increase the range to 220. Ok

if ((adc >400) && (adc < 580)) // volume +
        {
            vol = VS1053_GetVolume();
            if (vol <244)
            {    
                vol+=10;    
//                printf("vol %d   vol1 %d\n",vol,vol1);                    
                sprintf(Vol,"%d",vol);
                setVolumew(Vol);
            }
        }
        else if ((adc >730) && (adc < 830)) // volume -
        {
            vol = VS1053_GetVolume();
            if (vol >10)
            {    
                vol-=10;
//                printf("vol %d   vol1 %d\n",vol,vol1);                    
                sprintf(Vol,"%d",vol);
                setVolumew(Vol);
            }
        }        
        if (!inside)
        {    
            if (adc < 200) // stop
            {
                inside = true;
                clientDisconnect();
            }
            else if ((adc >278) && (adc < 380)) //start
            {
                inside = true;
                sprintf(Vol,"%d",currentStation);
                playStation    (Vol);
            }
            else if ((adc >830) && (adc < 920)) // station+
            {
                inside = true;
                wsStationNext();
            }
            else if ((adc >590) && (adc < 710)) // station-
            {
                inside = true;
                wsStationPrev();
            }
        }

  Are you sure? yes | no

jp cocatrix wrote 12/29/2016 at 10:01 point

KaRadio is a http stream player. It doesn't know about the file system of another computer  nor embed nfs or CIFS or uPnP protocol above tcp/ip. To play a file from a pc you need to convert it to a stream. Vlc can do that or any html server like apache or https://sourceforge.net/projects/miniweb/ and many other. Karadio send a get to this server to receive the stream, that's all it can do.

Hope this help

  Are you sure? yes | no

Thomas wrote 01/04/2017 at 15:00 point

Ok, that was not clear to me but it is logical. Setting up a own server is on my todo list for near future, but not now.

Did you changed the ADC Value for STOP in 1.1.3 ?

Stop Button does not work anymore. I measured voltage on ADC Pin when Stop is pressed. It is 0,202V so ADC should be 197. Could the Value be set to 220 in next release?

Regards

Thomas

  Are you sure? yes | no

V-Man wrote 12/27/2016 at 18:38 point

Thanks for this beautiful Thing! 

I encounter something weird with the Alientek mp3 module: when I connect a headphone I get beautiful sound free of noise, but when I connect it to a either a small amplifier or the Aux of my stereo, I get only very bad sound or no sound at all. What could be happening here? Anyone experiencing this as well?

  Are you sure? yes | no

Thomas wrote 12/27/2016 at 20:24 point

Hi V-Man, 

Maybe you are using a Mono cable. Has it two Or three poles?

If two it maybe a Mono one. You need a Stereo one. If it is already Stereo, try a shielded one.

Also ist ist Not good to cascade two class D Amplifiers. 

If you realy need to, usw one with Differential Inputs such as MAX98306.

Regards

Thomas

  Are you sure? yes | no

V-Man wrote 12/28/2016 at 06:57 point

Thanks for your tips, Thomas!

My cable is certainly stereo, I'll have a look into using another amplifier, this might well be the problem......

V.

  Are you sure? yes | no

jp cocatrix wrote 12/28/2016 at 09:18 point

No problem here with alientek on headphone or aux entry of a hifi.

  Are you sure? yes | no

Antimaster wrote 12/24/2016 at 13:45 point

I've build the radion in a nice wood case. If some one can say me how to insert pictures i can show you my case.

  Are you sure? yes | no

Thomas wrote 12/27/2016 at 11:07 point

We woukd realy like toll See your Radio.

Upload your picture here and integrate Link into your Post here.

http://tinypic.com

Regards Thomas

  Are you sure? yes | no

mangup wrote 12/22/2016 at 22:12 point

Nice project. I made it! As a user I have opion that there is missing config for alternative wifi connection.  I made portable speaker with this webradio client and I am limited to small radius where is first of two AP that I have. Thanks to make this project and share with others!!!!

  Are you sure? yes | no

jp cocatrix wrote 12/22/2016 at 22:20 point

Thanks, It is in the todo list. If an AP is successfully connected, it will be added in an internal history list. If the equipment is moved away from the current AP, the list will be tried before the default AP. I have to improve the speed of the detection and make a not too long history of AP ;-)

  Are you sure? yes | no

mangup wrote 12/22/2016 at 22:25 point

Super! 

Thanks Dejan

  Are you sure? yes | no

mangup wrote 12/28/2016 at 00:16 point

I have one question. I don't understend function Monitoring in Main section. What that function do?
Thanks.

  Are you sure? yes | no

mangup wrote 12/30/2016 at 10:01 point

I found some bug. I make two webradio. One to play streeming on work and one for home (differend ip). I use phone to access and control both webradio. They don't have same playlist. But when I connect I have just last refreshed list from cache. Maybe we should each device to have its own id and through him to read his list from cache?

  Are you sure? yes | no

Thomas wrote 12/28/2016 at 08:06 point

With Monitoring you can hear the selected station on the device which is running the frontend. Try to access Karadio with you Mobile. Select a station press monitoring and increase the volume of your mobile. Then you will see.

Regards

Thomas

  Are you sure? yes | no

mangup wrote 12/28/2016 at 09:16 point

Thanks for explanation. Work how you said.

  Are you sure? yes | no

jp cocatrix wrote 12/30/2016 at 10:55 point

"I found some bug. I make two webradio. One to play streeming on work and
one for home (differend ip). I use phone to access and control both
webradio. They don't have same playlist. But when I connect I have just
last refreshed list from cache. Maybe we should each device to have its
own id and through him to read his list from cache?"

It should not be a problem if ip are different between both because the browser "local storage" for the stations cache is per ip.

What browser do you use on the mobile?

  Are you sure? yes | no

mangup wrote 12/30/2016 at 11:23 point

I try firefox and some integratet in samsung s4

  Are you sure? yes | no

totalizator wrote 12/20/2016 at 13:17 point

After upgrade to 1.1.3 I can no longer play my liquidsoap mp3 stream. Has something changed? When playing it in an external player I have to add http:// prefix but I can't add it here. It worked in 1.1.2. Any ideas?

  Are you sure? yes | no

jp cocatrix wrote 12/20/2016 at 13:22 point

remind me the url?

  Are you sure? yes | no

jp cocatrix wrote 12/21/2016 at 10:37 point

  Are you sure? yes | no

Thomas wrote 12/20/2016 at 14:43 point

Try to reimport your webstations.txt

This helped myself with non working stations after updating.

Regards

Thomas

  Are you sure? yes | no

jp cocatrix wrote 12/20/2016 at 15:28 point

or do a refresh local list to read again the station list from the esp to the browser.

  Are you sure? yes | no

totalizator wrote 12/20/2016 at 23:37 point

Thank you but none of this helped. The fact is that it stopped working after the upgrade but there is a positive outcome. I have been using Liquidsoap to stream music from Mopidy https://www.mopidy.com/ but apparently this is not the best choice for a streaming frontend so I have switched to Icecast. Few seconds to configure it like here http://desmart.com/blog/music-as-part-of-positive-work-environment and it works even better - it's very lightweight (Icecast, contrary to what I have thought) and the stream starts immediately now.

  Are you sure? yes | no

Thomas wrote 12/19/2016 at 11:01 point

No Ide if it is possible, but what is about a functionality to syncronise playback of two or more KaRadios?

Regards

Thomas

  Are you sure? yes | no

jp cocatrix wrote 12/20/2016 at 08:40 point

I don't think it is feasible due to the buffering technique of the stream. With equivalent memory the result may be acceptable but not perfect.

  Are you sure? yes | no

yo2ldk wrote 12/16/2016 at 06:31 point

Hi all radio fan !

 check this:

http://radio.garden/live/

  Are you sure? yes | no

jp cocatrix wrote 12/16/2016 at 08:04 point

Amazing. Thanks

  Are you sure? yes | no

totalizator wrote 12/18/2016 at 21:31 point

Check this attachment if you need "a few" radio stations urls: http://talk.maemo.org/showpost.php?p=1461456&postcount=46 There is like ...all of them.

  Are you sure? yes | no

Thomas wrote 12/19/2016 at 07:24 point

Hi Totalizator,

great, thanks a lot.

Thomas

  Are you sure? yes | no

yo2ldk wrote 12/19/2016 at 12:19 point

nice collection, thank you !

  Are you sure? yes | no

Thomas wrote 12/12/2016 at 10:41 point

Soon i'm able to move my Karadio into the retro radio.
I itegrated all components to one board.

For final testing i assembled all in a box.

Sounds very good. Now some final adjustments on the LCD Software and im ready.
Regards

Thomas

  Are you sure? yes | no

jp cocatrix wrote 12/12/2016 at 12:44 point

[I Like] button;-)

  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