How much current do internal pull-up resistors draw on Teensy 3.1?

Status
Not open for further replies.
I am working on a very low power project, and I'd like to know if it's better to use an external or internal pull-up resistor for some buttons...
Thanks in advance
 
I am working on a very low power project, and I'd like to know if it's better to use an external or internal pull-up resistor for some buttons...
Thanks in advance

I would also like to know what the internal resistors are (pull-up /down)
Someone interested in measuring it?
 
Ok, I just made some real measurements to find out.

I connected a resistor from pin 2 to GND, and ran this:

Code:
void setup() {
  pinMode(2, INPUT_PULLUP);
}

void loop() {
}

Because I suspected the pullup might act more like a constant current (or something else non-linear, unlike a pure resistor), I tested with 2 different resistors: 1K and 10K.

Here's my results:

Code:
             Test  Measured  Computed
Board        Res   Voltage   Pullup
-----        ---   -------   ------
Teensy LC     1K    0.075    43000
             10K    0.624    42885

Teensy 3.1    1K    0.096    33375
             10K    0.757    33593

So it looks like the pullups are actually resistors, or a transistor circuit that's pretty faithfully emulating a resistor.

These measurements are on a single Teensy-LC and Teensy 3.1 which just happened to be sitting on my desk. I measured only at room temperature. I did this test with USB power, so each board was running from its own 3.3V on-chip regulator.

Freescale's datasheet says the pullups can be anywhere from 20K to 50K, which probably spans the wide range of power supply and temperature conditions.
 
The power (in watts) consumed by the pullup resistor is 10.89 / R, where R is the resistance. That power is only consumed when the pin is shorted to ground by the pushbutton.

If you use an external resistor, you can choose whatever value you like. But of course at extremely high resistor values, like over 1M, the signal will be very susceptible to induced noise or perhaps even leakage current from the transistors in the chip, if used at high temperatures. At the other extreme, very low value resistors will consume a lot of current, so you need to be mindful of the 3.3V power supply maximum, and the resistor's ability to dissipate the heat if that power level is sustained.
 
Status
Not open for further replies.
Back
Top