loading

A problem with 4017 decade counter

Hello. I've tried to build a very simple LED chaser (started out with only 3 LEDs) using 4017 IC, but I can't make it work properly. Instead of switching LEDs on and off one after another the circuit only turns on the LED tied to Q0 when clock signal is high. As soon as the clock signal goes low, the LED goes off, and the others sometimes flicker very dimly for a split second. Turning the clock signal back to high LED tied to Q0 is lit again. I believe everything is set up correctly: pin 16 is connected to +, 15 (the reset pin) to pin 7 (Q3), 14 to + through a 1k resistor and to - through a switch (thus manually generating clock signal), 13 and 8 are grounded, and pins 3, 2 and 4 (Q0, Q1 and Q2 respectively) are connected to LEDs. The components are placed on a breadboard. Have I connected something wrongly or could it be the chip malfunctioning? Thanks in advance.

sort by: active | newest | oldest
iceng3 years ago
Have you tried another 4017 ?
Bozho (author)  iceng3 years ago
I haven't yet. I'll get another one in couple of days and try it.
Bozho (author) 3 years ago
I've solved the issue. As iceng suggested, the problem was with the 4017 which was bought with a flaw. I put another chip in its place, and it works well. Thanks to everyone who gave their suggestion to help me solve the problem. The thread can be locked.
iceng3 years ago
Here is what I have gathered from this thread thus far...
your-4017.jpg
Bozho (author)  iceng3 years ago
Exactly. That's what the circuit looks like, and it should be functioning according to the function table. But instead of the count advancing when CP0 goes from LOW to HIGH and keeping the previous state in other cases it just turns on the Q0 LED when CP0 is HIGH and turns it off when CP0 is LOW. It does not affect the other LEDs at all (except for a slight flickering but that disappears when a capacitor is tied in parallel with the switch).
iceng Bozho3 years ago
Here I made your circuit and a video of it running.

No Capacitors at all ..... and a 10" antenna wire as a clock

occasionally touching it plus or ground to freeze the clock

iceng iceng3 years ago
Well yes a DC supply electrolytic but no film or ceramic noise killers caps.

And much worse than a bouncy switch or a steady 555 timer ... here we are

using a most horrible noisy clock .... THE 10" WIRE ANTENNA

Don't you hate when iPhone cuts your video in mid-word
Bozho (author)  iceng3 years ago
Thanks a lot for putting this much effort into solving this problem. So then I can definitely assume that it's a problem with my 4017 chip?
iceng Bozho3 years ago
Your welcome and Yea, that was my initial suspicion ....
The 017 is a great chip when it works.

The only remote possibility is if your LED resistor is too low
and drawing excessive current which can upset an 017.

I hope this warrants a best answer..

A
Nice video iceng it really demonstrates its function and what can happen with a noisy clock.

I was wondering, which 4017 did you use?

Joe
Bozho (author)  Josehf Murchison3 years ago
It's CD4017BE
Good it is the one most commonly used, there are an easy dozen different 4017s and the only thing that is the same between them is the truth table.

I just asked because sometimes a supplier substitutes a part and tells you they work the same and although the truth table is the same the ICs react differently.

An example is a CD4017BE supply voltage is 3 to 15 volts and a CD74HC4017s supply voltage is 2 to 6 volts and they both have the same truth table.

Joe
Bozho (author)  Josehf Murchison3 years ago
It must be the faulty chip, because when pin 14 goes LOW it completely stops working instead of maintaining the previous state. I'll borrow another chip from a friend tomorrow and see if it works.
Good Luck

Remember to get extra call it the rule of 5.

1 for testing
1 to designing
1 to blow
1 to build
and 1 for just in case

Joe
+1
I wanted 2 and I ordered 10 PIC16F84 from Mouser rule of 5 x2 and I saved almost 10 dollars if I bought them one IC at a time.

If I blow one or it was trash to begin with it doesn’t stop me from completing my project.

