3
\$\begingroup\$

In this circuit enter image description here

Why is there a resistor if the ground already is 0V?

\$\endgroup\$

closed as unclear what you're asking by RoyC, Finbarr, Dmitry Grigoryev, laptop2d, Lior Bilia Apr 5 '18 at 11:46

Please clarify your specific problem or add additional details to highlight exactly what you need. As it's currently written, it’s hard to tell exactly what you're asking. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.

  • 7
    \$\begingroup\$ what does this mean? ... ground already is 0V \$\endgroup\$ – jsotola Apr 3 '18 at 21:49
  • \$\begingroup\$ The resistor is there so out has a defined voltage in case both diodes are non-conducting (both inputs either open or GND.) \$\endgroup\$ – Janka Apr 3 '18 at 21:49
  • 3
    \$\begingroup\$ ..or a pull-down in other words. \$\endgroup\$ – Eugene Sh. Apr 3 '18 at 21:50
  • \$\begingroup\$ @jsotola Well, not really sure myself... Doesn't the bottom symbol refer to "ground"? And I would assume that ground is zero \$\endgroup\$ – That Guy Apr 3 '18 at 21:54
  • 3
    \$\begingroup\$ Do you mean "why isn't the output just directly wired to ground without the resistor" or "why is the output connected to ground at all, even through a resistor"? \$\endgroup\$ – Ilmari Karonen Apr 4 '18 at 3:52
29
\$\begingroup\$

This circuit is supposed to act like an OR gate. You need the resistor for the diodes to work correctly, especially in the off state.

$$\begin{array}{|c|c|c|c|} \hline \rm A & \rm B & \rm D1 & \rm D2 & \rm Out \\ \hline 0 & 0 & \rm off & \rm off & 0 \\ \hline 0 & 1 & \rm off & \rm on & 1 \\ \hline 1 & 0 & \rm on & \rm off & 1 \\ \hline 1 & 1 & \rm on & \rm on & 1 \\ \hline \end{array} $$

When A and B are both zero, D1 and D2 are both off. Without the resistor, the output node would float, meaning it would be affected by nearby electric fields and static electricity. In general, you should always have a DC path to ground for every node in your circuit.

\$\endgroup\$
  • 2
    \$\begingroup\$ "This circuit is supposed to act like an OR gate." Who told you that? \$\endgroup\$ – Curd Apr 4 '18 at 9:47
  • 20
    \$\begingroup\$ @Curd No one has to tell us. The diagram, in it's very essence, is an OR gate. I understand your point that people should explain the circuits they're asking about, but at some point when someone posts what is essentially a reference circuit for a common logic function, it becomes pedantic to require them to tell us what it's for. \$\endgroup\$ – dwizum Apr 4 '18 at 15:01
  • \$\begingroup\$ Small nitpick you should have either pull-up or pull-down, depending on the logic. \$\endgroup\$ – magu_ Apr 4 '18 at 17:01
  • \$\begingroup\$ @dwizum: It doesn't make any sense to present a circuit without any context and ask for the purpose of a component. No matter how simple the circuit! Also consider following: the OP asekd for the purpose of the pull-down resistor. The fact whether this resistor is actually needed or not depends very much on surrounding circuit of this "OR-gate". If the output is just connected to a LED with resistor connected to GND you don't need it at all. \$\endgroup\$ – Curd Apr 5 '18 at 7:22
16
\$\begingroup\$

The resistor is not intended to change the ground (which is our 0 V reference).

It is intended to ensure that OUT is pulled to ground when both the input signals are low.

Another way of saying it is that R is to ensure that any stray charge on OUT is discharged to ground and that OUT falls to 0 V rather than float at an undefined level when IN-A and IN-B are low (0 V). Don't forget that the charge can't dissipate back through D1 or D2.


Update for clarification:

schematic

simulate this circuit – Schematic created using CircuitLab

Figure 1. (a) With one diode forward biased the output is a definite +5 V (less the voltage drop across the diode). (b) With neither diode forward biased the output voltage is undefined. They are effectively out of circuit. Vout can float to any voltage between 0 and the reverse breakdown voltage of the diodes.

schematic

simulate this circuit

Figure 2. If the following stage presents a path to ground then the problem is solved.

\$\endgroup\$
  • 2
    \$\begingroup\$ @ThatGuy: It's a logical output, not a +5Volt voltage supply. A logical output has two states, one of which usually is 0V. How do you expect it to sometime become 0V, if not by connecting it to to ground? \$\endgroup\$ – MSalters Apr 4 '18 at 7:26
  • 2
    \$\begingroup\$ @ThatGuy because without a 'Pull-Down' resistor, the output will float, and can become affected by other factors (noise/static etc) and the resistor ensures these have a path to GND. The resistor basically ensures the output stays at 0V when it should be low. \$\endgroup\$ – MCG Apr 4 '18 at 7:42
  • 1
    \$\begingroup\$ @ThatGuy: I think you need to get a introduction book about electricity. Just take any ordinary 1.5V battery as you'd find it in the shop. No current while it's still in the package, definitely a voltage. If you're still struggling with this, diodes are already too advanced. \$\endgroup\$ – MSalters Apr 4 '18 at 9:00
  • 3
    \$\begingroup\$ @ThatGuy I think you really need to go back to basics if this is too difficult to understand. Try reading this article about pull ups and pull downs and see if that helps you make sense of why they are needed: electronics-tutorials.ws/logic/pull-up-resistor.html \$\endgroup\$ – Curious Apr 4 '18 at 9:10
  • 2
    \$\begingroup\$ Imagine If I asked you the question "do you want this chocolate?" and you say nothing. How do I read your "answer". The resistor ensures the default answer to the question is "No" because not replying does not mean anything. I am not sure if this will help. \$\endgroup\$ – R.Joshi Apr 4 '18 at 10:10
