Author Topic: Exclusive double switch circuit  (Read 2334 times)

0 Members and 1 Guest are viewing this topic.

Offline waspinatorTopic starter

  • Contributor
  • Posts: 49
  • Country: pl
Exclusive double switch circuit
« on: June 26, 2017, 06:13:14 pm »
Hi,

I'm trying to control two outputs from two inputs, but I want to make sure only one output is on at a time. What are some options for circuits I could use? If needed I could add a third input.

Thanks

Code: [Select]
INA INB  |  OUTA OUTB
---------------------
 0   0   |    0    0
 0   1   |    0    1
 1   0   |    1    0
 1   1   |    0    0
« Last Edit: June 26, 2017, 06:19:53 pm by waspinator »
 

Offline Nusa

  • Super Contributor
  • ***
  • Posts: 2416
  • Country: us
Re: Exclusive double switch circuit
« Reply #1 on: June 26, 2017, 06:22:43 pm »
Hi,

I'm trying to control two outputs from two inputs, but I want to make sure only one output is on at a time. What are some options for circuits I could use? If needed I could add a third input.

Thanks

Code: [Select]
INA INB  |  OUTA OUTB
---------------------
 0   0   |    0    0
 0   1   |    0    1
 1   0   |    1    0
 1   1   |    0    0

Just implement your logic table.
OutA = InA & not(InB)
OutB = InB & not(InA)
 

Offline Benta

  • Super Contributor
  • ***
  • Posts: 5875
  • Country: de
Re: Exclusive double switch circuit
« Reply #2 on: June 26, 2017, 06:30:09 pm »
The simplest way is to use an open-collector 2:4 line demultiplexer, eg, SN74ALS156. You can do it with gates as well, but I haven't checked whether you can pack it into one device.

 

Offline Nusa

  • Super Contributor
  • ***
  • Posts: 2416
  • Country: us
Re: Exclusive double switch circuit
« Reply #3 on: June 26, 2017, 06:33:56 pm »
Quad NAND gate IC would work, using two of the NAND's as inverters.
 

Online Zero999

  • Super Contributor
  • ***
  • Posts: 19524
  • Country: gb
  • 0999
Re: Exclusive double switch circuit
« Reply #4 on: June 26, 2017, 06:44:51 pm »
This depends on what the original poster's requirements are. The simplest way I can think of is two DPDT switches. The first contacts connected like a two way light switch and the second set on each switch in series with the load. See the link below and work it out for yourself.

http://www.lightwiring.co.uk/two-way-switching-3-wire-system-new-harmonised-cable-colours/
 

Offline waspinatorTopic starter

  • Contributor
  • Posts: 49
  • Country: pl
Re: Exclusive double switch circuit
« Reply #5 on: June 26, 2017, 06:47:58 pm »
Okay, so something like this?

 

Offline Benta

  • Super Contributor
  • ***
  • Posts: 5875
  • Country: de
Re: Exclusive double switch circuit
« Reply #6 on: June 26, 2017, 06:55:22 pm »
Yup, should work.

 

Offline waspinatorTopic starter

  • Contributor
  • Posts: 49
  • Country: pl
Re: Exclusive double switch circuit
« Reply #7 on: June 28, 2017, 06:38:41 pm »
looks like my NAND version is actually


Code: [Select]
INA INB  |  OUTA OUTB
---------------------
 0   0   |    1    1
 0   1   |    0    1
 1   0   |    1    0
 1   1   |    1    1

Is there a way to do this with just 4 NANDs?
 

Offline rstofer

  • Super Contributor
  • ***
  • Posts: 9890
  • Country: us
Re: Exclusive double switch circuit
« Reply #8 on: June 28, 2017, 06:52:27 pm »
Applying DeMorgan's Theorem to NAND gates leads to the idea that the gates closest to the output work as OR gates and the next layer back work as AND gates.  Signals that enter at odd layers are inverted.  So, no, you probably can't get there with 4 NAND gates.  Try to implement A*B + C*D with (3) 2-input NAND gates and you'll see what I mean.

OTOH, the output of NOR gates closest to the output work as AND gates and the gates one level back work as OR gates.  Signals that enter at odd layers are again inverted.  Try to implement (A+B) * (C+D) with (3) 2-input NOR gates.

For your project, the following should work:

Output 1 = NOR( A, NOR( B, B)) -> B AND (NOT A)
Output 2 = NOR( B, NOR( A, A)) -> A AND (NOT B)

Look at the first equation.  Notice that A is entering at the output NOR gate, an odd level.  Hence it is inverted.  The first level NOR is still working as an AND gate and NOT B is the other input.  So, that NOT B is inverted at the output to become B and the final equation is B AND NOT A.
« Last Edit: June 28, 2017, 06:56:28 pm by rstofer »
 

Offline Nusa

  • Super Contributor
  • ***
  • Posts: 2416
  • Country: us
Re: Exclusive double switch circuit
« Reply #9 on: June 28, 2017, 09:44:18 pm »
What he said....4 NOR gates instead of 4 NAND gates like I said above, unless inverted outputs is actually useful to you.

Demorgans Theorem can be shown visually as well as mathematically, by changing the type between AND and OR and moving the inverting symbols to the other side. This sometimes makes it easier to understand, especially if you organize it so inverting symbols cancel each other:
 

Offline rstofer

  • Super Contributor
  • ***
  • Posts: 9890
  • Country: us
Re: Exclusive double switch circuit
« Reply #10 on: June 29, 2017, 12:55:58 am »
I like that alternate representation of the NOR as an AND with inverted inputs.  Clever!
 

Online Zero999

  • Super Contributor
  • ***
  • Posts: 19524
  • Country: gb
  • 0999
Re: Exclusive double switch circuit
« Reply #11 on: June 29, 2017, 03:54:25 pm »
Two DPDT switches.
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf