Friday, August 4, 2017

Raspberry Pi Sound Board

I have wanted to create a sound board for some time. I finally got around to getting it done. This project took way longer than I wanted mostly because I did not make time to work on it. I created a really simple wood structure to mount the arcade buttons to.

I wanted a solderless solution so I ordered some female spade connectors so I could just crimp the wires instead of soldering. Turned out pretty good.

Supplies

  • Raspberry Pi 3
  • Female Spade Connectors 2.8mm width. Make sure you get the size that matches your arcade buttons.
    https://www.amazon.com/gp/product/B01962MW2G/ref=oh_aui_detailpage_o03_s00?ie=UTF8&psc=1
  • 10 x 30mm arcade buttons
    https://www.amazon.com/EG-Starts-Buttons-Multicade-Accessories/dp/B01N5DVINY/ref=pd_sbs_21_4?_encoding=UTF8&pd_rd_i=B01N5DVINY&pd_rd_r=4AG8PN4FQKRH00AGR4XN&pd_rd_w=1gW6J&pd_rd_wg=Iv7vh&psc=1&refRID=4AG8PN4FQKRH00AGR4XN
  • Jumper Wires
  • Bore Bit to cut your holes for arcade buttons

My first mistake was buying a bore bit that was too small. My buttons were 30mm and my bore bit was 28mm. Not sure where I got 28mm from but the holes were too small. I was able to use a Dremel to make the holes bigger but it sure wasn't as pretty as clean 30mm holes. 

I used common ground lines for the buttons so I had 4 buttons one one and 5 buttons on the other. I used a wire nut to ground them and attached them to two separate ground ports on the Raspberry Pi. 

Code 

I spent way too long trying to figure out the Python code to detect a button push. Finally found the right combo. Here is my code.


So the jist is to wait for a button to be pushed then call the Command line version of VLC to play the MP3 specified. Not that elegant but works great. You will see here that this version of the sound board is my Dr. Phil quotes soundboard. Good times. You can SCP to copy the files you need to the Pi or use a USB stick as pictured in my pics below. I didn't really plan my project well so I had to run the jumper cables out to the side of box so I could plug stuff into the pi. It works fine and gives the project that hacker feel.

This of course can be used for anything really. You can launch python scripts to do whatever you want. 





0 comments:

Post a Comment