Sunday, January 25, 2015



On the mid December 2014 I've decided to make an Internet Radio, because I'd like to listen music permanently, but my old good music starts annoying all my family members, including myself. From years I've listened the same music and... enough is enough. I've started to listen the music on Internet from PC, but it was very uncomfortable. To buy a new WiFi radio was out of question because of price.
Being in the winter holidays times I've decided to make one myself. And so began the journey into the wonderful world of the embedded devices, tiny but strong beauties which bring to me a lot of knowledge that I want to share in this blog.
I had some previous experience on programming, including Arduino stuff, but I'm not a professional. I'm a hobbyst, therefore the programming code that I've made are kept as simple as possible.
The most part of the components are off-the-shelf ones and existing tutorial from the Internet was priceless.
However, the information found on the internet doesn't gave solutions to all the problems encountered, so I had to imagine new solutions. This is why I started this blog. I want it to become a source of inspiration (among others) for everyone who ventures himself into such an undertaking.
The target of this tutorial consisted of peoples which have some knowledge of programming and thinkering. Maybe the solutions provided here are not 100% suitable for the hardware components you have. However, you may find inspiration in the codes that I've provided. I was working only in shell scripts and php. It takes me long hour to solve all the programming problems. For example, only to find how to add two numbers in a shell script was a pain. Unlike the bash (/bin/bash) scripts, the shell scripts (/bin/sh) are relatively very poor documented on the internet. The commands are different. Unfortunately, the bash is not implemented in OpenWrt, only the shell is. I use it because it was convenient to use the UCI capabilities, i.e. to define configuration files in /etc/config/ for keeping the station list and other variables that I need. The second reason is that I was able to send commands to router programmatically.
Finally, I consider it an ongoing process, if my time permitted. Therefore when I'll modify some files I'll updated it. Maybe I'll put the version in the header, in order to not alter or modify the links of downloadings.
Okay, enough chatter! Let's dirt some hands and squeeze some neurons.

PART I - Define the objectives

Our WiFi Radio must have the following capabilities:
  1. Play the internet stations stored into an updatable file from a web interface
  2. Play or stop the desired stations upon a particular schedule (alarm function).
  3. Recording (streaming) stations on demand.
  4. Precise clock (with permanent update from the internet)
  5. Remote control for the usual functions (Play/Stop, Start/Stop Recording, Reboot, Play Favorite Stations, Shuffle Play*)
  6. Volume control
  7. Extra capabilities such as: display currencies rates, current date etc

PART II - Hardware

PART II.a. - Identify the hardware parts

That part my differ, but I describe what I've used for the project
A salvaged satelitte receiver Price : Max $20 ($0 in my case)
TP-Link MR 3020 wifi router with USB portPrice $30
USB sound cardPrice: $7
Arduino Pro Mini - 2 pcsPrice $15 (both)
FTDI USB to Serial breakout boardPrice $6
ENC28J60 Ethernet ModulePrice $7
1 pair of audio mini speakersPrice: $4.5
8 GB USB mini stick Price $10
min.5 ports USB hub Price: $4.5
WiFi external antenna (mine is from an old MSI router Price: ?

No comments:

Post a Comment