How reliable is INPUT_PULLUP? Anyone using it over an external resistor?

I have a flow meter that asks for a 3k-30k pullup resistor.

INPUT: 5-24 VDC @ 8 mA OUTPUT: NPN Sinking Open Collector @ 20 mA, Max.

It would be much easier to use INPUT_PULLUP on the signal pin then it would to make a circuit with a resistor in it...assuming that is safe to use.

Has anyone ever used INPUT_PULLUP as a pullup resistor for a similar connection? Also, does anyone know the value of said pullup resistor for each pin? I'm using an Arduino Mega and it says the pullup resistor can have a value of 20k-50k. I can't find any data that says which pins have which value for their pullup resistor.

You missunder that specification. The pull up resistor can be any value between those limits. These are weak pull up values and if you requirements are for 3 to 30K then I would use an external 15K resistor.

Grumpy_Mike:
You missunder that specification. The pull up resistor can be any value between those limits. These are weak pull up values and if you requirements are for 3 to 30K then I would use an external 15K resistor.

So you’re saying the 20k-50k is a random value and not definitive for each pin? I was hoping the pins I wanted to use these on (2, 3, 18, 19) might always be <= 30k…

Nope, not definitive.

Table 29-1:

RPU, I/O Pin Pull-up Resistor, 20 to 50 k