3
\$\begingroup\$

The reason the resistor is in place, is to ensure the output stays at 0V when the output is logic '0'. This is also known as a pull down resistor.

The circuit is essentially an OR gate (as pointed out in the answer by Adam Haun). When one of the inputs becomes a logic '1', the output becomes logic '1'. If both inputs are at logic '0', the output is '0'.

Now, if you imagine the output is connected to something. Without a pull down resistor, the output is 'floating'. If some excess noise or static or some other type of electrical interference occurs, then it could cause the logic level of that output to become undefined, so it is 'floating' between a logic '1' and '0', and could have undesired results. In an ideal circuit, the resistor would not be needed, but, alas, in the real world, things are not ideal. The resistor ensures any stray interference has a path to GND, which keeps the output at 0V, or a logic '0'.

\$\endgroup\$
  • \$\begingroup\$ Alright, I finally think I get it. However, I do not understand this: why is it the resistor that ensures the output stays 0V and the ground alone? Doesn't the resistor simply limit the current? Therefore, I cannot see how it would pull excess voltage away from the output? \$\endgroup\$ – That Guy Apr 4 '18 at 10:58
  • \$\begingroup\$ What do you mean by 'ensures the output stays 0V and the ground alone'? \$\endgroup\$ – MCG Apr 4 '18 at 11:59
  • \$\begingroup\$ Oh, I meant "ensures the out stays at 0V and NOT the ground alone". What I mean is that you say that it is the resistor that ensures the output stays at 0V when the output is logic 0 (which must mean that it is 0V since nothing gets through the diodes). Then in the case that the output get affected by something and is maybe not 0V, how can the resistor pull current/voltage away from the output and down to the ground? Isn't it just because that the ground would have lower voltage than the output that the ground can help the output at staying empty? \$\endgroup\$ – That Guy Apr 4 '18 at 12:19
  • \$\begingroup\$ I would love if you or anyone else could answer the above comment.. However, if I still do not get it, I simply think that I should re-read some of the basics and I then might be able to see what you mean. It might be a good idea for me to read the basics anyway :))) \$\endgroup\$ – That Guy Apr 4 '18 at 12:21
  • 3
    \$\begingroup\$ @ThatGuy The GND is there to ensure logical 0 when input is 0, while the resistor is there to ensure logical 1 when the input is nonzero. The resistor prevents GND from slurping up all the current, leaving none for OUT. Disclaimer: I'm not an electrical engineer. \$\endgroup\$ – Fax Apr 4 '18 at 14:15
1
\$\begingroup\$

Another thing to mention, is don't assume that ground will always be 0V. If that circuit was hooked directly to a battery and there was no other circuitry, then it most likely would be 0V. However, once you are adding other circuits that share a common ground and factor in noise (from a spinning tire on a car or factory equipment for example) that voltage may rise slightly and it could be enough to make your circuit read a logic 1 voltage.

Look up resources for Raspberry Pi and Arduino circuits. All of their documentation is geared towards beginners. They won't get as detailed as the college textbooks, but they'll give you enough info to understand what is going on without overwhelming you with a bunch of other info.

Pull Up/Down Resister Info: https://playground.arduino.cc/CommonTopics/PullUpDownResistor

\$\endgroup\$
1
\$\begingroup\$

The simple way to explain it is this. If OUT is directly connected to GND, then IN-A and IN-B don't matter. OUT will always be low. So, OUT cannot be directly connected to GND. With the resistor, OUT will be low whenever IN-A and IN-B are both low. But it is possible for OUT to be high when IN-A or IN-B is high.

If the resistor is removed, then OUT may tend to stay high even when IN-A and IN-B are both low. The diodes prevent IN-A and IN-B from pulling OUT low.

\$\endgroup\$
0
\$\begingroup\$

If you don't add the resistor, the Output and ground will be in the same node therefore the output will always be zero volts

\$\endgroup\$
  • \$\begingroup\$ "... the Output and ground will be in the same node ...". What does this mean? \$\endgroup\$ – Transistor Apr 4 '18 at 22:11
  • \$\begingroup\$ It means they will have the same voltage \$\endgroup\$ – user184627 Apr 12 '18 at 18:16
  • \$\begingroup\$ OK. I don't think that terminology is correct. A node is normally circuit elements permanently connected together and therefore always at the same voltage. In this circuit that is not the case because the two ends of the resistor can be at different voltages. You can edit the question to improve it. \$\endgroup\$ – Transistor Apr 12 '18 at 20:53

Not the answer you're looking for? Browse other questions tagged or ask your own question.