Multiplexing Stamp outputs with a 4017 Decade Counter

The 4017 decaed counter is a very useful chip. It can be used for multiplexing a stamp output, sequencinga series of events, and many other things a creative mind can come up with.

4017 OPERATION

The 4017 operates very simply. For each pulse on the clock input pin is turns the currently high out put low and makes the next out put high. When the 10th Output is high and a pulse is received, the 10th output goes low and the 1st output goes high and the sequence begins again. The 4017 also has two other inputs. The first in a Reset Pin. On a rising edge this resets the 4017 to the first output. The last input is a disable pin, labeled as an enable pin with a circle on the input (the dot means ‘not’). When this pin is high the 4017 will not advance to the next out put but the reset pin is still active.

The 4017 has 11 outputs. There are the regular 10 outputs and a carry out that outputs a pulse when 10 is the current high output and a pulse on the clock pin is received.

If your application requires counting to a number less than 10, you can feed the first unused output in to the reset pin. (ie. If counting to 7 feed the 8th output into the reset pin)

WIRING NOTES AND SUGGESTIONS

The pins I call outputs 1-10 are usually labeled 0-9.

There are a number of things you can do to make things work better. First place a capacitor across the power and ground leads of the chip as close to the chip as you can. (You should do this with every chip you use.) Tie all unused inputs to ground. Connect all used inputs to ground with a 4.7k_ resistor. This will keep the chip from doing strange things if a signal lead get disconnected. If which output is on at a giving time is important, you should send a reset signal to the stamp when the first output should be high. This will do nothing if the first output is high and it will make the first output high if the count has gone wrong for some reason. If you are counting to a number less than 10 and sending a reset from the stamp, you should use an OR gate to combine the signals before the Reset pin.

 

 

 

OUTPUTS

The 4017 decade counter provides a logic level output. This can be used in a number of ways.

Using AND gates the output can be combined with another signal, such as a stamp output, to drive only one device at a time.

If you are driving a large load such that you do not want to build or buy multiple drivers, (For example you want to sequence a bunch of lights that are all dimmed with a dimmer.) you can drive relays with the output of 4017 and the relays connect the device to the driver.

COMMENTS AND IDEAS

The uses of the 4017 are endless.

If you do not want to drive the clock signal with the stamp you can use a 555 timer.

A random number generator: Run the clock input off of a 555 timer at a fast rate. Have the stamp stop the counter by using the Disable/Enable pin.

Sequence a set of animated lights. Use different strings of christmas tree lights to make the different page of a flip book animation. Use the 4017 to turn on only one string of lights at a time to animate the image.