gregh
electronics, computers and scratchbuilding

Recently I saw this article on another Forum, on simulating a flickering Firebox effect using LEDs from: http://www.rhyman.org/articles/auxiliary-lighting-circuit
the effect looked good as shown here:
http://www.youtube.com/watch?feature=player_detailpage&v=Tk0Q2fK7yO4
It uses 4 yellow LEDs and drives from a shift register generating random numbers. Each LED is driven from 2 adjacent shift reg outputs through a 1k and 2k resistor, so can have off and 3 levels of brightness. Operates about 50Hz with 50% duty. It’s a great idea and beautifully executed, but it’s a very complicated electronics circuit. And it gave me ideas……
So I thought this is a job for Picaxe!
For those unfamiliar with Picaxe microcontrollers, see my article here: http://www.gscalecentral.net/controls-signals-and-electronics/using-picaxe-to-enhance-2-4-ghz-radio-control-features/
The newer ‘M2’ types allow 4 parallel programs to run ‘simultaneously’. I hadn’t used this feature before, but it worked well.
I found it wasn’t really necessary to use the 3 levels of brightness for each LED, so I just use 4 LEDs that are on or off.
I wrote 3 different programs, simplifying each time and finished up just using 2 parallel programs. In the end I didn’t use the RANDOM number generator, but just modified my diesel sound generator program – talk about recycling. This is just a type of random number generator which when clocked at the right speed sounds like a diesel engine. By speeding up the clocking speed I had a flickering fire!
I used two random numbers in two parallel programs, produced at different rates of 43 and 50 Hz
I look at 2 bits of each random word, to drive 4 LEDs.
Picaxe can provide 20 mA from each output with a max total of 90 mA. So I can drive the LEDs directly. Here`s the simple circuit...

The magic trick to the whole effect is the kitchen ‘cling’ wrap (Glad Wrap here in Oz) in front of the LEDs to act as a diffuser. It needs about 5 folds = 32 layers to work! I also used a couple of layers of red and yellow cellophane. I wanted the fire redder higher up and white hot at bottom.
I used the ‘golden warm white’ LEDs in the mock-up - I didn’t have any yellow ones.
This is how I mounted the leds for my test setup. I glued small pieces of Aluminium foil over the ‘bright spot’ of each LED

Then a couple of layers of coloured cellophane like this

this is how it looks with no clingwrap:

and the final effect is here in a video: (I haven’t bothered putting it on youtube – I hope this link to my site works)….
http://www.trainweb.org/SaTR/firebox%20progV1.wmv
I haven’t installed it in a loco yet, but I love the effect.
Now to integrate with a fireman that moves and sound effects!!!!
the effect looked good as shown here:
http://www.youtube.com/watch?feature=player_detailpage&v=Tk0Q2fK7yO4
It uses 4 yellow LEDs and drives from a shift register generating random numbers. Each LED is driven from 2 adjacent shift reg outputs through a 1k and 2k resistor, so can have off and 3 levels of brightness. Operates about 50Hz with 50% duty. It’s a great idea and beautifully executed, but it’s a very complicated electronics circuit. And it gave me ideas……
So I thought this is a job for Picaxe!
For those unfamiliar with Picaxe microcontrollers, see my article here: http://www.gscalecentral.net/controls-signals-and-electronics/using-picaxe-to-enhance-2-4-ghz-radio-control-features/
The newer ‘M2’ types allow 4 parallel programs to run ‘simultaneously’. I hadn’t used this feature before, but it worked well.
I found it wasn’t really necessary to use the 3 levels of brightness for each LED, so I just use 4 LEDs that are on or off.
I wrote 3 different programs, simplifying each time and finished up just using 2 parallel programs. In the end I didn’t use the RANDOM number generator, but just modified my diesel sound generator program – talk about recycling. This is just a type of random number generator which when clocked at the right speed sounds like a diesel engine. By speeding up the clocking speed I had a flickering fire!
I used two random numbers in two parallel programs, produced at different rates of 43 and 50 Hz
I look at 2 bits of each random word, to drive 4 LEDs.
Picaxe can provide 20 mA from each output with a max total of 90 mA. So I can drive the LEDs directly. Here`s the simple circuit...

The magic trick to the whole effect is the kitchen ‘cling’ wrap (Glad Wrap here in Oz) in front of the LEDs to act as a diffuser. It needs about 5 folds = 32 layers to work! I also used a couple of layers of red and yellow cellophane. I wanted the fire redder higher up and white hot at bottom.
I used the ‘golden warm white’ LEDs in the mock-up - I didn’t have any yellow ones.
This is how I mounted the leds for my test setup. I glued small pieces of Aluminium foil over the ‘bright spot’ of each LED

Then a couple of layers of coloured cellophane like this

this is how it looks with no clingwrap:

and the final effect is here in a video: (I haven’t bothered putting it on youtube – I hope this link to my site works)….
http://www.trainweb.org/SaTR/firebox%20progV1.wmv
I haven’t installed it in a loco yet, but I love the effect.
Now to integrate with a fireman that moves and sound effects!!!!