Make your own animated LED Christmas sign
Last year I made a simple LED Christmas sign with very basic animation effects controlled by a PIC MCU. One of my friends, who visited us during the last Christmas, liked it and asked me the recipe of the project so that he could make something similar to decorate his front porch during the next Christmas. In response I gave him the link on my blog where I have described the details of the project. As Christmas is just couple months away, I got an email from him two weeks ago, saying that he has just started working on the project. He followed everything in the recipe that I have described on my blog except the PIC programming part, which he has never done before. I told him that I can send him a programmed PIC processor but he didn’t seem happy with that. In his own words, ” I don’t want any black box in the project, I want to enjoy building every part of it”. Then I had to find an alternative way of running the LED Christmas sign without using a microcontroller. So, here I am revising my previous LED Christmas sign project by replacing the PIC16F688 microcontroller in the original circuit with digital logic ICs (74HC595 and 74HC14 ). I have also added flashing LEDs around the edges of the sign to make it look more attractive.
LED display board
The display message on the sign is “MERRY XMAS”. Each character of the message is made up of red LEDs (5 mm diameter) connected in series and parallel fashions. The forward voltage of an LED depends on its type. If the LED is red, the forward voltage is usually between 1.7 – 2.1 V. For green and blue LEDs, this value is slightly higher. An LED requires a current limiting resistor in series to operate safely. Most 5mm LEDs operate close to their peak brightness at a driving current of 20 mA. In this project, I am limiting current through my LEDs to 15 mA and they still glow pretty bright. So, all of my calculations are based for 15 mA current through the LEDs. I found the forward voltage across my LEDs is about 1.95 V. Calculating the value of the series resistor for an LED is simple. Suppose, if you want to drive a LED through a 5 V power source, you need a resistor of value (5-1.95)V/15 mA = 203 ? to limit the current to 15 mA. The closest available resistor (on the higher end) is of 220 ?.
Now, let’s see how to make display letters with LEDs. The first letter of the message (MERRY XMAS) is shown below. 17 LEDs are used in creating the letter M. If you have to drive each LED through a 5V supply, you require 17 series resistors, and the current will sum up to 17×15 = 255 mA. If you add the current requirements of other letters in the message, the net current would go up to 2 A, which is quite a bit of current and you probably need a bigger heat sink for your voltage regulator. So I thought of doing it differently that would lower the net current consumption in the project and also save me from soldering to many resistors . How can I do that? Yes, you are right, by using a higher supply voltage.
I am using +32 V (from my old printer’s external power supply unit) to drive a chain of LEDs connected in series. By doing so the net current required to drive all the LEDs in a chain is same as required for a single LED, and I only need 1 resistor per chain. With +32 V, I can only drive up to 16 red LEDs in series, and the letter ‘M’ in the sign consists of 17 LEDs. So I have to divide it into two chains of 9 and 8 LEDs, as shown below. For the first chain, the value of the series resistor would be,
R1 = (32.0 – 1.95 x 9) V/15 mA = 963 ?.
I used 1 K for this. Similarly, for the second chain of 8 LEDs, the estimated resistor value is R2 = 1.1 K.
The anode terminal is connected to 32 V supply whereas the cathode is connected to the collector of a NPN transistor (BC547). The transistor acts as a switch with a control signal applied to its base terminal through a resistor. Whenever the control signal is HIGH, the switching transistor is turned on and all the LEDs will glow to display ‘M’.
This whole process is repeated for other letters in the message. The series resistor values are calculated in exactly the same way by considering the number of LEDs in each of the chains formed. The table below shows the number of LEDs and chains used for making each display letter in the sign.
I have also added 24 extra LEDs (8 Red, 8 Yellow, and 8 Green) to create a flashing border around the edges of the sign. They are connected in two chains, each one has 12 LEDs in series, as shown below.
In order to construct the display sign, I first took a 0.25″ thick cardboard and drilled tiny holes (0.8 mm drill size) in it where the legs of LEDs are inserted. There are two closely spaced (about 3 mm apart) holes for each LED. The legs are bent on the backside of the cardboard and soldered to form chains. This holds the LEDs fairly tight. In order to drill the equidistant holes, first I printed the letters on papers with round circles (size of LEDs) and sticked them on the board using tape (see pictures below). Each circle then provides reference for drilling holes for that specific LED. The circles are 0.5? apart. Since it’s a cardboard, drilling was not that painful. It took me about 30 minutes to drill holes for all 134 LEDs (not bad!).
From the above discussion it follows that the LED driver circuit consists of 10 NPN transistors (BC547) that work as ON/OFF switches for display characters and border LEDs. Here’s a closer look of the driver board.
Display control unit
The display driver is ready and now we need a controller to turn the transistor switches on and off in an appropriate sequence to create some animation effects to the text displayed on the board. The controller circuit consists of two 74HC595 shift registers and one 74HC14 inverting Schmitt trigger IC. The circuit diagram of the controller is shown below.
The 74HC14 provides six inverting buffers with Schmitt-trigger action. One of them is configured as a relaxation oscillator using an external resistor (100K pot + 10K fixed) and a capacitor (10 uF). The frequency of oscillation is given by f ? 1/(0.8 x RC). So, with a 100K pot and a fixed 10K resistance, the frequency can be varied from approximately 1 Hz-13 Hz. This clock will be the control signal for the LEDs around the edges, and therefore they will flash at the same frequency.
The two 74HC595 shift registers are cascaded to form a 16-bit serial-in parallel-out shift register. This requires connecting the serial output (pin 9) of one to the serial data I/P pin (14) of the other. The two clock inputs (Shift register clock and Storage register clock) of both are tied together and driven by the same clock signal from the relaxation oscillator. Remember that the relaxation oscillator runs freely and is always providing clock signal to the combined 16-bit shift register. So what appears at the output of the shift register depends upon the logic level applied at the serial data input pin (14). The data input pin is connected to the output of the second inverting buffer (pins 3 and 4) in the 74HC14 device. The input to this inverter comes from pins Q1, Q3, or Q5 output of second shift register, which is selectable using a jumper connector. Pin no. 10 of 74HC595 is the memory reset input, which is active low. It can be either connected to logic high (+5 V) all the time or to the output of the second inverter; there is a switch for doing that. Actually it controls the animation of the display (described later). The first 9-bit parallel data output (Q0-Q7 of first 74HC595 and Q0 of second 74HC595) from the cascade connection drive the switching transistors for the nine display letters on the sign. Now let’s see how it operates.
Suppose, the animation select is at position 2 (+5 V), which means both 74HC595 devices will never get reset. Also assume the Hold time select is connected to Q1 (pin 1) of the second 74HC595. Assume the power-on-reset values of the parallel outputs from both the shift registers are 0. This means the output of the second inverter (pin 4 of 74HC14) will be at logic HIGH. Since this is feeding the serial data I/P pin of the cascaded 16-bit shift register, the logic 1 will be shifted in with every clock pulse coming from the relaxation oscillator, which means the letters in the message “MERRY XMAS” will turn on sequentially from left to right. After all nine 1s are successfully shifted in, the complete sign will glow. An additional clock pulse will push one more 1 into the shift register resulting Q1 high. Since Q1 goes back to the input of the second inverter, the data I/P pin will be at logic 0 now, which means 0s will be pushed into the shift register now onwards. So the displayed message will start disappearing from left to right, one letter at a time. After 9 more clock pulses, all display letters are OFF. On the arrival of the 10th clock pulse, Q1 will be low, which means the data I/P pin will go high again. This whole process repeats for ever and you will see the animated Christmas sign running continuously. You can change the speed of animation by varying the frequency (through the 100K pot) of the relaxation oscillator. Similarly, by moving the Hold time select jumper to Q5, the displayed message can be held still for 5 clock pulses before it starts disappearing from the left side.
You can slightly modify the animation pattern by switching the animation select (which is actually memory reset pin of both 74HC595 devices) to position 1. Now, whenever the output of the second inverter goes low, it will clear the outputs of both the shift registers at once and the data I/P pin will go high again. On the output side, what this means is when all the letters are displayed on the sign, and the hold time is up, they all will turn off together and the message will start displaying again sequentially from left to right. The demonstration video at the end shows both the animations in action.
The +5V power supply required for the controller circuit is derived using a LM7805 regulator IC. The printer power supply that I have got has three output terminals, +16 V, +32 V, and Gnd. I used +16 V as an input to LM7805 IC.
Note: An extra LED shown in the controller board is for test purpose. It is connected to the output of the relaxation oscillator.
Project in action
Have fun watching the following video that shows the project in action.
We recommend EasyEDA for circuit design and PCB prototype