Cascading 4017b

Thread Starter

Treeman

Joined May 22, 2014
157
Hello, I need a little help on a timer project that I am struggling with (see att.)
I have a 555 giving out a 1Hz clock feeding a 4017 with outputs on 8,9,10 (seconds). I was hoping to trigger a second 4017b from these sequential Q outputs on 4017 no 1. The output from the second 4017 will be on Q4 thru 9 and both 4017 (1) and (2) will feed the A and B input of an AND gate.
I was hoping the arrangement will give me an Output on 18,19,20 seconds and 28,29,30 seconds to be then repeated (probably by a third 4017 x amount of times).
There is no issue with my use of the first 4017 but I cant understand why I cannot trigger a second 4017 from the output (8,9,10) of the first 4017.

Any help demystifying would be gratefully received. Sorry for the incomplete 'schematic' its more a working (or non working) drawing!
Am I barking, up the wrong tree; or both?
Thanks.
 

Attachments

crutschow

Joined Mar 14, 2008
34,459
Will diodes not help this?
Yes, they will.

Note that the way you connected the transistors in series, they both have to be on for the LED to light.
I think you want the two transistors in parallel, or use one transistor with diodes on all outputs, or use an OR gate on all the outputs.
 

Thread Starter

Treeman

Joined May 22, 2014
157
Yes, they will.

Note that the way you connected the transistors in series, they both have to be on for the LED to light.
I think you want the two transistors in parallel, or use one transistor with diodes on all outputs, or use an OR gate on all the outputs.
Yes the transistors (apparently!) form an AND gate which means I get an output only when A and B are present which is what I was after. I'll try with the diodes and come back. Thanks.
 

Bernard

Joined Aug 7, 2008
5,784
Can you describe the end result that you require?
To cascade 4017's for a sequential count of 0 to 30 seconds will need 4- 4017's.
If trying to AND two different time groups you will never get an output.
 

Thread Starter

Treeman

Joined May 22, 2014
157
Can you describe the end result that you require?
To cascade 4017's for a sequential count of 0 to 30 seconds will need 4- 4017's.
If trying to AND two different time groups you will never get an output.
NB I have put indicator LED on Q outputs to check operation - this is not on my diagram.

I'm trying to make a timer that will output (say a buzzer) on 18,19,20 seconds and 28,29,30 seconds. My 'logic' tells me that tying led's to the first 4017 gives 3 seq. flashes (of course) and that I can use this as a clock trigger to the second 4017 that ignores the first pass of IC1 (Q8,9,10) by leaving IC2 Q1,2,3 open (or to ground for chip stability) and tying together IC2 (Q4 thru 0) Which will provide an output on (18,19,20,28,29,30) . The AND gate is my attempt to have the signal from IC1 and IC2 trigger the buzzer at the right time i.e. when a signal is present on both IC's.
I'm not seeing much relevance to my problem on searching the internet and not finding the datasheet too helpful either. This probably means that I am trying to use the chip in the wrong way.
Problems encountered so far:
1. When triggering IC2 from IC1 the indicator LEDs stop lighting on Q8,9,10 but current is still passed to IC2 ??? Baffled.
2. I think I need to sink the outputs on IC2 because the LEDs stay on too long.

I'm more of a beginner than when I first signed up here having been out of action for a year or so- feel free not to spare the rod and spoil the child. ; ) Its all good.
 

Bernard

Joined Aug 7, 2008
5,784
Maybe you could use 2 4017's, first counts 0-9, second uses first reset as clock for second which then counts 10- 90. OR 8 & 9 then AND with 10. AND 0 & 20, AND 8 or 9 with 20, AND 0 with 30. OR the 4 ANDs & should have an output at 18 or 19 or 20 or 28 or 29 or 30 sec. Do you want the cycle to repeat?
 

Dodgydave

Joined Jun 22, 2012
11,304
If your clocking the 4017 at 1hz, then the the first ic counter counts upto 10, the second counts from 10 to 100, only ONE output will be high on each counter,

so if your looking to count to say 35, you need your AND gate on the 5 on the first counter, and 3 on the second counter.
 

Thread Starter

Treeman

Joined May 22, 2014
157
If your clocking the 4017 at 1hz, then the the first ic counter counts upto 10, the second counts from 10 to 100, only ONE output will be high on each counter,

so if your looking to count to say 35, you need your AND gate on the 5 on the first counter, and 3 on the second counter.
Ok Dave. I've applied your principle and we are pretty close to what I want. There is an issue with the reset on 0 count one pass through but that could be used as a 10 second single warning beep maybe which is not such a bad compromise. I'll carry on playing draw up a schematic and come back. Many thanks.
 

Thread Starter

Treeman

