5
\$\begingroup\$

I've got kind of a weird project in mind. I want my project to be able to connect to the headphones jack of an MP3 player.

The mp3 player will either be playing a constant tone or not playing anything at all. When it is not playing anything, I want to light a green LED. When a tone is playing, I want to light a red LED.

Is enough power generated through a headphones jack to cause a transistor to switch? Would it be easier to just use an AVR (ATtiny or something) to listen for analog input?

\$\endgroup\$
4
  • \$\begingroup\$ It can switch the transistor, but it can't power the LED. \$\endgroup\$ Feb 24, 2014 at 23:00
  • 1
    \$\begingroup\$ @IgnacioVazquez-Abrams that's ok, I will have an external 5v power source. \$\endgroup\$
    – synic
    Feb 24, 2014 at 23:00
  • \$\begingroup\$ Do you care about a specific tone, or will anything above the noise floor do? \$\endgroup\$ Feb 24, 2014 at 23:03
  • \$\begingroup\$ Any tone. Specifically, the tone will be 55Hz, but it should allow for any tone. \$\endgroup\$
    – synic
    Feb 24, 2014 at 23:31

1 Answer 1

5
\$\begingroup\$

Try this circuit

schematic

simulate this circuit – Schematic created using CircuitLab

The circuit is a voltage doubler feeding into a BJT driver for the red LED. The voltage at R1 should be about Vin (p-p) less a few hundred mV for the Schottky diodes, so an input voltage of ~500mV RMS should be enough to drive the red LED. When the red LED is off, the voltage at the anode of D4 rises until the green LED turns on. When the input signal disappears, C1 is rapidly discharged by the base current of Q1.

Edit: Below is an optional preamplifier since the input seems to be less than the 500mV RMS required to operate the detector. I've also increased the capacitors in the above schematic to 10uF & 100uF given the new information that the frequency is only 55Hz.

schematic

simulate this circuit

\$\endgroup\$
20
  • 1
    \$\begingroup\$ Yes, it's a common dual. If you want individual through-hole parts, 1N5818 diodes should do. \$\endgroup\$ Feb 25, 2014 at 4:54
  • 1
    \$\begingroup\$ @VladimirCravero Base current of (LED current)/hFE discharges the capacitor when there is no input signal present. It's a small cap, so the discharge is fast even if the LED is barely visible. \$\endgroup\$ Feb 25, 2014 at 20:50
  • 1
    \$\begingroup\$ @synic It should work with 1N4148s too, but at a higher minimum volume level. \$\endgroup\$ Feb 25, 2014 at 21:29
  • 1
    \$\begingroup\$ Ceramic caps would be the most compact. If you use tantalums, the - end goes to the input for the left one, and the - goes to GND for the right one. \$\endgroup\$ Feb 25, 2014 at 23:30
  • 1
    \$\begingroup\$ Might need more signal. What's the voltage on an AC voltmeter at the input. \$\endgroup\$ Feb 25, 2014 at 23:50

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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