Notes about the pull-up

The motion sensor i finished yesterday needed some last tests; namely, what resistor should i use? Internal? External? And in the case of external, what value? Now the internal pull-up resistors of the Arduino are 20 k. But why not try to use a higher value, cause even with this resistor the rule V = I * R applies, right? When the JeeNode is in power down mode, i measure 1.36V over the external (100 k) resistor I used till now. That means there’s a current of 13.6 μA going through the resistor. With the internal 20k resistor this would be 5 times more: 68 μA! Yuck! And all that in power down mode, no way!

OK; i bought a huge case with an assortment of resistors a few years ago, ranging from 12Ω to 1 MΩ. Hey, let’s try that last one, 1 MΩ. This will add an additional factor of 10 to the external resistor value, resulting in the current dropping to 1.36 μA. And guess what; with this resistor the behavior of the PIR didn’t change; this is very nice! I hope I’m not overlooking or breaking any electrical laws or rules by doing this, but this seems the right thing to do..

Programming the XBee and placing it in the breakout board is all there’s left to do; I guess you could say this 3rd sensor is finished! 🙂

Tagged , , . Bookmark the permalink.

2 Responses to Notes about the pull-up

  1. Jean-Claude Wippler says:

    Yes, 1 MΩ should work – it’ll be more sensitive to noise, so don’t make the lines to the PIR sensor too long. Note that current is only drawn when pulled down, so if no-motion is “1”, then the internal pull-up isn’t so bad (you could even turn it off once triggered, and periodically re-enable it to check until the input is high again).

    My impression is that there are always more tricks waiting behind the horizon 🙂

  2. Thanks,

    I “sensed” there would be a resistor value where the PIR output would start jumping up and down again, making it unreliable. But from what I’ve seen till now, it seems to be working just fine. Now it’s a matter of looking at what the real life test will bring. And indeed, keeping an eye on that horizon 🙂

Leave a Reply

Your email address will not be published. Required fields are marked *