Logic gates 2 AND & 1 OR with diodes.

Thread Starter

Richjtf

Joined Oct 12, 2013
15
Hey, i've been stuck on this one for about a week now, the design should be as shown, and the led is supposed to light up when sw1, sw2, and sw3 are working as short circuits. The problem is that the led diode is on because of the voltage source feeding it directly, and not because of the switches. Is the design wrong, is there something missing? I can post the truth table as well if you want me to.

I changed the design and it actually works, but the way it turned out to be is wrong according to my professor, he says it should be this exact design, which, as i said is not working for me..

Any help would be much appreciated! =)
 

Attachments

MikeML

Joined Oct 2, 2009
5,444
Are you trying to do this without "dc restoration" between the various types of gates for a reason? Normally, transistors would be used.

If you want to make this work as drawn, you will have to consider what happens due to the voltage dividers created when (for example) R4 is switched in series with R3. In other word, the resistor values are wrong...
 

WBahn

Joined Mar 31, 2012
30,057
I don't see that SW1 can do anything at all. When it is open no current can flow through D1 and when it is closed it reverse biases D1 and so no current can flow.

Overall, this circuit makes very little sense, particularly in the context of wanting the LED to turn on when (and only when) all of the switches are closed.

Please do post the truth table so that we can be sure we are on the same page as far as what you WANT the circuit to do. It would also be good to post the circuit as you modified it to work.
 

JoeJester

Joined Apr 26, 2005
4,390
Your professor gave you that exact design or is that a screen shot of how you did the design?

With two AND gates, one OR gate, and three switches, which one is common to both and gates?

Reminds me of the older control circuits using relays to activate different stages ... filaments, bias, plate, and using switches for interlocks ... Theory is the same; components are different.
 
Last edited:

tracecom

Joined Apr 16, 2010
3,944
I admit the circuit baffles me, but then I'm just a tinkerer. It looks like that, unless SW3 is closed, the inputs to D1-D3 are floating, which would be a logic high. And once SW3 is closed, closing SW1 and SW2 has no effect, because the inputs to D1-D3 were already high. In addition, it looks to me like the LED is always going to be lit through R4 and R3.

I built the circuit and took some measurements; that data is (or are, if you like) attached.

When the pro's figure this out, I will be interested in the explanation.
 

Attachments

Thread Starter

Richjtf

Joined Oct 12, 2013
15
It has to be on that order, the gates i mean.

The circuit i made to work was this one(Realice how it's not the same pattern, hence it's wrong according to my professor), and here you got the truth tables as well =)!

I didn't actually mean it has to go on when all switches are working as short circuits, it has to follow the truth table pattern. In which one of them is that when the three switches are working as short circuits, then the led diode should light up. (Since both gates AND & OR are getting A=1 and B=1 so the result should be 1, which means the led diode should light up)

The proffesor just handed me the pattern it should follow, the design is made by my own self.
 

Attachments

JoeJester

Joined Apr 26, 2005
4,390
Tracecom,

Did you use the same diode model in your build? In your first line, with all switches open. I find it unusual that D6, a forward biased diode is dropping 1.59 volts. D2 and D3 combined are dropping slightly less than 1.398V and both are forward biased as well.

The description of what it's "suppose" to do and what it "does" are galaxies apart.

I'd like to see the diagram the professor gave the student. I'd like to see the diagram the student turned in that "worked". There is a disconnect somewhere.
 

JoeJester

Joined Apr 26, 2005
4,390
Richjtf,

You still do not have any "AND" gates in that diagram. I see two "OR" gates, and one that does nothing.

What was the assignment? Do you have the exact text?

Your title mentioned two "AND" gates and one "OR" gate. You also mentioned three switches that energizes the LED. You seem to allude that you want SW1 and SW2 to form one "AND" gate with SW2 and SW3 forming the other "AND" gate. Either pair should energize the LED.

I don't understand why you have R4 in the circuit, or R1, or R2 for that matter.

This is how I envisioned the truth table for your assignment.
 

Attachments

Last edited:

JoeJester

Joined Apr 26, 2005
4,390
Ok. I just found it very curious that according to your chart, D6 dropped a lot of voltage for the little current in the circuit. Was I correct on where you placed the positive probe of your meter and the negative probe was on ground?
 

JoeJester

Joined Apr 26, 2005
4,390
tracecom,

that's exactly where I thought you measured. The difference between R4 and R2 is the voltage drop of D6.

The difference between R1 and R2 is the voltage drop of D2 and D3. I had assumed you used the same model diode so I didn't "expect" to see such a large difference. I'm assuming your LED was energized, probably around 1.5V between cathode and anode.

IF my truth table is what the OP wanted to do, all they would need is a power source, three switches, two diodes, one resistor, and one LED. If the AND gate composition is required to be diodes, it will take a little more.
 

WBahn

Joined Mar 31, 2012
30,057
It has to be on that order, the gates i mean.

The circuit i made to work was this one(Realice how it's not the same pattern, hence it's wrong according to my professor), and here you got the truth tables as well =)!

I didn't actually mean it has to go on when all switches are working as short circuits, it has to follow the truth table pattern. In which one of them is that when the three switches are working as short circuits, then the led diode should light up. (Since both gates AND & OR are getting A=1 and B=1 so the result should be 1, which means the led diode should light up)

The proffesor just handed me the pattern it should follow, the design is made by my own self.
Please, please, PLEASE! You need to keep in mind that we know absolutely nothing about what your assignment is or what you have done except what you tell us. Be very precise (and I realize that there is likely a language barrier here, but we can work through that) and very clear.

For instance, I can't tell if one of the two truth tables you attached is what the circuit is supposed to do and the other is what your implementation is actually doing. Even if that is the case, I can't tell which is which.

