[sci.electronics] Game Arbitration Circuit

denny@hpcilzb.HP.COM (Trueman Denny) (12/06/90)

I have a friend who wants to build a arbitration circuit as part of a high
school project.  Basically all it does is determine who presses a button 
first just like in Jeopardy.  Does a commodity IC exist that performs this
function?

I assume that a debouncing circuit will be needed to give a clean logic
signal and then some sort of circuit to determine who pressed their button
first and some sort of LED to indentify the person responding first and
a buzzer.  If there is a tie then all corresponding LED are energized.

Any comments or circuit suggestions are welcomed.  Please post to this
notes group are to me directly.

Thanks in Advance!!!

pepke@gw.scri.fsu.edu (Eric Pepke) (12/07/90)

In article <1310039@hpcilzb.HP.COM> denny@hpcilzb.HP.COM (Trueman Denny) 
writes:
> I have a friend who wants to build a arbitration circuit as part of a 
high
> school project.  Basically all it does is determine who presses a button 
> first just like in Jeopardy.  Does a commodity IC exist that performs 
this
> function?

When I was a kid, my father never gave me complete circuits, just hints.  
It was a lot more fun, and it was much more educational.  As I had to 
solve the same exact problem during high school, here's a hint:

Yes, there exists a commodity IC which does this.  It's called a dual J-K 
flip-flop with clear.

Eric Pepke                                    INTERNET: pepke@gw.scri.fsu.edu
Supercomputer Computations Research Institute MFENET:   pepke@fsu
Florida State University                      SPAN:     scri::pepke
Tallahassee, FL 32306-4052                    BITNET:   pepke@fsu

Disclaimer: My employers seldom even LISTEN to my opinions.
Meta-disclaimer: Any society that needs disclaimers has too many lawyers.

palmerc@infonode.ingr.com (Chris Palmer) (12/07/90)

In article <1310039@hpcilzb.HP.COM> denny@hpcilzb.HP.COM (Trueman Denny) writes:
>I have a friend who wants to build a arbitration circuit as part of a high
>school project.  Basically all it does is determine who presses a button 
>first just like in Jeopardy.  Does a commodity IC exist that performs this
>function?
>
>Any comments or circuit suggestions are welcomed.  Please post to this
>notes group are to me directly.
>
>Thanks in Advance!!!

I know I'll get flamed for this, but I'm a computer engineer with a minimal
electronics knowledge -- that is, I know which end of a soldering iron to
hold.  I started working on the exact same type of project about a year ago
for my wife who is a teacher and an academic team sponsor.  I drew many
pages of circuit diagrams and breadboarded some sample circuits before finally
deciding that I just didn't have what it took.  (The circuits worked, that
was simple, the problem was timing (double ring-ins, etc.).)  The circuit
got way too complicated for such a simple project so I dropped back and 
punted.  I took my old Commodore 64 out of the closet, built a box with
4 red LEDs, 4 green LEDs, and 8 subminature sockets then went to the 
workshop and built 8 handheld buttons with momentary contact push-buttons.
Then I did what any self-respecting computer engineer would do -- I did
all of the processing and decision making in software!  I wrote a program
that polled the switches and then lit the appropriate LED when someone rang
in.  (The box plugs in the parallel port of the computer).  I felt a little
guilty because I had wanted to do a hardware design, but this was actually
quite nice because I was able to add score-keeping, sound-effects, team
roster lists, and timers into my control software.  If you're interested
in any further details, let me know.
-- 
|  Christopher M. Palmer                     #                                |
/  Intergraph Corporation                    #                                \
\  Internet: b14!abulafia!palmerc            #                                /
|  UUCP : ...uunet!ingr!b14!abulafia!palmerc #                                |

mark@mips.COM (Mark G. Johnson) (12/07/90)

In article <1310039@hpcilzb.HP.COM> denny@hpcilzb.HP.COM (Trueman Denny) writes:
  >I have a friend who wants to build a arbitration circuit as part of a high
  >school project.  Basically all it does is determine who presses a button 
  >first just like in Jeopardy.


Here's a suggestion for a gameshow "who hit the button first"
circuit.  It makes a couple of assumptions, namely

     (1) There are no ties.  If more than one player hits
         his/her game button, the first one wins.
     (2) There are three players.
     (3) A solution using 2 chips is OK.
     (4) Switches are SPDT but not debounced.

The logic uses 4000-series CMOS style parts, mostly because they
are cheap and plentiful.  The ICs are U1==CD4043 quad RS latch
($0.63 from DigiKey) and U2 = CD4023 triple NAND3 gate ($0.36).

