User avatar
Gabriel
Posts: 73
Joined: Wed Aug 10, 2011 5:43 pm
Location: France

My project : the raspberry radio

Thu Jun 07, 2012 12:56 pm

Hello everyone !
I live in France and I like to listen to the BBC radio, unfortunatly I live too far from the antenna to receive the classic radio signal so I have to use the website on my computer http://www.bbc.co.uk/radio/. The problem is that a computer is not very movable and having a computer plugged on just for radio is stupid !
So I'm planning to build a "raspberry radio", a webradio that will use internet through a wifi or ethernet connection to stream the signal to a male 3.5 jack.
It should cost the price of the raspberry pi + 10$ (or less!) I know that you can buy these kind of device in shops but I think that they will be more expensive.

What it will have :
- ethernet/wifi connection
- a small lcd screen that will display informations (name of the station, volume....)
- some buttons (3/4) to change the station
- a "volume wheel" (don't know the proper name in English)
- a male 3.5 jack port
- a FM transmitter to use your old radio as speakers (It would increase the cost but I love this function 8-) )

What it will not have :
- built-in speakers : because it would be too much complicated to have a good quality (I think), and most of the radio that you buy today can be use as speakers : they have a 3.5 jack port to plug your mp3 player
- a battery (or maybe later)

Done :
- play streams in a linux terminal (so without X11) on a x86 computer using cvlc and the official BBC streams that I found here : http://iplayerhelp.external.bbc.co.uk/h ... ma_streams
(It's not much but I now know that my project is possible)

To do :
- buy a raspberry pi :oops: (I'm waiting for a mail from Farnell :roll: )
- write the software side
- create the hardware side
- design a "box"
Last edited by Gabriel on Thu Jun 07, 2012 12:58 pm, edited 1 time in total.
My home-made case : http://goo.gl/nprcI ; My presentation http://goo.gl/5hSar et en français : http://goo.gl/28Vif ; Please think to the FAQ and to the Wiki

User avatar
Gabriel
Posts: 73
Joined: Wed Aug 10, 2011 5:43 pm
Location: France

Re: My project : the raspberry radio

Thu Jun 07, 2012 12:57 pm

reserved for later...
My home-made case : http://goo.gl/nprcI ; My presentation http://goo.gl/5hSar et en français : http://goo.gl/28Vif ; Please think to the FAQ and to the Wiki

bredman
Posts: 1415
Joined: Tue Jan 17, 2012 2:38 pm

Re: My project : the raspberry radio

Thu Jun 07, 2012 1:21 pm

You may find some useful information here for the hardware side.
http://www.raspberrypi.org/phpBB3/viewt ... 86&p=41186

This is going to be a tough project. Have you considered using satellite radio instead? You can get a satellite receiver and dish for about EUR 70. This will give you everything you need without using your broadband allowance (if you have one). BBC Radio is available on satellite at 28 East 11954 (http://www.lyngsat.com/Astra-2B.html). You should have no problem with coverage if you are in mainland France (http://www.lyngsat-maps.com/maps/astra2b_north.html).

User avatar
Gabriel
Posts: 73
Joined: Wed Aug 10, 2011 5:43 pm
Location: France

Re: My project : the raspberry radio

Sat Jun 09, 2012 9:21 am

Thank you for your answer :) and for the link that should help me to add buttons.
I hadn't thought about the possibility of using a satellite radio, there would be some advantages but the receiver would be too big compared to what I'm going to build. Moreover it would increase the cost by 2 or 3.
So I don't think I will use a satellite radio but I keep the idea, maybe to use it later in another project.
My home-made case : http://goo.gl/nprcI ; My presentation http://goo.gl/5hSar et en français : http://goo.gl/28Vif ; Please think to the FAQ and to the Wiki

nadim
Posts: 2
Joined: Sun Jun 10, 2012 2:25 pm

Re: My project : the raspberry radio

Sun Jun 10, 2012 2:33 pm

I'm new to all of this but was wondering, and thus the reply/thought, how involved would it be (and if anyone has already done this) to actually add a satellite receiver as a module to the Raspberry PI ?

The raspberry seems to have all that is necessary, from a simplistic point of view at least, in terms of hardware (data decode - audio/video, etc) which would require one to interface to the satellite dish itself. Simply put, why not think along the lines of 'can the raspberry be made to function like a "dreambox"' [1] ? If one is also able to port the dreambox GUIs, of which there are 2-3 dozen, then you're good to go.

Just a thought.

[1] http://en.wikipedia.org/wiki/Dreambox

Regards.

felixfurtak
Posts: 47
Joined: Wed Nov 16, 2011 10:41 am

Re: My project : the raspberry radio

Thu Jun 21, 2012 5:55 am

I have set up something similar to what you describe, but without any display or buttons.

I use mpd running on Debian to stream BBC radio channels here in new zealand, and also use it as an mp3 jukebox.

The pi is simply connected up via the 3.5mm jack to my amplifier for the audio.

Also, I use a web interface to control the pi from my laptop or phone, so it doesn't need to be physically connected up to a monitor or display to see what's going on.

Currently I'm using client175 as the web client.

BigEndian
Posts: 19
Joined: Tue Jun 19, 2012 6:50 pm
Location: Munich // Germany

Re: My project : the raspberry radio

Thu Jun 21, 2012 9:44 am

I'm planning to do nearly the same with my Pi!
Unfortunately I will get mine in september so I still have to be patient... :)

I want to use the pi absolutely headless for this purpose, just with 3,5mm jack, ethernet and power cord connected. I think it is no problem to configure some music deamon like mpd that it will play my favourite station at system startup but I have no idea how to cleanly shutdown the pi when I don't need/want music.

Since there is no keyboard or SSH session to it, I just see the way to unplug it every time.

Are there any other Ideas?
Alex

User avatar
Gabriel
Posts: 73
Joined: Wed Aug 10, 2011 5:43 pm
Location: France

Re: My project : the raspberry radio

Thu Jun 21, 2012 11:53 am

@nadim :
Yes I think you're right (I had'nt think to this possibility)
It should be possible but it's a big project ! Except if somebody already made a software able to decode signal from sattelite (In classic decoders it's hardware decoded isn't it ?)

