Page 5 of 5

Re: Very simple Raspberry Pi Radio

Posted: Sun Nov 10, 2013 7:35 am
by Schwabinger
RaspRadio is working perfectly fine ... I use it daily.

But as it is only controlled with a remote, something is still missing: I want the good old "Radio Feeling" back where you have to use a dial to tune or to change the volume.

So I got myself a second Rasperry Pi and bought a cheap MCP3008 8 channel ADC.
Now by using a potentiometer I can tune through my playlist with about 20 Radio stations.

The way you connect the MCP3008 to the Pi is described here: ... n-mcp3008/

More info will follow.


Re: Very simple Raspberry Pi Radio

Posted: Sat Dec 21, 2013 12:09 am
by Schwabinger
Have a look at the working prototype of my new RaspRadio: ... 612312533/

It is operated with two pots and two push-buttons only. Both pots as well as the buttons are controlled by a MPC3008 ADC.

You tune the stations by turning the pot. Works very fast and feels like a real radio!

I am experimenting with battery / solar power: With 4 AA Eneloops you can run the radio for about 4:30.

Soon I will test the setup with a Pi version A which is supposed to use less than 50% of energy compared to model B.

The solar panel (which could actually house the Pi as well) is from: ... c9070d4d37


Re: Very simple Raspberry Pi Radio

Posted: Sat Jan 04, 2014 10:44 am
by andycrofts
Hmmm.. the idea of annoucing the numbers (each '5' is a dash, each '1' is a dot...)
How about Morse code? If you only want numbers, it'll take 10 minutes to learn:
1: .-----
2: ..---
3: ...--
4: ....-
5: .....
6: -....
7: --...
8: ---..
9: ----.
0: -----
So, 29 becomes: ..--- ----.
Dog-easy to write a bit of code for the Pi in Python!

Re: Very simple Raspberry Pi Radio

Posted: Mon Jan 06, 2014 2:24 am
by Schwabinger
Cool idea! On the other side, it want to keep it as simple as possible. RaspRadio should be easy to use for everybody.

As demonstrated here ... spberry-pi
I added a reset button to my new radio.

So with pushing a button you can

- reset the radio when running
- starting the radio if it has been shut down previously.

Here are some new pics: ... otostream/ ... otostream/



Re: Very simple Raspberry Pi Radio

Posted: Tue Feb 04, 2014 4:12 pm
by lfzguud
Gentlemen! Thank you so much for this conversation! I'm planning to gut this old RCA Victor radio (Little Nipper) into a RasPi internet radio.
Following your lead, it will repurpose the two buttons on the front for both tuning and volume. There will also be an infrared option and an LED screen on the back. Just ordered the RasPi and a few other parts - looking forward to build this! Again, thank you for the inspiration and for posting your progress!

Re: Very simple Raspberry Pi Radio

Posted: Fri Feb 07, 2014 4:25 am
by Schwabinger
RaspRadio Classic has two new features:

Headphone-Jack: When you plugin a headphone, the speaker will turn silent.
Switch for the battery powered amp: I often let the radio running, using the switch I stop the sound and prevent battery drain ...

From outside: ... 612312533/

From inside: ... 612312533/

The only thing I still would like to have is a new Sacher cake box ... to built it up again from scratch ... Might be the reason for a trip to Vienna.


Re: Very simple Raspberry Pi Radio

Posted: Sat Mar 15, 2014 9:22 am
by Schwabinger
RaspRadio can talk to you now:

Making use of the text2speech link that is offered by google, a female voice now reads the number and the name of the station that is just playing.


If I just listen to the station "Radio swiss Jazz", and if I am not positive that this is really that station , pressing a button mutes the radio for an moment and then the voice says:

"Station 13 ..... Radio Swiss Jazz"

And then the radio starts playing again.

Depending on the name of the station either an english or german speaking voice is talking.

The text2Speech mechanism is described here: ... like-siri/

My coding looks like that:

Code: Select all

echo off

# Pause radio

mpc pause

# Read station number
POSITION=$(mpc -f %position%| head -1)

# Extract station name (TEXT) and language flag (e or d) from
# textfile "spokenlist".

TEXT=$(head -$POSITION /home/pi/scripts/spokenlist | tail -1 | cut -d "#" -f 2)
LANG=$(head -$POSITION /home/pi/scripts/spokenlist | tail -1 | cut -d "#" -f 3)

# according to the language flag the english or german text2speech
# modul is called.
# the voice says: "Station: 3 ... BBC World Service"

if [ $LANG == e ]; then
/home/pi/scripts/ station $POSITION
/home/pi/scripts/ $TEXT
if [ $LANG == d ]; then
/home/pi/scripts/ station $POSITION
/home/pi/scripts/ $TEXT

# start playing again

mpc play
That solution is certainly more convenient than the blinking led that I used to indicate the number of the current station.

Re: Very simple Raspberry Pi Radio

Posted: Sun Apr 27, 2014 11:20 am
by Schwabinger
I experimented a little with a rotary encoder - it was surprisingly easy.

Using a rotary encoder you can have a playlist of unlimited length: Turning the know in one direction plays the next station, turning the knob in the other direction plays the previous station.

The library that I used is desribed here: ... pberry-pi/

And my very simple test code is here (I only had to add the mpc calls ):

Code: Select all

import gaugette.rotary_encoder
import subprocess
import gaugette.switch
A_PIN = 7
B_PIN = 9['mpc', 'play' ])
encoder = gaugette.rotary_encoder.RotaryEncoder.Worker(A_PIN, B_PIN)
while True:
    delta = encoder.get_delta()
    if delta==1:['mpc', 'next' ])['mpc', 'play' ])
    if delta==-1:['mpc', 'prev' ])['mpc', 'play' ])

Now I can browse through a playlist with about 400 radio stations ... which I extracted from here: