Project tutorial
Easy Peasy Tachometer

Easy Peasy Tachometer © GPL3+

Easy peasy reliable tachometer, that you can use to measure the rpm of tools, bicycle wheels, and robots using inexpensive parts.

  • 748 views
  • 0 comments
  • 2 respects

Components and supplies

About this project

My project is a home made reliable tachometer that is easy to make. I needed to build a tachometer to measure the speed of a DC motor, I could not find a reliable way of building a tachometer. I tried many ways to build a reliable tachometer until I succeeded.

Code

Easy Peasy Tachometer Arduino
It is a home made reliable tachometer, that can be used with an Arduino Uno or Nano that you can make to measure the speed of rotating objects on tools, bicycles, and robotics.
// Easy Peasy Tachometer
//James Rovere 2020
#include <Wire.h>
#include <Adafruit_SSD1306.h>// 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);


}
Easy Peasy Tachometer Arduino
It is a home made reliable tachometer, that can be used with an Arduino UNO or NANO that you can use to measure the speed of rotating objects on tools, bicycles, and robotics. For a complete tutorial follow this link https://youtu.be/2-J4f8-RX90
// Easy Peasy Tachometer
//James Rovere 2020
#include <Wire.h>
#include <Adafruit_SSD1306.h>// 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);


}

Custom parts and enclosures

Hall Sensor wiring diagram
Hall sensor vroxwaejew

Comments

Similar projects you might like

Arduino + Raspberry Pi + Ubidots Made Easy

Project tutorial by David Escobar

  • 15,388 views
  • 4 comments
  • 44 respects

Build a "Go Away!" Robot - Easy Starter Project for Kids

Project tutorial by FinderElectric

  • 3,338 views
  • 6 comments
  • 15 respects

How Easy Is It to Use a Thermistor?!

Project tutorial by Marcazzan_M

  • 16,905 views
  • 5 comments
  • 14 respects

IoT Made Easy w/ UNO, ESP-01, ThingSpeak & MIT App Inventor

Project tutorial by MJRoBot

  • 37,072 views
  • 16 comments
  • 66 respects

Mobile Controlled Bluetooth Car || Easy || Simple || HC-05

Project tutorial by Team Vishal soni

  • 24,372 views
  • 4 comments
  • 21 respects

Super Easy to Build 1Sheeld 2 Wheel Drive Robot

Project tutorial by Garry Gerwer and Ahmed Hamdy

  • 21,021 views
  • 3 comments
  • 35 respects
Add projectSign up / Login