Skip to content

txoof/audioSensor

Repository files navigation

2 Channel Audio Sensor and Receiver Switcher

Let's face it: nobody knows how to operate your stereo receiver. Your kids, husband, sister-in-law all just want to start music playing and have sound come out of the speakers. It should just work*, not be an exercise in frustrated button mashing.

irBlaster.jpg

It's a mystery which remote turns on the stereo. It's an even bigger mystery which button switches it so Spotify or the CD player plays. The irBlaster helps solve this problem by listening to two channels such as a CD Player and Media PC with Spotify, Movies, etc.

The irBlaster listens to the line-level audio over RCA cables. When it detects audio traffic on one of the channels, it sends a POWER ON Infrared (IR) code to the receiver, waits a few seconds for it to power up and then sends the IR code for the matching input. When there's no more audio traffic, it sends the POWER OFF IR code to the receiver.

As long as there is audio traffic on one channel, the channel is locked and will not be switched. If the active channel becomes idle and traffic is detected on the other channel, the board will send a stored IR code to switch channels.

There are pulse transformers on each channel to provide galvanic isolation. This helps limit any hum that the circuit can introduce back into the line level.

Materials

  • Arduino Micro 5V
  • CircuitBoard
    • There's also a Through-Hole model if you want to etch at home
  • Passive components
  • 2x RCA Female-Female -> Male Y-Splitter
  • 5V Power Supply and USB A - Micro cable
  • 2x Audio Inputs with line level RCA
  • Stereo Receiver w/ IR Remote

Arduino Code

Eagle Schematics and Board Design

This includes the schematics, board layout and Bill of Materials

  • [Eagle Schematics](./Audio Sense SMD/)

Use

  • Solder up the board
  • Attach an IR LED to the appropriate pins using some jumper wires
  • Read the IR remote codes for each channel using an IR receiver
  • Add the IR codes to the code
    • Make sure to use PROGMEM to store the IR codes! Storing the codes in regular codespace will cause memory overflows on the micro and generally break the running code.
  • Flash the Audio Sensor code to the Arduino
  • Plug in RCA cables with Y-splitters to split on the left channel of each audio source
  • Dangle the output IR LED somewhere near the IR input on your receiver
  • Power up the board and start audio playing on one channel - the Micro should switch the channel automatically to the source channel.

Known Issues

Chanel Balance Use of the Y-Splitters his will decrease the apparent "volume" on the left channel and needs to be balanced in the receiver

Manual Switching of Receiver The irBlaster is "dumb" and unaware of the current state of the receiver. If the receiver is switched on manually outside using the remote or power button, the irBlaster will be out of phase and switch the reciver OFF when it detects an audio signal rather than switching it on.

Switching to other audio sources won't necessarily interfere with the irBlaster, but it's possible that it could switch the power off unexpectedly if audio stops/starts playing on one of the other channels.

About

sensor for detecting audio-line levels

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published