Tachometer and interrupt, can I improve it?

Hi:

I'm using this to read RPM from electric motors. I'm using a IR sensor and a IR emiter (I can use a LED for that purpose).

It seems to work but the accuracy is +/-60 as I count pulses per second. I tried reading every 100 millis but then when I multiply by 600 it gives even worse results.

How can I improve this for more accuracy at lower RPM? Thanks

//  IR TACHOMETER

const byte interruptPin = 2;
volatile int pulses = 0;

void setup() {
  pinMode(interruptPin, INPUT_PULLUP);
  Serial.begin(115200);
  attachInterrupt(digitalPinToInterrupt(interruptPin), blink, RISING);
}

void loop() {
  delay(1000);
  noInterrupts();
  Serial.println(pulses*60);
  pulses =0;
  interrupts();
}

void blink() {
  pulses = pulses + 1;
}

Then I tried with millis() but to the same results:

//  IR TACHOMETER

const byte interruptPin = 2;
volatile int pulses = 0;
int startMillis;

void setup() {
  pinMode(interruptPin, INPUT_PULLUP);
  Serial.begin(115200);
  attachInterrupt(digitalPinToInterrupt(interruptPin), blink, RISING);
}

void loop() {
  startMillis = millis();
  while (millis()-startMillis < 1000){}
  noInterrupts();
  Serial.println(pulses*60);
  pulses = 0;
  interrupts();
}

void blink() {
  pulses = pulses + 1;
}

How can I improve this for more accuracy at lower RPM?

Count for a longer time.

You simply can't get around the basic counting error (+/- sqrt(N) out of N counts for a typical random process). That is a fundamental principle of sampling and counting statistics.

Change your approach to measuring,. Instead of measuring the number of pulses in a fixed period of time, determine the time period for a fixed number of pulses.

Time per pulse is the way to go indeed.
Measure how long it takes to read 10 pulses. Or if it's really slow, just one pulse. That will give you much better resolution.

For higher speeds counting pulses per time often works better.