8 LED Chaser with 74HC595 8 Bit Shift Register
Have you wanted to make a sweet Cylon/Knight Rider (Larson) Scanner effect? But you donít want to use up all of your Arduino IO pins? Well, you can make a nice 8 LED Scanner with a shift register IC.

In this tutorial weíll be using the 74HC595 8 Bit Shift Register, and this is what we'll be making;



Parts Required:
Arduino Uno (Or Arduino compatible clone)
Jumper Wires (Various colours and lengths)
1x 74HC595 8 Bit Shift Register
1x Breadboard
8x 220 Ohm Resisters

Step 1: Get Ready to Shift

8 LED Chaser with 74HC595 8 Bit Shift Register
8 LED Chaser with 74HC595 8 Bit Shift Register
8 LED Chaser with 74HC595 8 Bit Shift Register
8 LED Chaser with 74HC595 8 Bit Shift Register
Take your shift register and place it on your breadboard over the IC gap, now take your black jumper wires and youíll want to ground the IC, taking note where the notch is (Pin 1 is usually left of the notch) youíll want to ground pin 8 and pin 13.

Step 2: Power, Data, Clock and Latch

8 LED Chaser with 74HC595 8 Bit Shift Register
8 LED Chaser with 74HC595 8 Bit Shift Register
8 LED Chaser with 74HC595 8 Bit Shift Register
8 LED Chaser with 74HC595 8 Bit Shift Register
Take your red jumper wire and wire in the voltage to pins 10 and 16.

Take your blue wire (data) and connect it to pin 14, the yellow (clock) to pin 11 and green (latch) to pin 12 on the IC respectfully.

Then take your LEDís (Iím using an LED bar graph for size) and place them over the IC gap.

Step 3: Let there be LED Light!

8 LED Chaser with 74HC595 8 Bit Shift Register
8 LED Chaser with 74HC595 8 Bit Shift Register
Now take some more jumper wires and start to wire up the LEDís, Start with IC pin 15, then from pin 1 to pin 7.

Then take your 220 Ohm resistors and wire them from the other side of the LEDís to the ground rail.

Step 4: Arduino Time!

8 LED Chaser with 74HC595 8 Bit Shift Register
8 LED Chaser with 74HC595 8 Bit Shift Register
8 LED Chaser with 74HC595 8 Bit Shift Register
Bring your Arduino over and hook it up to your PC and load in this code.

int clockPin = 12; //IC Pin 11, Yellow Jumper
int dataPin = 11; //IC Pin 14, Blue Jumper
int latchPin = 8; //IC Pin 12, Green Jumper

byte patterns[30] = {
B00000001, 100,
B00000010, 100,
B00000100, 100,
B00001000, 100,
B00010000, 100,
B00100000, 100,
B01000000, 100,
B10000000, 100,
B01000000, 100,
B00100000, 100,
B00010000, 100,
B00001000, 100,
B00000100, 100,
B00000010, 100
};

int index = 0;
int count = sizeof(patterns) / 2;

void setup() {
pinMode(latchPin, OUTPUT);
pinMode(clockPin, OUTPUT);
pinMode(dataPin, OUTPUT);
}

void loop() {
digitalWrite(latchPin, LOW);
shiftOut(dataPin, clockPin, MSBFIRST, patterns[index * 2]);
digitalWrite(latchPin, HIGH);
delay(patterns[(index * 2) + 1]);
index++;
if (index >= count){
index = 0;
}
}

Once you've uploaded the sketch to your Arduino disconnect it for now and hook up the data (blue jumper) to D11, clock (yellow jumper) to D12 and latch (green jumper) to D8, reattach the computer, or a power supply and watch the light chase.

Step 5: Going Further

I hope this instructable has opened your eyes to a lot of possibilities... such as, did you know that if you add another 74HC595 8 Bit Shift Register to the mix you can control another 8 LED's on the same amount of wires (5 including power) and shift registers are awesome, with these little IC's they can expand your arduino outputs by 8 per IC, and you can in theory have an infinite amount of shift registers connected to your arduino.

If I touch onto Shift Registers in the future (Which I most likely will) I will show you how to expand.
 
 

Tag cloud

make build easy simple arduino making homemade solar laser printed portable cheap mini building custom cardboard wooden create super lego turn paracord chocolate your paper light intel