internal pullup and interrupts

hello,

I am trying to use interrupt 0 (pin2 on an arduino uno r3 board) to measure rpm for an computer fan with an 10k resistor connected between arduino 5v and digital pin 2 I get somehow accurate readings without the 10k resistor and with internal pull-up activated I get readings all over the place, even lower values for increasing rpms

I have tried both:

pinMode(2, INPUT_PULLUP); and

digitalWrite(2, HIGH);

without any luck

can internal pull-up resistors be used in conjunction with interrupts ? am I doing something wrong in the way I activate them ?

thanks, razvan radu

The problem is likely that the internal pull-ups are weak - 3 to 5 times weaker than 10k. Try an external 4k7 and see if its even better than the 10k (should reject noise much better).