RASPBERRY ZERO INTERNET RADIO / MP3 PLAYER
by hansiart in Circuits > Raspberry Pi
11975 Views, 21 Favorites, 0 Comments
RASPBERRY ZERO INTERNET RADIO / MP3 PLAYER
This is not the first raspberry internet radio, i know. But this one is:
- very cheap and works really good
- all functions controllable via a webinterface, your phone is the remote control
- very easy to build and operate
- portable due to the easy connection to wifi
- It has a very nice MP3 player
- it has a 10 channel equalizer
No programming or soldering skills needed. Just buy the components, connect some wires between them and thats it!. Oh, and burn an image of the radio operating system on an sd card.
It would be a nice birthday present as it is very easy to operate. This radio has a lot of nice features. All controllable via a webinterface. There is a.o. a 10 channel equalizer, a timer and mp3player. You can easy compile 2 lists of favorite stations. Artists / Songtitles are shown on the LCD and the webpage. Watch the simple video to get an idea..
In fact, the only 'difficulty' you will face is connecting it to your wifi. This is done completely headless, no keyboard or console involved. You can do it with a smartphone or desktopcomputer/laptop/tablet. Watch the video.
When you power the RPI for the 1st time, it can't connect to your wifi network. After all it does not know what wifi network and the wifi password. It now opens its own network, the so called accesspoint. You connect to that and tell the RPI the network data. After a reboot it is connected. Thats all, you have a full operational radio.
Optional, when you have some soldering skills, you can add a standby led, a pushbutton or a touchpad and / or a power board that allows switching the power of the speakerset.
Supplies
What you need is:
- a Raspberry zero W
- a 5v micro usb power supply or build your own
- PCM5102 I2S DAC GY-PCM5102 (ebay)
- 20x4 lcd display (ebay)
- 8gb micro sd card
- minimal 9 dupont wires
- a powered computer speaker set (second hand)
and optional
- a tactile button or touchpad TTP223B (the red one)
- 1 or 2 leds and resistors
- See the chapter "power supply" if you want to build one.
BUILDING IT
Consider this: I am sure you'd like to build this radio with stuff you allready have on the shelf but that probably does not work. Don't blame me for that and don't ask me for support. I spend days and days to test this on a Raspberry Zero W ! You should really buye one, it won't cost you much.
GLOSSERY OF ABBREVIATIONS
Device : a laptop / tablet / Phone or desktop computer with wifi
RPI : a Raspberry Zero W
LCD: the lcd display
PREPARATION
You start with downloading and burning the image on an sd card. You do this by following the instructions here: sd card burning instruction
Beware the SD card requirements! When nothing seems to work, suspect the SD-card.
Below you'l find links where you can download the sd-card image file.
Update 10 july 2020: The links point to a new sw version. The improvements are:
- the functionallity of the pushbutton/touchpad thoroughly tested
- some small improvements in the webpages
13-7-2020 DOWNLOAD FROM ONEDRIVE
13-7-2020 DOWNLOAD FROM DROPBOX
Try to find out what the i2c address of your LCD display is, this can save you some time.
To verify that all is working, i downloaded the image myself from dropbox (5 minutes), unzipped it an burned it on an SD-card. I used win32diskimager. No problem what so ever.
FIRST TEST
We can test with the basic hardware, that is the RPI connected to the LCD and the usb power cable. Nothing else.
The first thing to do is connect the RPI to your wifi network. The most conveniant way is as follows: Insert the sd card and power up. During the bootup you should see messages on the LCD. If not, you have the wrong i2c address. Not to worry, this can be changed in the configportal.
Next you go to your DEVICE, open the network configuration and observe the list of available networks. After some time (be patient, the RPI is not very fast) you will see a wifi network called "radioAP".
You connect your DEVICE to this network, no password needed. Next you open chrome or another browser on the same DEVICE and type the address 192.168.4.1 in the addressbar.
Now you will enter the config portal (picture 1). Did you see any messages on the LCD? No, than click on the menu item to change the i2c addres. You will see the result instantly. Now provide the wifi credentials, save and reboot.
Eventually you will see the obtained ip address on the LCD. Now connect your DEVICE back to your wifi network and browse to the address of the RPI. You will see the homepage of the radio.
Note that when the RPI could not connect to wifi, it tries again after 5 minutes. It will reboot than. So you have limited time to complete the wificonnectionprocedure.
If you plan to use (optional) a button, touchpad or the signal leds, you can connect them now and test if they work. The red led is on when the radio is off and the other led signals a touch event.
If you don't have a proper addressed LCD connected, the RPI keeps starting in the AP mode for yet unknown reasons. So if you want to run without the LCD, short the sda-pin on the raspberry to ground. It will boot normally now.
If you have the dac connected you can plug-in a headset of a Phone.
Now you have a fully operational radio. The controls on the webpage are self-explanatory. Where needed you can click a help link.
TIP
The lcd, the dac and the touchpad all have leds on board that eat energy. Not much but 24/7 yearly…. I cut them from the board, there is light pollution enough in this world.
THE POWER UNIT (optional)
When you have some soldering skills you could build this power unit. It can control the power of the speakerset so that it is not eating unnecessary power.
In the scheme you can see what components are involved.
The AC-DC converter is 5v - 700 ma (3.5W). These can work with various AC voltages AC 85 ~ 265v 50/60 hz I used stripboard to solder the components on.
I mounted a wall outlet on the back of the housing.
The Eclosure
The enclosure is fairly easy to make out of some MDF sheet. This material is easy to saw and to cut. The opening for the display i cut out with a hobby knive. When you plan the usb, touchpad or tactile button at the front you have to cut out an opening for these too.
I fit the parts together with wood glue and keep them in place with some hotglue that i can easy remove afterwards. Then i cut away the excess material and remove the hotglue.
After sanding the edges i painted the in- and outside with expoxy resin. This get sucked into the MDF and the joints, making it strong. Now you can sand the front and the hood very smooth and paint it with acrylic paint.
I have a 3d printer so i can print decorative frames for the display and led, button and USB. I am building a version with a domoticz system so i have the usb on the back.
You can also build it in an antique radio, this might look better in your house interior.
CONCLUSION
The engine of this radio is very powerfull and stable.
I have built a version with a led matrix array for the display. This works also very well even as this moving tekst needs much more cpu. This version has a BME280 sensor that measures pression, temperature and humidity and transmits the values to a user defined address. These values are also available on the webpage. And on the display that we can also use as a newsticker with variable speed and intensity.
Moreover it is in use as a domotica system (domoticz) that controls all the lights in my home. It uses an "RF link Gateway" on the usb so that there is no mp3 player.
Dispite all this violence the radio plays on unperturbed. This proves that the engine is allright.