You do not how you did well!! By watching your video , people don't need to did all that work that reach the final good result... Thanks for that you shared your experience❤
ปีที่แล้ว +1
This article was very detailed and useful for creating an Arduino controlled tachometer. Thank you!
The only man on TH-cam showing all the problems actually happens with a developer, this is what i was looking since a week! Thanks a lot dear for such a decent explaination. I tried many sketches on IR sensor but that was not accurate as shown in this video. No i know which sensor & sketches givea accurate result.
Please provide me the Arduino code of Tachometer used in this video... Please send me on moinyunus@gmail.com I need it... I also have email you before few days. please check & reply.
An interrupts based program does not really work because there is overcounting if the pin stays low for some time. Instead there should be an explicit counting of pin transitions within the loop and resetting the count every so often (2000 msec or whatever is your favorite number of milliseconds). Correction: additional experiments showed that interrupts work fine if the sensor is placed correctly.
Yes the link has been altered, you can find the code if you go to Arduino.cc and search Tutorials for "tachometer". I can also email you the code if you send an email to soldermelt@gmail.com.
Easy Peasy Tachometer Code: // Easy Peasy Tachometer //James Rovere 2020 #include #include // You may have to edit library for 128x64, default is //128 x 32. #define OLED_WIDTH 128 #define OLED_HEIGHT 64 #define OLED_ADDR 0x3C // A very common address for these displays. Adafruit_SSD1306 display(OLED_WIDTH, OLED_HEIGHT); float value=0; float rev=0; int rpm; int oldtime=0; int time; void isr() //interrupt service routine { rev++; } void setup() { display.begin(SSD1306_SWITCHCAPVCC, OLED_ADDR); display.clearDisplay();
digitalWrite(2 ,HIGH);// Instead of using a pull up resistor attachInterrupt(0,isr,RISING); //attaching the interrupt } void loop() { delay(2000);// 2 second delay detachInterrupt(0); //detaches the interrupt while calculating time=millis()-oldtime; //finds the time rpm=(rev/time)*60000; //calculates rpm oldtime=millis(); //saves the current time rev=0; display.clearDisplay(); display.setTextSize(2); display.setTextColor(WHITE); display.setCursor(0, 0);// Vertical, Horizontal. display.println("RPM:"); display.setTextSize(5); display.setTextColor(WHITE); display.setCursor(0,25); display.println(rpm); display.display();
But why was the IR sensor signal not adequate? I see on a schematic of the module TCRT5000 board, and 0.1uF capacitor in parallel with the IR receiver, and a 10K pullup resistor. This produces a lowpass filter that is 3dB down at 159Hz. I think that capacitor needs to be removed.
Perhaps you can tweak the IR sensor to work properly for you. I found that a Hall effect sensor is cheaper, smaller, simpler and more reliable to measure RPM than an IR sensor. Let me know if you have any success improving the IR sensor.
I found my tachometer project at Arduino.cc by searching for "PracticeMakesBetter" no spaces between the words. I do not know why it is not found searching for "Tachometer" now.
You do not how you did well!! By watching your video , people don't need to did all that work that reach the final good result... Thanks for that you shared your experience❤
This article was very detailed and useful for creating an Arduino controlled tachometer. Thank you!
This man out here doing God's work. Thank you!
The only man on TH-cam showing all the problems actually happens with a developer, this is what i was looking since a week! Thanks a lot dear for such a decent explaination.
I tried many sketches on IR sensor but that was not accurate as shown in this video.
No i know which sensor & sketches givea accurate result.
Thank you for your kind words, much appreciated.
Please provide me the Arduino code of Tachometer used in this video...
Please send me on
moinyunus@gmail.com
I need it...
I also have email you before few days. please check & reply.
I absolutely enjoyed this video. Thanks for the very awesome and informative content and keep it up!
Just what I was looking for, thanks and good job on the video.
Thank You for great and usefull informative video!
Best Wishes!
An interrupts based program does not really work because there is overcounting if the pin stays low for some time. Instead there should be an explicit counting of pin transitions within the loop and resetting the count every so often (2000 msec or whatever is your favorite number of milliseconds).
Correction: additional experiments showed that interrupts work fine if the sensor is placed correctly.
The arduino program with a Hall sensor works for most people.
@practicemakesbetter7132 That's correct, however a magnet attached to a blade of a for small propellers of an RC plane would throw it off balance.
informative, thanks for taking the time, but no link to the Arduino sketch. the link above just shows a pic.
Yes the link has been altered, you can find the code if you go to Arduino.cc and search Tutorials for "tachometer". I can also email you the code if you send an email to soldermelt@gmail.com.
Amazing! Thank you
Glad you liked it!
thank you
Easy Peasy Tachometer Code:
// Easy Peasy Tachometer
//James Rovere 2020
#include
#include // You may have to edit library for 128x64, default is //128 x 32.
#define OLED_WIDTH 128
#define OLED_HEIGHT 64
#define OLED_ADDR 0x3C // A very common address for these displays.
Adafruit_SSD1306 display(OLED_WIDTH, OLED_HEIGHT);
float value=0;
float rev=0;
int rpm;
int oldtime=0;
int time;
void isr() //interrupt service routine
{
rev++;
}
void setup()
{
display.begin(SSD1306_SWITCHCAPVCC, OLED_ADDR);
display.clearDisplay();
digitalWrite(2 ,HIGH);// Instead of using a pull up resistor
attachInterrupt(0,isr,RISING); //attaching the interrupt
}
void loop()
{
delay(2000);// 2 second delay
detachInterrupt(0); //detaches the interrupt while calculating
time=millis()-oldtime; //finds the time
rpm=(rev/time)*60000; //calculates rpm
oldtime=millis(); //saves the current time
rev=0;
display.clearDisplay();
display.setTextSize(2);
display.setTextColor(WHITE);
display.setCursor(0, 0);// Vertical, Horizontal.
display.println("RPM:");
display.setTextSize(5);
display.setTextColor(WHITE);
display.setCursor(0,25);
display.println(rpm);
display.display();
attachInterrupt(0,isr,RISING);
}
Hello friend, what should be changed in the code to do this, for example, with an ILI9341 TFT Display? Thanks
Sorry, I do not know, I suggest trying an Arduino support group to find the answer.
But why was the IR sensor signal not adequate? I see on a schematic of the module TCRT5000 board, and 0.1uF capacitor in parallel with the IR receiver, and a 10K pullup resistor. This produces a lowpass filter that is 3dB down at 159Hz. I think that capacitor needs to be removed.
Perhaps you can tweak the IR sensor to work properly for you. I found that a Hall effect sensor is cheaper, smaller, simpler and more reliable to measure RPM than an IR sensor. Let me know if you have any success improving the IR sensor.
Have you try to search for "tachometer" at Arduino.CC yourself? Which one is yours? Thank you.
Sorry for the delay, I could not find my Tachometer sketch at Arduino.cc either. Send me an email and I will send you my sketch.
I found my tachometer project at Arduino.cc by searching for "PracticeMakesBetter" no spaces between the words. I do not know why it is not found searching for "Tachometer" now.