Introduction: Fireside Internet Radio Player for Elderly Users - Built With Raspberry Pi

About: Streaming internet radio players for the elderly, custom built for individuals.

Introduction:

Today we have amazing access to great streaming content: music, news, weather, stories, etc. Yet, this access is limited to those who can navigate today's electronic devices. This project is based on a belief that the elderly want and need this access - they simply require an accessible interface and navigation.

Fireside Internet Radio is an internet connected, open source hardware/software project designed to make personalized streaming content available to those who need it the most. Visit www.firesideinternetradio.com for more information.

What does it do?

Fireside Internet Radio provides 3 main functions:

1)Provides a personalized list of streaming content feeds. Elderly users switch between these 'radio stations' by simply pressing a button. The same button is held down to turn the radio on and off. Caregivers can change the list of streaming sites remotely by updating a Google spreadsheet.

2) The software uses Google speech and other APIs to provide weather, time, news updates and also to read personalized information. For example, an Alzheimer patient may need to be reminded of their name or the names of their loved ones each time the player is turned on.

3) Twitter API can be used with Google speech to keep elderly loved ones socially connected. By setting up a Twitter account for the user (my grandmother has one but doesn't know what Twitter is!), family and friends can post quick updates. The software will check for Tweets and use the Google speech API to read the post.

I hope to develop other useful functions - please post if you have suggestions! (Also, this is first instructable - please rate openly and pass along any improvements! Thanks!)

Basic instructions:

1) Assemble radio hardware (based on Raspberry Pi (A or B)). Overall cost is approx. $70-$80 (not including headphone)

2) Download, customize (feel free to branch) software (python) from Github

3) Install Raspbian OS on SD Card, several software downloads, and Fireside scripts

4) Setup a Google Drive spreadsheet and list streaming urls

5) Build a speaker or headphone with pushbutton to operate the Fireside player

The next pages provide specifics for each of these steps.

Step 1: Organize the Hardware

Check out the Fireside player BOM (bill of materials) image above. A few notes on these items:

  1. Raspberry Pi: Models A, B, A+, B+ will work. I prefer the A as it is most economical. If you plan to develop on the Pi, you may want to consider a B as it has 2 USB ports.
  2. Amplifier: A lot of 5V amps will work. I've been happy with the 5V amp with integrated volume control from DROK. Check out: http://www.amazon.com/gp/product/B00C4N410G/ref=oh...
  3. SD Card: Some SD cards seem to work better for Raspberry Pi. Check out http://elinux.org/RPi_SD_cards for and up to date list of compatible cards.
  4. Charger: 5V Wall charger with micro usb end is required. A 1500 mA charger (or larger) will provide enough current for both the Pi and the amp. Chargers can be purchased all day long on Amazon.
  5. WiFi adapter: I've tried a lot of Wifi dongles, all purchased on Amazon -most work well with no issues. The Panda Ultra Wireless N adapter is one that consistently performs well.
  6. Inserts: Threaded inserts and screws can be found on McMaster Carr: http://www.mcmaster.com/#standard-threaded-inserts...
  7. Case: I use wooden boxes from craft stores. They usually cost just a few dollars and look very nice when sanded and painted. Cigar boxes and hollowed books also work well.
  8. Base: the base for the Raspberry Pi can be printed on any plastic rapid prototype machine.
  9. Not included: speaker with button - see last step

Next step: Assemble player hardware

Step 2: Assemble the Hardware

  1. Drill 3 1/4" holes into the case: a) amp/volume knob b) headphone jack and c) for power cable.
  2. Using hot glue, fasten the base for the Raspberry Pi in place. Make sure you allow room to access the SD card, USB -for wifi dongle, and the power connection.
  3. On the bottom of the Raspberry Pi, locate the weld points shown in the photo. These points are the ground and signal connection for the Pi's audio out. Solder a black ground wire and red signal wire at the points shown.
  4. Cut the 5V power cable about 2 inches from the micro USB connection. You will solder the cable directly into the 5V amplifier board's power pins. The 2 inch USB end will also be soldered onto the amp board to extend power to the Pi. See photo.
  5. Keeping wire lengths that work for your layout in mind, solder the power, amp, Pi, resistor and headphone jack as shown in the layout. Be sure to pass the power cable through the hole in the case before soldering to the amp board.
  6. Mount the amp and headphone jack in place using the threaded nut. Mount the Pi with (2) 4-40 machine screws. Use electrical tape to protect any exposed wiring.
  7. (or maybe step 1) Finish the case however you choose. I usually sand and paint the cases (before hardware assembly) and use rapid prototyped plastic trim pieces to design the front.

Next step: Load software onto SD card.

Step 3: Load Software Onto SD Card

Before loading the Fireside python code and other necessary software, install Raspbian Wheezy operating system on the SD card. (Again, check that the SD card is compatible with Pi: http://elinux.org/RPi_SD_cards )

Several great Instructables have been written for configuring a SD card with Raspbian. Check out this one, for example: https://www.instructables.com/id/Introduction-64/

(If you are using a SD with OS already installed, it is a good idea to update/upgrade before continuing.)

After Raspbian is installed on the SD card and Pi has been configured, boot up a Raspberry Pi with keyboard, HDMI monitor, mouse, and network connection. (If you plan to use your media player PI to configure the SD card, you may need to loosen its mounting inside the case in order to attach HDMI and a USB hub.) Confirm that network connection is working. Also confirm that the time setting is correct.

__________________________

1) Open a terminal window and make a directory named Fireside and change to the new directory:

