How do I make a soundboard that activates via a momentary switch?

Hi all,
For an upcoming case mod project, I would like to make a soundboard that, when a momentary switch is activated, plays a pre-loaded sound. In this case, when a momentary key switch is turned, it will start the computer, and play the sound of an engine starting. It would be even better if I could add a delay, so it starts playing the sound of the starter motor in the engine, and then continue on to the engine starting as the PC starts, but it requires you to keep the key switch activated, so its just like starting a car. Does anyone know how I could go about this?

Use a micro controler with an old MP3 player. A simple solution would be an Arduino with a Wave Shield. Load whatever audio file you want onto an SD card and run a set of wires from the start button to the Arduino. When the arduino detects the button press it can hit a delay then play the audio track.

If you want to have a key start on the case then a car's ignition key would be perfect. The first position of the key would be wired to the motherboard and start the PC. The second position of the key (position that would engage the car's starter) would be wired to the micro controller and start the playback of the audio track. You can program it to play the starter sound while the second position is held and when it's released play the engine sound.
On second thought you'll have to have the first position of the key wired between the 5VSB pin on the 24 pin main connector of the PSU (that's the purple wire on the connector that always has 5V running through it even when the PC if off) and the power input of the micro controller. The controller will have to be wired to that 5VSB wire and ground of the PSE to get power. Then when the first position is activated the controller turns on and automatically activates a relay or transistor for a couple of seconds to turn the PC on. Then it will look for the second position to be activated like i mentioned above and start the audio tracks.
BodenM (author)  mpilchfamily4 years ago
Could you have it setup like this?
Turn key > Arduino Uno + wave shield plays sound > when at x seconds after key is turned, start the PC
If so, what code should I use for it?
Yes you can work it that way. Start learning about the arduino and work on the code yourself. It will go something like this.

Key turns
arduino powers up
arduino plays sound for x amount of seconds
arduino sends a short signal from a pin that triggers a relay or transistor that activates the PC.

You'll need to understand the code for running the wave shield and then adapt the starting of the PC into it. I don't have a Wave shield so i won't be able to put the sketch together for you and test it out. You can find plenty of programming help on the arduino forums.