<div dir="ltr">Brian,<div><br></div><div>Picking pull-down resistors can be confusing but Ohm's Law is always lurking around and in play. Here are two typical cases of using pull-down resistors. </div><div><br></div><div>Sometimes a pull-down resistor is only used to keep an input pin from floating and only needs to drain very low levels of current. This very low current allows you to use relatively large resistors and still maintain a low enough voltage drop at the leakage current to still produce a stable logic low voltage on the input pin. Stay under a few 100k and you should be fine.</div><div><br></div><div>Other times the pull-down resistor is used to measure the state of a button (or signal, many sensor provide only pull-down or open collector outputs) on a pin that uses an internal pull-up resistor. For an Arduino the internal pull-up resistors are spec'ed at 20k-50k (Rpu, Table 29-1, page 318, 328p datasheet Rev. 8271D–AVR–05/11). The internal pull-up and external pull-down resistors create a voltage divider that must reduced the voltage at the input pin to logic low level when the pull-down resistor is connected. The link below discuss logic level voltages on an Arduino with a 5V supply. </div><div><br></div><div><a href="https://learn.sparkfun.com/tutorials/logic-levels/arduino-logic-levels">https://learn.sparkfun.com/tutorials/logic-levels/arduino-logic-levels</a><br></div><div><br></div><div>From the link above, we see an Arduino needs 1.5V or less for a valid logic low on a digital input of a 5V chip. So we have a voltage divider with a pull-up of 20k (worst case for the strongest pull-up from the 328p spec) and need a voltage divider output of 1.5V. Using a voltage divider calculator (link below, thank you Google) tells us that our pull-down resistor needs to be 8,571.43 ohms or less to guarantee a logic low. </div><div><br></div><div>The other consideration is that the 328p has a maximum current limit of 40mA per pin. We would like to protect the chip in case we accidentally try to drive the pin high as an output (we have all done this at some time)! Using 5V and 40mA we find that an Arduino can drive a 125 ohm resistor without exceeding current specifications. </div><div><br></div><div>So a good pull-down using a "perfect" resistor would be between 8571.43 ohms and 125 ohms. Allowing for resistor tolerances, a good range would be something between 200 ohms and 8k. Within that range, a lower value will reach a logic-low faster than a higher value. This may not be a factor in most cases but could be important if you are monitoring a fast or short signal (too large a resistor could prevent a short signal pulse from pulling the pin all the way down to a logic low). Typically you would use a resistor value you already have on hand or is already on your bill-of-materials for the same project. </div><div><br></div><div>Looking at the 20k-50k ohm range of values spec'ed for Rpu, we can understand how someone could use a 10k pull-down and still work, sometimes. But you are better off staying within the specifications and using pull-downs that assure your input pins always sees valid logic levels. </div><div><br></div><div><a href="http://www.raltron.com/cust/tools/voltage_divider.asp">http://www.raltron.com/cust/tools/voltage_divider.asp</a><br></div><div><br></div><div>I hope this help explain a little about the selection of pull-up resistors.</div><div><br></div><div>Shane</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Oct 31, 2014 at 7:59 AM, Grawburg <span dir="ltr"><<a href="mailto:grawburg@myglnc.com" target="_blank">grawburg@myglnc.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">I've seen 1k, 3.3k, 10k all as acceptable values for pull-down resistors with Raspberry Pi & Arduino-type devices.<br>
How do you pick the proper one since this doesn't seem to be an Ohm's Law problem?<br>
<br>
<br>
Brian Grawburg<br>
<br>
<br>
<br>
<br>
<br>
<br>
_______________________________________________<br>
Triangle, NC Embedded Computing mailing list<br>
<a href="mailto:TriEmbed@triembed.org">TriEmbed@triembed.org</a><br>
<a href="http://mail.triembed.org/mailman/listinfo/triembed_triembed.org" target="_blank">http://mail.triembed.org/mailman/listinfo/triembed_triembed.org</a><br>
TriEmbed web site: <a href="http://TriEmbed.org" target="_blank">http://TriEmbed.org</a><br>
</blockquote></div><br></div>