The One Button Audiobook Player

This little Raspberry Pi based project is a gift for my wife’s grandmother for her 90th birthday. Being visually impaired, she is hard to entertain but loves to listen to audiobooks. The problem is, that she isn’t able to handle a ghetto blaster or MP3 player.

The solution to this problem was – tadaaaah – a one button audiobook player :)

It basically consists of:

  • 1 Raspberry Pi
  • 1 ModMyPi enclosure
  • 1 button
  • 2 resistors (330 Ohm, 10 Kilo-Ohm)
  • 1 blue LED
  • 1 (slow) 8GB SD-Card
  • some wire
  • a pair of speakers

The following software has been used:

The features are the following:

  • always on: When you power on the raspberry, it will boot up and start the python script with the audio book in pause
  • one button usage: The button pauses and unpauses the audio book or goes back one track when you press the button longer than 4 seconds
  • remembers position: It will always remember the last played position
  • only one audiobook: There will always be only one audio book on the Raspberry
  • easy audio book deployment: When you plug in a USB thumb drive with a special name/label, the Raspberry will stop playing, mount the thumb drive, deletes the old audio book, copies the new one, rebuilds the playlist and – after unplugging the thumb drive – starts the new audiobook in pause mode
  • multi format: Since it uses mpd, the player supports  Ogg Vorbis, FLAC, OggFLAC, MP2, MP3, MP4/AAC, MOD, Musepack and wave

Some pics and a video:

 

(The audiobook used in this video is a free version of Cory Doctorows “Little Brother” from Fabian Neidhardt)

If you like to build your own one button audio book player, here are the super simple schematics:

And last but not least – the python script. The code might be crappy, please comment if you have improvements (especially regarding loadMusic). You can find it on github:

https://github.com/exitnode/theonebuttonaudiobookplayer

Update (2013-11-26)

Here’s what Russel wrote in a comment to this post:

“I just completed building this and have some addendum notes adding more details:

Install the following packages:
sudo apt-get install mpd
sudo apt-get install mpc
sudo apt-get install python-mpd
sudo apt-get install python-pyudev

(below assumes using defaults for /etc/mpd.conf)
sudo mkdir -p /music/usb
sudo ln -s /var/lib/mpd /music/mpd
sudo ln -s /var/lib/mpd/music /music/mp3

Copy the tobabp.py script to /home/pi
nano /home/pi/tobabp.py
Change these in the script or flip the connections in wiring diagram.
BUTTON = 17
LED = 24

Testing
Rename a USB stick to “1GB”
Copy 1 MP3 onto the stick
Insert the stick into pi

