Take the 2-minute tour ×
Electrical Engineering Stack Exchange is a question and answer site for electronics and electrical engineering professionals, students, and enthusiasts. It's 100% free, no registration required.

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?

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

1 Answer 1

up vote 5 down vote accepted

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

share|improve this answer
1  
Yes, it's a common dual. If you want individual through-hole parts, 1N5818 diodes should do. –  Spehro Pefhany Feb 25 at 4:54
1  
@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. –  Spehro Pefhany Feb 25 at 20:50
1  
@synic It should work with 1N4148s too, but at a higher minimum volume level. –  Spehro Pefhany Feb 25 at 21:29
1  
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. –  Spehro Pefhany Feb 25 at 23:30
1  
Might need more signal. What's the voltage on an AC voltmeter at the input. –  Spehro Pefhany Feb 25 at 23:50

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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