Short Delay for a 3 v LED

Thread Starter

hlehman

Joined Nov 16, 2023
6
Hello everybody! In a small project I have a LED flash that should light up synchronized with a sound being played from a micro board when a button is pressed. So far I have realized that without a problem. Only thing is, that LED will lighten up instantly, while the sound boards needs half a second to actually play the sound. So I figured out to delay the LED flashing and I have already read the various solutions with resistors and capacitors...My questions is, what would be the simplest solution for the LED to lighten up after approx 0.5 s and stops emitting light after the button is released instantly? I have only a small amount of space available, to small for a small board. So I thought I could basically wire a capacitor and a resistor in line to a l LED without a transistor...
Kind regards, Hendrick
 

MisterBill2

Joined Jan 23, 2018
17,763
The simplest solution will be a comparator driven by the sound output. If an open collector IC is chosen then just the comparator, the LED, and a single resistor may be all that you need. The comparator will need to be operated in the inverting mode so that with no sound output it's output will be high, and when there is a sound the output will be low, lighting the LED, during the peaks of the sound output signal. The LED will be flashing but the flash rate should be high enough that it can't be seen.
 

Tonyr1084

Joined Sep 24, 2015
7,766
Wecome to AAC.
The simplest solution will be a comparator driven by the sound output.
At first I had a similar idea but instead of a comparator I was thinking a simple transistor with its base tied to a capacitor that was charged through a resistor. But reading on in the original post (OP) I recall a time back in the late 70's early 80's when some of my friends and I were lighting LED's directly from the audio output. The LED would pulse to the amplitude of the audio signal. Then by chance one of us (not me) moved the LED across our field of vision and came to the realization that moving the LED while flashing to the music would result in what I've called the Z axis with the LED illuminating to the frequency of the audio sound while also pulsing to the amplitude. This made a sweep of dots and dashes; the dots were the high frequencies and the dashes revealed the low frequencies. We began putting LED's on old albums and spinning them with a motor. Home made brushes and slip rings provided power to the disk mounted LED's. Using divider networks we could put multiple LED's on the disk and separate out the high, mid and low frequencies. This produced a rather mesmerizing psychedelic effect. Especially when smoking a little of the forbidden weed. The motor speed could be controlled so the disk didn't spin too fast but fast enough that you could get very clear separation between the wave peaks and troughs. Aside from the complex box build, motor speed control, home made brushes and filters, the approach is rather easy. But in the OP the statement is made
I have only a small amount of space available, to small for a small board. So I thought I could basically wire a capacitor and a resistor in line to a l LED without a transistor.
So a box build with motor, speed control, slip rings, bearings and shafts all would not fit the bill.

Back to what @MisterBill2 said; drive the LED directly from the audio output. But that also presents a problem; now you have an audio channel that has an unexpected load on it, and with a speaker connected to that same feed, will the sound quality be affected?!

An approach that may best suit the desire, aside from keeping it small, is to get a second audio amplifier, a small cheap one and feed it from the pre-amp signal before the signal goes to the final amplification. This way the two outputs would be synchronized. While the main amp plays the speakers the second amp powers the LED's directly.

One final mention; I'm thinking of the small 5mm LED's that run on currents no greater than 30mA. Using super bright LED's, which weren't available back then, you could use a resistor to limit the current to the LED's.
 

Thread Starter

hlehman

Joined Nov 16, 2023
6
Hi evryone and thanks very much for your thoughts!
The sound comes from this here: Voice chip
As long as a button is pressed, a sound will be played. I do not need an amplifier for the small speaker since the chip has already around 3W. What I in my electronic naivety thought would be a capacitor and the resistor in line from the 5V source ...The 5 Volt powers the sound chip and the LED.
Regards Hendrick
 

AnalogKid

Joined Aug 1, 2013
10,943
There are many ways to do this, depending on the details of what is acceptable to you and your project.

The most simple is 1 resistor, 1 capacitor, and 1 diode. The capacitor charges slowly through the resistor, and discharges quickly through the diode. Ultra basic, works much better in a higher-voltage environment such as a 12 V circuit. A could-be-major drawback is that the slow charging means the LED comes on slowly. It will turn off more rapidly, but still with a visible decrease in brightness as opposed to "snapping" off. Another issue is that if the power input goes open-circuit when the switch button is released, there is no clear discharge path for the delay capacitor. Hmmm...

The next step needs 1 transistor as an active device to give a more snappy look - faster on and off. The transistor's gain "sharpens" (decreases) the rise and fall times of the current through the LED.

The next step is a circuit with hysteresis, a form of positive feedback. This can be 1 opamp, or 1 comparator, or 1 555, or 2 transistors. More parts, more room, but best performance.

I suggest trying the 1-transistor circuit. Schematic later. Do you have access to a small MOSFET, such as a 2N7000? Bipolar transistors will work, but the FET would be better.

ak
 

AnalogKid

Joined Aug 1, 2013
10,943
First pass at a 1-transistor delay circuit for a single LED. R1-C1 sets the turn-on delay. Depending on how "hot" your transistor is, you might have to adjust R1. D2 and R3 provide a much lower resistance discharge path for C1 when the power source goes open-circuit.

In very round numbers, the LED comes on after approx. 0.5 s, and goes off in 10 ms.

ak


LED-Delay-3-c.gif
 
Last edited:
Top