Sci Fi Your Pi – Project Update #13

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:

13-21) I originally planned to use it for the Pi2, used as a desktop computer. From what I understood from this discussion 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:

The mono amplifier would be used for the desk’s special effects sounds, the stereo one for the Pi2 desktop computer.

13-1To 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.



© Frederick Vandenbosch, 2014-2021. Unauthorised use and/or duplication of this material without express and written permission from this blog’s author and owner is strictly prohibited. Excerpts and links may be used, provided that full and clear credit is given to Frederick Vandenbosch with appropriate and specific direction to the original content.