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
check if everything works!
21 Comments
7 years ago
can the speed of the fade effect be made slower?
Reply 2 years ago
Yes this is simply done in code by fading the pwm pin, try for example to go up from 0-255 in increments of 2 instead of 1
7 years ago
Hi rikkkurd
I'll try to build this with your instructions but for a beginner like me it would be very helpful to have a more detailed list with all parts like resistors, diodes and switches, ... Would it be possible for you to give me a more detailed list? Or do you have found a new way in the last two years to improve something?
Reply 7 years ago
Hi claudio,
I did not find an improvement on this design yet. But it works very well. All parts are annotated in the schematic https://cdn.instructables.com/FYF/BY1S/HMMF949D/FYFBY1SHMMF949D.MEDIUM.jpg which is also in the instructable. As a beginner it can be difficult to start such a project but i definitely believe you can pull it off. If you have any questions please let me know. i believe all parts used are still easy to get an hold on. Best, rik
Reply 7 years ago
Thank you for your response! I am really happy that you answer my beginner questions :). I'm back with some questions:
1. I can't find all components of your shopping list in your schematic:
EL Inverter - 3v / COM-10201 = ???
EL Wire = ???
TRIAC - COM-09234 - MAC97A4 = BC550?
Voltage Regulator COM-00527 = LM317?
2. Are the two LED's (LED1 Blue 470nm, LED2 Green 555nm) necessary? Is the exact wavelength important for the dimming function?
3. What's the difference between BS170 and BS171?
4. What changes would be necessary if I want to power the el-powercircuit with a 3.7V lipo-battery instead of the 9V battery? Like this one: https://www.sparkfun.com/products/8483
I know these are maybe very idiotic questions but I hope you have some free minutes to help me out with them :D
Reply 2 years ago
1 yes your component search was correct, the el wire part number does not matter any el wire is probably fine
2 not at all, just the colors i used
3 not sure but google is your friend
4 sorry this is something you have to figure out with someone else,
3 years ago
Hi, another costume question. I’m really hoping to avoid adruino and just want to replicate what the battery pack can do (on/off/flash modes/ but with usb power. I want to have immediate control for my suit rather than pre programs, how can I achieve. This? Thank you.
Reply 2 years ago
You need to have some brain, but a simple button connected to your arduino could do the trick, arduino's are powered often by 5v so powering from a usb cable should not be a problem either
Question 2 years ago
Hi - I know this is an older post so maybe you don't even check this anymore but i was wondering if anybody know the equivalent of the TRIAC COM-09234 since they dont sell it anymore.. hope someone can help me out, thanks in advance
Answer 2 years ago
Hi, I still receive emails when people comment :)
https://www.digikey.sg/product-detail/en/on-semiconductor/MAC97A4G/MAC97A4GOS-ND/918558
This website shows a substitute currently this is the STMicroelectronics Z00607MA 1BA2 https://www.digikey.sg/product-detail/en/stmicroelectronics/Z00607MA-1BA2/497-7699-ND/1040591
Question 5 years ago
Would it not be easier to use a mosfet connected to the pwm pin to change the output going from the battery to the el wire inverter?
8 years ago
Hi, ridddurd.
This tutorial is very useful and easy to implement. And also your statement is clear.
I have one question about the schematic. In the schematic, Arduino D9 is pluged into some transistor(maybe).
Please tell me about the detail of this component.
Reply 8 years ago
it's the triac https://www.sparkfun.com/products/9234
sorry I was unclear about this, the parts list is in the first step.
Hope I could help
Reply 7 years ago
you did not mention all parts on the list, because in the schematic you are using more parts....can you show more pictures in detail about arduino pro mini?
Reply 8 years ago on Introduction
@rikkkurd
Thank you for the reply. I’m going to try to make it.
Reply 8 years ago
Great let me know if it works out im probably going to rebuild it myself as well upcoming month
8 years ago on Introduction
Hi. What is the simplest way to fade-in on power ON and fade-out on power OFF? Actually I do not need any arduino compatibility, just fading on power ON/OFF. Thank you.
Reply 8 years ago on Introduction
hmm interesting, A small arduino is still very simple, however what the arduino does is changing the supply voltage over time. if you have a big enough capacitor maybe it could slow down the rise of the voltage level and when powered down slowly fade out on the energy still available in the capacitor. No idea if this can work. if you do it by hand you can use a simple potmeter as a pwm output to use on the triac and switch it off by slowly turning the knob till you reach maximum brightness. Any people with other ideas?
8 years ago on Introduction
Can this set-up be used on a costume? Or does it have to be hooked up to a PC in order to (slowly) fade in and out?
Reply 8 years ago on Introduction
It can be definitly be used on a costume the arduino nano will handle all the fading and a simple 9v battery will be enough to power 1 meter for a few hours.