Joined May 22, 2014
157
Maybe you could use 2 4017's, first counts 0-9, second uses first reset as clock for second which then counts 10- 90. OR 8 & 9 then AND with 10. AND 0 & 20, AND 8 or 9 with 20, AND 0 with 30. OR the 4 ANDs & should have an output at 18 or 19 or 20 or 28 or 29 or 30 sec. Do you want the cycle to repeat?
Sorry Bernard - I'm a bit confused by your text. As a lay guess I suppose OR is opposite to AND (seems likely!!) . I'll give it some thought and play and get back. Thanks for the input.
 

MCU88

Joined Mar 12, 2015
358
Sorry Bernard - I'm a bit confused by your text. As a lay guess I suppose OR is opposite to AND (seems likely!!) . I'll give it some thought and play and get back. Thanks for the input.
A good way to know and remember the difference between OR & AND is ...

OR = Any logic 1 gives an 1 at the output
AND = All logic 1 gives an 1 at the output

The inverse to OR & AND is NOR for OR and NAND for AND.

The 'N' denoting NOT.
 

Thread Starter

Treeman

Joined May 22, 2014
157
Ok. This is the schematic so far. It works nigh on perfectly. I want the timer to repeat 8 times and then stop so have added a 3rd 4017. A couple of requests for info please.
1. To what do I connect the input and output on IC3 in order for it to count and to what in order to stop?
2. Can I install a global reset switch (push button momentary I guess) in order to start the whole thing off from 0 each time?
3. Could I have done my schematic any better - its early days here!

Many thanks so far for all the input - I'm getting excited to get the soldering iron out but must be patient a little longer!
 

Attachments

Thread Starter

Treeman

Joined May 22, 2014
157
How amusing - I sent my schematic to the owner at another electronics site and he said " your circuit will never work, you cannot control one transistor with another". How come it is working then?!!! I must be so lucky, please forward all non working projects to my inbox for the fairy dust. A little knowledge is a dangerous thing unless its just the right bit of knowledge I suppose. LMS9O (laughing my size 9's (9.5's, 43's) off) here.
 

MCU88

Joined Mar 12, 2015
358
How amusing - I sent my schematic to the owner at another electronics site and he said " your circuit will never work, you cannot control one transistor with another". How come it is working then?!!! I must be so lucky, please forward all non working projects to my inbox for the fairy dust. A little knowledge is a dangerous thing unless its just the right bit of knowledge I suppose. LMS9O (laughing my size 9's (9.5's, 43's) off) here.
Just use an microcontroller bro. Gets messy using discrete ICs for something that has many specific requirements.
 

Thread Starter

Treeman

Joined May 22, 2014
157
Just use an microcontroller bro. Gets messy using discrete ICs for something that has many specific requirements.
I will be using a PIC eventually too but being very stubborn I'm learning quite a bit and am determined to do this 'old school' - I may need an A4 breadboard soon though!. The circuit works perfectly and I'm working on using 2 more 4017's for a sixteen count on the output to give 8 total passes. Then I just have to work out how to stop it all.
 

Thread Starter

Treeman

Joined May 22, 2014
157
Just use an microcontroller bro. Gets messy using discrete ICs for something that has many specific requirements.
Ok MCU88. You are quite correct. Triggering the other IC's is now causing problems elsewhere so I will say the project is finished and the operator can count to 8 and stop the timer manually. Shouldn't be too hard. Off to buy a PIC I suppose.
Very happy I got the project to work though so I will name it differently than I was going to and post up in the finished section when the PIC arrives. I have some code that someone on here wrote for me which I presume will work 'out of the box'.
Cheers AAC
 

MCU88

Joined Mar 12, 2015
358
Ok MCU88. You are quite correct. Triggering the other IC's is now causing problems elsewhere so I will say the project is finished and the operator can count to 8 and stop the timer manually. Shouldn't be too hard. Off to buy a PIC I suppose.
Very happy I got the project to work though so I will name it differently than I was going to and post up in the finished section when the PIC arrives. I have some code that someone on here wrote for me which I presume will work 'out of the box'.
Cheers AAC
I'll write you some code. C code. Just in dot point form steps write out the requirements clearly. Must have clarity. Dot-point form steps to decompose the problem and a paragraph or two for conclusions.
 

Thread Starter

Treeman

Joined May 22, 2014
157
I'll write you some code. C code. Just in dot point form steps write out the requirements clearly. Must have clarity. Dot-point form steps to decompose the problem and a paragraph or two for conclusions.
Cool, what PIC should I buy (no smt) - will have to do a bit of reading on PIC . Popping out now back later.
 

MCU88

Joined Mar 12, 2015
358
Cool, what PIC should I buy (no smt) - will have to do a bit of reading on PIC . Popping out now back later.
Get the 16F628a for like about one-dollar on eBay if you buy 10 pcs or more. Buy the K150 PIC programmer. And download the MikroC compiler demo version which will allow you to code up to 2KB.

To make sure you have everything up and running, just first start by flashing an LED. I'll give you code for this shortly.
 
Top