Cascading 4017's question

Thread Starter

Otaku

Joined Nov 19, 2008
128
Hi all,
I need to cascade a pair of 4017's for use in a test fixture, and I found this schematic in another thread:


I see that there is an AND gate between the 4017 circuits, but I'm not sure which one to use for this application.
I'll be cascading two 4017's. The supply voltage for the 4017's will be 12VDC. Could someone help me out with a part number for the AND gate? All advice is much appreciated!
 
Last edited:

SgtWookie

Joined Jul 17, 2007
22,230
A 4081 is a quad 2-input AND gate, which would be suitable.

You could also use two gates from a 4093 quad Schmitt-trigger NAND gate; use one with both inputs tied together as an inverter to change the NAND function to AND.

You could also use transistors and resistors: http://hyperphysics.phy-astr.gsu.edu/hbase/electronic/trangate.html

Note that you will need to connect any unused INPUTS to Vdd or GND, otherwise the IC may oscillate at high frequencies.

Also see the bypass capacitor "sticky" thread in General Electronics Discussion forum.
 

Thread Starter

Otaku

Joined Nov 19, 2008
128
Thanks very much, Sgt W. I checked the datasheet for the 4081 and I see what I need to do. Thanks also for the advice on unused outputs - I'll be using just one of outputs so there will be unused pins.
 

SgtWookie

Joined Jul 17, 2007
22,230
I checked the datasheet for the 4081 and I see what I need to do. Thanks also for the advice on unused outputs - I'll be using just one of outputs so there will be unused pins.
Please re-read what I wrote - it is the unused INPUTS that need to be connected to Vdd or GND. Leave unused OUTPUTS disconnected. If you connect the unused OUTPUTS to Vdd/GND, you may burn up the IC.
 

Thread Starter

Otaku

Joined Nov 19, 2008
128
Please re-read what I wrote - it is the unused INPUTS that need to be connected to Vdd or GND. Leave unused OUTPUTS disconnected. If you connect the unused OUTPUTS to Vdd/GND, you may burn up the IC.
SgtW - thanks for catching that error - I had it backwards. A couple of other questions come to mind -
In the schematic I posted, I see that Q0 on the left-hand 4017 is connected to the RESET on the right-hand 4017. Is this Q0 dedicated to the RESET or can it also be used as an output?
On the right-hand 4017, there is no Q0 shown. Is this output disabled or can it be used? Thanks again for the help.
 

SgtWookie

Joined Jul 17, 2007
22,230
SgtW - thanks for catching that error - I had it backwards.
That's what we're here for. ;)

A couple of other questions come to mind -
In the schematic I posted, I see that Q0 on the left-hand 4017 is connected to the RESET on the right-hand 4017. Is this Q0 dedicated to the RESET or can it also be used as an output?
It is both the RESET for the right-hand 4017, and an output.

Don't expect it to source or sink more than ~4mA current, or you may prevent it from resetting the right-hand 4017; as it may not be able to reach the appropriate logic level.

On the right-hand 4017, there is no Q0 shown. Is this output disabled or can it be used?
On the right-hand 4017, Q0 will be at a logic 1 while any of the left-hand 4017's Q0 through Q8 are a logic 1.
 

Thread Starter

Otaku

Joined Nov 19, 2008
128
Understood. Thanks, SgtWookie. Since I'll have several unused outputs on the right-hand 4017 board, I think I'll play it safe and dedicate the left-hand Q0 as the reset.
 

Thread Starter

Otaku

Joined Nov 19, 2008
128
OK, so I wired everything per the schematic in the first post in this thread, two 4017 boards with a 4081 AND gate. While the second board (the one shown as the right-hand board in the schematic I used) does start up correctly, the output times are very short - ~500 msec compared to ~3 seconds on the left-hand board. There must be a reason for this, but I don't have the expertise to see it. Any advice would be appreciated. Thanks!
 

SgtWookie

