Custom Made Anemometer with Arduino & Oled Display
ฝัง
- เผยแพร่เมื่อ 11 ก.พ. 2020
- As an Arduino enthusiast, I found making projects with Arduino to be most fun for me. There is so much to learn from them as a maker and an engineer. So, here are my Arduino project related to wind measurement, crafted in 2 days. The project is calculating real time wind speed on OLED Display.
Information about the firmware please contact : andreas157@yahoo.gr
Donate on Paypal : deedyofficial@live.com
Support us on Patreon : / lightrace
Down below you will find links to buy similar tools and products i used in the video.
Avid Power Heat Gun : amzn.to/3kiJx7c
Arduino Nano : amzn.to/3kdSM8S
0.96 Inch OLED Module : amzn.to/36m2Ibg
VonHaus 2000W Heat Gun : amzn.to/36jcZoP ( UK Link )
Arduino Nano : amzn.to/32szWEO ( UK Link )
0.96 Inch OLED Module : amzn.to/2GJV9T7 ( UK Link ) - วิทยาศาสตร์และเทคโนโลยี
Amazing stuff!!!! Keep it up !!!
What is that sensor in the propeller?? Please reply.
Awesome work
Well done, it's just Great
I am very impressed
genius
Nice machinary
machine cnc from china , and supercam cnc software
How did you do the anemometer calibration? How many turns for 1 km, or is there a formula?
I've never seen one built with 3 triggers (the 3 magnets) but I would wager the code looks something like
rotations per second = float(rotation/10) / 3 [since there are three magnets]
windspeed = float (rotation per second, * vane_circumference * variance) [variance will be somewhere between 1.2 and 3, its a little helper to make up for the energy loss of the wind movign the anemometer]
windspeed is m/s, so windspeed * 2.237 for mph or (windspeed * 18)/5 for kph.
This is me just taking a stab at it blindly having not built and programmed my own yet.
Here is the complete code I made up quickly, if you use it let me know how you go....it should be the same as this video using two photo interrupters, a 2in disk with 10 holes and an oled display.
#include
#include
#include
#define SCREEN_WIDTH 128
#define SCREEN_HEIGHT 64
#define OLED_RESET 4
Adafruit_SSD1306 display(SCREEN_WIDTH, SCREEN_HEIGHT, &Wire, OLED_RESET);
const int sensorPin1 = 2; // Pin for the first photo interrupter
const int sensorPin2 = 3; // Pin for the second photo interrupter
volatile unsigned long lastInterruptTime1 = 0; // Time of the last interrupt for sensor 1
volatile unsigned long lastInterruptTime2 = 0; // Time of the last interrupt for sensor 2
volatile unsigned long revolutions = 0; // Number of full disk revolutions
volatile float windSpeed = 0.0; // Calculated wind speed
const float circumference = 12.56; // Circumference of the 2-inch disk in inches
const int holes = 10; // Number of holes in the disk
void setup() {
pinMode(sensorPin1, INPUT_PULLUP);
pinMode(sensorPin2, INPUT_PULLUP);
attachInterrupt(digitalPinToInterrupt(sensorPin1), sensor1ISR, FALLING);
attachInterrupt(digitalPinToInterrupt(sensorPin2), sensor2ISR, FALLING);
display.begin(SSD1306_SWITCHCAPVCC, 0x3C);
display.display();
delay(2000);
display.clearDisplay();
display.setTextColor(WHITE);
display.setTextSize(2);
}
void loop() {
unsigned long timeElapsed1 = micros() - lastInterruptTime1;
unsigned long timeElapsed2 = micros() - lastInterruptTime2;
if (timeElapsed1 > 1000000 || timeElapsed2 > 1000000) {
// No new interrupts, wind speed is zero
windSpeed = 0.0;
} else {
// Calculate wind speed based on the time between interrupts
float timeInSeconds = (timeElapsed1 + timeElapsed2) / 1000000.0;
float revolutionsPerSecond = (float)revolutions / timeInSeconds;
windSpeed = (revolutionsPerSecond * circumference) / holes;
revolutions = 0; // Reset the revolution count
}
display.clearDisplay();
display.setCursor(0, 0);
display.print("Wind Speed:");
display.setCursor(0, 20);
display.setTextSize(3);
display.print(windSpeed);
display.setTextSize(1);
display.print(" in/s");
display.display();
delay(1000); // Delay between measurements
}
void sensor1ISR() {
if (micros() - lastInterruptTime1 > 1000) {
// Ignore interrupts that are too close together (noise)
revolutions++;
lastInterruptTime1 = micros();
}
}
void sensor2ISR() {
if (micros() - lastInterruptTime2 > 1000) {
// Ignore interrupts that are too close together (noise)
revolutions++;
lastInterruptTime2 = micros();
}
}
formula for sure ,,
Ok did I miss it? How does it work and communicate? RS-422, or RS-485, or 4 -20mA Current loop?
is a custom project i can make it in any communicate needs,
Could you tell us about your CNC?
cnc machine from china , software supercam 3 axis