3
\$\begingroup\$

I know this is an extremely simple question, but I haven't been able to figure this out on my own. I'm trying to get an LED to get brighter as ambient sound rises. What I've come up with: use a transistor, attach the base to the electret microphone (that's the part I'm not sure how to do), then have the circuit for the LED pass through the collector and emitter. Would this work? Would the LED brighten continuously? Most importantly, is there a better way to do it?

The goal of this is to visualize the interference pattern created by two speakers. I'll have a camera set up using a long exposure, move the circuit around the lab area, and hopefully the bright spots in the picture correspond to points of constructive interference.

\$\endgroup\$

3 Answers 3

1
\$\begingroup\$

Why think "one LED"? An LED VU meter has a bunch of leds that progressively illuminate as sound gets more intense.

\$\endgroup\$
0
\$\begingroup\$

I'm not sure just a transistor will produce the gain you need. It'll be safer to use an OpAmp. Also put a resistor between the LED anode or cathode and the other side to protect it. But even then, it'll not work as you expect because it won't be continuous; it'll respond to the sound waves, so it'll blink, rise and fade quickly. You could use a capacitor between the OpAmp output and the ground to reduce this effect, but to have exactly what you want it'll need a more complicated circuit. For instance, a cheap microcontroller with an ADC input and a program to calculate the average input level, and a PWM output to feed the LED.

\$\endgroup\$
8
  • 2
    \$\begingroup\$ A DAC isn't needed, just PWM. \$\endgroup\$ Commented Apr 4, 2013 at 22:45
  • \$\begingroup\$ You're right, well noted! \$\endgroup\$
    – fceconel
    Commented Apr 4, 2013 at 22:49
  • \$\begingroup\$ I'm going to have a camera set up with a long exposure, so as long as the peak brightness varies with sound level, it'll work. So would the OpAmp solution work for that? Or would spikes in noise level ruin the picture? (I haven't got any experience with microcontrollers, but I do know C well) \$\endgroup\$ Commented Apr 4, 2013 at 22:52
  • \$\begingroup\$ I didn't understand, what do you mean by "ruin the picture"? The camera will be focused on the LED, the rest of the environment, or both? The LED will be in a fixed position? Consider this: if you clap your hands in a silent room, the LED will simply blink; if there's a lot of people chatting, the LED will be almost continuous; if a bird is singing, the LED will be on and off at each note; and so on. \$\endgroup\$
    – fceconel
    Commented Apr 4, 2013 at 23:00
  • 1
    \$\begingroup\$ The long exposure photo is an important part of the requirement - is it moving as well? \$\endgroup\$
    – pjc50
    Commented Apr 4, 2013 at 23:05
0
\$\begingroup\$

Also consider a cluster of LEDs. Changing the duty cycle on one LED will give you some brightness control, but changing the number of LEDs simultaneously lit will give a much greater range. This is how most LED bicycle lights work. Controlling the LEDs with a small microcontroller is likely the most adaptable solution.

\$\endgroup\$

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.