Arduino based egg incubator

Published by MKDas on

In this article, we are going to make Arduino based egg incubator. With an Arduino UNO and other associative devices. To make an incubator, we need to maintain an optimum temperature and humidity with other parameters like CO2. As this is a learning project, so we’ll focus on basic incubator design. So let’s start our egg incubator circuit using Arduino.

Disclaimer: Electricity is always dangerous. Skill required to work with electricity. Do work at your own risk. The author will not be responsible for any misuse or harmful act. This website contents are also copyright protected. Anything copied and directly posted on your website and claiming it as yours is prohibited and nonsensical. The author published all the articles as open source to help you to make your project and learning purpose only. Learn and make one for yourself. If need any help feel free to ask the author. The author will be helpful to you. Thanks.

What is Egg Incubator?

An Egg incubator is a device that maintains an optimum temperature and humidity with other parameters like CO2 as the hen maintains to hatch her eggs. It can be used in any biological sector. In common, the incubator is known in the chicken industry to help to produce a chicken from eggs. Here is a very common egg incubator that is available in the market.

A common egg incubator

And our goal to make this one our basic egg incubator:

Our Target Egg incubator

Key Points for an egg incubator:

To make an egg incubator, the first thing to maintain is the temperature. Next the humidity and then the CO2 level. Bigger the egg capacity more parameters to maintain. Then another job we need to do to get healthy chicken is turning/moving the egg position periodically. Normally each hen does this job herself while she is hatching. Also, we need to reduce the CO2 amount from the incubator room. So the key point of this project will be:

  • Temperature control.
  • Humidity control.
  • Turning.
  • CO2 level reduction.

Here we’ll make the very basic one. So that anyone can build one for himself.

Temperature Control:

To control the temperature, we need a control system that can heat, cool, and can sense temperature. We also need to spread the heat inside properly. That is why we will also need a circulating fan. So to make this system we’ll use these items:

  • A heater
  • A cooling fan
  • A circulating fan
  • Relays to turn on/off the heater and fan
  • Temperature sensor

Heater:

In the big incubator, large heater elements are used but for our small one, we will use simple incandescent lamps as our heater. A 100Watt lamp for this purpose will be enough. To reduce the light intensity, we can use lamps in series which will draw the same 100Watts and will generate the same heat but the heat will be more spread than using the single lamp. If you want to use more lamps in series, it will be less intensity of light but the heat will be more spread.

Two lamps in series

Cooling:

For cooling, we can use cooling fans. The large system needs a large fan but we can use the very known cooling fans.

Cooling fan

This cooling fan should be positioned in the outside to the inside way[normally we use inside to outside way in most of the cases]. The benefits of using in this way are, we need to cool the inside air temperature but we also need to reduce the CO2 level of the inside air. Positioning this way do these two job at the same time.

There may have a question if we use the fan in the outside to inside way then where the inside air will go? Yes, we should not make the incubator airtight. We need to heat the eggs but we must have to maintain little airflow inside from outside to supply some Oxygen to the eggs. Yes, hatching eggs need Oxygen like we breathe but not in high volume. A very small volume they need. Also, heated eggs produce CO2. This gas build-up reduces chicken production.

Circulating Fan:

We can use the cooling fan as our circulating fan. Two or Four fans will be good for our incubator. These circulating fans should be positioned inside in a circular way. This will maintain good air circulation as well as it will reduce concentrated heat build-up. A positioning like this will be enough to maintain proper air circulation.

Circulating fan and heater lamp positioning

Relay switch:

Relays are good for AC lamp switching. Although there are multiple ways to do this job as a basic one we can use a relay for both lamp and fan control.

A commercial relay

Temperature Sensor:

There are different types of temperature sensors available in the market. You can use any of that if you wish and know how to use it. But here in our project, we’ll use an LM35 Temperature sensor.

LM35 pinout

This sensor gives 10mV/’C. From that linear data, we can calculate the actual temperature.

Humidity Control:

To control the humidity of the system, we need to measure the humidity first. To measure humidity, here in our project we’ll use DHT11 as our humidity sensor.

DHT11 humidity sensor

