Tekko BDSimSimulatorProjects

বৃষ্টির এলার্ম (বৃষ্টি ধরার যন্ত্র)Rain Detector / Rain Alarm using Arduino

বৃষ্টির পাতার AO pin শুকনো অবস্থায় বেশি থাকে, পানি পড়লে কমে যায়। সীমার নিচে নামলেই Arduino buzzer বাজায় — ছাদে কাপড় শুকোানোর ক্লাসিক এলার্ম।

The rain board's AO pin sits high when the plate is dry and drops as water bridges its tracks. When it falls under the limit the Arduino sounds a buzzer — the classic clothes-on-the-roof alarm.

▶ ফ্রি চালিয়ে দেখো / Run it free Parts অর্ডার করো (WhatsApp)

সার্কিট ডায়াগ্রাম · Circuit diagram

Rain Detector / Rain Alarm using Arduino circuit diagram — Arduino Uno, Rain sensor, Buzzer, Resistor 220Ω, LED (blue), Jumper wires

যা যা লাগবে · Parts you need

তার লাগানো · Wiring

Rain sensor VCC→Arduino Uno 5V
Rain sensor GND→Arduino Uno GND
Rain sensor AO→Arduino Uno A0
Arduino Uno D8→Buzzer +
Buzzer -→Arduino Uno GND.3
Arduino Uno D13→Resistor a
Resistor b→LED A
LED K→Arduino Uno GND.3

Code (Arduino C++)

// Rain alarm: the rain board's AO pin sits high when dry and drops as rain wets it.
// Below the limit -> buzzer + LED, so you can bring the clothes in from the roof.
const int rainPin = A0, buzzer = 8, led = 13;
const int WET = 500;                 // lower = more sensitive

void setup() {
  pinMode(buzzer, OUTPUT);
  pinMode(led, OUTPUT);
  Serial.begin(9600);
}

void loop() {
  int raw = analogRead(rainPin);
  Serial.print("Rain sensor: "); Serial.println(raw);
  if (raw < WET) {
    Serial.println("RAIN!");
    digitalWrite(led, HIGH); digitalWrite(buzzer, HIGH);
  } else {
    digitalWrite(led, LOW); digitalWrite(buzzer, LOW);
  }
  delay(300);
}

আরো project · More projects