Auto-reset for 4017

MisterBill2

Joined Jan 23, 2018
27,514
220K resistor and a 47uF capacitor but it didn't work, could have I done wrong somewhere?
I suggest at least a one megohm resistor, 4r7 meg better yet, and not a leaky electrolytic cap. I am guessing that the circuit did not reset because the voltage on the reset never got high enough. And it will require removing that 10 K ohm resistor to common.
 

boostbuck

Joined Oct 5, 2017
1,043
220K resistor and a 47uF capacitor but it didn't work, could have I done wrong somewhere?
It seems you did go wrong. It would be nice to see a circuit of your modification.

I suggest that a resistor/capacitor reset circuit would need a schmitt-trigger tidyup. Per suggestion in post #5 you have 2 spare gates to use for that purpose - is that what you have done?
 

AnalogKid

Joined Aug 1, 2013
12,129
if the output of 4017 is high - nothing happens since pin1 of IC1 is also pulled high by resistor
Incorrect.

IC1c is a NAND gate. When both inputs are high, the output goes low.

Overall, this is a scanning approach to a game show circuit.

In the post-Reset condition, the oscillator is running but there are no clock pulses at the 4017 clock input. All 4017 outputs are low. Pressing any button gates clock pulses into the 4017. When the output associated with the pressed button goes high, the clock pulses are again gated off. The circuit sits in that state even after the button is released. Thus, one relay is driven long enough to activate its output.

When the circuit is counting up to the selected output, each relay is pulsed on briefly (about 200 us). For esample, if button #3 is pressed, relays 1 and 2 come on briefly before relay 3 comes on to stay. The idea is that the relay coil pulses are too brief to cause the armature to move.

NOTE: This is *not* a good circuit design, and has a critical flaw.

ak
 
Last edited:

AnalogKid

Joined Aug 1, 2013
12,129
It's a 'radio button' selector circuit
Nope. It is a "game show" circuit. It requires a separate Reset input after each button press, which a radio button circuit does not.

The idea is that the scan rate (set by the IC1a oscillator) is so fast that the button that starts the scanning will be the one that is latched. That is, pressing a second button of lower value in the time between when the first button is pressed and when the count gets to its value never will happen. This is not guaranteed by the circuit design, and is a critical design flaw. If the oscillator is running at 5 kHz and you press SW5, there is just under 800 us before the circuit latches. If someone presses SW4 750 us after you press SW5, SW4's output will be latched. This is why "real" game show circuits (such as Olympic timing) use asynchronous logic, where the circuit ambiguity is nanoseconds.

ak
 
Last edited:

MisterBill2

Joined Jan 23, 2018
27,514
OK, and a question for A.K.: what is wrong with the scheme I suggested in post #16?? Using CD4013 dual S/R flip-flops?? Pressing any button sends a solid "set" to that FF, and thru a diode to a capacitor it sends a brief "reset" to all of the FFs. So only the one selected has the set held high for the duration of the button press, and they all are reset by the closure of the button press. If the "Q" output is used to drive the relay circuit, the momentary uncertainty when both S and R are high for the selected one will not matter.
And this emulates more closely the mechanical switch scheme where the first part of the button press releases all the others. AND if multiple buttons are pressed then multiple outputs are enabled.
 

AnalogKid

Joined Aug 1, 2013
12,129
First, to post #3 - If I'm reading the schematic correctly (*never* a given), the output at IC1c pin 3 never is high for more than one millisecond, while the TS wants the outputs to reset after a few seconds.

IC1c could trigger a monostable that drives a differentiator that drives the Reset input, but that requires another chip.

OR, a PNP current sensor in series with the supply for all relay coils. This is the only other place in the circuit that has a state that reflects a change in any input.

Another option is to diode-OR the 4017 outputs into and R-C delay into the Reset input. In any case, the Reset input has to be *pulsed* after 2-3 seconds.