And to add humidity we need a humidifier. But for small incubators, we can not use the available ones to humidify because those make a high amount of fogs quickly. That is why we do not need any humidifier for a small system. But if you wish to add, that can be added in a bigger system. Here in our project, we will simply use a small bowl of clean water and some cotton balls on that.

A bowl of clean water

As the inside temperature is warm and there is airflow inside, so this bowl of water will be vaporized in small amounts which will maintain the inside humidity. And the cotton ball or a piece of cotton cloth will help the process. All we need to do is to check the humidity level and water level from time to time. Although the control circuit will alarm if there is low or high humidity but we just need to check this bowl of water.

Here are some humidifiers that you may need:

Turning:

For turning purposes, you can do that yourself with your hand if you can not arrange a tray like this:

Egg Turning tray

I had this tray in stock so I used it for this project but it’s your choice. But I’ll advise using this type of tray. Here there is a bi-directional turning motor that helps the tray to turn and the interesting thing is this motor is rated 220V AC. This makes the turning system easier. We need to turn the eggs from -45′ to +45′ from the middle in 30~45minutes intervals.

Here are some egg turning trays available on amazon.com :

Block Diagram:

Here is the block diagram of our Arduino based egg incubator:

Block Diagram

Control circuit:

We have all the accessories collected this far. Now it’s time to make the control circuit. We are using Arduino UNO as the controller as this is a very popular device as well as very helpful for beginners.

Egg Incubator Control Circuit

Download Proteus File.

Circuit analysis:

You can see that the control circuit is a very simple one. Relays are used to control lamps and cooling fans and turning motors. And ULN2003A is used as the relay driver. We also have a buzzer as an audio alarming system and to tune the temperature, we used a variable resistor. The power supply for this project is made with a 12V/3000mA Transformer (TR1), Bridge diode (BR1), and Capacitor C1. After that, we used a voltage regulator LM7812 to power Arduino. We used this to prevent Arduino to be damaged due to overvoltage.

Sensors (LM35 & DHT11) are connected to A1 and D13 respectively. A user pot is connected to the A0 pin of Arduino UNO.

Working principle:

After sensing the input parameters, Arduino decides when to turn on the heater and when to turn on the cooler. The temperature should be kept around 36.8’C. When the temperature is low, lamps will be turned on automatically. If the temperature is higher than 0.5’C from the setpoint, heaters will be turned off. If the temperature is higher than 1.5’C from the setpoint, the cooler will be on. At the same time, the buzzer will alarm at a temperature that is 2’C higher than the set point. The circulating fan is controlled according to the heater. When the heater is on, the circulating fan is on. When the heater is off but the temperature is higher than the setpoint, the circulating fan runs periodically( few moments on, few moments off).

The turning motor will be turned on for 3-4 seconds after each 30minutes. I did not calculate this time preciously. Used just like a timer counter using timer interrupt. There is no exact timing to do turning for small incubators. A turn in around 30 minutes works fine.

Coding:

Here is the Arduino coding for our Arduino based egg incubator. Code is very simple and easy to understand.

#include <LiquidCrystal.h>
#include<TimerOne.h>
LiquidCrystal lcd(11, 10, 6, 5, 4, 3);

#define   Heater  2
#define   Cooler  8
#define   Fan     12
#define   Buzzer  7
#define   Turning 9

#define   Heater_ON   digitalWrite(Heater,HIGH);
#define   Heater_OFF  digitalWrite(Heater,LOW);
#define   Cooler_ON   digitalWrite(Cooler,HIGH);
#define   Cooler_OFF  digitalWrite(Cooler,LOW);
#define   Fan_ON      digitalWrite(Fan,HIGH);
#define   Fan_OFF     digitalWrite(Fan,LOW);
#define   Turning_ON  digitalWrite(Turning,HIGH);
#define   Turning_OFF digitalWrite(Turning,LOW);
#define   Buzzer_ON   digitalWrite(Buzzer,HIGH);
#define   Buzzer_OFF  digitalWrite(Buzzer,LOW);

#include "DHT.h"
#define DHTPIN 13
#define DHTTYPE DHT11
DHT dht(DHTPIN, DHTTYPE);
float Temperature = 0;
float Setpoint = 0;
unsigned int timer_counter = 0;
unsigned int counter1 = 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++;
  if (timer_counter > 16200 && timer_counter < 16500)
  {
    Turning_ON;
  }
  else
  {
    Turning_OFF;
  }

  if (timer_counter > 16500)
  {
    timer_counter = 0;
  }

}

