RASPBERRY ZERO INTERNET RADIO / MP3 PLAYER

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

Step 1: 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.

Step 2: 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.

Step 3: 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.

Step 4: 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.

Be the First to Share

    Recommendations

    • Retro Tech Challenge

      Retro Tech Challenge
    • Micro:bit Contest

      Micro:bit Contest
    • Space Contest

      Space Contest

    16 Comments

    0
    therealhill
    therealhill

    Question 1 year ago on Step 4

    Hallo, will other display I2C displays work? Like a 128x32 pixels lcd non colour

    0
    hansiart
    hansiart

    Answer 1 year ago

    If you have such a display you can try, i don't have one to test with. My prediction is that it won't work.

    0
    PhilippeL40
    PhilippeL40

    Reply 6 months ago

    j'ai monté un lcd 2x40 on perd le nom du morceau joué! mais on l'a sur telephone

    0
    PhilippeL40
    PhilippeL40

    6 months ago

    ou se connecte les deux leds et fonction de celles ci

    0
    saarfranzose
    saarfranzose

    Question 1 year ago on Step 2

    The radio is really nice!! Is there the possibility to start a radio-station automatically at power on without using a handy/laptop first?

    hansiart-P6250012.jpghansiart-P6250011.jpg
    0
    hansiart
    hansiart

    Answer 1 year ago

    Hallo Saarfransoze, I am glad you like it. To answer your question: Yes, but that would mean that the radio starts to play in the middle of the night when there has been a power failure on the grid. You don't want that. I can see that you have difficulties with schwany, the same here. I tried the latest url (schwany1.schwany.de) but that often stops after an hour or so. Other stations work without these failures.

    0
    saarfranzose
    saarfranzose

    Reply 1 year ago

    Hello Hansiart, thank you for your answer. Schwany is not the problem, I made my own playlist. The login for the bash, is ist a secret? What is the sensor for? Using it is registered on the display, but nothing else happens. An automatically start would be important to start the radio easily. I made a german description, feel free to use it: https://radiobasteleien.blogspot.com/2020/06/das-hansiart-rpi-radio.html

    0
    hansiart
    hansiart

    Reply 1 year ago

    Hallo Saarfranzose. Gute arbeid, Ihre Anleitung. The sensor switches the radio on/of, i added a picture so you can see what sensor to use. It should give an active high when touched. The blue ones wont work because they stay high too long (12secs). You can also use a tactile button, as reflected in the drawing connected to 3.3V. So in fact you really can start easily. Only the very first time after power up, you have to press 2 times.
    Another downside you mentioned is the small lcd. You have to consider that the python scripts to update the display are really slow, so disturbances can be expected. Moreover, there is notting interesting to display.
    You can ssh into the radio at port 13254 as root with mies. Please don't steal my intellectual property hahaha. Have you seen my other RPI Radio with a led matrix display? There you can show what you like on the display.
    Hope this helps, enjoy

    0
    saarfranzose
    saarfranzose

    Reply 1 year ago

    I'm sorry. No connection, nothing happens by pressing the button, ones or twice, no matters.

    hansiart1.JPGhansiart2.JPGhansiart3.JPG
    0
    hansiart
    hansiart

    Reply 1 year ago

    Hi, I am also sorry, don't know what went wrong. Today i released a new image from my own radio, tested on another RPI-ZeroW so i am 100% sure that his one works with the button or touchpad. It has some other improvements anyway so please try the image radio-lcd-10-7-20.img
    For ssh you should use port 13254, not 13253, sorry that was a typing error.

    0
    saarfranzose
    saarfranzose

    Reply 1 year ago

    thank you for your support. Please give me the link for downloading the new image.

    0
    saarfranzose
    saarfranzose

    Reply 1 year ago

    I'm glad! It works fine now. Can start and stop the radio without handy! Just had to remove the static IP :-)
    thank you, hansiart!

    IMG_9633.JPG
    0
    hansiart
    hansiart

    Reply 1 year ago

    You are right, the image should not have a static ip configured. Thanks for pointing this out. I'l place a new image radio-lcd-13-7-20.img.
    Now you removed the static ip by brute force, you should also change the file /var/www/radio_data/wifistatus.txt. It should contain the word "dhcp", not "static". Otherwise the webpage for the ip config won't work as it should. To be precise, the file /etc/network/interfaces should look like the picture.
    Enjoy!


    interfaces.jpg