Step 1: LED Math and Driver Circuit
Now, let’s see how to make display letters with LEDs. The LED connections for the first character of the signboard (MERRY XMAS) is shown above. 17 LEDs are used in creating '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 up the current requirements of other LED characters in the signboard, 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 and transistors. This can be done by using a higher supply voltage.
I used a power supply unit from one of my old printers that provides +32 V, +16V, and ground to its 3 output pins. The +32 V is used to drive the chain of LEDs connected in series, and +16V goes to an LM78L05 IC to derive +5V regulated output for the control circuit. By doing so the net current required to drive all the LEDs in a chain is same as required for a single LED as they are in series, and therefore, only 1 resistor is required per chain.
The picture above shows how I constructed the character 'M'. 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 here. 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 constructing other LED characters in the signboard. The series resistor values are calculated in exactly the same way by considering the number of LEDs in each of the chains formed. The attached table shows the number of LEDs, number of chains, and the value of series resistor used for constructing each LED character.
Step 2: Border LEDs
Step 3: Constructing the Sign Board
The LED driver unit, which consists of ten transistors (9 for character display and 1 for border LEDs) is hooked up on the back of the cardboard. It has a female header receptacle to receive the logic control signals from the controller board, which we will discuss next.
Step 4: Animation Controller Board
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 signal controls the blinking of the border LEDs, and therefore, they will flash at the clock 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), which in fact, 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 (selectable using a jumper connector) of the second shift register. Pin no. 10 of 74HC595 is the memory reset input and is an active low signal. 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 characters on the signboard. In the next section, I will describe its operation in more detail.
Step 5: Operation of the Controller Unit
Suppose, the animation select is at position 1 (+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 its input (pin 3 of 74HC14) is at logic zero. 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 characters 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 output of second 74HC595 go high. Since Q1 goes back to the input of the second inverter through hold time select jumper, the data I/P pin (pin 14 of first 74HC595) 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 of second 74HC595 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 2. 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 characters are turned on the sign, and the hold time is up, they will all turn off once and the characters 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, as shown in the picture here.
Next section shows the Christmas signboard in action.