Open Circuit Problem with Logic Gates

Click For Summary

Discussion Overview

The discussion revolves around the behavior of logic gates, specifically AND and OR gates, when one or more inputs are left floating. Participants explore how to achieve a 0V output when inputs are not connected, particularly in the context of a project involving a contact sensor with multiple variables.

Discussion Character

  • Technical explanation
  • Debate/contested
  • Experimental/applied

Main Points Raised

  • One participant questions how to make an AND gate output 0V when one input is floating, noting that it currently outputs 5V instead.
  • Another participant suggests using a pulldown resistor to address the floating input issue.
  • Concerns are raised about the implications of leaving inputs floating, with participants emphasizing that this is not advisable.
  • One participant confirms they left an input floating and seeks clarification on the use of pulldown resistors, asking about appropriate resistor values.
  • A suggestion is made to use a pull-up resistor for the AND gate to maintain a constant high condition on one input leg.
  • Another participant reiterates the need to tie floating inputs either high or low based on the desired logic condition.
  • A later reply indicates that a participant initially struggled with the circuit but later resolved their confusion regarding the logic setup.

Areas of Agreement / Disagreement

Participants generally agree on the importance of avoiding floating inputs and the utility of pulldown and pull-up resistors. However, there remains some uncertainty about the specific implementation details and the behavior of the logic gates in the described scenario.

Contextual Notes

Participants mention varying resistor values for pulldown resistors and the potential need for different configurations based on the logic gate type. There is also a reference to a specific project requirement that may affect the circuit design.

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: 533
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:

Similar threads

  • · Replies 4 ·
Replies
4
Views
2K
Replies
12
Views
3K
Replies
6
Views
5K
Replies
4
Views
2K
  • · Replies 29 ·
Replies
29
Views
4K
  • · Replies 5 ·
Replies
5
Views
7K
  • · Replies 5 ·
Replies
5
Views
2K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 9 ·
Replies
9
Views
4K
  • · Replies 3 ·
Replies
3
Views
2K