Skip to content

Latest commit

 

History

History
110 lines (74 loc) · 4.4 KB

README.md

File metadata and controls

110 lines (74 loc) · 4.4 KB

Pincubator version 3

Pincubator is a raspberry pi project together with 2 arduino mega modules to drive a DIY egg incubator (seperate setter and hatcher)

I found out after last year that using the raspberry as microcontroller is often challenging. I decided to include 2 arduino mega's as microcontroller. One for the setter, one for the hatcher.

See live when incubating

Backstreet farm

Hardware setup

  1. Arduino MEGA
  2. Dalas temperature sensor
  3. Sensirion CO2/RH/T module
  4. SSR
  5. Eggs turning module
  6. 2 retired incubators
  7. Raspberry Pi
  8. Screwshields

I have multiple temperature sensors per device, and one extra from 'the other arduino', to allow failure detection.

Software setup

Each arduino talks to the raspberry pi over serial communication. That serial communication is forwarded to a local running ThingsBoard mqtt server. Settings on the server can be propagated back to the arduino to tuning of the setter and hatcher.

A telegram bot is installed allowing direct communication with the setter and hatcher.

Setter

The setter is an old heavy incubator which was used for high temperatures.

Ventilation is forced with 4 ventilators

  • I changed the heater to a PWM of around 1000mS per 10 seconds. A PID controller is installed on the Arduino MEGA controlled throuh continuous Dalas temperature sensor temperature sensing. The PID algorythm changes the PWM using the SSR.
  • Humidity control is currently disabled
  • Eggs turning is done using a second SSR.

The script can be found in the pincubator_v1_setter_folder.

Hatcher

The setter is an old incubator with external heat chamber.

  • I put a Dalas temperature sensor in the external heat chamber at 40.1°C which keeps the internal chamber around 37.6°C (can be adjusted from ThingsBoard server).
  • An algorythm changes the external set-point according to hourly readings
  • Humidity can be controlled using the SSR.

Raspberry pi

Installation

  1. Install ThingsBoard community edition following online tutorial

  2. You can create most devices and assets on the ThingsBoard server with

cd Pincubator
initial_setup.py
  1. Install all python packages

  2. I have no-ip.org installed to allow remote control

Runtime setter

A Python 3.7 process called run_setter.py

  • The process connects to the serial readings of the Arduino via USB.
  • Values are send to ThingsBoard to monitor the values over time Alerts can be set in the cloud dashboard.
  • Telegram bot is initiated
cd Pincubator
nohup python3 run_setter.py > setter.out &

Runtime hatcher

A Python 3.7 process called run_hatcher.py

  • The process connects to the serial readings of the Arduino via USB.
  • Values are send to ThingsBoard to monitor the values over time Alerts can be set in the cloud dashboard.
  • Telegram bot is NOT initiated
cd Pincubator
nohup python3 run_hatcher.py > hatcher.out &