Open Circuit Problem with Logic Gates

  • Thread starter Mastur
  • Start date
  • #1
41
0
I wonder how can I make the logic gate read 0V when it is open?

For instance, the AND logic gate. If one of its input pin has 5V supply, and the other don't have, the output signal given to me is 5V. How can I make it 0V? Well, theoretically, it should be 0V, but in reality, it appears that it is 5V.

Same goes with OR logic gate. If one of the inputs is 0V, and the other is not connected with any supply (not grounded - the wire is hanging), it gives an output value of 5V.

We need this for our project. We have our own long equation (it involves 16 variables, ANDed to make it simplier - 8 inputs).

We will be using this as a contact sensor. A insulator will be placed in between two conductors. One of the conductors will be connected with the 5V supply, and the other one will be to the logic gate input itself. If the two conductors does not make contact, the output remains high (5V).
 

Answers and Replies

  • #2
755
78
Use a pulldown resistor.
 
  • #3
113
0
Are you sure your and gate is not a nand? Or have you just left an input floating as suggested by the prior comment - if so, that's a big no-no.
 
Last edited:
  • #4
2,081
104
sounds like floating inputs to me as well.

use pulldown resistor to tie an input at zero volts, use a pullup resistor to tie an input to 5 volts depending on the logic needed at that gate.
 
  • #5
41
0
Yes, I just left the input floating.

I did research about this pull-down resistor. And based on this, its just a normal resistor with values raging from 10K-47K, am I right?

I also created a schematic of how I imagine the circuit would be. I have no simulators installed in this computer so I used paint instead. (See attached image)

So what I think would happen is, I will let the input1 pin of the logic gate connected to the ground with the resistor. Once the two conductors make contact, the signal that will be received by the logic gate will become 1, otherwise, it is 0. Is that right?
 

Attachments

  • #6
2,081
104
On an AND gate if you want the input condition on the open leg use a pull up resistor. same principle just tie the resistor to the 5 volt and one input leg. This will set a constant condition of 1 on that leg. so that when the other input goes to logical 1 the output will be logical 1.
On an OR gate if you want a logic 1 on output when one input goes high you will need a pulldown resistor to tie the floating input to logical zero.
All floating (open) inputs should either be tied high or low depending on the condition you wish to set. The range of resistors you mentioned will work. Its usually recommended to use a larger resistor for pullup than on the pulldown, but using the same value on both is fine.
 
  • #7
41
0
I would like to bring this up again. I've tried placing a 47K resistor in series with the input gates and let the input floating. Unfortunately, it does not give a low logic input.

I really need to set the input to 0 because my circuit will always have a floating input. The insulator between the two conductors will make the circuit always open.

Edit: Just kidding. My logic was messed up a while ago. Was able to work on this matter already. Sorry.
 
Last edited by a moderator:

Related Threads on Open Circuit Problem with Logic Gates

Replies
1
Views
687
  • Last Post
Replies
1
Views
14K
  • Last Post
Replies
13
Views
3K
Replies
23
Views
3K
  • Last Post
Replies
2
Views
5K
  • Last Post
Replies
6
Views
2K
  • Last Post
Replies
3
Views
742
Replies
9
Views
1K
  • Last Post
Replies
1
Views
973
  • Last Post
2
Replies
25
Views
15K
Top