• Scam Alert. Members are reminded to NOT send money to buy anything. Don't buy things remote and have it shipped - go get it yourself, pay in person, and take your equipment with you. Scammers have burned people on this forum. Urgency, secrecy, excuses, selling for friend, newish members, FUD, are RED FLAGS. A video conference call is not adequate assurance. Face to face interactions are required. Please report suspicions to the forum admins. Stay Safe - anyone can get scammed.

Bridgeport Mill Tachometer

Don’t touch it! It’s terminal!
9AC2076C-2D92-4F74-BA09-D1B91318DA2F.gif
 
Have you tried looking at Solarbotics here in Calgary they are situated around 32Ave and 12St in the north.
 
Have you tried looking at Solarbotics here in Calgary they are situated around 32Ave and 12St in the north.

Yup... kind of pricey. I got a switch, enclosure and 9V battery holder there.

 
Last edited:
still working on my mill controller, ran across a MUCH better tachometer framework. This library uses the main system clock to measure microseconds between pulses, takes maybe ten pulses and averages the time.

(correction - 30 pulses, should have read the code)

In testing it can easily track from1 Hz to 2500 Hz with good accuracy. 60 RPM to 150k RPM with my single trigger per revolution. Is not affected by other code in the loop, which I proved by adding a delay-flash-an-LED-delay after the frequency function, and changing the length of delay has no effect on accuracy.


The library is available in the usual Arduino <Manage Libraries> menu.

Here's my testing code:

#include <FreqMeasure.h>

// pin 8 is input

void setup() {
Serial.begin(57600);
FreqMeasure.begin();
pinMode(LED_BUILTIN, OUTPUT);
pinMode(8, INPUT);
}

double sum=0;
int count=0;

void loop() {
if (FreqMeasure.available()) {
// average several reading together
sum = sum + FreqMeasure.read();
count = count + 1;
if (count > 30) {
float frequency = FreqMeasure.countToFrequency(sum / count);
Serial.println(frequency);
Serial.println(frequency *60); // converted to RPM
sum = 0;
count = 0;
// otherstuff
digitalWrite(LED_BUILTIN, HIGH); // turn the LED on (HIGH is the voltage level)
delay(10); // wait a bit
digitalWrite(LED_BUILTIN, LOW); // turn the LED off by making the voltage LOW
delay(10); // wait a bit
}

}
}
 
Last edited:
still working on my mill controller, ran across a MUCH better tachometer framework. This library uses the main system clock to measure microseconds between pulses, takes maybe ten pulses and averages the time.

(correction - 30 pulses, should have read the code)

In testing it can easily track from1 Hz to 2500 Hz with good accuracy. 60 RPM to 150k RPM with my single trigger per revolution. Is not affected by other code in the loop, which I proved by adding a delay-flash-an-LED-delay after the frequency function, and changing the length of delay has no effect on accuracy.


The library is available in the usual Arduino <Manage Libraries> menu.

Here's my testing code:

#include <FreqMeasure.h>

// pin 8 is input

void setup() {
Serial.begin(57600);
FreqMeasure.begin();
pinMode(LED_BUILTIN, OUTPUT);
pinMode(8, INPUT);
}

double sum=0;
int count=0;

void loop() {
if (FreqMeasure.available()) {
// average several reading together
sum = sum + FreqMeasure.read();
count = count + 1;
if (count > 30) {
float frequency = FreqMeasure.countToFrequency(sum / count);
Serial.println(frequency);
Serial.println(frequency *60); // converted to RPM
sum = 0;
count = 0;
// otherstuff
digitalWrite(LED_BUILTIN, HIGH); // turn the LED on (HIGH is the voltage level)
delay(10); // wait a bit
digitalWrite(LED_BUILTIN, LOW); // turn the LED off by making the voltage LOW
delay(10); // wait a bit
}

}
}
that is the best method of sampling to achieve fast and accurate rpm returns
 
Back
Top