Professional Documents
Culture Documents
Physical size and weight egg size group of 60–69 g are best suited for
incubation
Size of 110 × 72 × 70 cm
Introduction:
This Incubator is known as artificial hatcher, which is used in
poultry farms for providing optimum conditions at consistent
rate. It has thermostat-based operation and is provided with
digital screen for easy temperature & humidity adjustment. The
Incubator is provided with protection devices for voltage
fluctuations & fault current.
Purpose:
To hatch eggs by controlling temperature, humidity and egg
turning throughout the 21 days of hatching period
Egg Types:
Chicken
Duck
Egg Quality and Quantity:
Allows a maximum of 120 eggs to be hatched
Damaged eggs are not allowed
Extra sized eggs are not allowed like for ostriches
Temperature Specifications:
Between 37.50c - 380c
Relative Humidity 50% – 55%
Ventilation of Air:
Developing embryos receive oxygen from the atmosphere and
release carbon dioxide to the atmosphere
Power supply:
Voltage supply 220 - 240V
Current 5A
Frequency: 50/60 Hz
Features:
Automatic humidity control
Automatic temperature control
LED display of temperature, humidity and turning frequency
signaling first hatch and monitoring the baby, by detecting
sound of the baby bird once baby breaks egg shell
Other requirements:
Battery backup is provided to power the system during power
failures
Materials:
Temperature sensors
Humidity sensors(hygrometer) to ensure humidity levels
Electric fan to facilitate even heat distribution
Tilting trays for turning eggs to prevent them from sticking to
the inside surface
Intended Users:
Small scale farmers
Starters
Code
// (C) 2017-2020 REUK.CO.UK - Free for non-commercial use.
// Egg incubation temperature and humidity controller with display.
// Connection to an always on motor - e.g. 6 rotations per day.
// Fan for cooling, heater for heating, humidifier to humidify.
void setup(void)
{
// Start up the temperature sensor library.
sensor1.begin();
// Set the temperature measurement resolution to
// 12 bit ADC (0.0625°C resolution)
sensor1.setResolution(12);
// Need to keep track of the status of the heater, fan, and humidifier
// so we know whether they are on or off.
heaterStatus = 0; // Start with the heating element off (=0)
fanStatus = 0; // Start with the fan off
humidifierStatus = 0; // Start with humidifier turned off
void loop(void)
{
// Read in the temperature and humidity and display across
// the top line of the display.
readInAndDisplayTemperature();
readInAndDisplayHumidity();
// Display the current system status on the bottom line of the display.
displaySystemStatus();
// If heater is currently on, and temperature is high, turn off the heater.
if(heaterStatus == 1 and sensorOneTemperature > heaterOffThreshold){
digitalWrite(heater, LOW);
heaterStatus = 0;
}
// If fan is currently off, and temperature is high, turn on the fan.
if(fanStatus == 0 and sensorOneTemperature > fanOnThreshold){
digitalWrite(fan, HIGH);
fanStatus = 1;
}
// If fan is currently on, and temperature is low, turn off the fan.
if(fanStatus == 1 and sensorOneTemperature < fanOffThreshold){
digitalWrite(fan, LOW);
fanStatus = 0;
}
// If humidifier is currently on, and humidity is high, turn off the humidifier.
if(humidifierStatus == 1 and humidity > humidifierOffThreshold){
digitalWrite(humidifier, LOW);
humidifierStatus = 0;
}
// Press and hold button2 for half a second to enter programming mode.
if(digitalRead(button2)==LOW){
int i;
for(i = 0; i < 5; i++){
delay(100);
if(digitalRead(button2) == HIGH) i = 20;
}
// If button was held for at least 1/2 second we go into programming mode.
if(i < 11){
programmingMode();
}
}
}
void programmingMode(){
// We arrive in here with the button2 currently being pressed
// and entering programming mode.
lcd.clear();
lcd.setCursor(0,0);
// Make sure that the user has released the programming button
while (digitalRead(button1) == LOW) {
delay(100);
}
lcd.print("PROGRAMMING MODE");
void waitForButton1Release(){
do{
delay(50);
}while(digitalRead(button1) == LOW);
}
void waitForButton2Release(){
do{
delay(50);
}while(digitalRead(button2) == LOW);
}
void readInAndDisplayTemperature(){
readTemperatureSensor();
displayTemperature();
}
void readTemperatureSensor(){
sensor1.requestTemperatures();
sensorOneTemperature = sensor1.getTempCByIndex(0);
}
void displayTemperature(){
// Need to deal with below zero temperatures and also
// with above 100 degree temperatures. Adjust number of
// decimal places to result in similar number of overall
// digits used.
int dp; //number of decimal places to show
void readInAndDisplayHumidity(){
readInHumidity();
displayHumidity();
}
void readInHumidity(){
// Read in the humidity from the sensor and set it
// to the global variable 'humidity'.
int chk = DHT.read11(DHT11_PIN);
humidity = DHT.humidity;
}
void displayHumidity(){
// Note - always call this function immediately
// after displaying the temperature.
lcd.print("H=");
lcd.print(humidity,0);
lcd.print("% ");
}
void displaySystemStatus(){
lcd.setCursor(0,1);
// We need to display the status of the heater, fan,
// and humidifier which can be ON or OFF. If status is
// ON, fill in character in front of device name.
if(heaterStatus == 1)
lcd.write(255);
else lcd.print(" ");
lcd.print("Heat ");
if(fanStatus == 1)
lcd.write(255);
else lcd.print(" ");
lcd.print("Fan ");
if(humidifierStatus == 1)
lcd.write(255);
else lcd.print(" ");
lcd.print("Hum ");
}
void displayThresholds(){
// Arrive here with button1 currently depressed.
// Show the six programmed thresholds on the screen
// for three seconds each.
//---------------------------------------------------------
// Utility functions to write float values to EEPROM and to
// read them back in again.
void EEPROM_writeFloat(int ee, float value)
{
byte* p = (byte*)(void*)&value;
for (int i = 0; i < sizeof(value); i++)
EEPROM.write(ee++, *p++);
}
Thermometer code
// © reuk.co.uk - 2018
#define ONE_WIRE_BUS 2
#define SECOND_BUS 3
#include <Wire.h>
#include <LCD.h>
#include <LiquidCrystal_I2C.h>
#define I2C_ADDR 0x27 // Note that some modules have address 0x3F
#define BACKLIGHT_PIN 3
#define En_pin 2
#define Rw_pin 1
#define Rs_pin 0
#define D4_pin 4
#define D5_pin 5
#define D6_pin 6
#define D7_pin 7
LiquidCrystal_I2C lcd(I2C_ADDR,En_pin,Rw_pin,Rs_pin,D4_pin,D5_pin,D6_pin,D7_pin);
OneWire oneWire(ONE_WIRE_BUS);
OneWire secondWire(SECOND_BUS);
DallasTemperature sensor1(&oneWire);
DallasTemperature sensor2(&secondWire);
void setup(void)
sensor1.begin();
sensor2.begin();
sensor1.setResolution(11);
sensor2.setResolution(11);
lcd.setBacklightPin(BACKLIGHT_PIN,POSITIVE);
lcd.setBacklight(HIGH);
lcd.clear();
}
void loop(void)
sensorOneTemperature = sensor1.getTempCByIndex(0);
sensorTwoTemperature = sensor2.getTempCByIndex(0);
displayTemperatures();
void displayTemperatures(){
lcd.setCursor(0,0);
lcd.print(sensorOneTemperature,2);
lcd.print((char)223);
lcd.print("C ");
lcd.setCursor(0,1);
lcd.print(sensorTwoTemperature,2);
lcd.print((char)223);
lcd.print("C ");
#include <LiquidCrystal.h>
#include<TimerOne.h>
#define Heater 2
#define Cooler 8
#define Fan 12
#define Buzzer 7
#define Turning 9
#include "DHT.h"
#define DHTPIN 13
float Temperature = 0;
float Setpoint = 0;
void setup()
pinMode(Heater, OUTPUT);
pinMode(Cooler, OUTPUT);
pinMode(Fan, OUTPUT);
pinMode(Buzzer, OUTPUT);
pinMode(Turning, OUTPUT);
lcd.begin(16, 2);
lcd.setCursor(0, 0);//cr
lcd.print("Egg Incubator");
Buzzer_ON;
delay(100);
Buzzer_OFF;
dht.begin();
delay(2000);
lcd.clear();
Timer1.initialize(100000);
Timer1.attachInterrupt( timerIsr );
lcd.clear();
void loop()
Read_temp();
Read_setpoint();
PrintTemp();
Read_DHT11();
Temperature_control();
void timerIsr()
//Turning control
timer_counter++;
Turning_ON;
else
Turning_OFF;
{
timer_counter = 0;
void Temperature_control()
Heater_OFF;
counter1++;
counter1 = 0;
if (Fan == HIGH)
Fan_OFF;
{
Fan_ON;
Cooler_ON;
Cooler_OFF;
Buzzer_ON;
else
Buzzer_OFF;
}
Heater_ON;
Fan_ON;
Cooler_OFF;
Buzzer_ON;
else
Buzzer_OFF;
void Read_temp()
Temperature = 0;
for (int i = 0; i < 30; i++)
delay(10);
Temperature /= 30;
Temperature;
void Read_setpoint()
Setpoint = 0;
delay(2);
Setpoint /= 30;
}
void PrintTemp()
lcd.setCursor(9, 0);//cr
lcd.write("S:");
lcd.print(Setpoint, 1);
lcd.setCursor(0, 0);//cr
lcd.write("T:");
lcd.print(Temperature-1, 1);
lcd.write((char)223);
lcd.write("C");
void Read_DHT11()
float h = dht.readHumidity();
lcd.setCursor(0, 1);//cr
lcd.write("H:");
lcd.print(h);
lcd.write("%");
lcd.setCursor(9, 1);//cr
lcd.write("S:");
lcd.print("86%");
//