This project is primarily hosted at https://github.com/quantenschaum/egg-incubator/
This is an Arduino-controlled incubator for chicken's eggs. Its purpose is to keep temperature and humidity at defined values, so that the eggs are incubated and the chicks finally hatch after some days.
It might as well be used to incubate other things than chicken's egg like other kinds of eggs (ducks, turtles, alligators, ...), or cultures of bacteria or fungus i.e. to make yogurt or to leaven yeast/sour dough or to make Tempeh.
How it works
The Arduino constantly measures temperature and humidity. The raw measurements are smoothed using Holt-Winters double exponential smoothing. The smoothed values are then fed into a PID control loop.
The temperature is maintained by turning the heating element on and off in a 2 seconds cycle. The duty cycle of the heater is determined by the temperature PID loop. Using a low frequency pulse width modulation turns a bang-bang controlled heating element into a fully modulated element.
As heating element I highly recommend Kanthal wire (used for styrofoam cutting). 10-15 watts are enough! This is much better than a light bulb. It can be operated with low voltage (saver than 220V bulb), does not emit light and does not burn out. Use a MOSFET to turn it on and off (no heatsink needed due to PWM and no clicking and wearing of a relay).
The humidity is maintained by opening and closing an air vent on the incubator using a servo. The servo angle is determined by the humidity PID loop. Inside the incubator is a water filled jar. The water warms up and evaporates, the humidity rises, the vent is opened and the humid air can escape letting dryer air in. The air vent is also needed also to allow fresh air and oxygen to get into the incubator. You have to experiment with the size (water surface) of the jar to reach the humidity set point and have the air vent (half) open.
The fan does not need to be controlled, it is constantly running and distributes heat and humidity equally in the incubator. I used a 12cm 12V PC fan operated at 5V, so it runs slowly. The Arduino monitors the fan using it's rpm signal and sets of an alarm if it fails. The fan also cools the heating wire, the heating is turned off, if the fan fails.