Turn IR speakers on when is AUX detected

Hello! :slight_smile:

I have a set of new speakers connected to my TV. They are active and have a 3.5 AUX input in the back. But if the speakers are not used for some time it enters sleep mode and I need a remote to turn them back on.

My plan is to use the analog input on the arduino to monitor the AUX input, when it detect signal (tv is turned on) it sends a IR signal to the speaker and turns on the speaker.

My concern about this is how do I detect signal on the AUX input? I belive that the signal varies some...

My concern about this is how do I detect signal on the AUX input?

First off, the Arduino can be damaged buy the negative half of an AC audio signal, and if the Arduino survives the audio signal may be "damaged" (distorted). The most common solution is to [u]bias[/u] the Arduino's analog input at 2.5V.

I belive that the signal varies some...

It can vary quite a lot, especially if the TV's volume control affects the AUX output. If the volume from the AUX output is fixed and the speakers have their own volume control the peak levels will be a lot more consistent. But, there are still loud sounds and quiet sounds.

The signal should be approximately [u]line level[/u] (about 1V). You should be able to set your threshold low enough to detect the presence of audio, but high enough not to be triggered by background noise on the audio line. You can use the Analog Read Serial example (with biased audio instead of DC from a pot) to check your ADC readings before deciding on a trigger threshold.