@felixfurtak :
Thank you for your answer !
A have already made a bash script that launch mplayer then close it when you change of station and launch it again with the new station -> dirty but working :p
I'm now working on commanding mplayer in slave mode http://www.mplayerhq.hu/DOCS/tech/slave.txt (much more clean !)
When this new script will be working I'll add recording and maybe (I'm a linux newbie) the function "pause on direct".

It seems to me that we have the same goal even if we don't use the raspberry pi in the same way. However maybe only one program could do everything concerning a mms flow : the question is : "Do this program already exist" ?
Because I know that a lot of programs can play/re-stream/record radio flow, but can they both be efficient for :
- a "direct control" with buttons and a small screen (or a usb keyboard and no screen)
- a "remote control" with a web based interface
- an IR remote control (not on my to-do list)
I'm ready to spent time writing a script/program but it would be sad wasting time with the wrong software (not bad software but wrong for the use).

I don't know MPD very well but I will try to see if it's compatible with a "direct control" (contrary to the concept of a server controlled by a client).
The solution is maybe a raspberry pi with a server side app controlled by a client on the raspberry pi + a client on smartphone/computer (heavier but more efficient).

@BigEndian :
So I understand that you don't want to control anything - except the shutdown ?
- I don't think that the raspberry pi will complain if you unplug it 10 times a day (there is almost no writing on the sd card and this kind of board is quite strong)
- Maybe you could ask the raspberry pi to shutdown itself every 1-2 hour (but it would be a bit boring)
-I don't see why you want it "absolutely headless" : you just need one button on the gpio.

