I've did a previous project also with 4017 chips, and it worked fine. The clock input was provided with a 555-timer setup. But now I want to use a "human-controlled" pulse switch to supply the clock input.
I've created a very small test scheme. Just connect pin 8 to ground and pin 16 to the positive pole of the accumulator, connect pin 3 (output 0) to a 5V LED (in series with a 680Ω res, because my accumulator has 12V), and connected the clock-inhibit to ground. The pulse switch is located between the positive pole of my accumulator and pin 14 (clock input)
When I turn the whole thing on, the LED burns (ofc, since pin 0 is on when you switch the 4017 chip on). But my clock signal doesn't do anything. Does anyone know why?
Yes, you need a pull-down resistor (~10K) on the Clock input. When the switch is open, the Clock input is floating, acting as an antenna, picking up 50/60cycles, causing the counter to count spuriously.
After you put in the resistor, the counter will remain static between button pushes. However, I predict you will have another problem; namely multiple counts each time you press the button. I have a solution for that, so write back.
Well I've tried several attempts, a capacitor with a resistor in series connected from pin 14 to pin 8, a resistor by itself, a capacitor (I've tried different values), but still nothing happens when I press the switch (switch is OK by the way).
But why would the counter count multiple times every time I press the button? I thought the counter only counts when a low (or no) charge changes into a large charge.
I've tried different combinations of the parts in the red circle (no components (just wire), only the capacitor, a 10 uF capacitor, only the resistor etc.)
This is exactly how I made it in my previous project, except the pulse isn't coming from a 555 timer, but from the pulse switch.
What do you mean?
I assume you mean I've got to connect a 47 uF capacitor bypassing the switch and the 4017 chip (so just connect that capacitor from the + pole to the - pole of the accumulator). Well, I've tried that, no success. The 4017 chip still maintains it's current only over pin 3 (0). No matter how fast / slow I click (and yes I know it's got nothing to do with that ).
There are various ways to do it. One simple way is to use a one shot multi-vibrator (74hc123). I just talked to another guy about them. You can also use some series resistance in the switch and a capacitor to ground to dampen the waves. If you create a time constant that is longer than the number of bounces coming off the switch you will have it licked although still may occur sporadically. A '123 will cure it. That's just a throw back to using analog switches. They bounce. You could also make a transistor switch with an RC time constant. Active switches are cleaner.
Ok well I don't really understand stuff like 74hc123 etc, but I'll look it up. Still, I can't understand how my switch is the cause of errors, I mean, if I don't press it the voltage should be 0 and when I press it, it should produce a square wave, right to 12V. From my point of view, that is.
But, apparently this is not the case but it produces a sort of bouncy wave-form which the count-pin contact on the 4017 chip cannot respond to?
I hope I understand this correctly, then at least I'm also convinced the bouncy wave-form of my (physical) pulse-switch is the cause.
Ok I've looked up the 74hc123, but really don't understand much about it. I'm dutch, so my english is not perfect in the electronics-area.
If not too much work, could you / someone else please give me an example-drawing on how to link a switch, through a debouncer to the clock input of a 4017 chip, so that it will work?
I've tried different combinations of the parts in the red circle (no components (just wire), only the capacitor, a 10 uF capacitor, only the resistor etc.)
This is exactly how I made it in my previous project, except the pulse isn't coming from a 555 timer, but from the pulse switch.
Three things will make it count: Tie Reset (pin 15) to ground. Tie CountEnable (pin 13) to ground. Tie a 10K resistor from Clock (pin 14) to ground. Now try pulsing the switch.
After you get it counting, we will talk about "switch debouncing"
Maybe I'm not understanding you. Is what you are saying is: You press the button (switch) once and it counts multiple times? If so that sounds like switch bounce. Did you get the clock working?
Ok I did exactly as you said. Now I've got the same result as when I started this project. The LED flickers constantly (btw, I didn't had a 10k resistor, so I used a 22k, but that shouldn't make too much difference in the principle), and when I hold down the switch the LED stops flickering. After 10 clicks, the LED stays ON while I press down the switch (well, obviously it is "counting", but also flickering at about 5 Hz constantly while I'm NOT pressing the switch at all).
Well, with the scheme posted, it doesn't count anything at all. Clock is -sort of- working, but it's not working like a 4017 should, where a selected output stays on until a trigger is given.
OK you have forced my hand. I;m pulling down date sheet now. Oh, this is a decade counter? I just did a design using the 74hc390 also a decade counter.
Yeah, the 4017 is a decade counter Though it wouldn't matter for which IC the generated pulse is imo. My testing principle is simple. With the current on, the LED on pin 3 should be on. When I press my switch, the decade counter should swith to pin 2, so the LED would turn off. Simple as that. Still not happening though.
Yes, of couse I've tested the LED's aside from the 4017 setup. In series with a 680 ohm resistor hooked up to my battery, nothing else -> the LED just stays on normally.
OK for one thing you need to tie the other clock to it's inactive state. So it looks like your using pin 14 which is the positive clock, so tie pin 13 high. Yes, debounce pin 14!
Yeah, the 4017 is a decade counter Though it wouldn't matter for which IC the generated pulse is imo. My testing principle is simple. With the current on, the LED on pin 3 should be on. When I press my switch, the decade counter should swith to pin 2, so the LED would turn off. Simple as that. Still not happening though.
There is absolutely no guarantee as to which state the 4017 will power up in. It is just as likely to come up in state 1 as in state 0, so it would take 9 pushes of the Switch (assuming it is de-bounced) to light the LED. If the switch is bouncing (99.9% probability), you could push the switch hundreds of times without ever seeing the LED flash.