RPM Counter Using Arduino UNO

RPM Counter Using Arduino UNO

RPM Counter Using Arduino UNO, circuit diagram,arduino frequency counter
RPM Counter Circuit

RPM Counter Using Arduino UNO

[otw_is sidebar=otw-sidebar-1]

In this article we will learn how to make RPM Counter Using Arduino UNO.
In the last post we will learn how to make Trellis Shield Latching Keyboard test circuit in proteus. You can visit our website,
I hope you appreciate my work, let’s discuss about today’s project.

 

 

Components:

  1. Arduino UNO
  2. LCD display
  3. I2C module
  4. Speed sensor
  5. Jumper wires

[otw_is sidebar=otw-sidebar-3]

arduino frequency counter

 

Construction…

  • Connect SDA pin of I2C module with A5 pin of Arduino UNO
  • Connect SCL pin of I2C module with A4 pin of Arduino UNO
  • Connect VCC pin of I2C module with VCC pin of Arduino UNO
  • Connect GND pin of I2C module with GND pin of Arduino UNO
  • Connect VCC pin of Speed sensor with VCC pin of Arduino UNO
  • Connect GND pin of Speed sensor with GND pin of Arduino UNO
  • Connect signal pin of Speed sensor with Digital pin 2 of Arduino UNO
  • Dress up the wires clean and tidy

Working…                                                                                    

An RPM (Revolutions per Minute) counter, also known as a tachometer, It is a device that measures the rotational speed of a motor, engine, or any rotating object. You can build an RPM counter using an Arduino Uno and a few additional components

[otw_is sidebar=otw-sidebar-2]

Applications…

  1. Automotive Industry
  2. Manufacturing and Machinery
  3. Aircraft and Aerospace
  4. Agriculture
  5. Research and Development

Advantages…

  1. Monitoring Engine Performance
  2. Preventing Over-Revving
  3. Maintenance and Diagnostics
  4. Controlling Machinery Speed
  5. Fuel Efficiency

Program images of RPM Counter..

 

RPM Counter Using Arduino UNO
RPM Counter Program Code

arduino frequency counter code

 

RPM Counter Using Arduino UNO ,arduino frequency counter code
RPM Counter circuit Program code
RPM Counter Using Arduino UNO
RPM Counter circuit Program code

Program code…

[dt_code]

#include <Wire.h>

#include <LiquidCrystal_I2C.h>

 

// Initialize the I2C LCD display

LiquidCrystal_I2C lcd(0x27, 16, 2);

 

// Initialize the Infrared Speed Sensor

const int speedSensorPin = 2;

unsigned long prevTime = 0;

unsigned long currentTime = 0;

unsigned long elapsedTime = 0;

int count = 0;

 

void setup() {

lcd.init();

lcd.backlight();

lcd.setCursor(0, 0);

lcd.print(“Speed Sensor:”);

lcd.setCursor(0, 1);

lcd.print(“Count: 0”);

 

pinMode(speedSensorPin, INPUT);

attachInterrupt(digitalPinToInterrupt(speedSensorPin), speedSensorISR, RISING);

}

 

void loop() {

// Calculate speed and display it on the LCD

currentTime = millis();

elapsedTime = currentTime – prevTime;

 

if (elapsedTime >= 1000) {

float speed = (count * 60) / (elapsedTime / 1000.0); // Speed in RPM

lcd.setCursor(0, 1);

lcd.print(“Count: ” + String(count) + ”   “);

lcd.setCursor(0, 0);

lcd.print(“Speed: ” + String(speed) + ” RPM   “);

count = 0;

prevTime = currentTime;

}

}

 

void speedSensorISR() {

// This function is called when the speed sensor detects a rotation

count++;

}

[/dt_code]