Maker Pro
Maker Pro

Driving LED from sound card

jeremys

Feb 6, 2010
3
Joined
Feb 6, 2010
Messages
3
Hi - I haven't done any electronics for a decade or two, so sorry if I look stupid.

I working on a science experiment which requires a the brightness of an LED to be modulated with a waveform up to around 100-150 Hz, but down to low frequencies, maybe 1 Hz.

The frequency needs to be computer controlled. The easiest solution I could come up with would be to use a PC sound card headphone output to control the LED (my laptop only has headphone, not line-out).

To get the frequency response at low frequencies, I think my input waveform would have to be modulated on a carrier wave (maybe 10 kHz) in my computer program, and then demodulated externally. Maybe a simple envelope detector circuit (sorry link is missing, but it is a diode connected to capacitor and resistor in parallel) would demodulate the headphone output with 1uF capacitor and 1k resistor to (1 kHz time constant).

To drive the LED I suppose I need a transistor connected to the voltage output of this circuit, though I'm not sure on sensible component values.

Does this sound about right? I'm concerned that as the headphone output of a computer is supposed to drive a low impedance output, the simple demodulator might not work very well. It's not clear to me whether the sound card will act as a current or voltage source, and what the expected range in voltages should be. Unfortunately I don't have an oscilloscope so can't measure this.
 

Resqueline

Jul 31, 2009
2,848
Joined
Jul 31, 2009
Messages
2,848
The modulation and envelope detector scheme sounds sound. Just put the LED in series with the resistor.
The problem as I see it is that the relatively low voltage one usually gets from the headphone output won't be quite enough to drive a LED directly. (What colour btw.?)

One way around that is using a small step-up transformer (or a step-down in reverse) before the envelope detector. This way you won't need a separately powered LED circuit. The 32 Ohms ouput impedance is a little low to drive a resistorless LED directly, but a transformer would change that.

Without a transformer I'd guess you'd get around a Volt from the envelope detector. Thus you could always use a voltage doubler rectifier circuit, getting 2 Volts, to make it work with a red LED. You'd need to control the volume carefully to adjust the brightness though.

Sound card output is a voltage source, with some resistance in series - thus limiting the available power and current.
 

jeremys

Feb 6, 2010
3
Joined
Feb 6, 2010
Messages
3
modulation

Hi - the modulation was just to be able to get low frequency waves through the sound card. I think the specs say they only output down to 20 Hz. I'll just give an LED a go and see whether it works before trying anything more complex. Thanks!

It was a white LED BTW. The experiment is to examine how sensitive the eye is to flickering.
 

Resqueline

Jul 31, 2009
2,848
Joined
Jul 31, 2009
Messages
2,848
White LED's require at least 3 Volts. You most certainly require a tripler rectifier or a transformer.
 
Top