Second, what you describe in 16 and 25 is not how I interpret the requirements in post #1. Both a radio button circuit and a game show circuit latch their output so it is constantly on (or driven or whatever) *after* the input button is released. Or, in the context of this thread, constantly until the delayed-Reset timer times out in a "few seconds". The only difference between the two circuits is that a game show circuit requires an explicit Reset signal to clear all outputs before the next round, while a radio button circuit can latch any button press at any time without an explicit reset.

Again, I think the original circuit will work as intended - IF - you accept the consequences of the fundamental problem that comes up anytime you use a synchronous state machine to interface with an asynchronous system.

ak
 
Last edited:

panic mode

Joined Oct 10, 2011
4,982
Incorrect.

IC1c is a NAND gate. When both inputs are high, the output goes low.
hmmm. i could make mistake but that is not the case here... i never claimed the opposite.
yes, IC1 is set of NAND gates and yes that is how NAND gates work.

but... that is not what i was talking about. (just saying...).

i don't think you have read or understood my post. the part that you quoted was not complete, it is expanding on what happens when one of buttons is pressed and if the 4017 output connected to that button is high or low. and it explains what happens at the pin1 of the IC1 which is an input of the NAND gate IC1c, not an output. of course output of that NAND gate is inverted when both inputs are true and it just so happens that the other input is always true.

so i think you probably just misread my post... and i do agree with everything else you stated.
 
Last edited:

MisterBill2

Joined Jan 23, 2018
27,514
So now it seems that the functionality desired is that when any button is pressed a relay associated with that button is operated for a few seconds and then released. So at that point why is there a requirement to release the previous selection,o when it has already been released after some short time. Or is the release an addition to the requirement after the original statement??

It seems that the effort to meet the original requirement is not needed any more.

Perhaps the TS should explain the required function in more detail.
Both of my suggestions will work, neither requires a 4017 counter, and they both allow one side of the buttons to be at a common low impedance point.
 

panic mode

Joined Oct 10, 2011
4,982
as was mentioned before, for game show circuit should not be clocked. for fastest response it should only use gates. once one button press is detected, it should ignore further button presses until it is rest.

here is one idea:

U1 allows registering button press when circuit is reset (no outputs are set). as long as one output is active, further button presses are ignored. this is sensed by U4D and diodes working as OR gate.

U2 and U3 are used to form simple RS (one for each user).

R5, C1 and U4A form a simple timing circuit that could auto reset outputs. if any output is set on powerup, this circuit will clear the outputs the same way.

1660937434973.png
 

crutschow

Joined Mar 14, 2008
38,506
Well, if we are talking game-show circuits, then I must post my favorite below because it is so simple:
It requires only one each of a switch, small SCR and LED per player.
With the appropriate value for R1, a 6V relay coil could be added in parallel with the LED (and added LED limiting resistor).

1660942895305.png
 
Last edited:

AnalogKid

Joined Aug 1, 2013
12,129
I would like the selection to goes off(de-selected) after a few seconds automatically, is there a solution where I can add into the circuitry to reset the 4017 chip?
It is possible, but messy. A compromise can turn off any activated output in 3 seconds, but you still have to press the Reset button between events.

Each transistor Q1 - Q4 has a resistor in series with the gate. These are completely unnecessary, and can be removed from the standard circuit. However, if you replace each of these resistors with a 10 uF capacitor (+ end to the 4017 output), and add a 100 K resistor from each gate to GND, you now have a timer circuit for each output that will turn on immediately when the 4017 selects an output, and turn off that output in approx 3 seconds. For completeness, add a 1N914 signal diode in parallel with each resistor (anode to GND). These will reset the capacitors in much less than 3 seconds.

That's it. Change the value of 4 resistors, and add 4 capacitors and 4 diodes. In terms of modifying the existing circuit while maintaining its intent, I think this is a reasonable effort.

With this change, any activated output will turn off in 3 seconds. After that, pressing more buttons will not cause any action, the circuit will sit there waiting for the Reset button to be pressed before the next event. Pressing the Reset button during the 3 second delay will terminate the cycle and de-activate the selected output immediately.

ak
 
