A 3d printed ghost next to the base of an LED tea light that has 4 LEDs poking out and the IR receiver port and micro-USB connector showing.

A Cold Light To Warm Your Heart

Halloween is coming fast and what better way to add to your Halloween ornamentation than [Wagiminator]’s cute NeoCandle tea light simulator.

[Wagiminator] has modified a 3D printed ghost along with extending [Mark Sherman]’s light simulation code to create a cute light that’s perfect for the holiday season. The NeoCandle uses an ATtiny85 chip to power four WS2812 NeoPixel jelly bean LEDs. The device has an infrared (IR) receiver to be able to control it from a remote that speaks the NEC protocol. There is a light sensor that allows the unit to dim when it detects ambient light and the whole unit is powered off of a micro-USB connection.

The ATtiny85 have limited program flash and [Wagiminator] packs in a lot of functionality in such a small package, squeezing in a bit-banging NeoPixel driver in only 18 bytes of flash that can push out a transfer rate 762 kpbs to update the LEDs. The pseudo-random number uses a Galois linear feedback shift register and comes in at 86 bytes of flash, with the IR receiver implementation code being the largest using 234 bytes of flash. The ATtiny85 itself has 8 KB of flash memory so maybe it’s possible to push [Waginminator]’s code to even more restrictive Atmel devices in the ATtiny family.

With microcontrollers and LEDs becoming so cheap and ubiquitous, making realistic flames with them is becoming accessible, as we’ve seen with previous projects on electronic candles.

Continue reading “A Cold Light To Warm Your Heart”

LED Flame Illuminates The Beauty Of Noise

Have you ever wrapped up a nice blinky project only to be disappointed by the predictability of the light or the color patterns? When it came to lighting this LED candle, so was [fungus amungus]. But there’s a better way, and it involves noise.

Perlin noise was created in the early 80s by Ken Perlin while he was working on the movie Tron. Frustrated by the current state of computer graphics and too limited on space to use images, he devised an algorithm for generating natural-looking textures. Basically, you generate a bunch of numbers between 0 and 1, then assign values to those numbers, such as a range of greyscale values from black (0) to white (1), or the values from the color wheel. The result is much prettier than random numbers because the neighboring values for any given number aren’t radically different. You get nice randomness with hardly any overhead.

[fungus amungus] is using the FastLED’s noise function to generate the numbers, but there’s a whole lot more going on here. As he explains in the excellent video after the break, if you want to animate these values, you just add another dimension of them. Although [fungus amungus] is using a Trinket Pro and a NeoPixel ring, we think a simplified version could be done with a Circuit Playground Express using the built-in LEDs.

If you want to do it the hard way, start by making your own NeoPixel ring.

Continue reading “LED Flame Illuminates The Beauty Of Noise”