Introduction: INTERNET RADIO / TICKER / WEATHERSTATION
This is a very good internet radio, but more than that, it is a weather station, a ticker and a domotica system as well.
And it is:
- very cheap
- works really good
- very easy to build and operate
- portable due to the easy connection to wifi
- 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 a domotica system.
- You can easy compile your own list of favorite stations.
- Artists / Songtitles are shown on the display and the webpage.
- A higly configurable ticker with lots of options.
- It can show pressure, moisture and temperature.
Watch the simple video to get an idea.
- What you need is:
- a Raspberry zero W
- a 5v micro usb power supply or build your own
- PCM5102 I2S DAC GY-PCM5102 (ebay)
- a BME280 sensor
- 4 or 5 cascaded max7219 ledmatrix display (ebay)
- 8gb micro sd card
- minimal 9 dupont wires
- a powered computer speaker set (second hand)
The rest is optional.
Step 1: INTERNET RADIO / TICKER / WEATHERSTATION / DOMOTICA SYSTEM
SUMMARY OF THE WORKING
The radio is completely controlled by webinterfaces, your phone (or other wifi enabled device) is the remote control. The only (optional) physical control element is a button or touchpad. The radio plays streams that are provided bij Internet Radio Stations. There are uncountable stations to listen to, a lot of them play only music of a certain genre so you can always listen to your favorite music.
So the radio has to be connected to your wifi network. I made that a simple operation that anyone can do. If the radio can't connect to a wifi network, it opens an accesspoint automatically. If you connect to that and then you browse to http://192.168.4.1 you'l enter the configpage. Here you can enter your wifi credentials. When done it reboots and will connect. Once connected it shows the ip address on the display. Just browse to this address and your done. Almost as simple as connecting your smartphone to a wifinetwork.
One of the first things to do now is expanding the filesystem to the size of your sd card. This is also a simple task, just click "expand rootfs" under the system menu and see what happens. When ready, you need to reboot.
Now you can explore the many features this radio has. When you connect a good pc speakerset you can enjoy a cristalclear sound that can be set to your own preferences with the 10 channel equalizer.
This is beyond the scope of this instructable but i have to mention it: I have this radio in use as a complete domotica system that works perfectly together with google home. I can voice-conrol many lamps and scenes in my house. And the radio itself ofcourse. Only an extra investment of about 13$ is needed to build an RFlink Gateway and plug it into the usb. The system is already up and running. On how to do this, a lot of information is available on the internet.
Step 2: STEP 1 BUILDING IT
DEVICE: desktop pc, laptop, tablet or Phone with WIFI
RPI: The raspberry zero W
The radio will work without the other hardware so you can test with only the RPI. It is however recommended to connect the display so that you can see what's happening and find out your ip address.
Optional, when you have some soldering skills, you can add a standby led, (is on when the radio is out) a pushbutton or a touchpad and / or a power board that allows switching the power of the speakerset. When you use a touchpad, you can connect an led to gpio20 that lights up when a touch event took place.
You start with downloading and burning the image on an sd card. You do this by following the instructions here: SD CARD BURNING INSTRUCTION
Note the SD card requirements! When nothing seems to work, suspect the SD-card.
Below you'l find a link where you can download the sd-card image file.
update 9 march 2021
I made a new image available that has some improvements. Most of the critical scripts are replaced by c programs that improved the reaction speed. Some forgotten translations are corrected. The infopage now displays the size and usage of the sdcard.
To verify that all is working, i downloaded the image myself from onedrive (5 minutes), unzipped it an burned it on an SD-card. I used win32diskimager. No problem what so ever.
We start with testing the software. Connect at least the led matrix. Insert the sd card and power up. You will see the led on the RPI flash just a few times. For energy saving it stays off further on. After some time (be patient, the raspberry is not very fast) you get some messages on the display. It tells you that an accesspoint is opened. Now go to your DEVICE and open the network configuration. You will see a wifi network called "radioAP". Connect your DEVICE to this network with passwd "rpiradio". Now open your browser and go to 192.168.4.1 , you will enter the config portal. Here you can provide the network credentials. When done, save and reboot. The ip address is shown on the display. Connect your DEVICE back to the normal network and check that you can reach the webpage of the radio.
If you plan to use (optional) a button or touchpad, you could connect them now and test if it works. The drawing shows what wiring is needed.
If you have the dac connected you can plug-in the 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 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 3: STEP 2 THE POWERUNIT
When you power the raspberry with usb, you can connect the vcc of the other hardware directly to the raspberry. But you will be short of one 5Volt pin if you have the display, the touchpad and the dac connected. You will have to split one of the dupont cables.
If you use another 5v power supply, one of the two 5v pins is the Vin now. Now you are short of 2 powerpins. In this case you can multiply one dupont cable to 3.
When you have some soldering skills you could build this power unit. It can also 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 4: STEP3 THE ENCLOSURE
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. You can also build it in an antique radio, this might look better in your house interior.
Step 5: Troubleshooting
The raspberry won't boot up.
At boottime, sometimes all of the leds in the display are lighted up. This is a bug in the display library. I could not find a solution for that. Anyway, when this happens, it is eating maybe too much power. Just pull the plug and try again.
We have 5 * 64 = 320 leds, when fully powered this consumes 320 * 0,02A = 6,4A so when your powerunit can deliver some 320W you should never experience this problem.
1 year ago
role des LEDs et branchements. j'ai réalisé la webradio sans l'afficheur(controle par phone)
Question 2 years ago
Great setup, but once the Pi is booted up with the image, Bluetooth doesn't work. Does it disable the Bluetooth module on the Pi, and if so, how do I re-enable it?
Answer 2 years ago
Bluetooth is not installed, the radio doesn't need it. You can install it yourself: ssh into the RPI (user root pwd mies) and follow the intructions found here:
Setting Up Raspberry Pi Zero Bluetooth | Microcontroller Tutorials (teachmemicro.com)
Can i ask what you want to do with BT?
Reply 2 years ago
Ah, I want to connect a Bluetooth controller to the Pi (it's a Pi 3) so it can control this: https://www.instructables.com/Wooden-LED-Gaming-Di...
Reason for running this on your image is so we can have best of both worlds, that project and a web interface to give the Pi a new SSID and wifi password when it needs it. The radio is a nice bonus 😄
The Bluetooth service doesn't start properly according to systemctl status bluetooth, and even with all the necessary Bluetooth applications installed, bluetoothctl hangs when I try to run it. Could there possibly be some incompatiblity with this image and a Pi 3?
Thanks for getting back to me so quickly!
Reply 2 years ago
Sorry, i dont have a rpi3 to investigate so i can't help you here. I would say that if the rest is running, it should be possible to get BT running too. But that there is some incompatiblity betweeen the kernels on rpi0 and rpi3 would not surprise me.
2 years ago
juste changer les radios sur "list1 "et "list2" merci
Question 2 years ago on Introduction
merci pour votre web radio fonctionne impeccablement ;une question:comment charger une autre webradio .merci
Answer 2 years ago
Je suis désolé mais je ne maîtrise pas suffisamment la langue française pour comprendre votre question.
Do you want to load another radiostation?
Reply 2 years ago
I would like to load several "url" in the Zero and choose them with wifi (lake you) I am thinking about the power on/off:ok to stop but works?
merci de votre gentillesse
Reply 2 years ago
Sorry i still can't figure out what your intentions are. What url, to play a radio stream? This is covered under the menu item "stations". Click on "list1" in the upper menu bar. Now you can edit the list with your favorite radiostations (name and stream url). The lists wil show up as buttons in the menu. Just click one and it plays the url.