Introduction: Analog Linear LED Fader Using Synthetic Inductor
Most of the circuits to fade/dim a LED are digital circuits using a PWM output of a microcontroller.
The brightness of the LED is controlled by changing the duty cycle of the PWM signal.
Soon you discover that when linearly changing the duty cycle, the LED brightness does not change linear. The brightness will follow a logarithmic curve, meaning that the intensity changes fast when increasing the duty cycle from 0 to lets say 70% and changes very slow when increasing the duty cycle from lets say 70% to 100%.The exact same effect is also visible when using a constant current source and increasing the current linear f.e. by charging a capacitor with a constant current.
In this instructable i will try to show you how you can make an analog LED fader that has a brightness change that appears to be linear to the human eye. This results in a nice linear fading effect.
For more info, see : https://www.instructables.com/id/Alternating-Analo...
To generate the exponential current, that is needed to compensate for the logarithmic perception of the human eye, i use a lossy synthetic (aka simulated aka active) inductor, that is part of the gyrator family.
I chose for a simple synthetic inductor configuration, so it is easier to understand how it works and it is easier to manipulate the circuit.
In the picture you see the exponential rising voltage versus time graph that is generated by the synthetic inductor.
In an inductor, the current rises when a constant voltage is applied over the inductor. In an ideal inductor, this current rises linear, but due to inevitable losses. The losses are the series resistance of the wire that is needed to form the coil and the parallel capacitance that is a result of the windings lying next to each other.
I introduced even more loss in the synthetic inductor, so the current curve becomes semi-exponential, because that is exactly what we need to make the fading effect appear to be linear to our eyes.
Step 1: Schematic1 - Relaxation Oscillator With Synthetic Inductor
The circuit is build around a relaxation oscillator, consisting of capacitor C2+C3, that is charged via the synthetic inductor formed by Q1, R1, R4, C1 and discharged via resistor R5. Charging of C2,C3 via the synthetic inductor gives a semi-exponential rising voltage over C2,C3 and discharging via R5 gives us an exponential decaying voltage over C2,C3. Comparator U1 (LM311, but could also be made with a 555) compares the capacitor voltage against a voltage created by the divider R6, R9 and the positive feedback resistor R7, R7 creates the necessary hysteresis and thus determines the amplitude at the output. With R6, R9 the DC offset at the output can be moved up or down. R6 and R9 can be replaced by a 10K potmeter to tweak the DC offset when you want the LED to go fully off or not. When the voltage over C2,C3 reaches the threshold voltage, the output of the comparator toggles. When the output is high, the synthetic inductor gets powered and charges C2,C3 through D1 with a semi-exponential current When the output is low, the inductor is switched off and R5 discharges C2,C3 through D3.
The circuit is dimensioned for a +5V supply.
The disadvantage of the circuit is that you can not change the frequency easily with a potmeter because the charging and discharging times are defined by individual components. The frequency can be changed rudimentary by changing C2+C3, but then C1 of the synthetic inductor and R5 also have to be changed.
Step 2: Build the Circuit
I have no PCB layout for the circuit, but i prototyped it on a breadboard (see picture).