Tekko BDSimSimulatorProjects

বৃষ্টি সেন্সর অরশদ — দোকান ভিজে যাওয়ার আগেই নিজে বন্ধ হয়Rain-Sensing Awning

বৃষ্টির পাতায় পানি পড়লে রিডিং বাড়ে। ৬০ শতাংশ পার হলে সার্ভো অরশদ গুটিয়ে নেয়, ৩০ এর নিচে নামলে আবার মেলে — একটা ভেজা পাতায় অরশদ নাচতে শুরু করে না।

The rain board traces short through raindrops and its reading climbs as the sky opens. Past 60 percent the servo rolls the awning in, under 30 it rolls back out — one wet leaf cannot make it dance.

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

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

Rain-Sensing Awning circuit diagram — Arduino Uno R3, Rain sensor, Servo motor (SG90), Resistor 330Ω, LED (green), LED (red), Jumper wires

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

তার লাগানো · Wiring

Rain sensor VCC→Arduino Uno R3 5V
Rain sensor GND→Arduino Uno R3 GND
Rain sensor AO→Arduino Uno R3 A0
Servo motor (SG90) VCC→Arduino Uno R3 5V
Servo motor (SG90) GND→Arduino Uno R3 GND
Servo motor (SG90) SIG→Arduino Uno R3 D9
Arduino Uno R3 D13→Resistor a
Resistor b→LED A
LED K→Arduino Uno R3 GND.3
Arduino Uno R3 D12→Resistor a
Resistor b→LED A
LED K→Arduino Uno R3 GND.3

Code (Arduino C++)

#include <Servo.h>
// Rain-sensing awning: the rain board's traces short through raindrops, so
// its analog reading climbs as the sky opens. Past 60 percent the servo rolls
// the awning in; below 30 it rolls back out — hysteresis again, so one wet
// leaf does not make the awning dance all afternoon. Green lamp = open for
// business, red = closed for rain.
Servo awning;
void setup() {
  Serial.begin(9600);
  awning.attach(9);
  awning.write(10);
  pinMode(12, OUTPUT); pinMode(13, OUTPUT);
}

void loop() {
  int rain = 100 - map(analogRead(A0), 0, 1023, 0, 100);   // dry board reads high
  static bool open = true;
  if (open && rain > 60) open = false;
  if (!open && rain < 30) open = true;
  awning.write(open ? 10 : 120);
  digitalWrite(13, open ? HIGH : LOW);
  digitalWrite(12, open ? LOW : HIGH);
  Serial.print("Rain: "); Serial.print(rain);
  Serial.print("% | Awning: "); Serial.println(open ? "open" : "closed");
  delay(400);
}

আরো project · More projects