void Temperature_control()
{
  if (Temperature >= Setpoint + 0.5)
  {
    Heater_OFF;
    counter1++;
    if (counter1 > 20)
    {
      counter1 = 0;
      if (Fan == HIGH)
      {
        Fan_OFF;
      }
      else if (Fan == LOW)
      {
        Fan_ON;
      }
    }

    if (Temperature >= Setpoint + 1.5)
    {
      Cooler_ON;
    }
    else if (Temperature <= Setpoint + 0.5)
    {
      Cooler_OFF;
    }

    if (Temperature >= Setpoint + 2.0)
    {
      Buzzer_ON;
    }
    else
    {
      Buzzer_OFF;
    }
  }
  else if (Temperature <= Setpoint - 0.5)
  {
    Heater_ON;
    Fan_ON;
    Cooler_OFF;
    if (Temperature <= Setpoint - 1.0)
    {
      Buzzer_ON;
    }
    else
    {
      Buzzer_OFF;
    }
  }
}
void Read_temp()
{
  Temperature = 0;
  for (int i = 0; i < 30; i++)
  {
    Temperature += analogRead(A1) * 0.5;
    delay(10);
  }
  Temperature /= 30;
  Temperature;
}

void Read_setpoint()
{
  Setpoint = 0;
  for (int i = 0; i < 30; i++)
  {
    Setpoint += analogRead(A0) / 25.6;
    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%");
}

//

You can download this .ino file from here.

As this code is not so critical, so I think you can understand it easily.

PCB:

I like to work with PCBs. So I make PCBs for all of my projects.

PCB of Egg Incubator

You can download the PCB file from here.

Result:

Here is my incubator that was finally completed. I gave this to one of my students to use. He resulted in me after one hatch is that he’s getting a 70% hatching rate. If everything is made more carefully this hatching rate will be higher. My standard commercial ones give 85% hatching on average although those are made in a standard format and with bigger capacity.

Our mini Incubator

Hope you enjoyed the project and made one for yourself. If any help is required, feel free to ask. Thanks.

If you still need one but you can not make it yourself, then you can check these incubators:


MKDas

I'm Mithun K. Das; B.Sc. in EEE from KUET, Bangladesh. Blog: https://labprojectsbd.com. "First, electronics was my passion, then it was my education, and finally, electronics is now my profession." I run my own electronics lab, M's Lab (https://mlabsbd.com). Where I work with the creation of new products from ideas to something in real life. Besides this is my personal blog where I write for hobbyists and newcomers in the electronics arena. I also have a YouTube channel where I publish other helpful videos, you can find the link inside the articles. I always try to keep it simple so that it becomes easy to understand. I hope these will help them to learn electronics and apply the knowledge in their real life.

10 Comments

Deponkor · December 12, 2020 at 1:01 pm

Nice project..
But If This project with set up button (high – low temperature & humidity & trunning motor ) manully occur is good. if u want change and modify ,I will respect u.

    Mithun K. Das · December 12, 2020 at 2:49 pm

    If you understand the working principle, you can add buttons for settings.

https://shiatsu-web.com · February 13, 2021 at 10:55 am

This is something New !

https://www.shinsen-mart.com · February 22, 2021 at 9:30 am

Best view i have ever seen !

Mete · June 5, 2021 at 8:31 pm

Can you share the proteus file? mete_ua_38@hotmail.com thanks.

    MKDas · June 6, 2021 at 4:52 am

    I’ll share it on the blog later.

      Mete · June 7, 2021 at 8:37 pm

      Please. i need urgent

        MKDas · June 8, 2021 at 6:03 am

        Check again and don’t forget to subscribe. Some awesome and useful projects are coming soon.

Steve · June 23, 2021 at 11:42 pm

Great project and well elaborated….
I tend to ask the same question as Deponkor as some of us are so new with Arduino uno and it’s working principles

    MKDas · June 24, 2021 at 6:29 am

    Yes, It’s not very complex to add buttons. But to make it simple and easy to understand I kept it simple.

Leave a Reply

Avatar placeholder

Your email address will not be published. Required fields are marked *