0% found this document useful (0 votes)
25 views4 pages

Anemometer Report - Dimension and Simulation

Uploaded by

hw1843461
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
25 views4 pages

Anemometer Report - Dimension and Simulation

Uploaded by

hw1843461
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 4

Anemometer Report - Dimension and Simulation

1. Components :
a. LM393 speed sensor module - A speed sensor is a device that
measures the speed of a moving object or system. It is basically an
Infrared Light Sensor integrated with LM393 Voltage Comparator IC.

b. Arduino uno board-Arduino Uno is a microcontroller board based on


the ATmega328P (datasheet). It has 14 digital input/output pins (of
which 6 can be used as PWM outputs), 6 analog inputs, a 16 MHz
ceramic resonator (CSTCE16M0V53-R0), a USB connection, a power
jack, an ICSP header, and a reset button.

c. 16x2 LCD display - An LCD (Liquid Crystal Display) screen is an


electronic display module. A 16x2 LCD means it can display 16
characters per line and there are 2 such lines.

d. Battery - To power Arduino.

e. SKF -61800 Bearings - Size: Inner dia - 10mm Outer dia- 19mm
thickness- 5mm

2. Code
#include <Wire.h>
#include <LiquidCrystal_I2C.h>

const int speedSensorPin = 2;


volatile unsigned long rotationTime = 0;
volatile unsigned long rotations = 0;

// ISR (Interrupt Service Routine) to handle interruptions from the speed


sensor
void sensorISR() {
rotations++; // Increment the number of rotations
rotationTime = micros(); // Record the time of the rotation
}

// LCD initialization
LiquidCrystal_I2C lcd(0x27, 16, 2);

void setup() {
pinMode(speedSensorPin, INPUT_PULLUP);
attachInterrupt(digitalPinToInterrupt(speedSensorPin), sensorISR,
FALLING);

lcd.begin(16, 2); // Initialize the LCD


lcd.backlight(); // Turn on the backlight
lcd.print("Rotary Disc Speed");
}

void loop() {
noInterrupts(); // Disable interrupts to safely read rotationTime and
rotations
unsigned long currentRotationTime = rotationTime;
unsigned long currentRotations = rotations;
interrupts(); // Enable interrupts back

// Calculate the speed in rotations per second (RPS)


float rotationsPerSecond = (float)currentRotations /
((float)currentRotationTime / 1000000.0);

// Calculate the speed in rotations per minute (RPM)


float rotationsPerMinute = rotationsPerSecond * 60;

lcd.setCursor(0, 1); // Set cursor to the second line of the LCD


lcd.print("RPM: ");
lcd.print(rotationsPerMinute, 1); // Display the speed with one decimal
point

delay(1000); // Update the display every second}


3. Simulation :
4. Price list
a. LM393 speed sensor module - 199
b. Arduino uno board - 800 approx
c. 16x2 LCD display - 200
d. Battery - 30
e. SKF -61800 Bearings - 514

Total Cost- 1743

You might also like