sudo mount /dev/sda1 /music/usb
sudo /etc/init.d/mpd stop
sudo rm /music/mp3/*
sudo cp /music/usb/* /music/mp3/
sudo umount /music/usb
Remove the USB stick

sudo rm /music/mpd/tag_cache
sudo /etc/init.d/mpd start
mpc clear
mpc ls
mpc ls | mpc add
sudo /etc/init.d/mpd restart
mpc play

Plug in earphones
You should hear audio
Next try the python script:
sudo python /home/pi/tobabp.py
Insert USB stick
the LED should flash and the USB file copy to /music/mp3/
the LED should flash again. Remove the Stick and LED flashes again.
Press button to start playing
Press button again to stop
Press & hold button to rewind to beginning.

sudo crontab -e
Add following line run at startup
@reboot python /home/pi/tobabp.py &
sudo reboot
Then retest again to be sure all is well.”

 

 

 

 

 

 

80 thoughts on “The One Button Audiobook Player

  1. Pingback: Ten More Awesome Projects for Your Raspberry Pi

  2. Pingback: Ten More Awesome Projects for Your Raspberry Pi | Tips for the Unready

  3. Hi,
    Very Nice Project !!
    What did you use to fix the blue led on the case ?
    I ‘ve drilled a hole in top of case but, what did you use for fixing the led .
    I’m trying to do the same project for my sister, I’d appreciate your help.

    Thanks a lot,
    By the way : Great job !

  4. Very Nice! I plan on emulating this design over the next few weeks (will keep you posted). Has anyone else successfully used your designs to build one that you know of?

  5. Great project. I’ve stolen huge chunks of it to make a similar thing that has a cron job to run get-iplayer with a list of programmes that my son likes so he can have it as a bedtime player (OK I could have done all that with an MP3 player but where wouIld have been the fun in that). Holding down the button skips forward rather than back in my version. Thank you very much for shaing your work.

  6. Pingback: Ten More Awesome Projects for Your Raspberry Pi | BARRIE JAMES

  7. Hello! Are you interested in making some of these for sale? Thanks

  8. I believe that you have the diagram slightly mislabelled. “GPIO17″ should be “GPIO24″ and vice versa.

  9. Pingback: Raspberry Pi Projects | draalin

  10. Pingback: Best Things You Can Do With Your Raspberry Pi - My Slice Of Pi

  11. I was about to build a one-button MP3 player for my mom (88 yo & technophobe) and thought I’d do a quick search.

    I plan to cycle through a simple directories which contain MP3s of various themes.

    I look forward to looking at your scripts as a starting point.

    Thanks!!!
    Brett

  12. Pingback: Amazing Raspberry Pi Projects – Part 2 | Linux User

  13. Pingback: Quick notes (sticky post) | synthtech

  14. Pingback: Quick notes, 2013 May-June | synthtech

  15. Pingback: [Test] Raspberry Pi 512 Mo

  16. Looks like a great project, I want to build it for my wife. I tried using MP3 players but she can’t stand earbuds and they do not hold the place.

    One question the terminal numbers I can’t relate to the GPIO but I see you have used a FC-26P terminal does this just plug onto the io board and are these the terminals in the schematic?

    By the way I wrote a Powershell script that will take all the folders and tracks on an audio book and redo into one folder renaming the tracks from 1 to how many are in all folders ( if there are 10 folders and 19 tracks in each, the tracks will now be in one folder numbered from 001-190) I will be glad to send it to you.

  17. Pingback: Raspberry Pi. Qué es y para qué vale?

  18. You should make some of these players with user manuals and sell it. Trust me there are millions of book lovers that they don’t want to deal with mp3 players or touch screen phones or tablets. Book listening should be as simple as asking your grandpa to read you your favorite book (well that is more complicated).One book at a time. Nothing confusing. Do you have extra that you want to sell?

  19. Hello, I have been looking for a device exactly like this for my 79 year old father. He is in a nursing home and is confined to a wheelchair, his eye sight is failing and he has arthritis in his hands. He can’t hold the little MP3 players let alone operate them. I have tried a laptop and a IPAD, but they just don’t work for him. I also agree with the last person. I think there would be a big demand for this. This would be perfect for him and anyone else with a physical handicap. I am not technically inclined to build things. But if someone were building and selling them I would buy them and I think so would many others. You have a fantastic idea and it could help a lot of people. All the best.

  20. I just completed building this and have some addendum notes adding more details:

    Install the following packages:
    sudo apt-get install mpd
    sudo apt-get install mpc
    sudo apt-get install python-mpd
    sudo apt-get install python-pyudev

    (below assumes using defaults for /etc/mpd.conf)
    sudo mkdir -p /music/usb
    sudo ln -s /var/lib/mpd /music/mpd
    sudo ln -s /var/lib/mpd/music /music/mp3

    Copy the tobabp.py script to /home/pi
    nano /home/pi/tobabp.py
    Change these in the script or flip the connections in wiring diagram.
    BUTTON = 17
    LED = 24

    Testing
    Rename a USB stick to “1GB”
    Copy 1 MP3 onto the stick
    Insert the stick into pi

    sudo mount /dev/sda1 /music/usb
    sudo /etc/init.d/mpd stop
    sudo rm /music/mp3/*
    sudo cp /music/usb/* /music/mp3/
    sudo umount /music/usb
    Remove the USB stick

    sudo rm /music/mpd/tag_cache
    sudo /etc/init.d/mpd start
    mpc clear
    mpc ls
    mpc ls | mpc add
    sudo /etc/init.d/mpd restart
    mpc play

    Plug in earphones
    You should hear audio
    Next try the python script:
    sudo python /home/pi/tobabp.py
    Insert USB stick
    the LED should flash and the USB file copy to /music/mp3/
    the LED should flash again. Remove the Stick and LED flashes again.
    Press button to start playing
    Press button again to stop
    Press & hold button to rewind to beginning.

    sudo crontab -e
    Add following line run at startup
    @reboot python /home/pi/tobabp.py &
    sudo reboot
    Then retest again to be sure all is well.

  21. Hi Russel,

    thank you very much for your detailed instructions. I’ll add them to my post the next days.

    Regards,
    Michael

  22. I alwo want to buy such a device -simple to operate, for an elderly relative, easy to load with books. Please, someone, make one to sell!!

  23. Hi, great idea and after comments made by Russel i got it to work!
    The problem i have on some audiobook mp3 files is that the play order is wrong.
    The audiobook cd’s i converted to mp3 work just fine. it’s the ones i bought and downloaded that are playing out of order.
    Is there a way to restore the play order?
    Thanks
    (i did use the latest standard wheezy image and i am a linux/python newbie)

  24. Thanks for the great project! I have a couple of things to report from my experience building the project.
    1 – the ‘Raspbian minimal image’ linked to in the post didn’t seem to recognize the audio device on my Pi, so instead I used the Raspbian image from the Raspberry Pi official site. It is a bigger image, but the audio worked ok. All of the instructions for configuring the Pi are the same with that image.
    2 – the schematics posted were for a rev2 Raspberry Pi. With a rev1 Pi, I had to make a small modification to the schematic due to the GPIO header being a bit different. Rev1 doesn’t have 3.3V on pin 17 of the GPIO header, so I sourced all of the 3.3V from pin 1.

  25. Pingback: Arduino Project 5: Digital audio player

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>