My PCs headphone jack (green) outputs a 4Vpp (2V amplitude) sinusoidal signal at 100% output level set in the sound preferences. What kind of circuit would I need to drive a red LED (2.2V forward voltage, 20mA forward current) based on the voltage level present at the headphone jack?
The LEDs luminous intensity behaves linearly in the range from 0 to 30mA. My idea would be to balance the LED current like follows:
Soundcard output:
+2V: driving the LED with 30mA
0V: driving the LED with 15mA
-2V: driving the LED with 0mA
I experimented with a circuit that puts the signal in parallel to a 9V battery that provided DC bias voltage. And I also tried to use a BC547C npn transistor in combination with the 9V battery. Unfortunately unsuccessful. The outcome was always a offset of the LED current: e.g. +2V: 28mA, 0V: 22mA, -2V: 16mA
I was not able to balance the current through the LED as described above. I guess to achieve this, a much more elaborate circuit is needed.
I would really appreciate any advice. Thank you very much!
Best regards,
Zelyev
Edit:
I would like to modulate the LED with the frequency of the audio signal.
A receiver catches the signal using a phototransistor.
I achieved the transmission using a simple Common-Emitter-Amplifier, the outcome was OK. But I want to make use of the whole LED intensity spectrum (0-30mA).