Joe
Bozho (author)  Josehf Murchison3 years ago
Thank you, I'll keep that rule in mind.
Yes it is only 2 - 6 VDC  it does need noise kill caps ( NKC ) on its terminals..

because the HC parts are  so  very  blazzing  Ffaaaaaassssst .  .  .  . . . ...........___

And they can take chunks out ( put holes ) in the Vcc.
iceng Bozho3 years ago
Yes
Bozho (author)  iceng3 years ago
I'll get a new chip tomorrow and see what happens. Meanwhile I'll try different values of resistances to see if there's any change in reaction.
AndyGadget3 years ago
 
Have you got decoupling capacitors in your circuit?
(0.1uF across V+ and 0V as close as possible to each chip.)

@author:
http://www.bowdenshobbycircuits.info/page5.htm#4017-2.gif

Does the circuit match this? I've built it up and it works great with or without the transistors, but without you need to limit the current quite low or risk blowing up the 4017.
Bozho (author)  frollard3 years ago
The setting on the 555 is different, but when I test the pulse it makes, it seems to be fine, so it's not the problem. The rest is, excluding the transistors, the same. Off topic, how does the capacitor on this schematic discharge? Shouldn't it be connected to pin 7 of 555? And why is pin 3 connected to 6 and 2 with a 47k resistor?
frollard Bozho3 years ago
the cap charges and discharges internally through the 555 timer in astable mode. I'd have to look it up exactly but that design as linked definitely works. If wired exactly like that and you still get flicker then your 4017 is probably toast.
Bozho (author)  frollard3 years ago
I solved the problem with the flickering by connecting a capacitor in parallel with the switch, but the chip is still not responding properly to the clock signal. I reckon it's the internal problem with the 4017 since iceng here made the same circuit and it worked fine.
Bozho (author)  AndyGadget3 years ago
I tried tying a 0.1uF capacitor to pin 16 and 8 (+ and ground) of the chip but nothing changed. Then I tied the same capacitor parallel with the switch, and the flickering is gone, but the rest is still the same. The chip doesn't turn on the other LEDs.
If you are using a push button you may need a one shot.
Bozho (author)  Josehf Murchison3 years ago
I tried both push button and toggle switch. The effect's the same. I'm starting to believe that it's definitely a faulty 4017 that's causing the troubles.
Push buttons and toggles don’t give a clean signal you need a one shot even if you use a new 4017, try this one.
Remote C 3c.bmp
Bozho (author)  Josehf Murchison3 years ago
I could try it, but I doubt it would help since I've already cancelled the noise with a capacitor or by using 555 timer. And iceng posted the video of the same circuit with a very noisy clock generator (a 10 inch wire) and it works just fine (at least way better than mine).
framistan3 years ago
My old notes on this chip say, "pin 15 must be held low for count to resume. Make the RS (reset) pin 15, HIGH to reset and LOW for count to resume. Also, Steveastrouk is right about switch bounce. Your manual switch will send MULTIPLE pulses each keypress and the led's will not light in sequence, but jump-around lit randomly. You may need to wire up a 555 timer as a ONE-PULSE generator each time the pushbutton is pushed. This eliminates the KEYBOUNCE of a manual switch.
Bozho (author)  framistan3 years ago
I connected reset pin to Q3 pin, so that the chip would start counting from the beginning once the third LED goes off (tied to Q2). I also tried grounding the reset pin, but the effect is the same. I've already used 555 in astable mode as a clock pulse generator, but I haven't tried it as a one pulse generator. I'll give it a go, and see what happens.
Its noise. the switch you're using is bouncing and making extra clock pulses. The LEDs will need a current limiting resistor, or you'll damage the chip. Take the common ground end of all the LEDs and pass it through a resistor to suit the supply volts.
Bozho (author)  steveastrouk3 years ago
The LEDs are all tied to a common ground through a 220 ohm resistor, I forgot to mention that. The same thing happens when I generate clock signal from a 555 timer. So what should I do to cancel the noise? Thanks a lot.