Cascading 4017b

Discussion in 'The Projects Forum' started by Treeman, Mar 11, 2015.

  1. Treeman

    Thread Starter Member

    May 22, 2014
    158
    15
    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.
     
  2. crutschow

    Expert

    Mar 14, 2008
    13,018
    3,235
    You cannot parallel the outputs.
    They will fight each other when one is high and the others are low.
     
  3. Treeman

    Thread Starter Member

    May 22, 2014
    158
    15
    Will diodes not help this?
     
  4. crutschow

    Expert

    Mar 14, 2008
    13,018
    3,235
    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.
     
  5. Treeman

    Thread Starter Member

    May 22, 2014
    158
    15
    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.
     
  6. Bernard

    AAC Fanatic!

    Aug 7, 2008
    4,173
    397
    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.
     
  7. Treeman

    Thread Starter Member

    May 22, 2014
    158
    15
    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.
     
  8. Bernard

    AAC Fanatic!

    Aug 7, 2008
    4,173
    397
    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?
     
  9. Dodgydave

    Distinguished Member

    Jun 22, 2012
    4,995
    745
    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.
     
    Treeman likes this.
  10. Treeman

    Thread Starter Member

    May 22, 2014
    158
    15
    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.
     
  11. Treeman

    Thread Starter Member

    May 22, 2014
    158
    15
    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.
     
  12. MCU88

    Member

    Mar 12, 2015
    360
    35
    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.
     
    Treeman likes this.
  13. Treeman

    Thread Starter Member

    May 22, 2014
    158
    15
    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!
     
  14. Treeman

    Thread Starter Member

    May 22, 2014
    158
    15
    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.
     
  15. MCU88

    Member

    Mar 12, 2015
    360
    35
    Just use an microcontroller bro. Gets messy using discrete ICs for something that has many specific requirements.
     
  16. Treeman

    Thread Starter Member

    May 22, 2014
    158
    15
    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.
     
    Dodgydave likes this.
  17. Treeman

    Thread Starter Member

    May 22, 2014
    158
    15
    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
     
  18. MCU88

    Member

    Mar 12, 2015
    360
    35
    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.
     
  19. Treeman

    Thread Starter Member

    May 22, 2014
    158
    15
    Cool, what PIC should I buy (no smt) - will have to do a bit of reading on PIC . Popping out now back later.
     
  20. MCU88

    Member

    Mar 12, 2015
    360
    35
    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.
     
Loading...