There are three players labelled A,B,C and one Emcee [Art Fleming]
labelled MASTER.  Each player has a SPDT switch; player A's
switch is connected like this:

        +5.0V ----o
                    /-------> "ButtonA"
          GND ----o/

Player B's and C's buttons are wired the same way, with outputs
ButtonB and ButtonC.  The Emcee's button is used to reset the
circuit (shutting off the LED's) and its output is "MASTERclear".

Player A's LED is attached to the following circuit

                      -------------         LED
                      |           |         |  /|      470 ohms
     ButtonA ---------| R       Q |----+----| < |-----/\/\/\----- +5.0V
                      |           |    |    |  \|
                +-----| S         |    |
                |     |   1/4 U1  |    |
                |     -------------    +------> "QA" to other ckts
                |
                |            (----------
                |          (    4023   |-------< QB
                +--------O(     NAND   |-------< QC
                           (    gate   |-------< MASTERclear
                             (----------

Player B's LED is attached to an identical circuit except that ButtonB
goes in on the left and QC,QA,MASTERclear feed the NAND gate.  Similarly
for player C, ButtonC goes in on the left and QA,QB,MASTERclear feed
the NAND gate.

To use the ckt, the Emcee presses and releases MASTERclear.  This
turns off all three LEDs.  Then after a question, one or more players
hit their buttons.  Whover hit first, has their LED light up.

Note: you will want to finagle around with the value of the resistor
      to adjust the LED brightness and to ensure good I-win-you-lose
      functioning of the NAND gates.

Now someone can translate this into GIF and someone else, into
PostScript.  :-)
-- 
 -- Mark Johnson	
 	MIPS Computer Systems, 930 E. Arques M/S 2-02, Sunnyvale, CA 94086
	(408) 524-8308    mark@mips.com  {or ...!decwrl!mips!mark}

balcer@jaguar.siemens.edu (Marc J Balcer) (12/07/90)

denny@hpcilzb.HP.COM (Trueman Denny) writes:

>I have a friend who wants to build a arbitration circuit as part of a high
>school project.  Basically all it does is determine who presses a button 
>first just like in Jeopardy.  Does a commodity IC exist that performs this
>function?

>I assume that a debouncing circuit will be needed to give a clean logic
>signal and then some sort of circuit to determine who pressed their button
>first and some sort of LED to indentify the person responding first and
>a buzzer.  If there is a tie then all corresponding LED are energized.

Until very recently, all game shows built these circuits from
relays.  They're easy to understand, very forgiving of bouncing
switches, and allow large voltages/currents to be switched
easily.  12V DPDT or 4PDT relays are ideal.

I believe that the April 1977 (yes, 1977) issue of Popular
Electronics has a design for an SCR-based circuit.  (A variation
on this circuit is what's used in the "Electric Jeopardy" box
game.)

An IC-based circuit would use flip-flops and gates.  A player's
button must be up and the circuit must be in the READY state for
the player's flip-flop to be clocked ON.  Doing this turns the
player's light on and takes the circuit out of the READY state so
that no more players can signal.  Some 555 timers and a speaker
can be used to generate a nice timed square-wave tone.  Since the
first player to press his button clocks his flip-flop and no
other players may signal, bouncing is really not a problem.

Having just built one of these for a pilot for a local TV quiz 
show, let me give you a few more ideas:

On a "real" game show, these circuits usually have three states:  
off, ready, and selected.

In the "off" state, none of the lights are on, and none of the
contestants' buttons are enabled.  The contestants can press
their buttons all they want, but their light won't go on.

Usually after the first half of the question has been read, the
judge puts the circuit into the "ready" state.  This turns on a
light that tells the contestants it's OK to press their buttons.
The next player to press his button gets his light turned on.  A
player cannot be "first" by simply holding his button down; he
must press the button once AFTER the "ready" light goes on.

The "selected" player (his light goes on) is first player to
press his button after the READY light goes on.

All of the lights are cancelled and the circuit goes back into
the "off" state when the judge pushes a "cancel" button.

To get an idea of how this kind of circuit works, watch either
"Jeopardy" or "Trump Card".  Notice how the contestants sometimes
seem to be pressing their buttons before the host finishes
reading the question.  On Trump Card you can sometimes see the
Ready light go on (it's a tiny white light on the right side of
the host's podium).

The extra state is needed in a real game to prevent people from
signaling too early or from keeping their finger on the button.
Allowing ties is not a good idea, unless the game specifically
allows two people to signal at the same time.  Your circuit will
need to have some way of randomly arbitrating between a tie.

Please contact me if you're interested in the designs of these
circuits.
--
---------------------------------------------------------------------------
Marc J. Balcer	[balcer@siemens.siemens.com]
Siemens Research Center, 755 College Road East, Princeton, NJ 08540
(609) 734-6531

tell@oscar.cs.unc.edu (Stephen Tell) (12/15/90)

In article <1310039@hpcilzb.HP.COM> denny@hpcilzb.HP.COM (Trueman Denny) writes:
>I have a friend who wants to build a arbitration circuit as part of a high
>school project.  Basically all it does is determine who presses a button 
>first just like in Jeopardy.  Does a commodity IC exist that performs this
>function?

>I assume that a debouncing circuit will be needed to give a clean logic
>signal and then some sort of circuit to determine who pressed their button
>first and some sort of LED to indentify the person responding first and
>a buzzer.  If there is a tie then all corresponding LED are energized.

I built a device like to pick the first respondent of 6 players for 
College TV station.  I'd like to take credit for this idea, but it
came from my advisor.

To answer some of your questions first:  One usually doesn't want to allow
ties.  If you do, you need to set a time criterion; does a tie mean
within 1 second? 100 milliseconds? 100 nanoseconds?
There's really no need to debounce; just trigger on the first bounce
that the switch makes.

The proposed solution that was posted with an R-S latch for each player and
some gating to hold the all latches in the reset state except for the winner
suffers from a possible race condition if there is in fact a "tie;" the
time-definition of a "tie" is a function of the logic family used.  When both
inputs to the latch are high, the output is indeterminent, or perhaps both Q
and not-Q are high; and after the inputs settle the output assumes a random
state.  Using clocked J-K flip-flops might produce reasonable behavior but
I leave that as an exercise for the reader :-).

Our circuit worked like this:  An 8-bit shift register was loaded with a
single 0 and the rest 1's and its last output is fed back to its input.  Only
6 of the shift register outputs were used, one per player.  The shift register
output is anded with the signal from a player's switch, which 0 when the
switch is pressed.  The and gate output is low whenever the 0 in the shift
register lines up with a switch that is pressed.

The shift register is clocked at a rate in excess of 1Khz, so each player's
switch is sampled or scaned in turn for 1 millisecond.  The 6 and gate outputs
are further anded to get a signal that goes low whenever switch is pressed and
the corresponding shift register output is 0.  This output feeds an S-R latch;
when it goes low a player has won and the control latch is tripped changing to
the "we have a winner" state.  The latch disables the shift-register from
clocking, so the 0 in the shift register indicates which player pressed his
button first.  The shift register outputs are gated with the output of the
control latch an drive the output lamps, so when we are in the "winner" state
the correct lamp is lit.

The actual circuit is more complex than this; they wanted the lamps to "flash
randomly" at the start of the game, so there is another control latch that
indicates "flash" or "game" mode.  When in flash mode the shift register clock
is slowed down, the lamps are always enabled, and the input to the shift
register becomes the XOR or the last output and one of the intermediate ones,
configuring it as a 256-state pseudorandom sequencer.

The thing is built in four boxes, the controller, a lamp/switch box for
each team of three players, and a remote control box with "reset" and "flash"
buttons for the judge.  The lamp boxes contain opticly-isolated triac
drivers controlling 25-watt 120-volt lamps for the "winner" lamps.

If I was doing it again I'd add the other state distinction of "idle" and
"armed."  To prevent false alarms and people leaning on the buttons.

I hope this gives you some ideas.
If you really want I can try to draw the schematic, they lost the only copy;
I was foolish enough to think I was through with the project when they asked
me to fix it.

--------------------------------------------------------------------
Steve Tell      e-mail: tell@wsmail.cs.unc.edu usmail:  #5L Estes Park apts
CS Grad Student, UNC Chapel Hill.                       Carrboro NC 27510
Former chief engineer, Duke Union Community Television, Durham, NC.

robf@mcs213j.cs.umr.edu (Rob Fugina) (12/16/90)

In article <1990Dec6.164647.26505@infonode.ingr.com> palmerc@infonode.UUCP (Chris Palmer) writes:
>In article <1310039@hpcilzb.HP.COM> denny@hpcilzb.HP.COM (Trueman Denny) writes:
>in.  (The box plugs in the parallel port of the computer).  I felt a little

Now I'm curious...as I was reading this, right after you said 'Commodore 64,'
I thought 'no problem, just plug it all into the joystick ports!'  Why did
you use the parallel port?  I'd really like more info on this, as a former
Commodore user.  ( I still have it...but not with me at school... )

Rob Fugina