-
Notifications
You must be signed in to change notification settings - Fork 0
Home
Welcome to the hatchling wiki!
This DIY project started off with wanting to learn python and basic hardware control with a RaspberryPi and developed into a full blown chicken egg incubator. The idea was to build the controller as much as possible from scratch with cheap, but reliable parts. The python code should move the eggs periodically and control the temperature via a PID controller, report temperature, humidity and current duty cycle. On top, the controller should visually show the correct values via LEDs and warn acoustically, if there are problems arising.
Features:
- works on any RaspberryPi & possibly other controllers
- uses cheap off the shelf or recycled parts
- PID controlled temperature
- simple status reporting of correct temperature & humidity via LEDs
- acoustic warning, when values are far off the set points
- automatic turning of eggs
- easy to use via CLI
- flexible incubation programs for other species (e.g.: ducks, quails, ...)
- runs safely for days without burning down the house...
- reports current values via plotly dash
make sure you run python3 (>=3.7) (see Configuration )
python -m venv hatch_env
source hatch_env/bin/activate
pip install -r requirements.txt
run hatchling with:
python hatchling.py
usage: hatchling [-h] [--init] [--species] [--silent] [--fixed_dc]
optional arguments:
-h, --help show this help message and exit
--init Start new incubation. Default: resume from last time point
--species Load species specific incubation program: chicken, quail,
elephant. See inc_program.json
--silent Deactivate the alarm buzzer
--fixed_dc Ignores PID controller and sets heater to fixed duty cycle.
settings.json
: here you find everything necessary to specify your GPIO pins (BCM format), LED/Buzzer modes, data output folder, PID parameters & number of steps for your stepper motor.
inc_program.json
: use this json file to specify your incubation program. You can adjust or add more programs here, callable by the --species
flag.
If you want just run the same Temperature & Humidity then just specify the default_phase
field and set phases=1
.
For more phases, add them to next_phase
and increase the phases
number.
Then you also need to specify when these next phases should be activated. Use the phase_changes
field for that. The values are in days.
Specify if you want the eggs to be moved at all with setting activate_move_eggs
to either 1 or 0.
days_move_eggs
: How many days the eggs should be moved.
interval_move_eggs
: Move eggs every x hours.
The --init
flag starts a new incubation. While the default mode is to resume from original time point, saved in time_init.json. This was setup as a precaution, in case something goes wrong during the long run time.
--silent
deactivates the buzzer. This is great for testing the incubator and maybe also for the initial heat up. You can then just wait until the incubator reached the set point and then just restart hatchling without the --silent
flag to activate the alarm buzzer.
Use the --fixed_dc
flag to specify a fixed duty cycle for your heater. This will be important when building a new incubator and tuning the PID parameters. See the PID section for more info.