any 2 out of 3 inputs provide an output

Discussion in 'The Projects Forum' started by kray89, Aug 24, 2008.

  1. kray89

    Thread Starter New Member

    Aug 24, 2008
    7
    0
    Hi,can anyone help me with a circuit design?

    I need to build a circuit which has 3 inputs and one output. When any 2 inputs are activated there will be an output. I would prefer to build it with transistors although this is not essential.

    The inputs are volt free (from relay contacts) and the output will drive a small relay(12vdc)

    Thank you in anticipation,
    Keith.
     
  2. SgtWookie

    Expert

    Jul 17, 2007
    22,182
    1,728
    OK, what do you mean by 'volt free'? Do you mean the connections are open/floating?

    How about if you get three inputs activated?

    Please define "activated" - is that open circuit, 0v, or a certain voltage level?
     
  3. kray89

    Thread Starter New Member

    Aug 24, 2008
    7
    0
    Thanks for your prompt reply!

    I should have said if one out of three inputs are activated then no output. if any two or all three inputs are activated then there is an output.
    By volt free I mean relay contacts closing as a switch. but I can trigger the inputs any way you like!

    Regards, Keith.
     
  4. kammenos

    Active Member

    Aug 3, 2008
    127
    0
    I really cannot get what you mean. Let;s take it from the start:

    You have 3 inputs
    When all are 0, the output is 0

    When one input is 1, the output goes 1

    A truth table like below:

    A B C | Q
    0 0 0 0
    0 0 1 1
    0 1 0 1
    0 1 1 1
    1 0 0 1
    1 0 1 1
    1 1 0 1
    1 1 1 1

    Did i got it right?

    And the output will be a relay?

    :confused::confused::confused::confused::confused::confused:
     
  5. SgtWookie

    Expert

    Jul 17, 2007
    22,182
    1,728
    I think it's more like:
    A B C Q
    0 0 0 0
    0 0 1 0
    0 1 0 0
    0 1 1 1
    1 0 0 0
    1 0 1 1
    1 1 0 1
    1 1 1 1
    Three 2-input AND gates and a 3-input OR gate would be a brute-force way to get it done.
     
  6. kray89

    Thread Starter New Member

    Aug 24, 2008
    7
    0
    Hi again, thanks for your reply, the truth table looks right to me. Where can I obtain a schematic so that I can attempt to build this circuit? and would it be possible to build it with switching transistors?

    Thanks again, Keith.
     
  7. kray89

    Thread Starter New Member

    Aug 24, 2008
    7
    0
    Hi, thanks for your reply and I apologise for not making myself clear.
    I'll try again. I've got 3 seperate sensors each output being normally open relay contacts. I need to build a circuit where the output switches a 12vdc relay when 2 or 3 inputs are applied but no output when only 1 of the 3 inputs is applied. I would like to build with transistors but if the only way is to build with I.C's so be it.

    It is to be used on a 3 boiler alarm panel - if 1 boiler breaks down then no alarm is sent but if 2 or 3 boilers break down it's a major problem and an alarm needs to be activated.

    Thanks again, Keith.
     
  8. thingmaker3

    Retired Moderator

    May 16, 2005
    5,072
    6
    One could indeed build it with transistors, or with diodes. Less soldering would be required if ICs were used, though. It could also be done with relays.
     
  9. kray89

    Thread Starter New Member

    Aug 24, 2008
    7
    0
    Thanks for your reply. Where could I get a circuit diagram to build this device?
    I have tried to build it with multipole relays but failed miserably!! Please can anyone show me the way?

    Regards, Keith.
     
  10. SgtWookie

    Expert

    Jul 17, 2007
    22,182
    1,728
    Give the attached a shot.
    A,B,C inputs are 0v for false (off), 12v for true (on).

    [ETA] Note that if your relay will require more than 500mA through the coil, you'll need more heavy-duty transistors for Q7 through Q9.

    [eta] For a relay-only solution, see my next reply.
     
    Last edited: Aug 25, 2008
  11. SgtWookie

    Expert

    Jul 17, 2007
    22,182
    1,728
    This one may be a bit easier for you; only three SPDT relays.

    The relays are the AND part; the wired-together outputs of the N.O. contacts is the OR part.

    There might be an easier way to do it; but can't think of one offhand.

    [eta] Updated schematic so that each input drives a single relay coil while also being switched through another relays' contacts.

    [eta] Note: in the schematic, 0v actually means "no connection", or simply the absense of 12v. Applying a ground or 0v would cause problems; eg shorts between ground and 12v at the junction near the OUT connector.

    [eta] The last schematic has diodes added to prevent a short in case the inputs are being switched between 12v and ground.
     
    Last edited: Aug 25, 2008
  12. Wendy

    Moderator

    Mar 24, 2008
    20,766
    2,536
    I would have used diodes myself. I don't recall seeing AND gates using transistors quite that way, but whatever works.
     
  13. kray89

    Thread Starter New Member

    Aug 24, 2008
    7
    0
    Thanks for the schematic, I eagerly await the relay only option - you are good!!

    Regards, Keith.
     
  14. SgtWookie

    Expert

    Jul 17, 2007
    22,182
    1,728
    Well, diodes could've been used for the 3-input OR gate, but the idea there was if our OP needed more than 500mA for driving a relay coil, swapping out those three transistors would be a lot easier than replacing the front-end six transistors.

    The three SPDT relay option would be the easiest thing to build, though - and our OP may already have those parts on hand.
     
  15. kray89

    Thread Starter New Member

    Aug 24, 2008
    7
    0
    I built the circuit with the relay option - worked like a dream!!! can't thank you enough for your time, trouble and knowledge.

    Regards, Keith
     
  16. SgtWookie

    Expert

    Jul 17, 2007
    22,182
    1,728
    Glad that worked out for ya ;) Don't be a stranger! :D
     
Loading...