Joined Jul 17, 2007
22,230
Do you have 100nF/0.1uF metal poly film or ceramic bypass caps on ALL of your ICs? If not, that is likely your problem. See the "Decoupling/Bypass capacitor" sticky in the General Electronic Chat forum. This will "bite" you if you do not read/heed/follow.

It would help a great deal if you would post your complete schematic, too.
 

Thread Starter

Otaku

Joined Nov 19, 2008
128
Boy, do I have noob written all over my face. I will add the caps to the circuits and let you know what changes. Thanks again for the pointers.
Regarding the schematic, I've been trying to use the LED chaser kit pictured here:



It's really bare-bones, but I can add the required caps where needed. If the configuration of this board will require heavy mods, I may just go ahead and build the 4017 circuits on prototype boards.
 

Thread Starter

Otaku

Joined Nov 19, 2008
128
Hi all,
So, I wired my two 4017's per the attached schematic:



However, there is a problem with the output sequencing. The left-hand 4017 doesn't always start on Q1 (the left-hand Q0 is dedicated to the Reset pin on the right-hand 4017) nor do the outputs always run in sequence. I only need 4 of the outputs on the right-hand 4017 (for a total of 12 outputs), so I have its Q5 connected to the Reset on the left-hand 4017. Apologies for not posting a schematic, but with the exception of substituting the right-hand Q9 for Q5 in the above drawing, my board is wired exactly as shown. Any ideas as to why this is happening?

Note - after posting this, I find that the attachment doesn't display unless you click on it.

Edit - For convenience, some of the 4017 output wires (both left and right-hand IC's) are run underneath the IC's, on the opposite side of the board. Could this be causing interference that would result in the random output sequences I described?
The 4017's and the 4081 AND gate are powered by regulated 12VDC, 1A. I'm using the 4017's to power 12VDC relays with coil resistance ~690 ohms. I added 0.1 uF ceramic bypass caps to each IC's supply voltage per SgtWookie's suggestion.
 
Last edited:

Thread Starter

Otaku

Joined Nov 19, 2008
128
I took another look at the board, and realized I don't have 1N4148 diodes on the relay coils. I'll install these and post the results.
 

Thread Starter

Otaku

Joined Nov 19, 2008
128
OK, the diodes are installed (which is a good idea in any case), but no change in the behavior of the 4017's. I posted a question back in 2009 about LED chaser boards starting on random outputs and got this reply from Audioguru:

"The 4017 starts at a random count when power is applied unless it is reset.
Pin 15 is the reset pin. Connect a 0.1uF capacitor from pin 15 to the positive supply. Connect a 100k to 1M resistor from pin 15 to ground. Then when power is applied, the capacitor is discharged and makes pin 15 high which resets the 4017 until the capacitor charges then pin 15 goes low and the 4017 begins at count zero."

I see that the datasheet schematic doesn't use this method of resetting the 4017's. Would this method work in this case?
One other question - if the right-hand 4017 in this circuit is interrupted while running, like removing power before it gets to the pin that's connected to the reset of the left-hand 4017, do the IC's reset upon the next power-up or will the 4017 that was running at the time the power was removed simply pick up where it left off?
I hope that I explained that last one correctly...
 

Thread Starter

Otaku

Joined Nov 19, 2008
128
I think I see what's happening - both 4017's need to be reset on power-up otherwise the last one running starts where it left off. Q0 of the left-hand 4017 resets the right-hand 4017, but the left-hand 4017 doesn't get reset unless the right-hand 4017 cycles all the way to Q5. Is there a way to reset both 4017's on power-up so that the left-hand IC will always start on Q0?
 

Thread Starter

Otaku

Joined Nov 19, 2008
128
Cool. Thanks, Bill. You mentioned "pulse"; does this mean that I shouldn't leave this reset circuit connected to the 4017 reset pins all the time, but rather use a momentary switch to make the connection when I need to reset the IC's?
 
Top