the rev variable should be volatile unsigned long rev; The float is bad idea to increment in isr. Later in the loop you can cast it into float. Also use unsigned long instead if signed int. Use micros instead of millis to get more accuracy. This code lies with low speed because of quantization noise. The good idea is to calculate interval between interrupts in microceconds as a base of rpm then revert the result. On high speed it lies because on inaccuracy of micros(). The best code is using both methods - store the time interval of last poll and a counter. If you’re interesting i can paste the code.
Sergei - can you explain your code. Does your "Smart Delay" Library need to be downloaded and installed before using the code your provide here. I tried to compile your code and get an error "Error compiling for Arduino boards. I am measuring slow speed RPM's in a range of 4 - 20. The code in these type TH-cam videos returns inaccurate numbers in the low hundreds. Was hoping your code would work for my application -- thanks
now how would i put this in my car.. assuming you would eliminate the IR pcb and only need the signal wire from the original tach and power to the controller?
Your project is really good and done neatly. actually i am working on a similar project which requires the total count of the revolutions (counter) for a definate time period, and that time period is decided by another sensor. sir please help
Is there an ardino board that can transfer the RPM info (and plus other data from possibly other sensors) to a smart phone..? For example via bluetooth
hello! what do you think/ know is maximum rpm this type of sensor is capable of measuring. I need to measure the rpm on a quadcopter motor at full speed.
Hi, I implement a tachometer Arduino (nano) with an Infrared sensor. I want to add a stopwatch program to the tachometer program. I want by pressing the button the time to start and by second pressing the time to stop and by third pressing the time is to reset. But since the tachometer program uses a "millis" function i cannot use the millis for the stopwatch. I need help for finishing the program. I upload the tachometer and the stopwatch programs.
Mr innovative, when the tachometer shows the maximum RPM of a spinning object, I want the display to stop reading further and show the reading so as to note the reading till it is reset, what modification to the sketch be done. thank you
You cant use this outside it ll detect the infrared from the sun unless and until you lower the sensitvity of the ir detector or you cover the the sensor receiver.
Dear Sharmaz, Thank you very much for this valuable video, really it is a good lesson for me and I get a new information from it, also I want to ask you about the Arduino code , why you used the " void isr ()" in the code? If possible would you please just explain what exactly it does in the code?
using an interrupt can free the microcontroller to get some other work done while not missing the IR Sensor input, without ISR (Interrupt Service Routines) there are huge possibilities of missing input pulse,
@@RGPinger :) Now I had shelved this project. But I understood the reason for "NOT" functioning. Problem, it's the Chinese cables, which I bought and I didn't think to test them, before mounting them on Arduino .... On 400 cables (they were cheap and I let myself be tempted) I found about thirty of them working. They are too fragile and poor. I'll try again later with some reliable cables.
hi sir, i have question about your code. void isr() //interrupt service routine { rev++; } what do you mean about rev? can you tell me what is it? thanks before.
hi broo wen I plugged in USB for ardunio nano to my phone , light is blinking but wen I am installing codes from ardunio app it's showing "no board found".and all settings I made properly but it's not getting software.y and my phone is motog4+.
Hello very interested in this account turn, I want to know if there is pcb for the electronic circuit or if there is way to download it. thank you for your answers cordially
Mysterious Manish out wire is connected with digital pin 2 of arduino, vcc pin is connected with 5v of arduino and gnd is connected with gnd of arduino
Can someone explain this : rpm=(rev/time)*60.000 ? Why 60.000 . On other sites/videos I;ve seen 30.000 or even 20.000 . Does it have to do with how many white bars are on the circle ( how many times the interrupt functions does ++ in 360 degree turn ) ? Because im using a low voltage to power my motor and it shows +5000 rpm, which is weird cuz its not spinnning that fast and im only using one white line .
I wanted to ask you why the code you provided doesn't work? I use Arduino Nano but with other sketches I had no problems. Is it necessary to add libraries for this project here? If so, how do you proceed? Thank you.
I tried another code that was not compiled before, I thought the library would be updated automatically, instead you need to update all the libraries that serve manually. Finally we begin to reason .... :)
you saved my ass, BTW the code is missing one line, after "int time" add this "int enco = 2;" this is declaring your pin 2, thats where interrup 0 is, and if you dont declare this pin... well. it will never work :)
Good video but I made this thing and my opinion is that this system is NOT very stable and gives fluctuating results. . The most of the sensors don’t work,so you must use the correct sensor and good refective material!
may i ask for some suggestions on the correct sensors , to be informed i have to convert it to AC powered to fit for my project for a machine in an industry. Thanks
Wahid Abir: I used type 86009 Infrarood Barrière Module Auto Obstakel Sensor with ptientiometer for regulating the distance, and it works well! I can’t upload a photo,so I give you this link to a video. th-cam.com/video/ZVr9WuACKY4/w-d-xo.html
bro im having error in compiling code for arduino it is showing.....plz help me out Arduino: 1.8.2 (Windows 7), Board: "Arduino/Genuino Uno" c:/program files (x86)/arduino/hardware/tools/avr/bin/../lib/gcc/avr/4.9.2/../../../../avr/bin/ld.exe: unrecognized option '-plugin' c:/program files (x86)/arduino/hardware/tools/avr/bin/../lib/gcc/avr/4.9.2/../../../../avr/bin/ld.exe: use the --help option for usage information collect2.exe: error: ld returned 1 exit status exit status 1 Error compiling for board Arduino/Genuino Uno.
why do so many people put crap music in a video??
because your mother is crap
royalty free i assume
Royalty Free, otherwise hé must pay for normal music.
No speaky Inglesh!
@@kleetus92 Maybe no English, but is smart.
the rev variable should be
volatile unsigned long rev;
The float is bad idea to increment in isr.
Later in the loop you can cast it into float.
Also use unsigned long instead if signed int.
Use micros instead of millis to get more accuracy.
This code lies with low speed because of quantization noise.
The good idea is to calculate interval between interrupts in microceconds as a base of rpm then revert the result.
On high speed it lies because on inaccuracy of micros().
The best code is using both methods - store the time interval of last poll and a counter.
If you’re interesting i can paste the code.
yes please do this my guy
Sergei Keler yes bro please paste the code
По коду создалось впечатление, что автор "слышал звон, но не знает, где он..."
Sir code?
Sergei - can you explain your code. Does your "Smart Delay" Library need to be downloaded and installed before using the code your provide here. I tried to compile your code and get an error "Error compiling for Arduino boards. I am measuring slow speed RPM's in a range of 4 - 20. The code in these type TH-cam videos returns inaccurate numbers in the low hundreds. Was hoping your code would work for my application -- thanks
When building boards , what are the acceptable power /voltage requirements for capacitors, resisters etc as far as wattage and tolerance
your explanation is too good sir....
thanks
Excellent!!! Fantastic and thanks for sharing!!!
NIce project! And i have Made it and Its work s 👍
now how would i put this in my car.. assuming you would eliminate the IR pcb and only need the signal wire from the original tach and power to the controller?
Really, really nice, bro!
MC's Creations thanks bro
how if i want to add this tachometer with alarm ?
Thanks it works great, but I have one problem over 32,000RPM it readings change to negative and counts down.
Awesome project...brother
good job , im working on tachometer project to my lathe and this is the most closed to what i d like to have in my project , thanks for sareing
thanks
I appreciate the knowledge shared. thanks
is this as accurate as mz80 ?
It can measure induction or all ac motor speed
Thanks for your demo and efforts. I just want to say that there is too much fluctuation and the results are in accurate.
how to make this accurate?
Bro i have tachometer it also not showing accurate? Any solution please?
best idea ever seen
Thanks for this good project....how can I get this code to run on atmega16 chip?
Nice video
But I need same circuit and material but coding for counting
Coding please
Your project is really good and done neatly.
actually i am working on a similar project which requires the total count of the revolutions (counter) for a definate time period, and that time period is decided by another sensor.
sir please help
Is there an ardino board that can transfer the RPM info (and plus other data from possibly other sensors) to a smart phone..? For example via bluetooth
You can using Bluetooth module.
Will it works for 8x2 character LCD ?
hello! what do you think/ know is maximum rpm this type of sensor is capable of measuring. I need to measure the rpm on a quadcopter motor at full speed.
i have tested it for 15k-17k rpm but quadcopter motor have >40k RPM so it lill bit tricky to measure
how if i want to add this tachometer with alarm ?
Hi, What is value=0 written for ?? it has no use in code ahead ? can it be skipped ??
Hi,
I implement a tachometer Arduino (nano) with an Infrared sensor. I want to add a stopwatch program to the tachometer program. I want by pressing the button the time to start and by second pressing the time to stop and by third pressing the time is to reset. But since the tachometer program uses a "millis" function i cannot use the millis for the stopwatch. I need help for finishing the program.
I upload the tachometer and the stopwatch programs.
How many female header pins required
Mr innovative, when the tachometer shows the maximum RPM of a spinning object, I want the display to stop reading further and show the reading so as to note the reading till it is reset, what modification to the sketch be done. thank you
You cant use this outside it ll detect the infrared from the sun unless and until you lower the sensitvity of the ir detector or you cover the the sensor receiver.
Love you ho gya wadda wadda
What if i need to record these reading for some analysis?
CAN YOU EXPLAIN ME THE INTERRUPT FUNCTION AND WHAT IS THE PURPOSE TO ADD MILLIS AND OLD TIME
since we are using arduino mega for that we have changed the pin numbers of LCD in code but where to change pin no of ir sensor output pin in code
madhu kumar ir is connected to interupt pin don't change that
excuse me, since i'm newbie in using arduino. i wanna ask something, is your tachometer has a specific limit? thanks ^^
Alexander Ucok yes it has many limits and bugs. See my comment above.
I make the whole tachometer and upload the program.But LED not shows the name tachometer and rpm..Please suggest the solution
Dear Sharmaz,
Thank you very much for this valuable video, really it is a good lesson for me and I get a new information from it, also I want to ask you about the Arduino code , why you used the " void isr ()" in the code? If possible would you please just explain what exactly it does in the code?
using an interrupt can free the microcontroller to get some other work done while not missing the IR Sensor input, without ISR (Interrupt Service Routines) there are huge possibilities of missing input pulse,
Assembled this project. Sketch loaded on Arduino Nano but no entry appears on the display. Why?
because u noob.
@@RGPinger
:) Now I had shelved this project. But I understood the reason for "NOT" functioning. Problem, it's the Chinese cables, which I bought and I didn't think to test them, before mounting them on Arduino .... On 400 cables (they were cheap and I let myself be tempted) I found about thirty of them working. They are too fragile and poor. I'll try again later with some reliable cables.
Plzz upload a video on.. How to make oled display techometer
Can you please help me to show results on serial monitor instead of LCD.
can use a inductive sensor npn to replace the IR sensor , how if is posible ?
Marcelo farrace This is possible, you can see it in my video and it works even better than IR
How the rpm is getting calculated.. I didnt understand the formula in your code plz explain
hi sir, i have question about your code.
void isr() //interrupt service routine
{
rev++;
}
what do you mean about rev? can you tell me what is it?
thanks before.
it is incrementing the rev (revolution)
hi broo
wen I plugged in USB for ardunio nano to my phone , light is blinking but wen I am installing codes from ardunio app it's showing "no board found".and all settings I made properly but it's not getting software.y and my phone is motog4+.
Hello
very interested in this account turn, I want to know if there is pcb for the electronic circuit or if there is way to download it.
thank you for your answers cordially
sir i want to connect OLED display insted of connecting lcd can you able to give the circuit please
Overall budget?
I did all the assembly but it does not work for me, I do not know if it's due to the code?
can i get arduino code without lcd, but using serial monitor?
Will u pls send me the source program for the aurdino....?
Is the code given in the link is it working .
CAN YOU SEND THE CONNECTION, IN THE VIDEO I DO NOT UNDERSTAND IT, TO FEED THE 5V AND THE EARTH WHERE TO GO?
THANK YOU
easyeda.com/sharmaz747/Arduino_techometer-1682044268dc49a4b0106a43e2b0ba62
how if i want to add this tachometer with alarm ?
hii iam vinay
i prepared the project as shown by u .
iam not getting the output. the display is showing blank
In ur circuit diagram........ Which wire is ground, Vcc, Output for IR sensor & where should it be connected to the arduino.... Plz help
Mysterious Manish out wire is connected with digital pin 2 of arduino, vcc pin is connected with 5v of arduino and gnd is connected with gnd of arduino
Mr Innovative..... And a resistance 100k is shown connected to display...... What's that mean
VEE of LCD is connected 100k pot to adjust brightness
Mr Innovative... The points which u have marked as 5V & GND in the diagram.... Are they connected to arduino's 5V & GND place?
yes all the point which marked as 5V & GND are connected with arduino's 5V & Gnd
Can someone explain this : rpm=(rev/time)*60.000 ? Why 60.000 . On other sites/videos I;ve seen 30.000 or even 20.000 . Does it have to do with how many white bars are on the circle ( how many times the interrupt functions does ++ in 360 degree turn ) ? Because im using a low voltage to power my motor and it shows +5000 rpm, which is weird cuz its not spinnning that fast and im only using one white line .
A minute has 60.000 ms
i have done this but it shows incorrect speed values is there any solution in the program
Where I can buy zero pcb?
Can you make it for bike
can I use Arduino IR obstacle sensor for this code?
andrahyzer koster thats what he used
the code for Arduino is not working please send me another link for code please... and ur project was nice...
how if i want to add this tachometer with alarm ?
ERRO rgb_lcd.h: No such file or directory
Sir, how to apply +5V to LCD?
I wanted to ask you why the code you provided doesn't work? I use Arduino Nano but with other sketches I had no problems. Is it necessary to add libraries for this project here? If so, how do you proceed? Thank you.
I tried another code that was not compiled before, I thought the library would be updated automatically, instead you need to update all the libraries that serve manually. Finally we begin to reason .... :)
hii can i get a project report for this??
in ur code rpm = rev/time*60000, what is 60000? please tell me, thanks
that's how many milliseconds are in a minute
I put one of these together to measure RPM for the FADEC of my home made jet engine, here is hoping she works at 100,000 RPM! lol
you forgot to declare on your code the signal from IR sensor
it was declared as an interrupt pin
you saved my ass, BTW the code is missing one line, after "int time" add this "int enco = 2;" this is declaring your pin 2, thats where interrup 0 is, and if you dont declare this pin... well. it will never work :)
enco what is this. and also a one question how to declare input data pin
Works on 0 too .. Depends upon the microcontroller
And ardunio type
Good video but I made this thing and my opinion is that this system is NOT very stable and gives fluctuating results. . The most of the sensors don’t work,so you must use the correct sensor and good refective material!
may i ask for some suggestions on the correct sensors , to be informed i have to convert it to AC powered to fit for my project for a machine in an industry.
Thanks
Wahid Abir: I used type 86009 Infrarood Barrière Module Auto Obstakel Sensor with ptientiometer for regulating the distance, and it works well! I can’t upload a photo,so I give you this link to a video. th-cam.com/video/ZVr9WuACKY4/w-d-xo.html
I want the arduino code of these .Could you share it?
if I want get out put every 100 milliseconds instead of 1 second?????
Please send me code for arduino uno without lcd because i want to use serial monitor
isme code upload nhi ho rhe h code error show please solve my problem
I m not able to find code..... As clicked on code link disable error appears
www.mediafire.com/file/qb57bnuww0us465/tachometer-using-arduino.ino
thanks a lot !!!!
Code isn't working.
Can you help me ?
Why code is not compiling
I can't upload program to arduino
Please help me
Arduino Multitask control relay timer with keypad
plez help me
how to make this project
bro im having error in compiling code for arduino it is showing.....plz help me out
Arduino: 1.8.2 (Windows 7), Board: "Arduino/Genuino Uno"
c:/program files (x86)/arduino/hardware/tools/avr/bin/../lib/gcc/avr/4.9.2/../../../../avr/bin/ld.exe: unrecognized option '-plugin'
c:/program files (x86)/arduino/hardware/tools/avr/bin/../lib/gcc/avr/4.9.2/../../../../avr/bin/ld.exe: use the --help option for usage information
collect2.exe: error: ld returned 1 exit status
exit status 1
Error compiling for board Arduino/Genuino Uno.
Manish Goyal ask it on arduino forums website, you would get much quicker and better answer
can I use arduino uno
yes u can
how if i want to add this tachometer with alarm ?
Why not count rpm in my sensor
Its not a meter it rpm always increases what is round per meter it does
Is this circuit working
Sir i dont understand circuit drawing
code arduino plz ;i can't upload it
Showing Return 0 is error
I love you
Hahaha this video was posted 9 months ago from 25/12/17
Taking up too much space. good project though.
Sir I can't load cords to urduino
TODO MUY BIEN PERO EL CODIGO :(
Eléctricos & automatización SAS en liquidación el codigo es una mierda. Me parece que el primer codigo del hombre.
Pointless with out an explanation
इसमे टाइम नहि दिखा रहा है
If your gonna do a tutorial, loose the horrible music.
Compilation error
www.dropbox.com/s/p06qymoxeboluc3/P1050670.JPG?dl=0
I haven't connected the sensor yet, but at least I see RPM starting at zero.
Annoying music
WTF is that NOISE!!!
müzik bok gibi
how if i want to add this tachometer with warning alert ?