Hi!
I just built an Amplifier for my home theatre subwoofer, and I'm quite happy with it. The only problem is that I'll manually have to turn it on and off, while the commercial ones have a sort of "auto detecting" the music signal.
I've been using Arduino for quite some time now, and I know how to use analogRead to measure voltage levels.
The difference is that I don't want the Arduino to affect the signal in any way. Is it possible to build an electronic circuit that will achieve these criteria?
What size plug does the audio input jack have?
If its 3.5 you can sense this easily by having an optocoupler on the pin which is on when a jack is not present and off when a jack is present( the pin connected on a spring if see through).
With arduino you can measure up to 5v on the analog pins so be aware as to the voltage range and its wise to include a 220-1k resistor to limit current flow.
What arduino are you using?
Normally its wise to use digitalRead to sense with optocouplers/relays as they only produce an on/off signal when a voltage is applied
If the signal is line-level with peak-to-peak voltage less than 5V you can simply
couple to the ADC using a capacitor to a voltage divider made of a pair of 100k
resistors, one to GND, one to Vcc. This presents a load of 50k to the audio signal
which is fine.
Then you'd sample regularly and calculate the AC amplitude, and compare with a
threshold. The capacitor can be about 220nF so it forms a HPF with the 50k
at 15Hz or so. Adding 1k in series with the capacitor helps protect against over-voltage
events.