cd /home/pi
mkdir Fireside
cd Fireside

Clone the Fireside files from github:

git clone https://github.com/bkshepard/fireside.git

2) Make a new file named 'sb.cfg' by copying the file 'sb_example.cfg'.

cp sb_example.cfg sb.cfg

In the new sb.cfg file, enter specifics for your gmail, wunderground api, and twitter keys. Pick any device # (ex. 11223344) for the player and remember it for the step of setting up Google spreadsheet.

Gmail: Setup a google account at www.google.com. We'll set the spreadsheet in the next step.

Wunderground (weather) api: http://www.wunderground.com/weather/api/

If you plan to use Twitter, set up an account and obtain appropriate API tokens: https://dev.twitter.com/oauth/overview/single-user

(Using Twitter is optional...I suggest getting the player working first with radio streaming/time/weather and then later adding Twitter functions)

3) Force the audio output on the Pi to the 3.5 mm audio jack:

     sudo raspi-config

Select Option 8: Advanced Options and then select Option A6: Audio:

Select Option 1: Force audio through 3.5 mm jack

4) Install PIP then use pip to install gspread:

sudo apt-get install python-pip

sudo pip install gspread

5) Install music related software:

sudo apt-get install mplayer mpg321 mpd mpc

6) Add this file to improve the stability of the wifi connection:

sudo nano /etc/modprobe.d/8192cu.conf

(and add these lines to the new '8192cu.conf' file:

options 8192cu rtw_power_mgnt=0 rtw_enusbss=0

rtw_ips_mode=1

7) Setup the script to run automatically when Pi boots up. This involves loading Upstart and copying the .conf file into /etc/init:

sudo apt-get install upstart

sudo  cp /home/pi/fireside/fireside.conf /etc/init/

8) Set-up wifi connection for intended network:
If you plan to use the player on a different network then the one used for building it, be sure to set the ssid username and password: There are several scripts that work. I prefer to setup the following using a wpa_supplicant.conf file.

a) open /etc/network/interfaces and edit so the script is:

auto lo

iface lo inet loopback

iface eth0 inet dhcp

allow-hotplug wlan0

iface wlan0 inet manual

wpa-roam /etc/wpa_supplicant/wpa_supplicant.conf

iface default inet dhcp

b) Edit the file /etc/wpa_supplicant/wpa_supplicant.conf to include the network name and password:

ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev

update config=1

network={

ssid ="thisisthenameofthenetwork"

psk="thisisthenameofpassword"

proto=WPA

key_mgmt=WPA-PSK

pairwise=TKIP

auth_alg=OPEN

}

Next step: Setup Google Spreadsheet

Step 4: Setup Google Spreadsheet With List of Streaming Media

1) Log in to the Google account created in Step 3 and go to Google Drive.

2) Create a new spreadsheet named 'Fireside' (the name is important as the code searches for this spreadsheet)

3) Create a sheet in the Fireside spreadsheet named 'Stations' (name also important)

4) Setup the sheet as shown in the image above. On the first row, make column headings as 'Device #' then 'Station 1', 'Station 2', etc. On the next row, enter the device # that matches the device # used in the sb.cfg file created in Step 3. Then, under each station heading, enter a url for a streaming station.

You can find thousands of streaming content streams onlines:

A few examples:

I know this URL works and is a good one for first testing your player:

http://crystalout.surfernetwork.com:8001/WFMN-FM_M...

My family all seems fascinated by the digital voicing of NOAA weather reports:

http://www.wunderground.com/wxradio/ (find your local station)

Vintage radio programs (free) can be found at RadioLovers.com. Like Gunsmoke:

http://www.radiolovers.com/shows/G/Gunsmoke/1955/G...

Lots of great NPS streaming programs can be found:

http://streams.kqed.org/kqedradio.m3u

In searching for urls to stream, google the term 'direct url' as it is the direct url address you want to list in the spreadsheet.

Next Step: Build speaker with button

Step 5: Speaker With Button

A speaker with a button is needed to listen to and operate the player. This is a simple pull-up resistor switch circuit shown as shown in the diagram. Using a standard 3 pin audio jack, the speaker uses the right pin as the signal (audio output) from the RPI. The left pin is used to provide input to the RPI GPIO 23.

Above are photos of several examples of speaker/button builds. My favorite is the speaker that looks like a white microphone -it is a speaker and not a mic. In my experience, many senior users do not like to wear headphones but need a speaker in close proximity to their ear. This hand-held mic-shaped speaker provided a close proximity with an easy to access button. If there is interest in this design, I'll make an Instructable and share the .stl hardware file for the 'mic' case.

The speaker and button can also be built into the case with the Raspberry Pi if the device is to be used as a bedside player -see the last two photos above.

Step 6: Test and Use!

1) Plug in the speaker with button and power up the player...wait one full minute for initial boot-up....

2) Hit the button one time...after a pause of a few seconds, the device will begin streaming the first URL

3) Hit the button again to cycle between streaming content

4) Hold the button down and count for ~4 seconds....this will power down the device...the script will tell time and weather once more and announce it is shutting down.

5) The code is always running while the player is powered. The user can 'turn it on' again by just hitting the button.

Dig into the code and improve it! There are a lot of additional functions that can be added: read emails, voice to text messaging, medicine reminders....If you build a player, please let me know! And if you make improvements, please share!

www.firesideinternetradio.com

Homemade Gifts Contest

Participated in the
Homemade Gifts Contest

Formlabs Contest

Participated in the
Formlabs Contest