SamSuka
bigclive
bigclive

patreon


Test of LED flame software.

I've written the base PIC assembly code to run the LEDs on the original flame PCB with wire jumpers to the original microcontrollers pads.

Initially I just had a simple shift register chasing random data up the LEDs, but it was too harsh.  So I've rewritten the code to pulse width modulate two separate output patterns against each other with a 50/50 intensity share.

The effect shown is random data being chased up against a solid glow, but I'm thinking of writing the software to gently ramp a bar up and down to random heights while simultaneously chasing up solid sprites of random lengths.

https://youtu.be/DYBYl5qb4xk

Depending on how well it works, the end result will not have a detectable repeating pattern.

I've already discovered a trick that they missed in the original design.  The PIC12F629 I'm using can only drive the LEDs on five of its output pins, so the bottom LED is just running off a 100 ohm resistor and modulates up and down with the ratio of other LEDs lit.  It also caps the boost circuit's voltage when the processor is not powering any LEDs or if it were to lock up for some reason.  (The circuit is using the watchdog to force a reset if it crashes.)

Test of LED flame software.

Comments

It's not looking too bad. It's not looking that bad at all. it actually looks very cool (for a flame)

Zeedijk Mike

It it ends up looking OK I'll put the assembly code and hex file on my website.

Big Clive

Looks good! Will you share the code with us?

Paul Schuur

I like it! Maybe it's the camera exposure, but it does seem a little too bright/intense at the top, perhaps a larger resistor on the top LEDs? Also, some variation in color would really sell it, maybe just a couple yellow and red-orange LEDs mixed in?

David K

I built something similar for CircuitPython a couple of months ago: https://github.com/Flameeyes/flameflicker-playground (details at https://flameeyes.blog/2020/05/25/fake-candles-and-flame-algorithms/) It relies on Perlin noise to generate the PWM values. In my case it's designed mostly to imitate the flame of a single candle, rather than work with multiple LEDs though.

But the reason it looks like a warp drive is that it's like a pulse burning along a tube : it doesn't get less active towards the top. So your suggestion of adding some height-based affects could be helpful. You might also reduce the brightness of the bright spot the higher it goes.

adrian

I agree with the warp drive comment - done in purple it would be excellent :)

adrian

Please release these as a kit or circuit we can build at home when it's all finished 👍

How about an A5 board with a flame effect, similar to the mains flame effect bulbs you took apart a few years ago?

Ian Harris

Wow that's an improvement. Cool!

Michael Thompson

That's 100% better than the original

Jim

Are you sure you havn't put your woofler in there?

That is pretty amazing!!

Mike Hughes

Very nice!

neat

God 420

The star trek warp drives look suspiciously like crumpled mylar/foil on a motor with a light bouncing off it.

Big Clive

My missus would love one of these in the garden. Still looking for a local stockist (Eaglesham, Glasgow, EK etc)

Looks like a warp drive from the Star Trek universe.

Mark Trombley


More Creators