I'm working on a simple audio circuit which takes two different signals from mp3 players (earphones output), mix them up and outputs to an amplifier/speaker. But before mixing the signals, I need to measure the onset of Signal 1 with a microcontroller, in the case an Atmega328. I have little experience with audio and amplifiers so I don't know how to split Signal 1 from Signal 2 in order to read Signal 1 only.

I have also added a simple voltage divider for DC offset so the Atmega328 won't read negative voltages. Below a simple schematic of what I have so far:


simulate this circuit – Schematic created using CircuitLab

  • \$\begingroup\$ "I need to measure the onset of Signal 1 with a microcontroller", why? - Also, have you tried this circuit already? Connecting the two outputs of the mp3 players without any resistor between them? \$\endgroup\$ – Harry Svensson Oct 15 '17 at 11:17
  • \$\begingroup\$ This is for an artwork, one of the sounds playing will trigger lights, the other is background but both need to be coming out from the same speaker. I tried, it outputs the sound fine. The only issue is what to do to read just signal 1... \$\endgroup\$ – Chu Oct 15 '17 at 11:20
  • Put 1 kΩ between signal 1 and audio in
  • Put 1 kΩ between signal 2 and audio in
  • Disconnect \$C_1\$ from audio in

  • Connect a wire from signal 1 to \$C_1\$

In theory you'll get 100% of signal 1 onto A0 of the Arduino. In reality you're probably going to get 99.9%, 0.01% being random noise and signal 2. I hope you can live with that.

  • \$\begingroup\$ That's great, I don't mind if it's 100%, this will be enough for the threshold I need. I will try it today and vote for the solution later on. Thank you! \$\endgroup\$ – Chu Oct 15 '17 at 11:38

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.