Automation system for poultry housing

Full automation for poultry housing — hatch, ventilation, lighting and a monitoring system for fault detection

The goal was a system that looks after itself and only bothers the owner when a person is genuinely needed.

  • Hatch automation — linear actuator, calibrated speed profiles, position monitoring
  • Ventilation — CO₂-based, with heat recovery
  • Lighting — spectrum-based, with separate modes for laying hens, growing birds and brooding
  • Edge AI — bird detection and counting, predator detection
  • Safety logic — two-channel safety curtain, overcurrent protection, IEC 61131-3 logic
  • Remote management — Home Assistant, MQTT over TLS, real-time diagnostics
  • Custom carrier board — a PCB designed to interconnect the modules

Automated hatch

  • Vertical linear actuator — the mechanism cannot be forced open by predators
  • Holding position requires no power — the hatch cannot be levered open if the supply fails
  • Manual opening — by removing the locking plug
  • Automatic calibration — a single button press generates the speed profiles, measures travel time and the load under starting and normal operation, and derives the safety limits from them

Safety systems

  • The mechanical frame defines the end positions — the magnetic switches only confirm that the state matches the expected values; a sensor failure raises a false alarm but does not prevent the hatch from closing.
  • IEC 61131-3 safety limits stored in the chip's internal memory, where the user cannot overwrite them
  • Two-channel safety curtain with cross-fault detection
  • Obstacle detection based on the calibration — if something jams, movement stops immediately, in accordance with EVS-EN 12453:2017+A1:2021
  • Hardware and software monitoring for fault detection
  • Module tamper detection — opening the enclosure locks the chip and sends a notification; it can only be opened with the technician's code, which avoids false alarms on life-critical systems

Sensor inputs: 2× safety curtain, 2× end position switch, 2× tamper switch, expansion modules for temperature, humidity and light.

Edge AI — local detection, with no cloud service

  • Bird detection and counting in real time, on the device itself
  • Cross-validation between models — reduces false positive detections
  • Detection of predators and unfamiliar animals — if a fox appears, the hatch closes automatically and a notification is sent to the phone
  • Check for birds left outside – before the hatch closes
  • Automatic summaries that tell you what happened and why, not just an error code

Climate and lightning

  • Ventilation is driven by CO₂ level — fresh air matters more than an ideal temperature
  • Heat exchanger retains energy without restricting air exchange, and is easy to clean
  • Day and night follow sunrise and sunset, not the clock.
  • Light compensation – based on actual need
  • Light spectrum matched to need — red-dominant with warm white and UVA for laying hens, blue and green with cool white for growing birds, and a separate mode for brooding
  • Temperature monitoring on dimmers and power supplies — to detect overheating and fire risk, and to catch anomalies

A system that fixes itself

A constant stream of notifications means people turn them off — and then the ones that actually matter go unnoticed too. There are three levels of notification:

  • Info — the system resolved the situation itself, no visit needed
  • Warning — something is out of service, the automation is running in fallback mode and will report when it recovers
  • Intervention required — the system can no longer guarantee the outcome, and says so directly

The modules run in a hybrid arrangement: if one module drops out, the system continues in a reduced mode rather than stopping. Faults fall into three levels — automatic recovery, manual reset, or permanent lockout.

Connectivity and management: WiFi and Ethernet, MQTT over TLS, with two separate brokers whose data is cross-validated to detect spoofed commands and duplicate modules. Home Assistant discovers the devices automatically; remote control, profile switching and diagnostics all run from the same place.

Compliance of the modules used

  • EU Declaration of Conformity — Directive 2014/30/EU (EMC) and 2011/65/EU (RoHS)
  • UK Declaration of Conformity
  • RoHS 10 compliance
  • Tested to the following standards — EN 61000-6-3:2007+A1:2011, EN IEC 61000-6-1:2019, EN IEC 63000:2018
  • Control logic — IEC 61131-3