Sound really is an essential part of a pinball machine, without it you just have a ball rolling around inside a nicely painted box. I decided to go with some really simple, old style sound effects which I created using bfxr.net. I wanted some background music too, which I mostly got from old James Bond movies and Xavier Cugat tracks. The sound needed to be easy and fast to trigger from the main microcontroller. I originally tried to use the VS1000D board from Sparkfun. This board uses .ogg files, is controllable by serial and has 256 MB of flash. However I found it didn’t work correctly all the time, it doesn’t turn on automatically with power and it’s hard to know when a sound has stopped playing. Instead I bought two SOMO 14-D boards, which are pretty cheap and output mono audio. The sound files are converted from WAV to AD4 format and placed on the micro-SD card in the SOMO-14D module. I found these much easier to use and was up and running in no time. Each board is controlled by the same ATMega8 (which also does slingshot debouncing):
One module plays the sound effects and the other plays the background music. The mono output from the two sound modules is ‘mixed’ together using a simple resistor divider network, fed into an old computer speaker amp and then fed to two speakers on the backboard. Sounds are triggered from the main control board via a UART connection. The Sound/Slingshot board takes the UART commands and deals with the interface to the two SOMO-14D modules. This means the main controller isn’t bogged down with all the gritty interfacing, and can focus on other things.
Next: Moving Target