One of the first activities used to introduce electronics and micro controllers is fading an LED with PWM. It’s natural then to try exactly the same exercise when using EL for the first time. Send a PWM signal to a transistor which modulates the power to the EL driver, or use a triac on the AC line between the driver and the EL display. Sounds simple enough but anyone who has tried this will know that the results are less than desirable. The outcome is certainly a transition from dark to light, but with shuddering and flickering until the duty cycle reaches 100% and the EL is completely illuminated.
There is however a relatively simple solution to this problem, which results in a continues smooth fading or dimming effect with the EL, that can be controlled with an Arduino just like an LED.
The circuit involved five parts:
* Arduino or other source of a PWM signal
* A low pass filter
* An amplifier to boost the signal
* A variable voltage regulator such as the LM317
* The El driver Circuit.
The low pass filter will smooth out the PWM to effectively give us an analogue signal just using a single resistor and capacitor. For our circuit with a 3.3v PWM we used a 1m ohm resistor with a 22 nf capacitor. For more information on low pass filtering and how to find the values for these components in your circuit see the great tutorial from Scott Daniels in the resources.
The next step is amplifying the analogue signal. For this we will need a rail-to-rail op amp suitable for working with a single supply, the TLC271 for example. This is a non inverting configuration with two resistors, Rf between the Vout and the Inverting Input on the op amp and Rin from the Inverting Input to ground. The gain for the op amp can be calculated as:
Gain = 1 + Rf/Rin
We’ve used 82K for Rf and 38K for Rin, giving us a gain of 3.15. With 3.3 v max out of the low pass filter this gives us a max output of 10.4 volts from the op amp.This 10.4 v max is used for the adjustment of an LM317 variable voltage regulator, which will give an output of ADJ+ 1.25 volts. This gives us a max of 11.65 volts which is ideal for running our 12v EL driver.