So little base details about my radio project:


Hardware (current):

[Main unit]

Raspberry Pi model B rev 1

2GB SanDisk SD-card

Achme AM453B power supply

Old dvd-player (buttons and LED utilized)

Random Creative PC speakers

DS18B20 temperature sensors

Spot raster prototyping board with some homebrew electronics


[Satellite unit]

Arduino Leonardo

Ethernet Shield

16x2 character LCD display

More DS18B20 sensors

Breadboard to keep the connections together so far


The concept here is that Raspberry Pi is the control unit around this all. It controls the streams and playback, takes input from the satellite units (currently just temperature), gives commands to the satellite units and logs the temperatures. The RPi is powered by the Achme PS through the GPIO pins from that protoboard so there is no single USB connected.


OS running on the RPi is Arch Linux without GUI. All controls happens over HTTP API, physical buttons or ssh. There is no monitor, keyboard etc connected to it. I have MPD running and providing the audio playback functionality and playlists. That is controlled from Cizilo, homebrew python software keeping all this together.


Cizilo provides locking MPD client through python mpd lib wrapped in the locking class. It has also one thread controlling the hardware on the DVD enclosure, reading those buttons and controlling the led in the front panel. The HTTP API is also provided by the software and it’s utilizing simple web server from twisted. As everything so far is tied around this single piece of code I have avoided any complicated communications between different processes. If I need to split these things at some point I probably will utilise some message Q system, but so far there has been no need for it. There is no actual web page provided, but the web server just listens for the API commands and returns all values in cute JSON package. I have not planned to have web interface for this, but after all the basics have been put together I will work through Android app to have the controls transferred to my phone.


Current functionality is to have 3 buttons hooked up to the RPi providing short press Stop/Play, Previous item in playlist, Next item in playlist. Same buttons has also long press functionality in  same order Toggle Night mode, Volume down (5%/500ms), Volume up (5%/500ms). The software keeps track of the stream played and the volume for normal mode and night mode. Idea behind the night mode is that I prefer to have something playing through night when I’m sleeping and scrolling through the playlist for correct stream and adjusting volume was just frustrating. Now I can have my preferred stream and volume set by one button when I’m heading to bed. This also inspired me to implement alarm clock into this same interface. The alarm can be set through the HTTP API and will swap the night mode to normal mode or start playback if the state has been stopped. It also increases the volume 25% over a minute period to give bit smoother wakeup.


I will be doing couple of versions of those satellite units. The one I have currently running is just thermometer until I get my mosfet drivers from my supplier and get my light controls set up. It has the display so I can get some information from the RPi displayed along with the temp. I will probably put the same 3 button functions for it as the RPi has so I can control the radio from my bedroom without fiddling around with phone or laptop. The other version of the satellite unit will be black box just collecting the temperature data and controlling the lights.


I got my first 10m of RGB LED strip from China couple of weeks back but have had some problems to source all the rest of the components to get the light controllers running. The soul of it will be the PWM lines from Arduino together with homebrew power boards to drive the LEDs. The controls itself will be coming from the RPi and I need to extend my HTTP API to cover those as well when I get the first prototype running and see how those performs. I will get to more details when I get the components coming in. RS had the mosfet drivers on shelf so they should be coming any day now.


Next post will hopefully have some pictures as well how this all is getting together.