I recently got around to making a color fading el wire driver, which actually tries to shift the color by changing the AC frequency.
"Read more" for technical details....
Here is a little video I tried to make. I think I spent more time trying to edit this video than building the whole project!!
Update: "dcroy" built this same thing a few months before I did, and using only a 555 timer! Looks like it's not as unique as I thought!
This is the schematic. Most of the parts are small surface mount and they're hidden under the transformer.
Here's the code from the Arduino IDE. Pretty simple stuff. But beware, if you try this, it's essential to drive each transistor for the same length of time, and not more than about 1ms. If you drive one more than the other, or leave either on too long, the transform sees a DC or low frequency signal. That could result in far too much current, probably destroying the transistors if the battery is fresh.
constint pin1 = 12;
constint pin2 = 19;
voidsetup() {
Serial.end(); // USB off, to save powerfor (byte i=0; i<25; i++) {
pinMode(i, OUTPUT); // all unused pins lowdigitalWrite(i, LOW); // to avoid wasting power
}
pinMode(pin1, OUTPUT);
pinMode(pin2, OUTPUT);
}
unsignedint us = 250 * 64;
constint usMax = 500 * 32;
constint usMin = 120 * 32;
byte dir = 0;
voidloop() {
digitalWrite(pin1, HIGH);
delayMicroseconds(us / 32);
digitalWrite(pin1, LOW);
if (dir) {
us = us + 1 + us / 2048;
if (us >= usMax) dir = 0;
} else {
us = us - 1 - us / 2048;
if (us <= usMin) dir = 1;
}
digitalWrite(pin2, HIGH);
delayMicroseconds(us / 32);
digitalWrite(pin2, LOW);
}