Open Circuit Problem with Logic Gates

AI Thread Summary
The discussion centers on achieving a 0V reading from logic gates when inputs are open. Users suggest using pull-down resistors to tie floating inputs to ground, ensuring that the output reflects the intended logic levels. There is confusion about the behavior of AND and OR gates with floating inputs, with recommendations to avoid leaving inputs unconnected. One participant initially struggles with the concept but later clarifies that they resolved their issue. Proper resistor values and configurations are emphasized for reliable circuit performance.
Mastur
Messages
39
Reaction score
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).
 
Engineering news on Phys.org
Use a pulldown resistor.
 
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:
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.
 
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

  • PULLUPDOWN.JPG
    PULLUPDOWN.JPG
    2.1 KB · Views: 502
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.
 
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:
Back
Top