Tekko BDSimSimulatorProjects

ডিম ফোটানোর থার্মোস্ট্যাট — তাপমাত্রা নিজে নিজে ঠিক থাকেEgg Incubator Thermostat with Arduino

বাচ্চা ফোটাতে ৩৭.৫ ডিগ্রি দরকার, একদম ঠিক। সাধারণ on-off দিলে হিটার প্রতি সেকেন্ডে কাঁপতে থাকে, তাই এখানে hysteresis — ৩৬.৫ এর নিচে গরম, ৩৮.৫ এর উপরে বন্ধ। ৩৯.৫ ছাড়ালে অ্যালার্ম বাজে।

Chicks need 37.5 C, dead on. A plain on-off check flickers the heater every second, so this sketch uses hysteresis — heat below 36.5, stop above 38.5 — and a buzzer screams only if the box runs past 39.5.

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

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

Egg Incubator Thermostat with Arduino circuit diagram — Arduino Uno R3, DHT22 temperature & humidity, LCD 16x2 with I2C, Relay module (5V, 1 channel), Light bulb, Buzzer (5 V), Jumper wires

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

তার লাগানো · Wiring

DHT22 temperature & humidity VCC→Arduino Uno R3 5V
DHT22 temperature & humidity GND→Arduino Uno R3 GND
DHT22 temperature & humidity DATA→Arduino Uno R3 D2
LCD 16x2 with I2C VCC→Arduino Uno R3 5V
LCD 16x2 with I2C GND→Arduino Uno R3 GND
LCD 16x2 with I2C SDA→Arduino Uno R3 A4
LCD 16x2 with I2C SCL→Arduino Uno R3 A5
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→Light bulb a
Light bulb b→Arduino Uno R3 GND.3
Buzzer (5 V) +→Arduino Uno R3 D8
Buzzer (5 V) -→Arduino Uno R3 GND.3

Code (Arduino C++)

#include <DHT.h>
#include <Wire.h>
#include <LiquidCrystal_I2C.h>
// Egg incubator thermostat: chicks need 37.5 C, dead on. A plain "if hot then
// off" flickers the heater every second, so this uses hysteresis — heat below
// 36.5, stop above 38.5, and ignore everything in between. The bulb is the
// heater; the buzzer only screams if the box runs past 39.5 (fan failed).
DHT dht(2, DHT22);
LiquidCrystal_I2C lcd(0x27, 16, 2);
bool heating = true;

void setup() {
  Serial.begin(9600);
  pinMode(7, OUTPUT);
  pinMode(8, OUTPUT);
  dht.begin();
  lcd.init();
  lcd.backlight();
}

void loop() {
  float t = dht.readTemperature();
  if (t < 36.5) heating = true;
  if (t > 38.5) heating = false;
  bool overheat = t > 39.5;
  digitalWrite(7, heating ? HIGH : LOW);
  digitalWrite(8, overheat ? HIGH : LOW);
  lcd.setCursor(0, 0); lcd.print("Temp: "); lcd.print(t, 1); lcd.print(" C   ");
  lcd.setCursor(0, 1); lcd.print(heating ? "Heater ON " : "Heater OFF");
  Serial.print("Temp "); Serial.print(t, 1); Serial.print(" C | Heater ");
  Serial.println(heating ? "ON" : "OFF");
  delay(600);
}

আরো project · More projects