Gabriel
My home-made case : http://goo.gl/nprcI ; My presentation http://goo.gl/5hSar et en français : http://goo.gl/28Vif ; Please think to the FAQ and to the Wiki

felixfurtak
Posts: 47
Joined: Wed Nov 16, 2011 10:41 am

Re: My project : the raspberry radio

Thu Jun 21, 2012 11:20 pm

Shutting down could be problematic if a disk write is in progress when the shutdown occurs.

There are a few options in this regard.

1) Leave it switched on all the time. It only consumes around 3 Watts, so not too much of a power drain
2) Shut down remotely using ssh command
3) Once set up, mount all partitions as read only and disable logs or write them to RAM.

I'm currently favouring option 1) since it is arguably the easiest.

Regards,

Felix

touriga
Posts: 1
Joined: Sat Jun 23, 2012 7:26 am

Re: My project : the raspberry radio

Sat Jun 23, 2012 4:26 pm

Hi
My Raspberry Pi arrived this week so it is time to get going. Linux is new to me so I have a lot to get through. :)

My project sounds very similar to that of @felixfurtak and @BigEndian. I don't need any peripherals, display etc.

I have a PURE DAB radio in the bathroom and want to play Interner radio via the aux in. We'll probably only ever play one station. All the others we need are on DAB.
So all I need is power, a Wifi dongle and a jack lead to the radio's Aux in.

Switching on and off and preventing my bandwidth to have a chunk permanently unavailable has been a consideration. I am hoping that the PURE USB port provides power. That way when the radio is on it fires up the Raspberry Pi, and shuts it down when I switch the radio off. I still have to check this and that it doesn't trash the Raspberry Pi cutting power regularly.

Radio tuning: Via remote web interface. Wondering if I can use DLNA for this.

Music: I have a NAS box on my network with all my music. Currently I can render music, and control rendering onto to a number of devices with my phone. It would be nice to have this as just another renderer on my network. I'm assuming that DLNA can switch the media playing from radio stream to music rendering and vice versa.

Recording: Nice to have if I can do this simply via a phone app. Ideally onto my NAS drive.

I started today and so far I have set up a virtual machine running Debian on my Windows PC. I've been playing around with media streaming on the VM and also getting remote set up. I figure I'll do all the initial slog work on the VM and then port to the Raspberry Pi. I don't really want to hassle with monitors, keyboards, etc. so as soon as I have remote working I fire up the Raspberry Pi and make that my platform.

Looks like I'll be spending a bit of time on this thread!!

nadim
Posts: 2
Joined: Sun Jun 10, 2012 2:25 pm

Re: My project : the raspberry radio

Sun Jun 24, 2012 11:45 am

Gabriel wrote:@nadim :
Yes I think you're right (I had'nt think to this possibility) It should be possible but it's a big project ! Except if somebody already made a software able to decode signal from sattelite (In classic decoders it's hardware decoded isn't it ?)
Gabriel, a quick follow-up. I had mentioned satellite TV as you can get plenty of radio feeds using satellite and it would, most probably, fit your needs. Have you considered looking at the various satellite USB sticks out there (search for "Linux USB DVB S2 HD").

http://www.linuxtv.org/wiki/index.php/D ... SB_Devices

I'm certain someone has gone down this path, it would certainly be interesting to hear their findings and if all worked as expected on the R-pi.

Regards.

User avatar
Gabriel
Posts: 73
Joined: Wed Aug 10, 2011 5:43 pm
Location: France

Re: My project : the raspberry radio

Tue Jul 03, 2012 6:20 pm

Update !
I changed my mind about the "design" : actually it will be a "stand alone" wifi radio.

