Welcome to Junk Jack Forum!  

• We need your support! 


Electronics: 2-way light switch or door control

This is the general forum concerning Junk Jack
  • Author
  • Message

desTROYer74

Offline

  • Posts: 36
  • Joined: Thu Nov 24, 2016 4:12 am

Electronics: 2-way light switch or door control

PostThu Nov 24, 2016 6:41 pm

I made this 2-way light switch, just sharing it with anyone wanting to use it.
You can toggle either of the switches and it will toggle the state of the output (in this case a light). You could also use it to open/close a door.
Let me know if you have any other improvements or suggestions :D

Image



Sent from my iPad using Tapatalk

desTROYer74

Offline

  • Posts: 36
  • Joined: Thu Nov 24, 2016 4:12 am

Electronics: 2-way light switch or door control

PostThu Nov 24, 2016 7:27 pm

Better example of the 2-way light switch:

Image
Image


Sent from my iPad using Tapatalk

desTROYer74

Offline

  • Posts: 36
  • Joined: Thu Nov 24, 2016 4:12 am

Electronics: 2-way light switch or door control

PostThu Nov 24, 2016 7:28 pm

Example of the 2-way door switch:

Image
Image


Sent from my iPad using Tapatalk

AFanOfStuff

Offline

User avatar
  • Posts: 933
  • Joined: Mon Dec 02, 2013 2:49 am

Re: Electronics: 2-way light switch or door control

PostThu Nov 24, 2016 9:39 pm

I love creations like these despite the fact that I have no idea how they work or how to make good things myself.
:yawn:

Jack

Offline

  • Posts: 2094
  • Joined: Sun Oct 09, 2011 1:59 am

Re: Electronics: 2-way light switch or door control

PostFri Nov 25, 2016 12:57 am

Actually your left branch calculates (A & ~B) so it's true when first is on and second is off, your right branch calculates (~A & B) so it's true when first is off and second is on. The XOR gate which combines them it's true when inputs are different but (A & ~B) and (~A & B) can't never be true or false together, they're mutual conditions.

So (A & ~B) ^ (~A & B) simplifies to (A & ~B) | (~A & B), where ^ is XOR and | is OR. But (A & ~B) | (~A & B) is true when both inputs are in different states, which is the XOR operation, so the layout can be simplified to A ^ B:

Image

You can see the minimal form of your boolean logic here: https://www.wolframalpha.com/input/?i=(A+and+not+B)+xor+(not+A+and+B)

desTROYer74

Offline

  • Posts: 36
  • Joined: Thu Nov 24, 2016 4:12 am

Electronics: 2-way light switch or door control

PostFri Nov 25, 2016 5:57 am

Jack wrote:Actually your left branch calculates (A & ~B) so it's true when first is on and second is off, your right branch calculates (~A & B) so it's true when first is off and second is on. The XOR gate which combines them it's true when inputs are different but (A & ~B) and (~A & B) can't never be true or false together, they're mutual conditions.

So (A & ~B) ^ (~A & B) simplifies to (A & ~B) | (~A & B), where ^ is XOR and | is OR. But (A & ~B) | (~A & B) is true when both inputs are in different states, which is the XOR operation, so the layout can be simplified to A ^ B:

Image

You can see the minimal form of your boolean logic here: https://www.wolframalpha.com/input/?i=(A+and+not+B)+xor+(not+A+and+B)


Haha classic!
I was just thinking how impractical mine is due to the large footprint, and wishing it could simplified. Yours works, thanks! :D


Sent from my iPad using Tapatalk

Return to General

Who is online

Users browsing this forum: No registered users and 6 guests