Introduction: How to Make Arduino Based Digital Tachometer Simple DIY Tutorial
Let see how to make Arduino based digital Tachometer.
Working principle :-
IR Sensor get penetrate by motion of motor shaft, signal are transfer from IR Senor module to Arduino.
This signal are processed in Arduino according to code loaded on it.
Then Arduino transfer signals to LCD Screen to display RPM
Step 1: Video
Step 2: Material Reuired
1) IR Sensor module :- http://amzn.to/2mOUVyw
2) LCD Screen :- http://amzn.to/2lxF1bp
3) Arduino Nano :- http://amzn.to/2lxF1bp
4) Zero PCB :- http://amzn.to/2lxF1bp
5) Header pins :- http://amzn.to/2lxF1bp
6) 9V Batter
Step 3: Electrical Circuit
Kindly go through the attached circuit diagram.
https://easyeda.com/sharmaz747/Arduino_techometer-...
IR Sensor Arduino
VCC----------------5V
GND----------------GND
OUT-----------------2(digital pin no. 2)
16X2 LCD Arduino
VSS------------------ GND
VCC----------------- +5V
VEE------------------ POT
RS-------------------- 12
R/W----------------- GND
E--------------------- 11
DB0----------------
DB1----------------
DB2----------------
DB3----------------
DB4------------------ 6
DB5------------------ 5
DB6------------------ 4
DB7---------------- 3
LED+--------------- +5V
LED----------------- GND
Visit https://easyeda.com/
to design & buy your custom make PCB
Step 4: Procedure
Bring a Zero PCB, Mount female header pin on PCB
Place arduino and LCD Screen on PCB
Make solder connection where it is required,
refer electrical drawing for better understanding.
place IR Senor module on PCB in way that its sensor face toward the
wheel of motor to whom RPM have to measure.
Connect the Arduino with PC to upload code.
Then connect the 9V battery to power up arduino & LCD 16 X 2 screen
you can adjust the brightness of screen by rotating that Knob connected at VEE of LCD Screen
Now you are ready to take RPM reading.
Manually rotate the Wheel of motor you can see RPM Reading are appear on screen
feel free to comment below
Thank for your attention hope you like this project
Step 5: Arduino Code
Click here to download Arduino code
upload the code to Arduino
Be sure you have selected right Board & port to successfully upload the code
Attachments

Participated in the
Microcontroller Contest 2017