I can't tell whether your circuit schematics are for the circuits you've tried to build or are schematics that the instructor gave you or what?

Try starting over with a format along the following lines:

ASSIGNMENT:

Describe the assignment as given to you. What are the goals, what are the requirements, what are the constraints.

GIVEN INFORMATION:

Describe any additional information that was provided to you by your instructor. This would include any schematics that they provided. If you built a circuit according to their schematics, describe the results you got.

MY ATTEMPT:

Describe your circuit, post a schematic of your circuit, describe the behavior of your circuit. To what degree does it meet and not meet the requirements?

Be sure that any attachment you include clearly indicates what it is. Either by a notation in the attachment itself, or by referencing the attachment's filename in the post. Better yet, include the attachment as an image in the post.
 

Thread Starter

Richjtf

Joined Oct 12, 2013
15
Yeah sorry, my native language is not english, but i'm not bad at it ._.

The diagram i'm given is the following, I'm asked for 2 AND, 1 OR circuit, with diodes, this should be working as the truth table indicates.

The truth tables, i forgot to mention, one is for the circuit i posted on the first post, the other one is for the second circuit, the one that is working, but the one that is obviously not what i'm asked for :p

I've reuploaded the pictures, but i've actually given them names that make sense =)

Circuit 1 = 2 and 1 or <- This is my attempt, which does not work, at all. (See the truth table)

Circuit 2 = 2 or 1 and <- This is the one i made to work, but as you see, is not what i'm asked for. This also means that this one and it's truth table is useless.

The diagram is what i'm given, the truth tables have got names now.

The truth tables are made by myself. The one we should be working with is the one named "circuit 1"

I'm not given anything else, i'm given the diagram and asked to build it with diodes, not transistors, not integrated circuits.

Thanks :)

P.S: Just hover the image with the pointer and then the pop up with each pictures name will appear.

Edit: Forgot to mention, right now the circuits led is always on. No matter what.
 

Attachments

Last edited:

MikeML

Joined Oct 2, 2009
5,444
The gate diagram (first one shown above) can be simplified.

Vout= (A AND B) AND (B OR C)
Vout=ABB OR ABC = AB OR ABC = AB(1 OR C) = AB

which requires only one resistor and two diodes with inputs A and B.
 

WBahn

Joined Mar 31, 2012
30,057
Yeah sorry, my native language is not english, but i'm not bad at it ._.

The diagram i'm given is the following, I'm asked for 2 AND, 1 OR circuit, with diodes, this should be working as the truth table indicates.

The truth tables, i forgot to mention, one is for the circuit i posted on the first post, the other one is for the second circuit, the one that is working, but the one that is obviously not what i'm asked for :p

I've reuploaded the pictures, but i've actually given them names that make sense =)

Circuit 1 = 2 and 1 or <- This is my attempt, which does not work, at all. (See the truth table)

Circuit 2 = 2 or 1 and <- This is the one i made to work, but as you see, is not what i'm asked for. This also means that this one and it's truth table is useless.

The diagram is what i'm given, the truth tables have got names now.

The truth tables are made by myself. The one we should be working with is the one named "circuit 1"

I'm not given anything else, i'm given the diagram and asked to build it with diodes, not transistors, not integrated circuits.

Thanks :)

P.S: Just hover the image with the pointer and then the pop up with each pictures name will appear.

Edit: Forgot to mention, right now the circuits led is always on. No matter what.
What do YOU mean when you say that a circuit is or is not working? You talk about a circuit that doesn't work at all and then you talk about a circuit that you got working but doesn't do what it's supposed to. Well, if it doesn't do what it's supposed to, then it's not working. So I'm confused what the distinction is in your mind.

Let's say I gave you a battery, a resistor, an LED, and three switches labeled A, B, and C. Now I ask you to build a circuit such that switches A and B both have to be closed in order for the LED to light up. Could you build such a circuit? Would that satisfy the project requirements? If not, why not?
 

Thread Starter

Richjtf

Joined Oct 12, 2013
15
Well, the professor gave me the diagram shown above, which is 2 AND & 1 OR, i tried to change it to 2 OR & 1 AND, and that's the only thing i can make work, but that is not what i'm being asked to design, i'm asked to design 2 AND & 1 OR, it should follow the pattern shown in the truth table, when one or more switches work as short circuits, the result should be the exact same as in the truth table. Right now, the led diode is always on no matter what, and if i change the design, and add resistances, or take out resistances, it will no longer stay on at all times, but will also not light up at any other given situation.
 

Thread Starter

Richjtf

Joined Oct 12, 2013
15
Let's say I gave you a battery, a resistor, an LED, and three switches labeled A, B, and C. Now I ask you to build a circuit such that switches A and B both have to be closed in order for the LED to light up. Could you build such a circuit? Would that satisfy the project requirements? If not, why not?
It wouldn't, i need to design a working logic gates circuit with diodes, 2 AND & 1 OR, and for working i mean that it's response according to what switches are closed and what switches are on needs to match this truth table.

Vout 0 means the led should stay off, Vout 1 means the led should light up.

0 for switches mean it's open, 1 means it's closed.
 

Attachments

MikeML

Joined Oct 2, 2009
5,444
Richjtf:

You ignored my suggestion that the logic network can be simplified before you try to implement it in hardware. Look at this:

All possible eight states of the inputs are V(a.), V(b.) and V(c.)

Note that V(out1.), V(out2.), and V(e.) are equivalent, with V(out3.) also equivalent except that it has a reduced amplitude (as expected).

Also note that V(c) and V(f.) contribute nothing to the output, so can be eliminated...

Note that this exactly implements your truth table if you call sw3=C
 

Attachments

Top