0
\$\begingroup\$

I'm a software guy trying to implement a 1-wire interface. I have modified a USB-to-UART device as indicated here, but I don't understand the "pull up" resistor concept. Googling "open-drain" gets me here, and I can understand why current would flow from Vcc to Output when the IC is turned "off", but the text states that the pull-up resistor pulls output up to Vcc in this state. But if the value of R is greater than, well, zero, won't Voutput always be lower than Vcc? One thing I DO remember from high school electronics is that there is always a voltage drop over a resistor. I understand that the value of R needs to be high to prevent the IC from overloading, but the higher R is, the further from Vcc the output will be when the IC is off. So... what am I missing?

\$\endgroup\$
5
  • \$\begingroup\$ what am I missing? ... the input impedance is very high compared to the pullup resistor ... the input logic level is not necessarily at Vcc ... it is much lower than that \$\endgroup\$
    – jsotola
    Commented Jun 7, 2021 at 16:14
  • \$\begingroup\$ Then the output voltage isn't being pulled up to Vcc, as text indicates. With these UARTs, Vcc is either 5V or 3.3V and TTL level is 3.3V. So... logic level is not much lower than Vcc. \$\endgroup\$
    – user127813
    Commented Jun 7, 2021 at 16:27
  • \$\begingroup\$ won't Voutput always be lower than Vcc - yes, for any realistic circuit it will. For a decent circuit it won't be a lot lower than Vcc, but it will nevertheless be lower. You appear to believe that this will be a problem though - why? \$\endgroup\$
    – brhans
    Commented Jun 7, 2021 at 16:29
  • \$\begingroup\$ It's not that I believe it's a problem, it's that the text for the diagram I linked to says that Vout is "pulled up to" Vcc. This violated my understanding of ohm's law. I guess it's semantics and "pulled up to" doesn't mean "will be equal to". I'm not an electronics person - did I mention that? \$\endgroup\$
    – user127813
    Commented Jun 7, 2021 at 16:38
  • \$\begingroup\$ Perhaps you would prefer "pulled towards Vcc". How close the signal is pulled towards Vcc depends on the current drawn through the pull-up resistor. Generally, the current throught the pull-up resistor will be very low, so the resulting signal will be "close enough" to Vcc to be considered a logic High when there is nothing pulling the signal Low. \$\endgroup\$ Commented Jun 7, 2021 at 16:57

2 Answers 2

1
\$\begingroup\$

The value of pull up resistor for an open drain is picked to support two functions:

  1. Prevent too much current from flowing through the drain when the output transistor is turned on.

  2. To provide enough voltage/current to the load when the output transistor is turned off.

You are right that there is a voltage drop across the resistor, BUT if designed correctly, it's quite small.
Below is an example circuit. If Vcc is 3.3V, then when when M1 is on, there is 0.33mA flowing through R1 and Vout is very near 0V.
When M1 is off, then there is a voltage divider between R1 and R2. \$\large Vout=\frac{Vcc*R2}{R1+R2}\$ Which for the given values is \$3.0V\$, well within most digital circuits ability to detect a high. If one wanted to eak a little more voltage out, you could reduce R1 to say 4.7k.

The load (R2 below) is usually high impedance as shown (could be higher or lower depending on exact circuit though), but the actual value would need to be considered when picking a pull up resistor to make sure that all conditions are satisfied.

schematic

simulate this circuit – Schematic created using CircuitLab

\$\endgroup\$
2
  • \$\begingroup\$ Note, for voltage divider equation for schematic shown, equation is Vout = Vcc*R2/(R1 + R2), wouldn't let me edit just that equation. \$\endgroup\$
    – Chance K
    Commented Jun 7, 2021 at 17:17
  • \$\begingroup\$ @ChanceK Fixed, thanks for finding that. \$\endgroup\$
    – Aaron
    Commented Jun 7, 2021 at 17:30
0
\$\begingroup\$

There is no voltage drop in a resistor if there is no current flowing.

The requirement for having a pull-up resistor comes from the 1-Wire protocol. Every device will read the bus wire to see the bits being sent, and each device that wants to communicate on the bus wire can only pull the wire voltage low to ground. No device is allowed to push the wire voltage high to supply level, or it would conflict with the devices pulling low.

So because the bus wire would not go to high level otherwise, it is only weakly pulled up to high level with a resistor.

If no device is pulling low, the bus is at high level, with very little voltage drop, as only very little leakage currents flow in the resistor.

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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