Participated in the
Sensors Contest 2017
44 Comments
Tip 1 year ago
Hello.
In the following program, I used the LCD in this post, and the calculation used by GreatScottLab in his Tachometer design:
https://www.instructables.com/DIY-Tachometer-RPM-M...
Please check his post for more details and explication. I just merged the codes to adapt to my situation, he is the creator and owner of the project.
Also, if you get the 14448 value, the user "jendam99" posted in the comments of the GreatScottLab post that a 100uF/16V electrolytic cap across the 5V and GND on the supply and a ceramic 10nF cap on the OUT and GND of the sensor resolves the problem. I used the 100uF/16V and the 100nF (because that's what I had at that time)
I just borrowed the info and done some modification, the work it's not mine!
**************************************************************************************************
#include
LiquidCrystal lcd(12,11,6,5,4,3);
unsigned long rpmtime;
float rpmfloat;
unsigned int rpm;
bool tooslow = 1;
void setup()
{
lcd.begin(16,2); //initialize LCD
pinMode(2, INPUT);
TCCR1A = 0;
TCCR1B = 0;
TCCR1B |= (1 << CS12); //Prescaler 256
TIMSK1 |= (1 << TOIE1); //enable timer overflow
//digitalWrite(2 ,HIGH);// Instead of using a pull up resistor
attachInterrupt(0,RPM,FALLING); //attaching the interrupt
}
ISR(TIMER1_OVF_vect) {
tooslow = 1;
}
void loop()
{
delay(1000);
if (tooslow == 1) {
lcd.clear();lcd.setCursor(0,0);
lcd.print("_TACHOMETER_");
lcd.setCursor(0,1);
lcd.print("SLOW!");
}
else {
rpmfloat = 120 / (rpmtime/ 31250.00);
rpm = round(rpmfloat);
lcd.clear();
lcd.setCursor(0,0);
lcd.print("_TACHOMETER_");
lcd.setCursor(0,1);
lcd.print(rpm);
lcd.print(" RPM");
}
}
void RPM () {
rpmtime = TCNT1;
TCNT1 = 0;
tooslow = 0;
}
Question 2 years ago
Where is the Ir sensor declared in the arduino code, I can’t seem to figure it out.
6 years ago
Hello Sir,
Will this work to measure the RPM for my RC gas engine propeller
or have you now an other tutorial to measure the rpm of a rc plane
Thanks
fourstar
Reply 5 years ago
I'm working on that right now...
5 years ago
In the circuit diagram, the output pin of the IR sensor unit is connected to the Arduino D2 pin. But where on the Arduino code is the input pin declared? Am I the only one that is not being able to make it work?
Reply 5 years ago
Hi!
See my comments above... It is also common to read around 10 Rpm figures into a moving array and average them so the display is not to glitchy.
5 years ago
k1200s
There are errors throughout; the 68k resistor should not be in there, the D2 input should go to the output pf the op-amp and not the LED, and the pin assignments for the Nano are wrong, I'm working my way through them.
attachInterrupt(0,isr,RISING);
the zero in the above refers to pin D2, which actually on a nano is Pin5... so should read...
attachInterrupt(5,isr,RISING)
I can see that it will work but it is not written up too well :(
5 years ago
it also works nicely with a cheap hall sensor-pcb from eBay! This is my first project with an Arduino (Pro Mini) - and it feels good;-) !!Thank you!!
next quick Question: Looking at the sketch, I do not see where/how pin D2 is defined as an input (I need to know for further modifications and playing around with a rotary encoder). I would be very nice if you could help with an answer.
5 years ago
Quick question: Does the Arduino keep track of the time that it runs? You don't have to start some special 'clock' operation?
I can't believe how concise this code is compared to other tachometer tutorials I've seen. Nice tutorial!
5 years ago
the arduino code download link goes to a Google page that says it violates terms of service for URL shortener..
Perhaps just past the code in "code" brackets, then no one has to download anything from nefarious places.
Reply 5 years ago
it is fix,
http://www.mediafire.com/file/qb57bnuww0us465/tachometer-using-arduino.ino
6 years ago
while I have downloaded the project, I haven't had the opportunity to use it as yet. Tried to read through the project and had a difficult time understanding what the person was trying to convey. Not a very explanation of how to build it, however, being a retired engineer being able to build directly from schematics and upload code to the nano makes things quite easy for me, but I think not for a beginner in the business.
Reply 6 years ago
I'll try to make my explanation more efficient in upcoming projects thanks for your inputs
Reply 5 years ago
hi sir can u plz forwad me the code cause the previous link to the code doesnt work thanks
Reply 6 years ago
Thank you for your reply. I was not trying to be mean when I commented, But as a retired Electronics Engineer I have had to write Instruction Manuals and Build Manuals. I have found that the "KISS) method is the best way to approach. (KISS Keep It Simple Stupid!). That way even the least trained person with a minimum of experience can usually build from a manual. Again though thank you for the reply. BTW, I'm 68 years young and still myself busy with electronic projects here at home. You don't use it, you lose it!
Reply 6 years ago
yes its my honor to have advice from people like you who have a huge experience in your field, this will add more value to my work & KISS is best way to present your ideas, keep motivate us thanks
Reply 5 years ago
hi sir can u plz forwad me the code cause the previous link to the code doesnt work thanks
6 years ago
hello sir,
i want to ask you, how to change rpm output to m/s output?
could you help me to resolve in arduino sketch?. thank you
6 years ago
If you download the pdf there is no code link. Bummer
Reply 6 years ago
try this:
http://www.mediafire.com/file/qb57bnuww0us465/tach...