Flickering LED (Candle)
BaTWING_2000
Posts: 6
Hello,
I bought the Prop-1 Controller to create a simple flickering candle effect but I'm not getting anywhere at all. I got into basic stamp a short 2 years ago and now figured that I nearly forgot everything and I don't have the patience to pick it up again, so... I'm actually considering paying somebody to create me a simple program to have 1 single led flicker realistically without the use of any capacitors (cool volunteers are of course wanted).
I checked out the candle flicker program on efx-tek.com and it is not doing what I want it to do. I don't really like the flicker since it is just randomly turning the led on or off without any dimming smoothness in between. Also, this program runs the flicker down P0 to P7 like a movie.
Anybody who has enough knowledge to throw together a small program for the following?:
- Realistic candle flickering for 1 LED on a single output.
- Easily control the intensity of the flame based on speed of flickering and intensity of on/off flickering.
- Able to edit and copy the piece of code to each of the 7 outputs individually.
- (future idea I'm considering) have all the 'flames' on all the outputs 'blow out' when an input is triggered (turn O7 to in input probably) for about 5 seconds (adjustable) and then have them all slowly fade back on back to normal.
The big idea is having about 100 pumpkins controlled together with about 3-5 prop 1 controllers all with the same program on them each with 6 different flickering patterns. I plan to connect roughly 10 to 15 pumpkins to a solid state relay that is connected to one of the outputs.
All these prop 1 controlled will do their own simple flicker on each output for a batch of 10 pumpkins each but in the future they all are connected as a slave on pin 7 to receive a low voltage input or a normally open or normally closed signal from another control devise that is in charge of creating a loud thunder clap that 'blows' all the pumpkins out for about 5 seconds before they slowly glow back to normal.
Thanks already for all the help guys, it seems so simple but I hate to admit it that I just don't know how to start on this. I wanted to make my career with this kinda stuff in the theme park industry to work with animatronics but I just figured out I cant even program a simple blinky light so, I don't know.
Anywho, plz help... I really want to see this idea turn into reality for a future Halloween. Much thanks.
I bought the Prop-1 Controller to create a simple flickering candle effect but I'm not getting anywhere at all. I got into basic stamp a short 2 years ago and now figured that I nearly forgot everything and I don't have the patience to pick it up again, so... I'm actually considering paying somebody to create me a simple program to have 1 single led flicker realistically without the use of any capacitors (cool volunteers are of course wanted).
I checked out the candle flicker program on efx-tek.com and it is not doing what I want it to do. I don't really like the flicker since it is just randomly turning the led on or off without any dimming smoothness in between. Also, this program runs the flicker down P0 to P7 like a movie.
Anybody who has enough knowledge to throw together a small program for the following?:
- Realistic candle flickering for 1 LED on a single output.
- Easily control the intensity of the flame based on speed of flickering and intensity of on/off flickering.
- Able to edit and copy the piece of code to each of the 7 outputs individually.
- (future idea I'm considering) have all the 'flames' on all the outputs 'blow out' when an input is triggered (turn O7 to in input probably) for about 5 seconds (adjustable) and then have them all slowly fade back on back to normal.
The big idea is having about 100 pumpkins controlled together with about 3-5 prop 1 controllers all with the same program on them each with 6 different flickering patterns. I plan to connect roughly 10 to 15 pumpkins to a solid state relay that is connected to one of the outputs.
All these prop 1 controlled will do their own simple flicker on each output for a batch of 10 pumpkins each but in the future they all are connected as a slave on pin 7 to receive a low voltage input or a normally open or normally closed signal from another control devise that is in charge of creating a loud thunder clap that 'blows' all the pumpkins out for about 5 seconds before they slowly glow back to normal.
Thanks already for all the help guys, it seems so simple but I hate to admit it that I just don't know how to start on this. I wanted to make my career with this kinda stuff in the theme park industry to work with animatronics but I just figured out I cant even program a simple blinky light so, I don't know.
Anywho, plz help... I really want to see this idea turn into reality for a future Halloween. Much thanks.
Comments
http://www.nutsvolts.com/index.php?/magazine/issue/2010/11
It describes how to build flickering candles (LEDs) with the Propeller chip. It's worth a read. The Propeller should be much better at creating realistic flames.
Jim
http://cgi.ebay.com/New-3-Pack-Blow-out-LED-tealight-candle-tea-lights-/180565638372?pt=Candles&hash=item2a0a8cfce4
They come with button cell batteries. They have a microphone to detect blowing or loud sounds to switch off.
Jon Williams has written and provided code for LED flickering candles using the Prop-1 on the EFX-TEK web site... you can find it and additional notes and schematics to download on this page:
http://www.efx-tek.com/topics/wickled.html
That should get you going,
Tim
It seems very, very, very odd to me to have electronic clones that one actually can blow out.
Now this is the program: (has to be BS1 for now, prop-1 controller)
' =========================================================
'
' File....... Candles.BS1
' Purpose.... Light faux candles (with LED wicks)
' Author..... EFX-TEK
' E-mail..... teamefx@efx-tek.com
' Started....
' Updated.... 01 JUN 2006
'
' {$STAMP BS1}
' {$PBASIC 1.0}
'
' ========================================================
'
[ Program Description ]
'
' This program controls up to six faux candles. Each candle "flame" is
' comprised of three LEDs, a resistor, and a capacitor. The capacitor
' allows the flame to fade when the Prop-1 controller output goes off,
' creating a more realistic flame effect.
'
[ I/O Definitions ]
SYMBOL Candles = PINS ' candle outputs, P0 - P5
'
[ Constants ]
SYMBOL FlickBase = 75 ' flicker base timing
'
[ Variables ]
SYMBOL flicker = W1 ' random flicker value
SYMBOL idx = B4 ' loop control
SYMBOL wicks = B5 ' to test for dark
SYMBOL rate = B6 ' flicker rate
'
[ Initialization ]
Reset:
DIRS = %00111111 ' make P0 - P5 outputs
flicker = 1225 ' seed random generator
'
[ Program Code ]
Main:
FOR idx = 1 TO 3 ' tumble random generator
RANDOM flicker
NEXT
Check_Dark:
wicks = flicker & %00111111 ' test value
IF wicks = %000000 THEN Main ' if all off, try again
Flame_On:
Candles = wicks ' update outputs
rate = flicker & $0F + FlickBase ' randomize timing
PAUSE rate ' hold flames
GOTO Main ' start again
'========================================================
Is anybody able to add a little tidbit to this program to create a slow fade in of the candles when the controller is turned on and having the flames blow out and fade back in after about 5 seconds when an input (lets say O7) is pressed?? You guys are awesome!!!
EDIT: Is there also a way to control and set the flicker values for each pin individually?? that's my first goal right now, thanks.
Keep in mind that you can ask questions of Jon himself, he does post here from time to time. The Prop-1 is a Basic Stamp 1 with additional circuitry and is his product from his company EFX-TEK. You may get even better support in the forums over there, those guys are very helpful. Jon is also an actor and goes by the names: Jon Williams, Jon McPhalen and Jonny Mac... this can be a little confusing so I thought it might help you to know. By the way, Jon is a former Parallax employee and is also the author of that Nuts and Volts magazine article that was mentioned above.
All the best in your LED candle quest,
Tim