I got a nice box (in metal, so quite strong, well sized, maybe a bit heavy), a screen from a keychain (see http://www.raspberrypi.org/phpBB3/viewt ... ?f=2&t=428 and http://www.raspberrypi.org/phpBB3/viewt ... =64&t=6688 ) that can be controlled by any linux os (a program make me able to set a picture every 0.1 second or so).
And I also put 4 buttons (5 or 6 later), they will be controlled by my arduino (I won't have my pi until a loong time).

I started playing with bash scripts using the "setpic" program and the great imagemagick.
I already made a kind of clock. (see the pictures below, you can click on)

Image


Image


Image

Uploaded with ImageShack.us

@nadim,
Do you know if a "Linux USB DVB S2 HD" dongle will need an antenna ? I will try to buy such thing when I will have my r-pi.
My home-made case : http://goo.gl/nprcI ; My presentation http://goo.gl/5hSar et en français : http://goo.gl/28Vif ; Please think to the FAQ and to the Wiki

coliscip
Posts: 9
Joined: Wed May 30, 2012 10:14 am

Re: My project : the raspberry radio

Fri Aug 17, 2012 4:37 pm

Hello!
Can you put a step-by-step tutorial about making something like you do?

winelight
Posts: 1
Joined: Sat Aug 18, 2012 9:15 pm
Location: UK

Re: My project : the raspberry radio

Sat Aug 18, 2012 9:22 pm

I am planning something similar.

A raspberry pi with wifi USB dongle running MPD/MPC. Not sure what happens to the audio, haven't looked at how easy it is to get it out of the stereo jack or whether a USB audio thingy is necessary.

So far, it's similar to the other proposals here.

But, this is for a car internet radio. Unfortunately, my car audio works over an AV bus. So, I need to monitor, interpret and respond to commands sent over the bus in order to turn the radio on (well, it will probably be on all the time) and select stations.

My plan is a little microcontroller board to do this, which will send TTY-style serial commands to the pi. Probably, it's possible to dispense with the microcontroller board and write some software for the pi to use the GPIO pins to monitor the car's AV bus. But the thought of this scares me, while the serial port / microcontroller route doesn't.

User avatar
Gabriel
Posts: 73
Joined: Wed Aug 10, 2011 5:43 pm
Location: France

Re: My project : the raspberry radio

Mon Aug 20, 2012 10:55 am

coliscip wrote:Hello!
Can you put a step-by-step tutorial about making something like you do?
I'm afraid it would be difficult : my constructions are a bit empiricals, I mean I see a nice metal box and I say "let's go!" I find if I can set the board, then I go to the next step. This radio-box as been made around the power supply unit from a computer and nobody will find the same so I can't give instructions for it.
However I can give you ideas for research the lcd : If you want to use the same lcd (which cost around 10$) you'll have to consult these links (it's a bit complicated, needs linux, but do-able.) :

- http://www.raspberrypi.org/phpBB3/viewt ... 28&p=14872
- http://www.raspberrypi.org/phpBB3/viewt ... =64&t=6688

If you try doing this and achieve having a keychain working as a screen I will give you the script to make a clock.
My home-made case : http://goo.gl/nprcI ; My presentation http://goo.gl/5hSar et en français : http://goo.gl/28Vif ; Please think to the FAQ and to the Wiki

coliscip
Posts: 9
Joined: Wed May 30, 2012 10:14 am

Re: My project : the raspberry radio

Tue Aug 21, 2012 10:37 am

First, thank you for your reply.
Don't want to have lcd or any display.
I want just to use keyboard or buttons connected to GPIO pins (previous station, next station-from a list of stations defined by me , volume up, vol down, mute).
I want to use audio out jack.

jc233
Posts: 1
Joined: Fri Sep 28, 2012 8:09 am

Re: My project : the raspberry radio

Fri Sep 28, 2012 8:27 am

Interesting project!

I have something similar already working at home, but using a Via embedded PC board, and control is with a set of switches.

Currently I have 4 switches, "Radio 4", "Radio 6", "Radio 4 Extra" and "OFF".

My future plans are:
i. Add some sort of screen and more complex controls for the switches via menus etc.
ii Convert the player from via to ra-pi (once it finally arrives - still didn't get to austria! :x )

So my system consists currently consists of:

i. Embedded PC board (Via C5)
ii. Voyager embedded linux
iii. mpd music player.
iv. Audio output via usb DAC
v. Music sources
- my music collection, ripped to MP3 of FLAC and stored on the network on a samba share
vi. Control via:
- telnet in and use mpc
- over network with anyone of various clients (from PC, phone, webrowser etc)
- 'standalone' with a set of switches (see below)
vii. Standalone accomplished with:
- Set of switches connected to IO of Arduino or mbed board.
- serial link between the two boards.
- simple python script on the media player, reading in serial commands and running mpc.

Marronnier
Posts: 2
Joined: Wed Oct 24, 2012 4:38 pm

Re: My project : the raspberry radio

Wed Oct 24, 2012 5:02 pm

I also have a project to convert an FM radio to work as an internet radio using the RPi. I've set up MPD and MPC to play some radio stations by using e.g.

mpc add http://64.40.99.2:8088
then
mpc play

which is great if you want to listen to Beatles Radio all day. I would like to listen to BBC Radios 1-7 and other UK radio stations. Can anyone let me know what I URLs I should be 'add'ing instead of http://64.40.99.2:8088 to get these other radio stations?

Thanks

User avatar
bonelifer
Posts: 128
Joined: Thu Jan 12, 2012 4:01 am
Location: http://www.phpbb.com/community/memberli ... e&u=147848

Re: My project : the raspberry radio

Wed Oct 24, 2012 6:25 pm

Marronnier wrote:Can anyone let me know what I URLs I should be 'add'ing instead of http://64.40.99.2:8088 to get these other radio stations?
Found this via an online search: http://www.codedefied.co.uk/2011/12/24/ ... -with-mpd/

Marronnier
Posts: 2
Joined: Wed Oct 24, 2012 4:38 pm

Re: My project : the raspberry radio

Wed Oct 24, 2012 6:40 pm

bonelifer wrote:
Marronnier wrote:Can anyone let me know what I URLs I should be 'add'ing instead of http://64.40.99.2:8088 to get these other radio stations?
Found this via an online search: http://www.codedefied.co.uk/2011/12/24/ ... -with-mpd/
Thank you very much for this link, I did a lot of searching but did not come across anything as useful as this, thanks again.

bobrathbone
Posts: 22
Joined: Mon Oct 22, 2012 7:43 am

Re: My project : the raspberry radio

Thu Dec 13, 2012 6:20 am

Take a look at this project for a Raspberry PI internet Radio
http://www.bobrathbone.com/raspberrypi_radio.htm
Build instructions and source are available for download from this sit.
It features a 5 button radio with a 2 x 16 LCD screen.

nickr
Posts: 27
Joined: Fri Jan 13, 2012 6:35 pm

Re: My project : the raspberry radio

Thu Dec 13, 2012 7:12 am

I wonder if it might be simpler to use squeezeplug? http://www.squeezeplug.eu/ . It has access to hundreds of internet radio stations out of the box and you can add your own urls too.

It's player, squeezeslave, can be keyboard controlled all the way.

Button control is actually easiest by linking some switches up to a cannibalized usb keyboard. http://www.instructables.com/id/Hacking-a-USB-Keyboard/

For example if squeezeplay wants a "p" key to "pause" you map the button on the outside of your hacked up box to emulate the "p" key and so on.

Or just use lirc and control the whole thing with a remote control.

User avatar
Gerrelt
Posts: 294
Joined: Sat Nov 10, 2012 9:01 am

Re: My project : the raspberry radio

Thu Dec 13, 2012 12:16 pm

I made an internet radio using Squeezelite, see: Radio Raspberry

I control it through an app on my android phone, it's working very well!

I've got a video of it here, when it was still in development: Youtube movie
(not in the radiocassetteplayer yet, and still using squeezeslave instead of squeezelite, see old thread)
my Raspberry Pi page: http://raspberry.gerrelt.nl

Return to “Media centres”