Random Flashing Christmas Lights with Geiger Counter Effect Output

LFSR Board Whole

About ten years ago, things were a bit slow at work and the joyous season of goodwill was almost upon us.  How might it be possible to relieve the tedium and simultaneously look a bit like you're doing some work?  Ah Hah!  You can make some annoying flashing Christmas lights, but not any old annoying flashing Christmas lights, no.  These use a linear feedback shift register to generate a pseudo-random flashing sequence and make a pretty LED display.  You can also connect up a loudspeaker to one of the outputs to make a pseudo-random clicking effect like a Geiger counter, white noise or the interesting grinding noise of the sequence repeating if you turn up the clock rate.

The Linear Feedback Shift Register Pseudo-Random Sequence Generator

I'll not go into the full details of the theory here and I'd recommend looking up Linear Feedback Shift Register on Wikipedia.  Suffice to say that they are very useful and easy to make, either using old logic chips like I've done or a spot of VHDL or programming.  I've made a maximal length sequence for a 16-bit shift register using taps 4,13,15,16 (the numbers are one step out in the schematic) which creates a sequence 65535 bits long.  If you clock this at 10Hz, it will be almost two hours before the sequence repeats.

XMAS_LFSR Schematic Description

Here's the schematic.  You can click on the image for a bigger view or download a pdf here: 

Irritating Random Christmas Flashing Lights Schematic Diagram xmas_lfsr01_01.pdf

The intention is to run from 12V d.c. overall and a standard 5V linear regulator provides 5V for the HC logic devices.  The main shift register is comprised of U1 and U2 74HC273 D latch devices and this allows access to all possible tapping points, unlike some other dedicated shift register chips.  They are cleared at start-up by an RC clear generator with a relatively short period.  A similar circuit with a longer period injects an essential '1' into the system.  U3 74HC86 provides the XOR gates.  The state of the shift register is shown on the LEDs which need to be 2mA low current types.  Four logic level gate threshold N channel MOSFETs provide pull-down output drive for external LEDs supplied from the 12V rail. 
Depending on what external devices you intend to drive with the output transistors, they are not particularly critical.  My prototype used IRF611 because they happened to be available.  You need to have suitable current limiting resistors appropriate for 12V on the external LED circuits.  The NDD02N40 shown on the schematic is a good, small, 2V gate drive voltage FET which has very good parameters at 5V gate drive.  The choice of taps to drive the output transistors is not important, or is an artistic decision.  A simple Schmitt inverter clock generator provides a variable rate clock signal and this can be adjusted for maximum irritation effect.  The clock signal to the shift register has to be good and sharp to avoid the sequence generator jamming, so a second Schmitt gate is used after the actual clock generator inverter.  The final gate on U4 74HC14 can be used to drive a small loudspeaker or amplifier via a d.c. blocking capacitor C6.  At low clock rates this sounds rather like a Geiger counter audio output.

Creating Interesting Noises With an LFSR

You can create interesting noises using LFSRs.  I've already suggested the Geiger counter effect, and you can hear that by connecting a small loudspeaker to output J3.  If you reduce the value of C3 to about 1nF, you can create pseudo-random white noise.  If you turn the clock up fast enough you can hear the lower frequency content of the sequence repeat.  I claim that low-pass filtered versions of these sequences, running fast enough to hear the repetition, sometimes appear in sci-fi film soundtracks and other places.  An example would be the noise underlying the DVD top menu on my box set of "The Prisoner" from 1967.  Of course, there are many different sequences that you can create using this technique by using different taps and shift-register lengths.  They will all sound different from each other but when low-pass filtered, each one will have a unique and reproducible grinding noise.  It might be interesting to try two identical sequence generators running at slightly different clock speeds driving the left and right channels of stereo headphones or speakers.

My Particular Implementation


Here are pictures of my particular prototype and links to some YouTube videos of it running.  I used some high brightness white LEDs and various other bits scavenged from mobile phones at the time to decorate a plastic Christmas tree.  Can you spot the type numbers of the mobile phones used?  The old Radio Shack solder breadboards in the shape of the plug-in breadboards were a fantastic gimmick at the time which I thought that I would try using because I happened to have some, and for a bit of fun.  Ordinary stripboard is better in practice.

If you need any of the parts like the handy NDD02N40 MOSFET, by coincidence I just happen to have some in the Useful Components Ebay Shop.

general email
        address

Navigate Up