Quiz Table Buttons

Discussion in 'General Electronics Chat' started by Jump, Aug 21, 2009.

  1. Jump

    Thread Starter New Member

    Aug 11, 2009
    3
    0
    First of all I'll state I am new to this electronics stuff, have been interested from a distance but not had the time and/or need to actually do any ... but that is about to change ... I have given myself a project to build a set of quiz buttons for use at a Cub Scout pack I help run. I appologise in advance for any 'noob' mistakes below and if some of the phasing and naming of components etc are erroneous. What you see here is 1 weeks knowledge I've managed to glean in breaks from work, the diagrams come from 30 minutes with Eagle Layout Editor that I got a link to from somewhere. This is quite a long post - sorry...

    I need 4 or less teams/switches and the associated indicators etc.

    I had a quick search around and found a few circuits to have a look at:

    1) http://www.electronicsforu.com/elec...able.pdf&title=Low-Cost Electronic Quiz Table

    2) http://www.electronicsforu.com/EFYLinux/circuit/May2006/CI-01_May06.pdf

    3) http://www.mitedu.freeserve.co.uk/Circuits/Misc/quiz.htm

    The first one looked okay, the logic described is simple and it can easily be expanded if needed. Uses only diodes and transistors.

    The second looked good with 1 IC to do all the 'thinking' for me and a couple of handfuls of other components, but having read up on the IC used being a TTL device discounted it due to the 5V +/- 5% power restraints (I don't want to have to start building regulated power circuits too).

    The third uses CMOS logic ICs, 4013 flip-flops and 4081/82 AND gates. I can follow the logic again and see if I need to I can expand it. Unfortunately the link seems to have gone down - but I can remember the circuit and have added it below. This is the one I decided to go for and am planning do drive it from standard 9V battery.

    Now, having bought components for circuit 3 I find the IC circuit in 2 is available in CMOS also - oh well that may be project 2 for an eight button option for a future quiz.

    I have redrawn the circuit, I know some of the current limiting resistor values for the LEDs will be wrong and also the Reset may be wired wrong high/low as I can't remember of the top of my head, both can be remedied later :

    [​IMG]

    The original called for a 4082 dual 4-way AND IC but one was not available so I replaced that with a second 4081 and used three of the four 2-way AND gates in it's place.

    The functioning of the circuit should go as follows - once initialized and/or reset all inputs to the 4013 flip-flops should be low, therefore the output Q will be low and the complement \overline{Q} will be high. The four \overline{Q} are all ANDed giving a high signal and this output in turn is ANDed with the output from each of the switches which is nomally being held low from the pull down resistors. Once a switch is pressed that signal line goes high, it is ANDed with the high signal from the feedback of the \overline{Q} ANDing. This sets the input to the 4013 flip-flop high. Q goes high and \overline{Q} goes low, dropping one input to all the switch AND gates to low and preventing any new switch press from effecting the system. It will then remain in this state until the Reset button is pressed setting all Q back to low, and \overline{Q} to high etc.

    I have some questions about the above circuit ... and hopefully that's where AAC can come in.

    1) on the 4013 should the input from the triggering switch go to the Set, as drawn, or the Data or Clock?

    2) if the input goes to the Set, should the other 2 be held high or low, or can they just be left to float with the positively signaled Set (either high or low) overriding whatever they may trigger?

    3) I've looked at the Datasheet for the ICs I have HEF4013BP and the only reference to current I can find is 10mA - is that the limit to the current this can drive ie am I reading the datasheet correctly?

    4) I have read what the pull up/down resistors are for. Is there a recomendation as to their value, ie does a 10k resistor make any difference than a 1k resistor, or are they just there to limit the current when they may be the only thing in the way from short circuiting the battery, as in those after the switches above.

    For the project I need one box for the Quiz Master with the reset etc and a seperate button box for each table. For the connections between these I will be using standard UTP Cat5 cable as I have salvaged some RJ45 sockets from an old Ethernet hub. This means that the switch and signal LED will be remote and the rest of the circuit can be in one location, see left hand circuit in the image below for the 'simple' IC driven LED and switch in the remote switch box. The switches I will make, probably some sort of sprung metal-metal contact with a big top to be mashed, these are for 8-10 year old children to use and therefore will need to be near bomb proof. The signal quality , ie switch bounce, doesn't matter due to the nature of the circuit - the first contact triggers the circuit and all others are ignored.

    If the current limit for the 4013 IC is only 10mA then I will want to boost it to drive more LEDs, this is where my woeful lack of electronics comes to the fore. I presume the component I'd need is a transistor of some sort - see right hand circuit in the image below. Can someone please confirm if I have it correct and if possible suggest a suitable transistor to use, and explain why, so I can look it up to get some understanding and not have to bug people for the information again later.

    [​IMG]

    \overline{A}
     
  2. beenthere

    Retired Moderator

    Apr 20, 2004
    15,815
    282
  3. Wendy

    Moderator

    Mar 24, 2008
    20,764
    2,534
    Wasn't there a similar thead about 6 months to a year ago using relays?
     
  4. eblc1388

    Senior Member

    Nov 28, 2008
    1,542
    102
    You are nearly there, apart from some minor loose ends to tidy up.

    I don't even know why someone has commented clocking has anything to do in the circuit operation because the 4013 is used here(correctly) as a simple SR Flip Flop where its purpose is to acts as a memory. The current design is a correct design.

    Once triggered, the circuit will latch and subsequent key bounce has no effect to the current circuit states so input key debouncing serve no useful purposes.

    I see that you want to extend the circuit to 8 or more push buttons. I would recommend you try my suggestion of using diodes to form the AND gate instead. You can then easily expand the existing circuit into 8 push button inputs by just adding 4 additional diodes.

    The alternative AND function works like this. When user pressed RESET button, all 4013 /Q output goes HIGH. The input common 4081s gate pins(2,6,9,13) also goes HIGH because of the 10KΩ pullup resistor and all the 4148 diodes are not conducting as both ends of the diode are HIGH. Once any 4013 operates and /Q goes LOW, all the 4081s input will go low(0.6V) together, preventing any additional input triggering.


    [​IMG]


    Yes, the output current of the 4013 is limited and a NPN transistor is needed to boost the drive current if lots of LEDs are being driven.

    The way the transistor being connected in your original drawing is BAD as it is acting as an emitter follower instead of a switch. The transistor will get hot for no useful purposes. Instead, the location of the NPN transistor should be as shown in the following image. If you then use a 1KΩ ~ 2KΩ base resistor, then the transistor will be saturated during operation and does not generate much heat.

    You can use any general purpose NPN transistor with collector current rating higher than 500mA. The common 2N2222 or 2N2222A would be a good choice.

    [​IMG]

    Edited: Added additional info.
     
    Last edited: Aug 22, 2009
  5. Jump

    Thread Starter New Member

    Aug 11, 2009
    3
    0
    Many thanks for the replies :

    BeenThere
    I've had a look at your counter, buttons and buzzer. It is a little more than I need right now, but will bookmark it for reference. For the debounce I don't think that's required - first signal wins any bounces and/or input from the other switches is then completely ignored by the logic.

    Alberto
    after reading up some more I know there are other functions that can be done using the 4013 with Data and Clock but as eblc1388 surmised I'm only using it in this instance as a memory and the rest of the logic to latch on first signal.

    eblc1388
    thanks for the clarifications and updates. I wasn't sure whether data and/or clock needed to be tied and you answered that one. With your explanation of the use of the diodes in place of the AND logic I can see how that works - however I already now have the IC and also it's cheaper for me than the diodes anyhow so I'll stick to that.
    About the transistor - it looks like I need to read up quite a bit about transistor theory, to my eyes there is no functional difference between the transistor being before or after the load and I'm not too sure what the function of the base resistor is - like I said I need to read up some on transistors :rolleyes:

    One further question while I'm on. If I wished to add a piezo buzzer do these require any sort of driver or do they just require a voltage to be applied, via a suitable transistor no doubt ... :)
     
  6. Blacksmith

    New Member

    May 26, 2014
    14
    0
    Is it possible to use only one resistor on the LED Neg bus for the current limiting resistor?
     
  7. MrChips

    Moderator

    Oct 2, 2009
    12,418
    3,355
    Yes. There will never be more than one LED lit at the same time.
     
  8. THE_RB

    AAC Fanatic!

    Feb 11, 2008
    5,435
    1,305
    Ouch! MrChips bitten by the necro post gremlin. ;)
     
  9. crutschow

    Expert

    Mar 14, 2008
    12,981
    3,221
    As long as it's been resurrected, and if BS is intending to build the circuit, then it should be noted that the LEDs connected to the latches, are all backwards.

    Edit: Also there's a variation of the circuit that uses JK FF's, such as the CD4027, which eliminates the need for the input AND gates to reduce the parts count. The contestant switch goes to the respective FF CLK input, the output AND gate goes to all the J inputs, and the K inputs are grounded.
     
    Last edited: May 27, 2014
  10. Blacksmith

    New Member

    May 26, 2014
    14
    0
  11. Blacksmith

    New Member

    May 26, 2014
    14
    0
    this is what I go so far
    will this work.
    am I missing anything?
     
Loading...