Picture of Arduino Audio Triggered Power Switch
Ever wanted your home entertainment or sound system to power up itself when plugging in your iPod or other portable MP3 player?

Watch this video to see how it works. Then flip through the steps to find out how to make one using the Arduino controller.

Remove these adsRemove these ads by Signing Up

Step 1: Parts and schematic

Picture of Parts and schematic
Parts required.JPG
Schematic, audio triggered pwr switch.jpg
This is what the finished instructable looks like. The required circuit is built onto a Arduino Proto Shield that mates to the Arduino Duemilanove microcontroller.

To successfully complete this project, you will need to know how to solder, how to build simple electronic circuits, and have experience programming the Arduino microcontroller.

Pictured are some of the parts you will need. Here's a complete parts list:

1 ea Arduino Duemilanove or equal ( Radio Shack 276-128 Arduino Uno REV3 will work also) with power adapter
1 ea Arduino Proto Shield (Radio Shack 276-140 is slightly different but will work)
2 ea Phone jacks (Mouser 161-3508-E)
1 ea Terminal block, 5.08mm (Mouser 651-1935561)
1 ea Tactile PB switch (DigiKey SW407-ND)
1 ea 10K ohm variable resistor (DigiKey AAS14CT-ND)
1 ea 2N3904 transistor (Radio Shack 276-2016)
1 ea 47mf 16v electrolytic capacitor (Radio Shack 55047407)
1 ea 1K ohm, 1/4w film resistor (Radio Shack 271-1321)
2 ea 10K ohm, 1/4w film resistor (Radio Shack 271-1335)
1 ea 22K ohm, 1/4w film resistor (Radio Shack 271-1339)
1 ea PowerSwitch Tail II (Adafruit .com ID 268 or COM-10747)

And finally, the schematic diagram of the circuit.
globrite1 year ago
Great use of Arduino. A nice and safe alternative to control power may be to use a Wattstopper power unit which is UL approved, has zero voltage switching and as a bonus has DC output at about 150 mA to power your controller. One such unit (B-120 EP) is available from Amazon for about $15. - Enjoy.
jabujavi2 years ago
I'm reading your code.
soundValue = analogRead(soundIn);
oldSoundValue = soundValue;

Why you don't set directly and you save one assignment and you win some efficiency and readability?
oldSoundValue = analogRead(soundIn);

I say more, you can do this:
oldSoundValue = analogRead(soundIn);
change = analogRead(soundIn) - oldSoundValue;

And if you won't change the variable "m" you can use #define m 5.
The same idea with led and overrideSw. This its like write directly the values in code but you can change it easily. Typically we used capital letter for this definitions, so M, LED, OVERRIDESW ;so when other people read this they know that it is not a variable.

With this you can save 2 assignments and 4 variables. It makes your code more efficient and accurate.
chipmonger (author)  jabujavi2 years ago
Thanks for the advice.