Sunday, July 14, 2013

Experiments in Dimming EL Wire using PWM (2013)

Recently, a friend of mine got into electronics.  As a first project, he wants to build Tron-themed shoes for his son.  He chose to use EL wire as a lighting accent, and would ideally like to be able to modulate the brightness of the wire using software.

However, EL wire must be powered using relatively high-voltage alternating current, and a dedicated driver circuit is usually employed to convert DC into the required format.  Because these drivers usually include some kind of oscillator/resonator to alternate the current, I was worried that using a transistor to limit the input current might screw up the driver's ability to stabilize, and initially though it might be better to throttle the oscillator output using a TRIAC or some such.  However, I realized that without special care, turning the TRIAC off would be akin to running the driver without a load, letting the oscillator run amok, which by all accounts is not a good idea either.

So... we turned to our good friend the Internet, and of course somebody else has already dived into this topic to much greater depth than I could ever hope to achieve.  Thank you ch00f!  His conclusions were that current-limiting the input stage of the resonator was a valid approach.  I treat this as great news for humanity at large because it means we can simply apply what we know about using transistors to control loads, treat the driver-and-EL-wire system as a generic load, and go on with our lives.

Here is the result:


I had some spare 2N2222s around so I adapted the idea to use those:

Manual dimming circuit.
PWM dimming circuit, with manual brightness control.
This circuit was intended for experimentation; in a finished circuit, you would probably choose some total fixed value for the sum resistance going into the transistor base and leave it at that.  You might also want to add a capacitor either in parallel with the driver or between the base of the transistor and ground to smooth out things a little, but I didn't need one in my tests.

Here are a few pictures from along the way:
The driver outside its enclosure.
Initial connection of the driver to an external PSU.
Controlling the driver circuit using a transistor.
Close-up of the transistor wiring.  (The Arduino RBBB is not used here.)
Using a potentiometer to dim the circuit.
Manually dimming the circuit.  What the heck - Picasa created this animated GIF on its own.  I never asked for it, it just showed up.  Insanity!
Final setup with the Arduino RBBB, messy desk, breakfast juice and all.  To supply a test PWM signal I simply used the circuit from my quiz game buzzers.