Previous posts for this project:
- Sci Fi Your Pi: PiDesk - Project Description
- Sci Fi Your Pi: PiDesk - Project Update #1
- Sci Fi Your Pi: PiDesk - Guide: Setting Up the Raspberry Pi 2
- Sci Fi Your Pi: PiDesk - Project Update #2
- Sci Fi Your Pi: PiDesk - Review: Bare Conductive Touch Board
- Sci Fi Your Pi: PiDesk - Project Update #3
- Sci Fi Your Pi: PiDesk - Guide: Stepper Motors with Gertbot
- Sci Fi Your Pi: PiDesk - Project Update #4
- Sci Fi Your Pi: PiDesk - Project Update #5
- Sci Fi Your Pi: PiDesk - Guide: Controlling NeoPixels with the Raspberry Pi A+/B+
- Sci Fi Your Pi: PiDesk - Project Update #6
- Sci Fi Your Pi: PiDesk - Project Update #7
- Sci Fi Your Pi: PiDesk - Project Update #8
- Sci Fi Your Pi: PiDesk - Project Update #9
- Sci Fi Your Pi: PiDesk - Guide: Capacitive Touch with Atmel's AT42QT1070 Touch Sensor IC
- Sci Fi Your Pi: PiDesk - Project Update #10
- Sci Fi Your Pi: PiDesk - Guide: Magic Lamp with wireless charger, Adafruit Trinket & NeoPixels
- Sci Fi Your Pi: PiDesk - Project Update #11
- Sci Fi Your Pi: PiDesk - Project Update #12
Project Update
Part of the kit we received is the Cirrus Logic Audio Card. It is an expansion board for the Raspberry Pi, that adds audio output and input with various types of connectors. I will however not end up using it in my project for the following reasons:
1) I originally planned to use it for the Pi2, used as a desktop computer. From what I understood from
though, is that it is not yet supported on the Pi2 due to incompatible kernel versions. Users have come up with a minimalistic software image capable of using the card on the Pi 2, but it is not suited to be used as a desktop image.
2) The second Pi I'm using, the A+ to manage the desk controls, is compatible with the card and the software is available. The card would however be overkill, as the only audio function required is to play sounds when certain buttons are pressed. Taking into account the low cost requirements of the project, the audio card has been deemed unsuitable.
I searched for a cheap alternative to get amplified audio output from both Pis and came across the Adafruit breakout boards. There are two boards that seemed affordable and suitable for my project:
- Adafruit Mono 2.5W Class D Audio Amplifier - PAM8302 ID: 2130 - $3.95 : Adafruit Industries, Unique & fun DIY electronic…
- Stereo 2.8W Class D Audio Amplifier - TS2012 ID: 1552 - $9.95 : Adafruit Industries, Unique & fun DIY electronics and ki…
The mono amplifier would be used for the desk's special effects sounds, the stereo one for the Pi2 desktop computer.
To hook everything together, I made a custom stereo cable with female headers capable of connecting to the breakout board's male headers. Power for the breakout board is taken from the Pi's GPIO pins. And finally, the connectors for the speakers were stripped off, and the wires connected in the breakout board's screw terminals. The same process is valid for the mono and stereo breakout boards, except for the fact the the mono breakout board only supports one speakers (obviously ...).
As a test, I put one of the sound effect MP3s on the Pi and played it out with following command:
pi@PiDesk ~ $ omxplayer -o local example.mp3 Audio codec mp3 channels 1 samplerate 22050 bitspersample 16 Subtitle count: 0, state: off, index: 1, delay: 0 have a nice day
The solution for both Pis combined is still cheaper than one audio card, and is compatible with any model or revision Pi.
Top Comments