This project shows how to build a very nice WebRadio player that can play Internet audio streams by combining WIZwiki-W7500 board with VS1053 mp3 decoder board.
The WIZwiki-W7500 Cortex-M0 platform board.
On 31 August 2015 I got the new WIZnet platform board, the WIZwiki-W7500 that is based on a Cortex-M0 cpu at 48MHz with 128 kBytes of flash memory and 48 kBytes of RAM shared with the hardwired TCP/IP core. The RAM amount used by the TCP/IP core can be upto 32 kBytes leaving the rest 16 kBytes to the user (32 + 16 = 48 kBytes of RAM). The W7500 is a 3.3V device but according to the WIZnet the board’s I/O pins are 5V tolerate. Moreover, the board has the same pinout with the Arduino UNO. Combining this board with a VS1053 mp3 decoder board you can build a very nice Icecast Internet streams player (WebRadio player) that can plays internet audio streams upto 320 kbits/second (320 kbps). Of course the limited RAM on W7500 receiver side (16 kBytes) is not enough to cover big data delays between your internet connection gateway (your ADSL router) and the Icecast server.
The circuit is very simple and combines only two boards. The WIZwiki-W7500 (W7500 for short) and the VS1053 mp3 decoder module. The W7500 board makes a connection to the Icecast server, requests the audio data stream and sends the received data to the the VS1053 module for decoding. The VS1053 module, receives the data stream from the W7500 and auto-recognize the audio data format. It recognizes if the data stream is midi or wav ormp3 or aac file format and decodes it. The user can listen to the music stream over the VS1053 audio jack that leads the head phones. The circuit is powered with 5V DC from the USB port of the W7500 board. The W7500 ethernet connector is connected to the ADSL router or to any ethernet device that can provide Internet connection (router, hub, switch). The connection diagram is based on a real boards photo for being recognized from any person that wants to build the circuit but he doesn`t have any experience in electronic circuit schematic diagrams. Just connect the two end points accross every colored line by following the picture 1 connection digram.
Picture 1. The connections between the WIZwiki-W7500 and VS1053 boards (Click to enlarge).
The circuit does not contain any LCD screen for hardware simplicity. Instead of printing the information on LCD, the WebRadio station information is printed on the USB_Serial port that provides the W7500 board. Just connect the W7500 USB port to your computer, install the drivers and open your favorite Serial Terminal. In my case, I used the Termite v3.1 with settings 115200 bps.
WebRadio Station information from the Icecast servers.
The source code
The source code has been written in mbed online compiler and the programming language is used is C++. There are many comments on the source code to help you understand the meaning of almost every line of the source code.
The mbed has a VS1053 library that was written by Kaoru Onoe and has been modified from me (Vassilis Serasidis) for supporting the W7500 board and adding a patch [ modeSwitch() function] for some LC-Technology VS1053 board that have some chip pins disconnected. Without that patch there is no sound out of these VS1053 modules.
The Ethernet library (WIZnetInterface) is provided by WIZnet and can be found in mbed libraries. To that library you have to change the default settings of 8 Sockets, 2 kBytes Transmitter and 2 kBytes receiver buffer for each socket. The settings we want are: Only one socket with 16 kBytes transmitter and 16 kBytes receiver buffer. These settings can be changed by editing the file:
The main.cpp file is the following
My WebRadio player 2 demonstration
Author : Vassilis Serasidis, firstname.lastname@example.org