Introduction: Dimming EL Wire


Electroluminescent wire is a thin copper wire coated in a phosphor, which glows when an alternating current (100V) is applied. Unlike a LED strip it’s not a series of point but an unbroken line of visible light in all 360 degrees. The brightness of this technique is sufficient for the application and because of the very flexible nature of this material it can be easily incorporated in many different applications.

In this instructable I will explain how to apply fade effects to EL-Wire.


Step 1: Possible Techniques

Electroluminescent wire is not easily adjusted in brightness, therefore fading in and out is hard. Two main techniques are used to change the brightness of the electroluminescent wire, one is based on a custom build driver that actually shifts electroluminescent wire brightness by changing the alternating current frequency. The other is based on the same mechanism and uses a 555-timer component to change the current frequency, but this version is a lot simpler.

A problem with changing the frequency is the color change in the electroluminescent wire, above the 2000Hz the wire will quickly change to a lighter color, for example from dark blue to aqua blue. This behavior is not desirable in my application, but a slow fade effect to show the user the device is in progress is.


link to tutorial with 555-timer: http://hackaday.com/2011/07/13/color-changing-el-wire/

next step how does it work

Step 2: How Does It Work

I figured out that a standard supplied 3V EL-wire inverter is capable of handling a quite large range of input voltages from 2.5V till 3.5V.

Testing with a variable power supply showed a very nice color change of the electroluminescent wire and also showed that the inverter is capable of handling much lower voltages to completely fade out the electroluminescent wire. The next task was developing a variable power supply which can be adjusted with an Arduino.


Step 3: What Do You Need?

I ordered all my supplies at sparkfun. You are free to choose your own supplier.

This was my shopping cart


EL Inverter - 3v
COM-10201                                                https://www.sparkfun.com/products/10201

EL Wire - of your favourite color 3m
COM-10194                                                https://www.sparkfun.com/products/10194

TRIAC
COM-09234                                                https://www.sparkfun.com/products/9234

Voltage Regulator - Adjustable
COM-00527                                                https://www.sparkfun.com/products/527


Step 4: Schematic of Variable Power Supply

The schematic of this board can be found in the photos. The technique is based on a variable power supply component LM317, which can adjust the voltage based on the ratio between to external resistors, by shortcutting one of these resistors with a pulse width modulation signal, it is possible to change the output voltage of this component and thus change the brightness of the electroluminescent wire.

I connected 2 inverters to one arduino nano to control my El-wire

See also the LM317 calculator:
http://www.electronics-lab.com/articles/LM317/

Step 5: Arduino Code

Copy this code to your arduino and if necessary make some adjustments.
I tried to be as complete as possible with my comments please ask if something is not clear.


-----------------------------------------------------------------------------------------------------------------------
int counter = 0; // to count how many instances the fade loop has made
int pwmPin = 9; // adjustable voltage on pin 9
int greenELwire = 4; //connect the blue ELwire FET to pin 4 to turn it on and off
int blueELwire = 5; //connect the green ELwire FET to pin 4 to turn it on and off
void setup() {
pinMode(greenELwire,OUTPUT);
pinMode(blueELwire,OUTPUT);
pinMode(pwmPin,OUTPUT);
// nothing happens in setup
}
void loop() {
// fade in from min to max in increments of 5 points:
digitalWrite(greenELwire,LOW);
digitalWrite(blueELwire,LOW);// explicitly turn off all ELwire
delay(2500); //wait 2.5 seconds
digitalWrite(greenELwire,LOW); // green off
digitalWrite(blueELwire,HIGH); // blue on
//start fading on pwmPin
while(counter < 8){//fade in and fade out 8 times
for(int fadeValue = 00 ; fadeValue <= 200; fadeValue +=1) {
// sets the value (range from 0 to 200):
analogWrite(pwmPin, fadeValue);
// wait for 6 milliseconds to see the dimming effect
delay(6); // total duration of fade is 200*6 = 1200ms or 1.2
seconds
}
delay(100);
// fade out from max to min in increments of 5 points:
for(int fadeValue = 200 ; fadeValue >= 00; fadeValue -=1) {
// sets the value (range from 0 to 255):
analogWrite(pwmPin, fadeValue);
// wait for 30 milliseconds to see the dimming effect
delay(6);
//total time of fade in and out is 1.2 seconds times 2 = 2.4 seconds which is a slow
fade.
}
counter++; // increment the counter so the fading stops after 8 instances.
}
analogWrite(pwmPin,0); // make the pwmPin 0 so the fading stops and the ELwire will be on
full brightness.
digitalWrite(greenELwire,HIGH); //blue off (low is off)
digitalWrite(blueELwire,LOW); // green on
delay(5000); //wait 5 seconds to show the user the treatment is completed
counter = 0; // make counter 0 after 8 instances
}

Step 6: Done

You are done!

check if everything works!