4017 Counter: How to count to 20 - Page 1
Forum section: electronics / projects

author: Shark Bate
author_rank: Newbie
timestamp: June 06, 2014, 01:44:18 am
content: How can I light 20 led's in a row using the 4017 decade counter. I tried using 2 of these IC's, and 555 for clock.I know that you can cascade the two IC's and get the led' to light such that first all the led's connected to the output of 1st IC lights then a carry is sent to the 2nd IC and then counting repeats.I am looking for a way to light 20 (or more) led's in a row one by one individually.I also tried using transistors to switch between the two IC's so that only one will be active at one time, but it didn't work.Any ideas???

author: vk6zgo
author_rank: Super Contributor
timestamp: June 06, 2014, 03:18:52 am
content: I did something like that years ago,& from memory,I used NAND gates to do the change over from the first 4017 & the next.What you need to do to get a feeling for what you are trying to do, is to draw up diagrams showing the states of each device at different times.It's not really hard,just time consuming.

author: zapta
author_rank: Super Contributor
timestamp: June 06, 2014, 03:37:27 am
content: You can connect the led as a matrix of 10 x 2. Use one 4017 counter and for the columns and a flip flop for the row. Have the flip flop toggling state whenever the 4017 completes a cycle.

author: vk6zgo
author_rank: Super Contributor
timestamp: June 06, 2014, 04:56:35 am
content: Elegant!---I wish I'd thought of that back in the 1980s when I had to make something like the OP's gadget.

author: fcb
author_rank: Super Contributor
timestamp: June 06, 2014, 08:33:22 am
content: Quote from: zapta on June 06, 2014, 03:37:27 am+1 for neat solution zapta.

author: dannyf
author_rank: Super Contributor
timestamp: June 06, 2014, 11:35:13 am
content: Tie the 10 leds from Q0..9 to the carry pin (via a transistor -> creating an inverse of the carry signal) and tie the other 10 leds from the same Q0..9 to the collector of the 1st transistor (via another transistor -> effectively creating the carry signal).The two sets of leds will count alternately and you use only one 4017.

author: FrankBuss
author_rank: Unknown
timestamp: June 06, 2014, 12:14:32 pm
content: Quote from: dannyf on June 06, 2014, 11:35:13 amThe carry pin is high for the first 5 outputs and low for the second 5 outputs.

author: Shark Bate
author_rank: Newbie
timestamp: June 06, 2014, 01:43:18 pm
content: Thanks guys,I'll try using the flip flops.

author: Zero999
author_rank: Super Contributor
timestamp: June 06, 2014, 06:22:57 pm
content: Quote from: zapta on June 06, 2014, 03:37:27 amYes, that will work.If you're using an oscillator to drive the CD4017, you could use the other flip-flop in the CD4013 to make an astable, thus saving parts.

author: zapta
author_rank: Super Contributor
timestamp: June 06, 2014, 06:45:40 pm
content: Quote from: Hero999 on June 06, 2014, 06:22:57 pmNever seen such arrangement before, reminds me oscillators with an inverting Schmidt trigger, a resistor and a capacitor. Can this circuit have time periods where both R and S are asserted? What happens then, is it dependent on the specific behavior of the flip flop when both are asserted?

author: Zero999
author_rank: Super Contributor
timestamp: June 06, 2014, 10:09:09 pm
content: Quote from: zapta on June 06, 2014, 06:45:40 pmWhat do you mean by both R and S are asserted?It's used as an RS flip-flop as the D and clock inputs are connected to 0. When power is applied, one of the outputs will be high and the other low. Say Q is high and Q' low, C1 will charge, via R1, until the voltage is high enough to trigger the R input on the flip-flop, causing Q to go low and Q' to go high, C1 now discharges through R1, as C2 is discharging through R2, until the voltage is high enough to trigger the S input and the cycle repeats indefinitely.I've built the circuit with the CD4013 and it works quite well.