user1932935
Published © GPL3+

Arduino Powered Incubator!

Hi, I have made an Arduino incubator using relays to turn on and off the light bulb and heating element that heats the water to make hum.

IntermediateFull instructions provided436
Arduino Powered Incubator!

Things used in this project

Hardware components

Arduino Mega 2560
Arduino Mega 2560
×1
Relay Module (Generic)
×2
Jumper wires (generic)
Jumper wires (generic)
You need a lot of different ones!
×4
LED Light Bulb, Frosted GLS
LED Light Bulb, Frosted GLS
150w
×1
Heating element
×1
Incubator box
×1

Software apps and online services

Arduino IDE
Arduino IDE

Hand tools and fabrication machines

Drill / Driver, 20 V
Drill / Driver, 20 V

Story

Read more

Schematics

Incubator

Code

Arduino IDE Incubator Code

Arduino
int HeaterTemp = 30;      // High temp at which the LED turns on
int HeaterPIN = 11;// Relay for heater
int HumidityPIN = 9;     // Humidity PIN
int Humidity = 80;    // Humidity level
#include <Wire.h>
#include <HDC2080.h>
#include <LiquidCrystal.h>

#define ADDR 0x40
HDC2080 sensor(ADDR);

// Readings used for average
const int numReadings = 5;


// Set variables to zero
float checkdelay = 0;


void setup() {

// For Heater
  pinMode(9, OUTPUT);
  pinMode(12, OUTPUT);
  pinMode(11, OUTPUT);
  Serial.begin(9600); 

  sensor.begin();
  sensor.reset();
  sensor.setMeasurementMode(TEMP_AND_HUMID);  // Set measurements to temperature and humidity
  sensor.setRate(ONE_HZ);                     // Set measurement frequency to 1 Hz
  sensor.setTempRes(FOURTEEN_BIT);
  sensor.setHumidRes(FOURTEEN_BIT);
  sensor.triggerMeasurement();
    Serial.print("Realtime Temp is (C) (: ");

}
void loop() { 
// Wait a few seconds between measurements.
  delay(50);

    for (int x = 0; x < numReadings; x++){
    Serial.print(sensor.readTemp());
    delay(100); // delay in between reads for stability  
  }

  if (sensor.readTemp() < 37.6666) { //37.6666
    digitalWrite(HeaterPIN, LOW);
  }else if (sensor.readTemp() > 20) {
    digitalWrite(HeaterPIN, HIGH);
  }
  if (sensor.readHumidity() < 54) {
    digitalWrite(HumidityPIN, HIGH);
  }else if (sensor.readHumidity() > 35) {
    digitalWrite(HumidityPIN, LOW);
  }

// LCD module connections (RS, E, D4, D5, D6, D7)
LiquidCrystal lcd(7, 6, 10, 8, 3, 2);
 
char temperature[] = "Temp = 00.0 C";
char humidity[]    = "Humidity   = 00.0 %";

  // set up the LCD's number of columns and rows
  lcd.begin(16, 2);

delay(1);           // wait 1s between readings
  // Read humidity
  byte Temp = ("Temperature(C): "); 
  byte (sensor.readTemp());
  //Read temperature in degree Celsius
  byte Humid = ("Humidity(%): "); 
  byte (sensor.readHumidity());
  
  // Check if any reads failed and exit early (to try again)
  if (isnan(Temp) || isnan(Humidity)) {
    lcd.clear();
    lcd.setCursor(5, 0);
    lcd.print("Error");
    return;
  }
 
  temperature[7]     = Temp / 10 + 48;
  temperature[8]     = Temp % 10 + 48;
  temperature[11]    = 223;
  humidity[7]        = Humidity / 10 + 48;
  humidity[8]        = Humidity % 10 + 48;
  lcd.setCursor(0, 0);
  lcd.print("Temp = ");
  lcd.setCursor(8, 0);
  lcd.print(sensor.readTemp());
  lcd.setCursor(14, 0);
  lcd.print("C");
  
  lcd.setCursor(0, 1);
  lcd.print("Hum  = ");
  lcd.setCursor(8, 1);
  lcd.print(sensor.readHumidity());
  lcd.setCursor(14, 1);
  lcd.print("%");
  }

Credits

user1932935
1 project • 0 followers
Contact

Comments

Please log in or sign up to comment.