Smart Egg Incubator

Student Name Voicu Alexa-Andreea
Group 331CD
GitHub https://github.com/alexavoicu/Smart-Egg-Incubator

Introducere

The Smart Egg Incubator is a microcontroller-based system designed to automate and optimize the process of egg incubation. It continuously monitors and regulates temperature and humidity — the two most critical environmental parameters for successful embryo development.

The incubator can:

  • Measure temperature and humidity via a DHT22 sensor
  • Control the temperature by using the fan at no more than ~27°C
  • Activate a humidifier to keep humidity between 50–60% (65–70% during hatching)
  • Provide LED indicators (green/yellow/red)
  • Buzzer alerts forwhen human intervention is needed
  • Log environmental data to a microSD card in .csv format
  • Display live readings/alerts on the LCD screen

The goal is to provide a low-cost, accessible, and reliable solution for hatching eggs at home, in schools, or in small farms. By automating critical monitoring and control tasks, the incubator increases hatching success rates and minimizes manual effort.

The idea came from noticing how difficult it can be to hatch eggs reliably without specialized equipment. I wanted to create a simple and affordable system that automatically manages key environmental factors — temperature and humidity — making the incubation process easier and more accessible to anyone.

This project is useful for:

  • Biology teachers or educational purposes
  • Small-scale farmers
  • People that are passionate about egg hatching

It offers a smart and affordable alternative to commercial incubators, making the hatching process more data-driven and educational.

Descriere generală

Block Scheme

The system is built around the Arduino Uno platform. It uses a DHT22 sensor to measure temperature and humidity inside the incubator. A small 12V fan, is powered by an external battery using a power mosfet module, that enables the control from the arduino board. The fan ensures air circulation, when the temperature is too high, but it also helps to move humid air around, which can prevent pockets of moisture from accumulating in one spot.

The LCD display shows live values of temperature and humidity and the alerts for the user, while LEDs indicate status:

  • Green = optimal
  • Yellow = warning
  • Red = out of range

The buzzer notifies the user when human intervention is needed.

All sensor readings are logged every 60 seconds to a microSD card.

Hardware Design

Component list

  • Arduino Uno R3
  • Breadboard + jumper wires
  • DHT22 sensor
  • SD card module + microSD
  • 12V DC fan
  • LCD 1602 I2C display
  • 3 LEDs (red, yellow, green)
  • 4x 220 Ohm resistors
  • 1x 10K Ohm resistor
  • Pasive buzzer
  • 12V battery
  • IRF520 Module

How the components are connected

1. DHT22 Sensor

  • Out pin on D2
  • VCC on 5V
  • GND on GND

2. LCD 1602 Display

  • SDA on A4
  • SCL on A5
  • VCC on 5V
  • GND on GND

3. MicroSD module:

  • CS (Chip Select) on D4
  • MOSI: D11
  • MISO: D12
  • SCK (Clock) on D13
  • VCC on 5V
  • GND on GND

4. 12V Fan and IRF520:

  • IRF520 SIG on D8
  • IRF520 GND on GND
  • IRF520 VIN and GND on + and - from the battery
  • IRF520 V+ and V- on + and - from the fan

5. Passive Buzzer:

  • Signal on D7
  • GND on GND

6. LEDs (Red, Yellow, Green)

  • Red: D9
  • Yellow: D10
  • Green: D6

Component Scheme

Electric Scheme

Final Hardware Implementation

Software Design

Libraries

The program was developed using the Arduino IDE, and relies on several key libraries for sensor communication, display control, data logging, and peripheral management:

DHT.h – for reading temperature and humidity values from the DHT22 sensor

Wire.h & LiquidCrystal_I2C.h – for controlling the I2C 1602 LCD display

SD.h – for writing environmental data to the microSD card

tone() – native Arduino function used to control the passive buzzer with PWM audio signals

The flow

In each cycle it performs the following tasks:

Read data from the DHT22 sensor

Evaluate both temperature and humidity and assign status flags:

0 = optimal (green)

1 = medium (yellow)

2 = critical (red)

Determine the worst case (maximum of the two flags) to define the overall system status

Temperature and humidity evaluation:

If temperature or humidity drops below/above certain thresholds, the corresponding flag is set to red (2). If values are within an acceptable but not ideal range, yellow (1) is assigned. Ideal values result in green (0). The worst of the two flags determines the LED status and whether a buzzer or fan should be activated and displays the message accordingly.

The buzzer is passive, meaning it needs a signal with a defined frequency. It only activates when the system transitions into the red alert state It emits three tones with decreasing frequency (1000 Hz → 800 Hz → 600 Hz), each followed by a short pause. Total alert duration is approx. 2 seconds. The tone is played using Arduino’s tone() function and not repeated unless a new red alert is triggered.

The fan is connected via an IRF520 module and is triggered only if the temperature exceeds 27°C. It automatically shuts off once the temperature returns to the safe range.

The I2C LCD shows: Alerts, “Low/High temperature!”, “Low/High humidity!” when entering critical states Live readings, Temp: … C, Hum: ..% when values are stable Logging confirmation, “Logging data…” when writing to SD Priority is given to alert messages, which override live readings for 2 seconds

Rezultate obținute

The project was successfully implemented and tested and all major functionalities work as intended. Demo:

Smart Egg Incubator

Concluzii

While my project wasn’t very complex, it gave me the opportunity to integrate multiple hardware components and manage real-time system logic. The availability of the libraries for the DHT22 sensor, LCD, and SD card modules helped me a lot with my work, allowing me to focus more on logic and the incubator's behavior.

The biggest challenge was controlling the fan. I initially underestimated the current it needed, and quickly realized that driving it directly from a digital pin was not possible. So I needed to used a 12V battery, but wasn't sure how i would actually connect it so that it would work without any risks. After some research, I added an IRF520 Mosfet module, and thinking now, a flyback diode would have been a great addition to protect against voltage spikes when switching off the fan.

Another issue was that I didn't know what the timing conflicts would be between SD card access and LCD updates. At one point, I was trying to write to the SD card while displaying messages caused flickering and delays. I had to be careful about when and how often updates happened, and add short delays to give each module time to operate without interfering.

Overall, the project helped me learn how to integrate sensors, fans and storage, and how to troubleshoot the small issues that appear only when everything is running at the same time.

Resurse

pm/prj2025/iotelea/alexa_andreea.voicu.txt · Last modified: 2025/05/26 21:44 by alexa_andreea.voicu
CC Attribution-Share Alike 3.0 Unported
www.chimeric.de Valid CSS Driven by DokuWiki do yourself a favour and use a real browser - get firefox!! Recent changes RSS feed Valid XHTML 1.0