empowering creative people

Showcase Image

Introduction

I wanted a self-contained internet radio with the following criteria:

  • Reasonably compact/portable.
  • Only required an external connection for power (i.e. wireless internet access).
  • Simple controls for volume and mute-toggle.

Project Description

The new raspberry pi 3 has built-in wifi so I went with that to avoid the extra hardware.

The main software I installed is mpd (media player daemon) and mpc (mpd controller).

For control I used a rotary encoder with momentary push-button - roate for volume control, push to toggle mute. I wrote a daemon to automatically run at boot which monitors the encoder and used the mpc API to control mpd.

Audio is output from the raspberry pi 3.5mm audio jack to a single speaker via a small amplifier module.

I prototyped with a breadboard until I got the code working and decided to make it permanent. I've been experimenting with some hobyist-level woodworking so decided to put it all in a wooden box, most of which is recycled pallet wood. I provided access to the ethernet and usb ports for alternative connectivity and the ability to play MP3s from a usb drive.

The main electronic components were sourced from Core Electronics:

For the daemon code, I started with the work documented by Andrew Stine (http://theatticlight.net/posts/Reading-a-Rotary-Encoder-from-a-Raspberry-Pi/) which I modified for my purposes and then converted to a daemon to be run at boot. The final code I ended up with is on github (https://github.com/Clewsy/rad10d).

Attachments

1. 1468474517_Proto.jpg

2. 1468474517_Done.jpg