Anemometer Report - Dimension and Simulation
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.
e. SKF -61800 Bearings - Size: Inner dia - 10mm Outer dia- 19mm
thickness- 5mm
2. Code
#include <Wire.h>
#include <LiquidCrystal_I2C.h>
// LCD initialization
LiquidCrystal_I2C lcd(0x27, 16, 2);
void setup() {
pinMode(speedSensorPin, INPUT_PULLUP);
attachInterrupt(digitalPinToInterrupt(speedSensorPin), sensorISR,
FALLING);
void loop() {
noInterrupts(); // Disable interrupts to safely read rotationTime and
rotations
unsigned long currentRotationTime = rotationTime;
unsigned long currentRotations = rotations;
interrupts(); // Enable interrupts back