Led dim to bright then bright to dim in a flip flop ne 555

Thread Starter

MrsssSu

Joined Sep 28, 2021
190
1647183572360.png
Hi all, above picture is a ne 555 flip flop circuit (1 off, 1 on) and vice versa. Lets say the red led receives an input (1) that is a constant dc voltage, how do I make the red led to go from dim to bright and then from bright to dim and vice versa with the blue led? Are there any schematic for these type of design? Thank you for reading :)
 

ElectricSpidey

Joined Dec 2, 2017
2,146
You can create an "alternate breathing" effect using one 555 and one dual op-amp.

Set up the 555 in astable mode.
Set up the op-amps in follower mode.
Connect the op-amp inputs to the threshold pin of the 555.
Connect one of the LEDs from one amp output to the positive rail and the other LED to the negative rail and the output of the other amp. (with resistors)
Use the CV pin to determine the threshold with a feedback resistor from the 555 output.
Add transistors to the op-amp outputs if higher power LEDs are needed. (also in follower mode)

Of course there are other ways to do what you want, this is only one example.
 

Reloadron

Joined Jan 15, 2015
6,584
In the circuit posted it will just alternate between two LEDs. This is what it should look like.
LED Alternate CKT.png

Neither LED has a current limiting resistor. The 555 is configured as a free running multivibrator. When pin 3 goes high LED D2 will be on and when pin 3 is low LED D1 will be on.

how do I make the red led to go from dim to bright and then from bright to dim and vice versa with the blue led? Are there any schematic for these type of design? Thank you for reading :)
Yes, we call that Fade In and Fade out. More parts will be needed. Normally fade in and fade out effects are done using PWM (Pulse Width Modulation. You can build a circuit with discreet components. Using a 555 timer here is one example circuit which can be modified for two LEDs. Another option is to use a simple uC (micro controller) design. Here is an example using a single uC chip. The latter involves writing a few lines of code. So the choice is yours. There are other ways to go about it but I would start with a Google of LED fade in and out circuits.

Ron
 

ElectricSpidey

Joined Dec 2, 2017
2,146
Just for the OPs information, the instructable circuit in post #4 is not an example of PWM but works on the same basic principle as in post #3.

I’m not saying Ron meant it to be an example of PWM, I just wanted to make it clear to the OP.
 

Reloadron

Joined Jan 15, 2015
6,584
Just for the OPs information, the instructable circuit in post #4 is not an example of PWM but works on the same basic principle as in post #3.

I’m not saying Ron meant it to be an example of PWM, I just wanted to make it clear to the OP.
Uh Oh, that would be a my bad and thank you for pointing it out. Just maybe I should have read a little more into it, well no maybe to it, I should have read beyond where they mentioned PWM and actually looked at the circuit. When I manage to give bad dope I would hope members like you would bring it to my attention.

Thanks again
Ron

Given the options I might go with a circuit similar to what was posted, include a current limit resistor which I do not see in the original drawing and use a uC like the one I suggested to drive the second LED. My read is the thread starter wanted to fade in and fade out only one of the two. Let the 555 drive the first On or Off and when Off trigger the small uC to do a single fade in and out on the second. If we want a fade IN and Fade out on both then just use the uC to fade one in and out then the next in and out using PWM.
 

Thread Starter

MrsssSu

Joined Sep 28, 2021
190
1647227495334.png
@Reloadron @ElectricSpidey @Tonyr1084 , I am actually planning to use a comparator attached the the output of ne 555. When the ne 555 output is 1 as shown by square wave, I want an IC which can output a wave that is triangular as shown with the highest peak at the middle of the square wave and when its 0, output is 0. And this increasing and decreasing wave (triangular wave above) is feed into a comparator to adjust the output PWM of led to adjust its brightness. Are there any IC that inputs the square wave above, and output a triangular wave as shown above? I know there are integrators but the phase shift of the triangle wave is different. Thank you and have a nice day :).
 

Alec_t

Joined Sep 17, 2013
12,808
Using the 555 but no micro you could fade the LEDs in and out alternately with this arrangement :-
DualLEDFader.jpg

The downside is that for a prolonged fade-in or fade-out time (which you haven't specified) the time-constant R1C1 (or R2C2) has to be large. As R1 and R2 are the current-limiters for the LEDs and thus fairly low value, C1 and C2 consequently have to be high value.
Also, the fade-in and fade-out current profile isn't easily adjustable. Together with the non-linear variation of LED light emission with current and the non-linear response of the eye to light level, adjustment of the profile would be desirable. A micro could easily provide that. I doubt that linearly-ramped current, as in post #7, would be the optimum profile but I'd be happy to be proved wrong.
 

Audioguru again

Joined Oct 21, 2019
4,680
There are LED fading circuits all over the internet, I made this one but when running quickly the fading does not look good because the triangle waves are linear but the sensitivity of our vision is logarithmic. It fades slowly very well:
 

Attachments

k1ng 1337

Joined Sep 11, 2020
533
View attachment 262697
@Reloadron @ElectricSpidey @Tonyr1084 , I am actually planning to use a comparator attached the the output of ne 555. When the ne 555 output is 1 as shown by square wave, I want an IC which can output a wave that is triangular as shown with the highest peak at the middle of the square wave and when its 0, output is 0. And this increasing and decreasing wave (triangular wave above) is feed into a comparator to adjust the output PWM of led to adjust its brightness. Are there any IC that inputs the square wave above, and output a triangular wave as shown above? I know there are integrators but the phase shift of the triangle wave is different. Thank you and have a nice day :).
Here an op amp is performing mathematical integration from a square wave to triangle wave. This circuit appears to be offset 45 degrees compared to your preferred waveform in your diagram although you probably get the idea of what's happening. You could use additional components to offset the phase shift so that the peak of the triangle is in phase with the midpoint of the ON time of your square wave as in your diagram.

Operational-Amplifier-as-Integrator-Featured.jpg
 

Thread Starter

MrsssSu

Joined Sep 28, 2021
190
1647333307144.png
Hi, this is the circuit given in your link. However, to achieve a changing PWM duty cycle requires VIN to be changing from low voltage to high voltage and then from high voltage to low voltage linearly. How do I make VIN rises and decreases linearly?:)
 

Audioguru again

Joined Oct 21, 2019
4,680
The triangle waveform should be perfectly linear up and down.
But the sensitivity of our vision to brightness is logarithmic, not linear. Logarithmic is the inverse to a capacitor voltage charging exponentially though a resistor.
 

dl324

Joined Mar 30, 2015
14,458
to achieve a changing PWM duty cycle requires VIN to be changing from low voltage to high voltage and then from high voltage to low voltage linearly. How do I make VIN rises and decreases linearly?
I applied a triangle wave from a signal generator. In your case, you'd need to replicate U1A and U1B to provide a lower frequency triangle wave. Note that the voltage range of the second triangle wave generator has to be taken into consideration to avoid pauses at the light levels for brightest and off.
 
Top