Arduino RPM Counter - Tachometer
Arduino RPM Counter - Tachometer
Home
Contact
Subscribe
Arduino Projects
Tachometer
Arduino Projects
Arduino IR
RPM
All about pH
measurement
Get a complimentary guide
for lab or process pH
measurement.
http://arduinoprojects101.com/arduino-rpm-counter-tachometer/
1/6
10/27/2014
2/6
10/27/2014
rpmcount = 0;
rpm = 0;
timeold = 0;
void loop()
{
//Update RPM every second
delay(1000);
//Don't process interrupts during calculations
detachInterrupt(0);
//Note that this would be 60*1000/(millis() - timeold)*rpmcount if the interrupt
//happened once per revolution instead of twice. Other multiples could be used
//for multi-bladed propellers or fans
rpm = 30*1000/(millis() - timeold)*rpmcount;
timeold = millis();
rpmcount = 0;
//Print out result to lcd
lcd.clear();
lcd.print("RPM=");
lcd.print(rpm);
//Restart the interrupt processing
attachInterrupt(0, rpm_fun, FALLING);
}
Note:
This code reading rpm with 2 propeller at the motor. This mean 2 cut of the infrared beam will count as 1 revolution.
You can modify this line to suit your use;
rpm = 30*1000/(millis() timeold)*rpmcount;
http://arduinoprojects101.com/arduino-rpm-counter-tachometer/
3/6
10/27/2014
Tagged as: arduino projects, arduino rpm conter, arduino tachometer, arduino uno, ir, led, phototransistor
Fluke VT04 IR
Thermometer
Powerful Addition, Fluke
VT04 W/ PyroBlend Plus
For Sharper Images!
Leave a Comment
Name *
E-mail *
Website
http://arduinoprojects101.com/arduino-rpm-counter-tachometer/
4/6
10/27/2014
Submit
Search
To search, type and hit enter
Categories
Arduino Projects (12)
Blog (2)
News (1)
Recent Posts
Arduino LiquidCrystal Character Creator
Arduino Servo Basic
Arduino Digital Switch
Shrinkify Your Arduino Projects
Arduino RPM Counter / Tachometer
Arduino Stopwatch
Arduino Temperature Sensor
Arduino Voltmeter
Connecting Arduino LCD Display
Arduino Police Strobe Light
Tag Cloud
16x2 arduino as isp arduino knight rider arduino lcd display arduino police strobe light
arduino projects
arduino serial communication arduino servo arduino stopwatch arduino tachometer arduino temperature sensor arduino thermometer
arduino uno
attiny basic
led light LM35 phototransistor police strobe light serial servo setup shrink single chip smaller stopwatch unboxing usb voltage voltage divider
voltmeter
http://arduinoprojects101.com/arduino-rpm-counter-tachometer/
5/6
10/27/2014
http://arduinoprojects101.com/arduino-rpm-counter-tachometer/
6/6