loading

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

2017/04/13 New release 1.2: 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

<p>Hi, i tried flashing the ESP8266 nodemcu but i get an error on the command prompt that runs alongside it: <br>Invalid head of packet &lt;' '&gt;<br>Exception in thread Thread-2<br>Exception invalid head of packet &lt;' '&gt;</p><p>And the download panel is stuck on the download green indication, no sign of any activity on the nodemcu.</p><p>Does this usually happen? How long does it take to flash the nodemcu usually? It's been stuck on this for awhile..</p>
<p>sorry, I'm not sure why the image quality has changed when i uploaded it but the images i took were good...</p>
<p>My radio has finally earned from 0.96 LCD and Russian tags. Buttons and IR has not done so far. There is one problem, after a while the radio turns off, Stoped on the display, Play through the WEB does not help, just off / on. What could be the problem?</p><p>Thanks again for such a great project and help!</p>
<p>I have two different protos running 24/24. Try to improve your power supply?</p>
<p>&quot;Arduino Pro or Pro Mini, ATmega328 (3.3V, 8MHz)&quot; Arduino: 1.8.2 (Windows 10), Board:<br>Fork / exec C: \ arduino-1.8.2 \ hardware \ tools \ avr / bin / avr-gcc.exe: The file name or extension is too long.<br>Error compiling for the Arduino Pro or Pro Mini board.</p><p>Wanted to connect, </p><p>0.96&quot; I2C IIC SPI Serial 128X64 White OLED LCD</p><p> but get compile error message .</p><p>what am I doing wrong?</p>
Which file name? the ino?
<p>Have all libraries reloaded and set. Go now<br>Many thanks!!!:)<br>Now I need baud rate<br>set to<br>Sys.uart (&quot;28800&quot;)<br>I do not understand yet When I start after the fast Termite.exe, I see only hieroglyphs .. I have to set with Termite .exe irgent something?</p>
<p>The default baud rate is 115200 to be set to the termite setting..</p><p>Efter, you can send the sys.uart command to set it to 28800 and reset the esp.</p>
<p>I have flashed mini arduino with Arduino Uno and then I tried immediately with Termite exe.Das did not work. Then I put everything together. And over Nodemcu again Termite started and entered Sys.uart (&quot;28800&quot;) and that has worked. ;)<br>Now I have only the problem that the time is not true: (and Russian letters are not represented correctly</p>
<p>At the beginning of the code of the ino file, you have to set the</p><p>// your timezone offset<br>#define TZO 1</p><p>to your timezone.<br>Recompile and flash again.</p><p>The tzo command will be sent automatically.</p>
<p>#define TZO 1 changed to #define TZO 2, reflashed. The time is on 00-01-2000 :( I'm doing something wrong?</p>
<p>nothing. Sometime the ntp call fails on timeout, but it is retried periodically</p>
<p>Have done so and waited. No change. Time still shows 00-01-2000</p><p>:(</p>
<p>Obviously, the mini pro must be connected to the esp8266. Are you sure to use the up to date delivery?<br>The display is working? (station etc?)<br>Without detail, i can't find your problem.</p>
<p>Yes display shows all info ... only the time display hangs</p>
<p>I tested with exactly the same configuration (mini pro 3v 8Mhz)</p><p>And it show on termite in bridge between 2 usb (the nodeMcu and an usb adapter to the mini pro)</p><p>May be try to reload the ino at <a href="https://github.com/karawin/karadio-addons," rel="nofollow">https://github.com/karawin/karadio-addons, </a> but<br>Probably the tx to rx from mini pro to the nodeMcu is not well wired.</p>
<p>Have now all newly made new Nodemcu new mini pro everything flashed. Oh yes new cables. And nevertheless the clock does not run.<br>What I have yet discovered when Nodemcu is connected to the computer and Termite runs when I enter sys.date command, the clock runs on my small display. However, the time after the reset or new start again away</p><p>:(</p>
<p>Probably the tx from mini pro to rx of nodeMcu is not well wired.</p><p>Stop termite, it can disturb the Rx from the mini pro.<br>If the clock manually entered works, that means that the reception of the mini pro works, but not the mini pro tx to rx of the nodeMcu</p>
<p>Now I understand nothing ... in the u8glibConf.h stands<br> --NodeMcu-- --Mini Pro--<br>Tx Rx<br>Gnd Gnd<br>VU Raw<br>And now you write the tx from mini pro to rx of nodeMcu is not well wired. ?!<br>Have now new cable taken nevertheless the time does not run<br>So now everything has new, new flashed, new cables and still does not run the time :( what am I doing wrong? ;(</p>
<p>Please add a wire from the tx from mini pro to rx of nodeMcu</p><p>The mini pro now send the commands sys.tzo , cli.info and sys.date<br>I forgot to add this comment in the u8glibConf.h because it is new. But it is obvious as you sent these commands manually, the mini pro do it too.</p><p>I make all these files in my free time for free so it is very heavy to think at all things.</p>
<p>I am so stupid:) ... Now goes! I could have thought of second cables to connect.Super. Many Thanks!! Now I can test whether it is stable.<br>Thanks again for the support!</p>
<p>I may take wrong karadio U8glib.ino? I take the zip</p><p><a href="https://github.com/karawin/karadio-addons/blob/master/karadioU8glib/karadioU8glib.zip" rel="nofollow">https://github.com/karawin/karadio-addons/blob/mas...</a></p>
<p>I removed the zip. Please reload the ino and h files. Not yet updated the comments.</p>
<p>Final project</p>
Great. Just update the display with https://github.com/karawin/karadio-addons<br>It adds the date and time. (need the mini-pro -&gt; esp rx wire.)<br>
<p>I have a small problem with the module vs1003. When switch station, previous station continues playing until ends cache in buffer, then begins to play the current station. Display and the web interface shows the current station, but playing the previous one. Please tell me how can i fix this situation.</p>
I wonder how it is possible. Are you sure that it is the Karadio software?<br>Send a log please.
<p>Hi karawin,</p><p>I finished the wooden radio that told you I was building.</p><p>Thanks again for your work.</p><p><iframe allowfullscreen="" frameborder="0" height="281" src="//www.youtube.com/embed/krWOcHQyDbA" width="500"></iframe></p><p>More information: <a href="https://giltesa.com/?p=18015" rel="nofollow"> https://giltesa.com/?p=18015</a></p><p>Kind regards.</p>
Great demonstration. And Bravo for the quality of the build.<br>The pluggable connector is a very good idea.
<p>Hello karawin,<br><br>I'm creating a web interface with Bootstrap, I have a question, What memory limit is there for interface files?<br><br>My index.html file has a size of 42KB, four times more than the original, and I have not yet finished...<br><br>I attach a link to the test web, I think it's looking good:</p><p><a href="http://test.giltesa.com/karadio1/" rel="nofollow">http://test.giltesa.com/karadio1/</a><br><br>Kind regards.</p>
<p>This file is on flash, so 42KB is not a problem.</p><p>Go on...</p>
<p>Awesome instruction! I got my webradio running on basic configuration. Now I just need to add a display and buttons. <br>Thank you karawin for sharing your work! </p>
You are welcome.
<p>Photo de ma carte arduino pro mini :</p>
<p>Et dans &quot;u8glibconf.h&quot; j'ai opt&eacute; pour cet afficheur, j'ai donc decommenter uniquement cette zone :</p><p>U8GLIB_SSD1306_128X64 u8g(U8G_I2C_OPT_NONE|U8G_I2C_OPT_DEV_0);// I2C / TWI</p>
<p>J'ai bien chang&eacute; dans u8g.h ceci : (UG8_16BIT)</p><p>In .../Arduino\libraries\U8glib\utility/u8g.h</p><p>uncomment the following line</p><p>#define U8G_16BIT 1</p>
<p>Euh, rectificatif sur la couleur de mon fil Gnd entre NodeMcu et mini Pro : bleue</p><p>Vu (NodeMcu) -------------&gt; RAW (mini pro) (couleur vert)</p><p>Pin Gnd (NodeMcu) -------------&gt; Pin Gnd (mini pro) (couleur BLEUE)</p><p>Pin Tx (NodeMcu) -------------&gt; Pin RxI (mini pro) (couleur jaune)</p>
<p>Bonjour Karawin,</p><p>oui aucun pb avec le fichier u8glibconf.h, j'ai bien vu que toutes les info sur le cablage y etait inscrites, mais je dois t'avouer que entre la NodeMcu et la carte arduino pro mini, ce n'est pas evident &agrave; comprendre, je m'explique :</p><p>Entre mini pro et OLED, voici mon branchement :</p><p>Pin A4 (mini pro) --------&gt; Pin SDA (OLED) (couleur brun sur mon montage)</p><p>Pin A5 (mini pro) --------&gt; Pin SCK (OLED) (couleur rouge sur mon montage)</p><p>Pin Gnd (mini pro) ---------&gt; Pin Gnd (OLED) (couleur noir)</p><p>Pin Vcc (mini pro) ---------&gt; Pin Vcc (OLED) (couleur bland)</p><p>OK </p><p>Par contre entre mini pro et NodeMcu, la je ne suis pas sur, voici ce que j'ai fait en m'inspirant du fichier u8glibconf.h :</p><p>Vu (NodeMcu) -------------&gt; RAW (mini pro) (couleur vert)</p><p>Pin Gnd (NodeMcu) -------------&gt; Pin Gnd (mini pro) (couleur vert)</p><p>Pin Tx (NodeMcu) -------------&gt; Pin RxI (mini pro) (couleur jaune)</p><p>Mon soucis, c'est que je comprend bien que l'envoi des donnees entre la NodeMcu et la carte mini pro se fait par la liaison Tx vers Rx, mon fil jaune sur mon montage, que je branche ou pas ce fil, je n'obtient rien sur l'afficheur OLED, du coup, OK, je me suis rendu compte en lisant u8glibconf.h que je n'avais pas chang&eacute; la Baudrate, j'ai eu un peu de mal &agrave; comprendre la liaison UART, mais maintenant grace &agrave; ton aide, c'est bon, je me dis que maintenant, seul une erreur de cablage peut poser probleme. La pin RxI de ma carte arduino pro mini, est-ce que c'est bien celle la (sur le cot&eacute;) ?</p><p>Je ne vois plus que &ccedil;a.</p><p>Merci d'avance pour ton aide</p><p>DOM</p>
<p>Si quelqu'un a plus de precision la dessus :</p><p>Entre l'arduino mini pro et l'ecran OLED, pas de probleme, j'arrive a comprendre :</p><p>Graphic LCD Pinout:</p><p> Mini Pro____ _______ GLCD___</p><p>JP2 A4 LCD SDA .... Pin 3</p><p>P2 A5 LCD SCK .... Pin 4</p><p>// LCD Gnd .... Pin 1</p><p>// LCD Vcc .... Pin 2 5 volts from the minipro VCC</p><p>Par contre, entre la NodeMCU et l'arduino mini pro, j'avoue que c'est pas clair :</p><p>RESET Reset (not used))</p><p>Rx 1 to the tx of the nodeMcu</p><p>Gnd ground</p><p>jp2: A4,A5 I2C lines</p><p>Raw: 5 to 16 VDC Max</p><p>Merci pour votre aide</p>
<p>Tout est dans u8glibconf.h</p><p>Cable wiring between nodeMcu and Mini Pro<br>-----------------------------------------<br>--NodeMcu-- --Mini Pro--<br>Tx Rx<br>Gnd Gnd<br>VU Raw</p>
<p>OK merci pour le changement du &quot;Baud rate&quot; ou taux de transmission en francais, c'est fait grace avec termite. J'ai eu du mal &agrave; comprendre, je voyais bien que vous parliez d'une autre interface, interface UART, mais je n'avais pas tout saisi... l&agrave; &ccedil;a va mieux !</p><p>Par contre, tjrs rien sur mon afficheur, bizarre ? Car pour le coup, les info elles transitent bien par l'interface serie UART / termites.</p><p>Peut etre une erreur dans mes branchements ?</p><p>A bientot</p><p>Merci</p>
<p>Hello, I'm Dom from France. I have a problem with TX signal.</p><p>My OLED no receive specifical signal (station title, etc).</p><p>Can you explain me this :</p><p>You must disconnect the rx tx from the mini or nano when flashing the nodeMcu.<br>Once flashed and started change the baud rate of the karadio with the <br>sys.uart(&quot;28800&quot;) <br>uart command and reset.</p><p>Because I try this :</p><p>My IP (192.168.0.49) + /?sys.uart(&quot;28800&quot;), but it does not work...</p><p>Thank you for your help</p><p>DOM</p>
sys.uart(&quot;28800&quot;) est une commande &agrave; faire par l'interface s&eacute;rie.avec termite par exemple.<br>https://www.compuphase.com/software_termite.htm<br>Apres flash du logiciel la vitesse par d&eacute;faut est de 115200, il faut la passer en 28800 avec cette commande.<br>Ensuite rebrancher le oled et reset.<br><br>L'interface web n'est pas pr&eacute;vu pour ca.<br>
<p>I have this error when I try to flash</p>
<p>Wrong com port?</p>
<p>No, because it works with ESPFlashDownloadTool_v3.4.4, the same port. This is my settings who works, but the problem is I haven't signal from Tx pin of NodeMCU and not receive information of station on OLED display. I use Arduino Nano instead of mini. </p>
<p>You must disconnect the rx tx from the mini or nano when flashing the nodeMcu.<br>Once flashed and started change the baud rate of the karadio with the <br>sys.uart(&quot;28800&quot;) <br>uart command and reset.</p>
<p>Thank you, it works</p>
<p>Minimal test, works very well. I used ESPFlashDownloadTool_v3.4.4</p>
Well done<br>

About This Instructable

28,845views

82favorites

Bio: Old retired engineer
More by karawin:Wifi Webradio With ESP8266 and VS1053 (KaraDio) 
Add instructable to: