Log in

Ye olde game-show button circuit. - Adventures in Engineering
The wanderings of a modern ronin.

Ben Cantrick
  Date: 2013-09-12 01:27
  Subject:   Ye olde game-show button circuit.

You know that typical game-show or quiz-bowl buzzer system, where each contestant gets a button and the first to press it is allowed to answer the question the host asked?

Someone asked for a circuit to implement such a system. I have dim memories of seeing designs for such systems in the distant past, but nothing I could remember clearly. So I decided to design my own.

Correctly and efficiently implementing a buzzer system turns out to be more difficult than I first thought, mainly due to the requirement that the first person to buzz in must "lock out" everyone else. Once you're over that hurdle, the only thing left that might trip you up is how you're going to reset the system so that people can buzz in again.

Hopefully the diagram above shows clearly enough how system works. The core circuit is a weird flip-flop like thing that records the press of the corresponding button. This flip-flop like circuit is composed of the right-most NAND gate and the NPN transistor it drives, as well as the resistor that "feeds back" the transistor's collector voltage to the top input of the NAND gate.

Here's how it works: When the output of the NAND is low, the transistor is off. No current flows through the transistor, and thus it has no significant effect on the circuit, and so pretty much "disappears" (tri-state) from the circuit. Consequently, the only thing really driving the top input of the NAND gate is the small amount of current leaking in through the LED from the +5 rail. This very small current - not nearly enough to light the LED - pulls the top input of the NAND gate up to a logic high state. (Or at least, it does if the LED's forward voltage drop is less than about 2.9 V. Users of blue or white LEDs with a Vf near 4 volts, beware!)

NOTE CAREFULLY: The diagram specifies ACT logic gates for a reason! ACT/HCT gates have a "logic low" output voltage of 0.2V. This is low enough to ensure the transistor is "turned off." If one were to use, say, LVTTL logic gates, the 0.4V "logic low" output voltage might be enough to turn the transistor on, thus causing a race condition where the NAND gate is continuously switching its output from high to low and back again.

Now, what happens when the user presses the switch? The left NAND gate (74ACT132, with schmitt trigger inputs for noise protection) has its top input held high by the state of the flip-flop. Thus it is acting as a simple NOT gate. Its output is the logical NOT of the bottom input. When the user presses the switch, the logic-high voltage runs down the transmission line and hits the bottom input of this left NAND gate. This causes it to switch its output from logic high to logic low. The output is fed in to the right NAND gate, which now has only one input at logic high, and so it sends its output to logic high. That output is hooked to the transistor, so the transistor turns on!

The transistor turning on has three major consequences...

First, it allows a significant amount of current to flow through the LED and into ground. The LED lights up.

Second, it drags the "feedback" resistor's voltage sharply downward, thus causing the top input of the NAND gate to become a logic low. This feedback is self-reinforcing: By dragging one input of the NAND to a logic low voltage, the transistor has forced the NAND to maintain a logic high output, regardless of what the other input does! The flip-flop has "flopped", and this flopped state is self-reinforcing. It will not leave this state easily.

Third, and very crucially, the transistor causes the diode to go into forward bias, dragging the top input of the left NAND gate down to a logic low also. This is crucial because all the left NAND gates have their top inputs diode-OR connected to each other. When one is dragged low, ALL of them get dragged low. And with one input held low, the output of a NAND gate is guaranteed to be high. Thus, the first switch that gets pressed "cuts off the input" of all the other switches. Once a single flip-flop has flopped, no other switch will be able to cause a change in any other flip-flop. This is the "lock out" mechanism.

So that covers the triggering and lock-out mechanisms. There's only one function of the circuit left to explain, which is the "Reset" mechanism.

The Reset mechanism is the switch at center-top. When pressed, this switch drags the top input of all of the left NAND gates up to logic high voltage, via the current-limiting resistor. For most of the left NAND gates, this causes them to go from having both inputs low, to having one high and one low - so their output does not change state. However, for the one left NAND whose right NAND/flip-flop is high (and consequently both its top input and bottom input are high), this forces the bottom input low. And thus its output state changes to high. That output goes into the bottom input of the right NAND, which forces the right NAND's output to low. Which turns off the transistor! And now we're right back to the state that the circuit started out in at the top of this post.

Quickly Ends Dat.

A couple more notes...

0) Given my druthers, I would use one of the '132's gates as a debouncer for the Reset switch. (Actually, I'd use an RC filter on the output of the switch and then feed the filtered output to the '132. "It's the only way to be sure.")

1) The 100k pull-downs on the bottom input of the left NANDs are there because logic gate inputs have a known tendency to "float high" if they are not actively driven by something. You'll notice that everywhere in the circuit, all logic gate inputs are actively driven by something at all times. Nothing is ever left floating. In addition to ensuring correct behavior during normal operation, this should also minimize any metastability that might occur during power-up. FALSE! The top input of the left NANDs was not actively driven at all times! Added 100k pullups to fix this.

2) Just in case it's not obvious, the purpose of the diodes is two-fold. First, they act as a diode-OR to combine the output signals from all the flip-flops. Second, they isolate the output of the flip-flops from each other, ensuring that one f-f's output going to the flopped state won't cause any of the others f-fs to also go flopped.

3) The 120 ohm resistors are there to properly terminate the transmission lines that run between the buttons and the logic. I'm assuming you're using some kind of twisted pair wiring, which typically has an impedance a little higher than 100 ohms.

4) If you want a buzzer, rig up a 555 monostable attached to the lockout/reset line.

5) You should be able to daisy-chain these quite a ways. The transistors do most of the heavy lifting, so logic gate fanout limits shouldn't be a big issue.

6) CORRECTED import code for Falstad sim:

$ 1 5.0E-9 0.03246524673583497 51 5.0 50
151 432 176 512 176 0 2 0.0
s 32 208 96 208 0 1 true
r 320 256 320 208 0 100000.0
R 32 208 32 176 0 0 40.0 5.0 0.0 0.0 0.5
g 320 256 320 272 0
w 576 160 576 128 0
t 560 176 576 176 0 1 -4.943407553710505 1.0999999999041587E-10 100.0
g 576 192 576 208 0
r 560 176 512 176 0 2200.0
w 432 128 432 160 0
162 576 80 576 128 1 2.1024259 1.0 0.0 0.0
r 624 80 576 80 0 220.0
151 320 192 432 192 0 2 5.0
171 96 208 240 208 0 5.0000000000000004E-8 110.0 16 0.0
g 96 224 96 240 0
r 256 208 256 256 0 120.0
w 240 208 256 208 0
w 240 224 240 256 0
w 256 208 320 208 0
g 256 256 256 272 0
w 384 128 320 176 0
w 240 256 256 256 0
w 240 432 256 432 0
w 384 304 320 352 0
g 256 432 256 448 0
w 256 384 320 384 0
w 240 400 240 432 0
w 240 384 256 384 0
r 256 384 256 432 0 120.0
g 96 400 96 416 0
171 96 384 240 384 0 5.0000000000000004E-8 110.0 16 0.0
151 320 368 432 368 0 2 5.0
r 624 256 576 256 0 220.0
162 576 256 576 304 1 2.1024259 1.0 0.0 0.0
w 432 304 432 336 0
r 560 352 512 352 0 2200.0
g 576 368 576 384 0
t 560 352 576 352 0 1 -4.943407599061927 1.0999999999041587E-10 100.0
w 576 336 576 304 0
g 320 432 320 448 0
R 32 384 32 352 0 0 40.0 5.0 0.0 0.0 0.5
r 320 432 320 384 0 100000.0
s 32 384 96 384 0 1 true
151 432 352 512 352 0 2 0.0
w 384 128 384 304 0
d 384 128 432 128 1 0.805904783
d 384 304 432 304 1 0.805904783
w 624 48 288 48 0
w 624 256 624 80 0
R 288 48 288 16 0 0 40.0 5.0 0.0 0.0 0.5
w 624 80 624 48 0
s 288 48 384 80 0 1 true
r 384 128 384 80 0 120.0
r 320 176 288 96 0 100000.0
r 320 352 288 288 0 100000.0
w 288 288 288 96 0
w 288 96 288 48 0
r 432 128 576 128 0 1000.0
r 432 304 576 304 0 1000.0

So there you have it. A nicely functional quiz-show buzzer system with four buttons, reasonably easy to implementable with two TTL logic chips and a few transistors and diodes. Not bad for an evening's work...
Post A Comment | 7 Comments | Share | Link

Alex Belits: photo-shortest
  User: abelits
  Date: 2013-09-12 22:43 (UTC)
  Subject:   (no subject)
Except, at the moment when reset button is pressed there is a huge (though short-lived) current through a diode and open transistor. A much easier reset mechanism would be to simply turn power off.
Reply | Thread | Link

Ben Cantrick: ronin
  User: mackys
  Date: 2013-09-20 02:18 (UTC)
  Subject:   (no subject)
You're absolutely right. I need to put a... I guess a 2.2k would be fine... resistor there to limit current. I had that in there during an earlier cut of the circuit but took it out because of vertical space limitations.

Also, I'm not at all sure that the top gate of the left NAND(s) is being actively driven at all times. I think I need a 100k pull-up on it to make sure it goes high when the transistor is off. Right now the only thing driving it high is reverse-leakage through the diode... not something one should depend on.

Reply | Parent | Thread | Link

Ohmi: OhmiGearSolid
  User: ohmisunao
  Date: 2013-09-13 22:31 (UTC)
  Subject:   (no subject)
Sorry to be OT but: Is everything going okay? It looks like it flooded in Boulder!?
Reply | Thread | Link

Jon: abi-station2
  User: j_b
  Date: 2013-09-17 17:30 (UTC)
  Subject:   (no subject)
Got a phone call with a status update from Ben yesterday:

Update from Mr Cantrick:
The denizens of Rancho Lobo are okay, they have had no power for 4+ days, but have gotten fresh water supplies from a neighbor. They have a generator, and enough power/resources to operate phone / tv in emergencies, and maybe a few minutes of Internet every few days. They do NOT need friends to bring things to them, due to: Berthoud is a short hike away, but the County Sheriff is enforcing an "if you leave you may NOT come back" situation, which would mean abandoning the farm's animals. They're continuing to hunker down and wait for power & roads to be restored, partying like it's 1699.
Reply | Parent | Thread | Link

Ohmi: OhmiGearSolid
  User: ohmisunao
  Date: 2013-09-25 23:30 (UTC)
  Subject:   (no subject)
Thanks for the update.. and looks like Ben is posting so all good?
Reply | Parent | Thread | Link

Ben Cantrick: ronin
  User: mackys
  Date: 2013-09-20 05:23 (UTC)
  Subject:   (no subject)
FailJournal in full effect... :P

I am having this issue: http://knownissues.livejournal.com/902.html

And consequently I cannot correct my post. :P

Maybe it's time to move to DreamWidth like J. Grant did...
Reply | Thread | Link

Ben Cantrick: ronin
  User: mackys
  Date: 2013-09-21 00:13 (UTC)
  Subject:   (no subject)
Working now. Why, I have no idea.

Corrections made to post.
Reply | Parent | Thread | Link

May 2015