A Chaser Circuit consists of a clocked IC or other electronic unit like an Arduino that drives an array of LEDs in such a way that individual LEDs (or small groups of LEDs) turn on and off in a predetermined and repeating sequence, thus producing a visually attractive display in which one or more ripples of light seem to repeatedly run through a chain or around a ring of LEDs.
In this tutorial I am going to create 3 chaser circuits using Arduino and IC4017 decade counter.
Step 1: Using IC555 and IC4017 : Components Required
Lets first create the chaser circuit using the IC4017 decade counter and IC555 timer IC.
For the Non-Arduino bit we need:
- 2 x 4017 Decade Counter IC
- 1 x 555 Timer IC
- 1 x 10 K Potentiometer
- 1 x 1 Kilo Ohm Resistor
- 1 x 100 Ohm Resistor
- 1 x 100 MFD Capacitor
- 20 x Zener Diodes and
- 10 x Red LEDs
Step 2: 1. Forward Chaser
The circuit is very simple.
The 555 Timer IC operates as a clock oscillator or clock generator. The output on PIN-3 goes high causing a shift. The signal from the 555 IC clocks the 4017 decade counter. Output of 555 timer IC on PIN-3 is given as an input to 4017 IC through PIN-14. Whenever a pulse is received at the input of IC 4017, the counter increments the count and activates the corresponding output PIN. This IC can count upto 10, so we have attached 10 LEDs to the circuit. By increasing or decreasing the value of resistance of the 10K pot we can adjust the speed of the chaser circuit. Since only one LED will be turned on at a given time, I have attached just one 220ohm current limiting resistor to the cluster of LEDs.
Step 3: 2. Forward Reverse Chaser Using 2 X IC4017
Now, to give the forward and reverse effect we are attaching another 4017 IC to this circuit. If lets say the 1st IC connects from 1 to 10 (left to right) then the second one should connect from 10 to 1 (right to left). However, now we cannot connect the counter ICs directly to the LEDs as we did before. We have to use Diodes to stop the reverse flow of current to the 2nd IC.
We have also lowered the value of the current limiting resistor to 100ohms as at a given time 2 LEDs will be on, one running from left and one from the right hand side.
Step 4: 3. Forward Reverse Chaser Using 1 X IC4017
To get a forward reverse effect using one 4017 IC we need to connect 8 diodes to the circuit. The 1st and the 6th LED will be directly connected to the IC4017. The LEDs at the far end will get signals from only one pin however the one in the middle will receive signals from 2 x pins and hence we need diodes to stop the reverse flow of the current.
Step 5: Components Required : Using Arduino
Now, I am going to repeat the same setup using an Arduino.
For the Arduino bit we need:
- 1 x Arduino Uno/Nano (whatever is handy)
- 1 x 220 Ohm Resistor
- 10 x Red LEDs
- Few Connecting Cables
The beauty of using an Arduino is that the setup remains the same for all the previously shown circuits, the only thing that changes is the code. So, I am going to use this simple setup for the rest of the tutorial.
Step 7: 1. Forward Chaser
Code: The code for the forward chaser is very simple. Start by defining the constants and the global variables that will be used throughout the code.
Then in the setup section define the pin modes. Now, in the loop section we are going to start by turning off all the LEDs followed by turning one LED on at a time. A counter is used to tell the loop which LED to turn on in the next cycle. Once the value of the counter reaches 10 (the maximum number of LEDs) the counter resets to 1 and the 1st LED lights up and the cycle continues.
Step 8: 2. Forward Reverse Chaser
Code: The code is same as the previous setup. The only thing that changes is the function that deals with the LEDs. In this setup we cycle through LED 1 to LED 10 and then reverse from LED 9 to LED 1. The counter resets when the max count is reached.
Step 9: 3. Left-Right Chaser
Code: The setup is exactly the same as the previous two setups. This function is the one which turns on the LEDs at the two far ends and then the one before that and likewise until they cross each other. The counter is reset when the max count is reached.
Step 10: PCF8574 8-bit GPIO Port Extender
Using a PCF8574 8-bit GPIO Port Extender we can add even more LEDs to this setup.
PCF8574 becomes a life saver when you run out of pins on your Arduino. This “GPIO (General Purpose Input Output) pin extender” provides an additional 8 pins (P0 ~ P7) which can be used to ‘output a signal’ or ‘read a signal as an input’. These modules run on the I2C bus, and if daisy-chained you can connect upto 8 of these devices in a project. Each device will give us an additional 8-bits of GPIO enabling 64 GPIOs in total.
To know more about this IC please check out my tutorial number 10 : “PCF8574 GPIO Extender – With Arduino and NodeMCU”.
Step 11: Thanks
2. Forward Reverse: https://drive.google.com/file/d/1bw1la5oRMWZRXsfY…
3. Left Right: https://drive.google.com/file/d/1bw1la5oRMWZRXsfY…
1. With Arduino: https://drive.google.com/file/d/1bw1la5oRMWZRXsfY…
2. Without Arduino: https://drive.google.com/file/d/1bw1la5oRMWZRXsfY…