LED CHASER

Hello everybody! I’m back with another instructable about making an LED Chaser. This is the circuit of a simple LED chaser. The LEDs lights one by one for a period of 1 second and the cycle repeats giving the running light appearance. So let’s get started!

OVERVIEW

This led chaser or sequencer is one of the most popular types of LED-driving circuit.

 

DETAILS 

The led chaser consist of many LEDs programmed with the arduino in such a way that individual LEDs (or small groups of LEDs) turn on and turn off in a predetermined and repeating sequence,thus producing a visually attractive display in which one or more  lights seem to repeatedly run through a chain or around a ring of LEDs.

 How It Works

The LEDs individually turn on and off according to the time interval set.

  1. Take 10 resistors of 220 ohm each.
  1. Take 10 LEDs of different colors.
  1. Connect the cathode end of all LEDs to the GND pin of Arduino.
  1. Connect the anode pin of all LEDs with each resistor connected to the end.
  1. Now connect the resistors end to pin 2,3,5,6,7,8,9,10,11,12 of the Arduino.
  1. Do connections same as circuit diagram.

Your LED chaser is ready…

You can make your own LED dancing circuit by just improving the code.

Components

FRITZ

 

 CODE

int pinsCount=10;                        // declaring the integer variable pinsCount
int pins[] = {2,3,5,6,7,8,9,10,11,12};          // declaring the array pins[]
 
void setup() {                
  for (int i=0; i<pinsCount; i=i+1){    // counting the variable i from 0 to 9
    pinMode(pins[i], OUTPUT);            // initialising the pin at index i of the array of pins as OUTPUT
  }
}
 
void loop() {
  for (int i=0; i<pinsCount; i=i+1){    // chasing right
    digitalWrite(pins[i], HIGH);         // switching the LED at index i on
    delay(100);                          // stopping the program for 100 milliseconds
    digitalWrite(pins[i], LOW);          // switching the LED at index i off
  }
  for (int i=pinsCount-1; i>0; i=i-1){   // chasing left (except the outer leds)
    digitalWrite(pins[i], HIGH);         // switching the LED at index i on
    delay(100);                          // stopping the program for 100 milliseconds
    digitalWrite(pins[i], LOW);          // switching the LED at index i off
  }
  
}

 

 

PROJECT IMAGE

 

CONCLUSION

We hope you enjoyed the tutorial and this little lesson will purport you into great levels. Enjoy yourself in electronics. For more tutorials and questions, please leave your comments in the comment area. See other components on the site www.inventelectronics.com. Inspiring ingenuity.

0 0 vote
Article Rating
0
Would love your thoughts, please comment.x
()
x