Fading Red Eyes

This circuit can be used to slowly illuminate and fade a pair of LEDs, or with the addition of a second transistor (PNP) the circuit will fade two pairs of LEDs out of phase so that one pair gets brighter while the other grows dimmer. The dual transistor version is shown below the single transistor circuit. Most any op-amp should work, I used the 1458 dual op-amp in the single transistor circuit and the LM324 quad op-amp in the dual transistor version. The two spare op-amps in the LM324 package could be used for a second circuit running at a different rate which would allow using four pairs of LEDs.

In operation, a linear 3 volt p-p ramping wavform is generated at pin 1 of the IC and buffered with an emitter follower transistor stage. The 22uF capacitor and 47K resistor connected to pin 2 establish the frequency which is about 0.5 Hz. You can make the rate adjustable by using a 100K potentiometer in place of the 47K resistor at pin 2.

The circuit consists of two operational amplifiers (op-amps), one producing a slow rising and falling voltage from about 3 volts to 6 volts, and the other (on the right) is used as a voltage comparator, the output of which supplies a alternating voltage between 2 and 7 volts to charge and discharge the capacitor with a constant current.

Each of the op-amps has one of the inputs (pins 3 and 6) tied to a fixed voltage established by two 47K resistors so that the reference is half the supply voltage or 4.5 volts. The left op-amp is connected as an inverting amplifier with a capacitor placed between the output (pin 1) and the inverting input (pin 2). The right op-amp is connected as a voltage comparator so that the output on pin 7 will be low when the input is below the reference and high when the input is higher than the reference. A 100K resistor is connected between the comparator output and input which provides positive feedback and pulls the input above or below the switching point when the threshold is reached. When the comparator output changes at pin 7, the direction of the current changes through the capacitor which in turn causes the inverting op-amp to move in the opposite direction. This yields a linear ramping waveform or triangle waveform at pin 1 of the inverting op-amp. It is always moving so that the voltage on the non-inverting input stays constant at 4.5 volts. Note that the capacitor will charge in both directions since one side is held at a constant 4.5 volts while the other side moves between 3 and 6 volts so you may want to use a couple 22uF caps connected with oposite polarity (as shown in the lower circuit). However, the reverse charge is only around 1.5 volts so a single electrolytic should work with little effect on linearity.

Copyright 2006: Bill Bowden

The attachment illustrates two pairs of LEDs that operate out of phase so as one pair slowly illuminate, the other pair will fade.

Leave a Reply

Your email address will not be published. Required fields are marked *