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.
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 the individual LEDs or small group of LEDs turn
on and off in a predetermined and repeating sequence, thus producing a visually attractive
display in which one or more ripple of light seem to repeatedly run through a chain or around a ring
of LEDs. In this tutorial, I'm going to create three chaser circuits using Arduino and 4017
decade counter. This video is sponsored by PCBWay. PCBWay specializes in manufacturing
of very high quality, low volume, colored PCBs at a very budgetary price. In addition to standard
PCBs, you can order advanced PCBs, aluminum PCBs, rigid flex PCBs. They also provide PCB assembly
and other related services which can meet your need at the greatest extent. Let's first create
the chaser circuit using the 4017 decade counter and 555 timer IC. For this bit we need two 4017
ICs, one 555 timer IC, one 10k potentiometer, one 1 kilo ohm resistor, 100 ohm resistor,
100 microfarad capacitor, 20 zener diodes and 10 red LEDs. The circuit is very simple. The 555
timer IC operates as a clock oscillator or clock generator. The output on pin number 3 goes high
causing a shift. The signal from the 555 IC clocks the 4017 decade counter. Output of 555 timer IC
on pin number 3 is given as an input to the 4017 IC through pin number 14. Whenever a pulse is
received at the clock input of IC 4017, the counter increments the count and activates the
corresponding output pin. This IC can count up to 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 220 ohm current limiting resistor to the cluster of LEDs. So this is how it looks like.
Now to give the forward and reverse effect, we are attaching another 4017 IC to the circuit.
If let's say the first IC connect from 1 to 10, then the second one should connect from 10 to 1.
However, now we cannot connect the counter ICs directly to the LEDs as we did before.
We have to use a diode to stop the reverse flow of current to the second IC.
We have also lowered the value of the current limiting resistor to 100 ohms as at a given time,
two LEDs will be on, one running from the left and another one from the right hand side.
So this is how my board looks like in 2D and 3D. There are three breakout boards in this 100cm by
100cm assembly. Once I had my design ready, I just had to upload the Gerber file to the PCBWay's
website and then select the type, color and any other customization that I want and then just
send it for fabrication. For my project, I chose the black color. PCBWay ships from China to most
of the countries of the world within 3 to 7 business days. Talking about the quality,
it's absolutely mind-blowing. Let's start by soldering the diodes to the board.
Then let's solder the two resistors to the board. After that, let's solder the 100uF capacitor to
the board. Frankly speaking, using SMDs would have given the board a smaller and neater look.
Next, I'm soldering the three IC bases to the board followed by plugging the ICs into them.
Now, let's solder the potentiometer and the male pin headers to the board. And to conclude,
let's solder the 10 LEDs to the board. Now let's do a quick test. By lowering the speed,
I can get the desired forward and reverse effect. By removing one of the 4017 ICs,
we can get the effect that I demonstrated in the previous example. To get a forward and reverse
effect using one 4017 IC, we need to connect eight diodes to the circuit. The first and the
sixth LED will be directly connected to the 4017 IC. The LEDs at the far end will get signals from
only one pin. However, the one in the middle will receive signals from two pins. And hence,
we need diodes to stop the reverse flow of the current. So, this is how it looks like.
Now, I'm going to repeat the same setup using an Arduino. For the Arduino bit we need,
one Arduino Uno Nano whatever is handy, one 220 ohm resistor, 10 red LEDs and 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'm going to use this simple setup
for the rest of the tutorial. 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 counter is reset
to 1 and the first LED lights up and the cycle continues. So, this is how it looks like.
The setup for the forward and reverse chaser is exactly 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 maximum count
is reached. So, this is how it looks like. Now, the setup for the left-right chaser is exactly
same as the previous two setups. This function is the one which turns on the LEDs at the two
far ends and then one before that and likewise until they cross each other. The counter is reset
when the maximum count is reached. So, this is how it looks like. Using a PCF8574 8-bit GPIO port
extender, we can add even more LEDs to the setup. PCF8574 becomes a lifesaver when you run out of
pins on your Arduino. The GPIO pin extender provides an additional 8 pins which can be
used to output a signal or read a signal as an input. These modules run on I2C bus and if daisy
chained, you can connect up to 8 of these devices in a project. Each device will give us an additional
8-bit 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. Thanks again for watching
this video. I hope it helps you. If you want to support me, you can subscribe to my channel and
watch my other videos. Thanks. See you again in my next video. Bye now.