Last edited:

Thread Starter

Ng Yik Hong

Joined Aug 9, 2021
10
It is possible, but messy. A compromise can turn off any activated output in 3 seconds, but you still have to press the Reset button between events.

Each transistor Q1 - Q4 has a resistor in series with the gate. These are completely unnecessary, and can be removed from the standard circuit. However, if you replace each of these resistors with a 10 uF capacitor (+ end to the 4017 output), and add a 100 K resistor from each gate to GND, you now have a timer circuit for each output that will turn on immediately when the 4017 selects an output, and turn off that output in approx 3 seconds. For completeness, add a 1N914 signal diode in parallel with each resistor (anode to GND). These will reset the capacitors in much less than 3 seconds.

That's it. Change the value of 4 resistors, and add 4 capacitors and 4 diodes. In terms of modifying the existing circuit while maintaining its intent, I think this is a reasonable effort.

With this change, any activated output will turn off in 3 seconds. After that, pressing more buttons will not cause any action, the circuit will sit there waiting for the Reset button to be pressed before the next event. Pressing the Reset button during the 3 second delay will terminate the cycle and de-activate the selected output immediately.

ak
This looks very much to what I want but I am not adding a reset switch. My original intention was to use the circuit to light up a bulb upon button pressed, and goes off/deselects after few seconds. The selected button shall not block out other buttons like a game show but responds to the last selection, lights the bulb then goes off few seconds later, no manual reset to the 4017.

Thanks!
 

MisterBill2

Joined Jan 23, 2018
27,514
This looks very much to what I want but I am not adding a reset switch. My original intention was to use the circuit to light up a bulb upon button pressed, and goes off/deselects after few seconds. The selected button shall not block out other buttons like a game show but responds to the last selection, lights the bulb then goes off few seconds later, no manual reset to the 4017.

Thanks!
That is quite different from what I originally understood, which was that any button press released any previous pressed button. Now it is much simpler. The circuit to use is what I call a "Flop-shot", with the trigger setting an RS FF and then the "Q" output not only providing the signal, but also slowly charging a capacitor at the reset input slowly through a resistor. Contact bounce is no problem because trigger pulses after the FF is set have no effect. The circuit works well with a cd4013 RS FF. I never tried it with TTL so no clue how that might work.
 

eetech00

Joined Jun 8, 2013
4,705
In addition to comments in post #24.

If a selected button is held down, any other button subsequently pressed will engergize its associated relay (in addition to bridging the output of the 4017).
 

MisterBill2

Joined Jan 23, 2018
27,514
In addition to comments in post #24.

If a selected button is held down, any other button subsequently pressed will engergize its associated relay (in addition to bridging the output of the 4017).
I think that we, as a thread, were asked to help because the operation was not exactly what was needed.
 

Thread Starter

Ng Yik Hong

Joined Aug 9, 2021
10
It is possible, but messy. A compromise can turn off any activated output in 3 seconds, but you still have to press the Reset button between events.

Each transistor Q1 - Q4 has a resistor in series with the gate. These are completely unnecessary, and can be removed from the standard circuit. However, if you replace each of these resistors with a 10 uF capacitor (+ end to the 4017 output), and add a 100 K resistor from each gate to GND, you now have a timer circuit for each output that will turn on immediately when the 4017 selects an output, and turn off that output in approx 3 seconds. For completeness, add a 1N914 signal diode in parallel with each resistor (anode to GND). These will reset the capacitors in much less than 3 seconds.

That's it. Change the value of 4 resistors, and add 4 capacitors and 4 diodes. In terms of modifying the existing circuit while maintaining its intent, I think this is a reasonable effort.

With this change, any activated output will turn off in 3 seconds. After that, pressing more buttons will not cause any action, the circuit will sit there waiting for the Reset button to be pressed before the next event. Pressing the Reset button during the 3 second delay will terminate the cycle and de-activate the selected output immediately.

ak
It works until all selections had pressed and the circuit stops, until I reset manually or re-power the circuit. :(
 
Top