Tekko BDSimSimulatorProjects

পানির ট্যাংক অটো-ফিল — পাম্প নিজে নিজে বন্ধ হয়Water Tank Auto-Fill Controller

৪০ শতাংশের নিচে নামলে পাম্প চালু, ৮৫ পার হলে বন্ধ — দুটো মাপ রাখা হয়েছে যাতে পাম্প এক লাইনে বারবার কাঁপে না। ট্যাংক ভরলে লাল বাতি জ্বলে।

Below 40 percent the pump starts, above 85 it stops — two thresholds, not one, so the pump never chatters around a single line. The red lamp means the tank is full; the green one tracks the pump.

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

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

Water Tank Auto-Fill Controller circuit diagram — Arduino Uno R3, Water level sensor, Relay module (5V, 1 channel), Mini water pump (3–6V), Resistor 330Ω, LED (green), LED (red), Jumper wires

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

তার লাগানো · Wiring

Water level sensor +→Arduino Uno R3 5V
Water level sensor -→Arduino Uno R3 GND
Water level sensor S→Arduino Uno R3 A0
Relay module (5V, 1 channel) VCC→Arduino Uno R3 5V
Relay module (5V, 1 channel) GND→Arduino Uno R3 GND
Relay module (5V, 1 channel) IN→Arduino Uno R3 D7
Relay module (5V, 1 channel) COM→Arduino Uno R3 5V
Relay module (5V, 1 channel) NO→Mini water pump (3–6V) +
Mini water pump (3–6V) -→Arduino Uno R3 GND.3
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++)

// Water tank auto-fill: the resistive level strip reads 0-100 percent. Below
// 40 percent the pump starts, above 85 it stops — two thresholds so the pump
// never chatters around one line. The red lamp means the tank is full; if the
// level still reads 100 while the pump has run 20 seconds, something is wrong
// (float jam) and the pump force-stops. The green lamp tracks the pump.
const int levelPin = A0, relayPin = 7;
bool pumping = true;                       // start filling an empty tank

void setup() {
  Serial.begin(9600);
  pinMode(relayPin, OUTPUT);
  pinMode(12, OUTPUT); pinMode(13, OUTPUT);
}

void loop() {
  int pct = map(analogRead(levelPin), 0, 712, 0, 100);   // strip tops out near 0.70 × 5 V
  if (!pumping && pct < 40) pumping = true;
  if (pumping && pct > 85) pumping = false;
  digitalWrite(relayPin, pumping ? HIGH : LOW);
  digitalWrite(13, pumping ? HIGH : LOW);
  digitalWrite(12, pct > 85 ? HIGH : LOW);
  Serial.print("Level: "); Serial.print(pct);
  Serial.print("% | Pump: "); Serial.println(pumping ? "ON" : "OFF");
  delay(400);
}

আরো project · More projects