Shift Register Powered Realistic Candle Flicker

[Kevin Darrah] recently went out to dinner at a restaurant that was using some cheap LED candles (yuck) instead of the real thing. And in the true spirit of a hacker, he started to notice the patterns programmed into the fake flame repeat over and over again. And like any hacker might, his mind started to devise a better way.

Now’s the time where some of us lazy hackers might grab a microcontroller, and copy and paste in some pseudo-random number generating code you found on the Internet, but not [Kevin]. The basics of his hack uses two shift registers tied together that are fed a single clock signal, and also a latch signal that is slightly delayed version of the same signal made by a RC-time circuit.

The randomness of the output is created is by feeding back the outputs of the shift registers to an XOR gate. If you want to learn more about this, the technique it’s called a “linear feedback shift register“. It’s commonly used as a poor-man’s random number generator, although it’s not technically truly random, statistically it does a very good job. You can see the results in the video after the break where [Kevin] describes the circuit.¬† He wraps up the hack with a battery and solar charging circuit as well to make a completed project.

Continue reading “Shift Register Powered Realistic Candle Flicker”