Skip to the content
PCBKitNew board
2 layers77.5 × 92.2 mmChicken coop board, the printed circuit board in 3D

An opensource device to connect Kebrl Automatic Chicken doors with home assistant

Size
77.5 × 92.2 mm
Copper layers
2
Thickness
1.6 mm
Parts
44
Nets
53
Pads
162
Tracks, vias
190, 34
Pours
1
Routed
Yes
KiCad
KiCad 10.0 (file 20260206)
Created
2 Aug 2026
Updated
2 Aug 2026

Overview

Chicken coop board is an open-source printed circuit board by ygaspoz, from the ygaspoz/ChickenDoorController repository on GitHub, published under the MIT licence. It is a 2-layer board of 77.5 × 92.2 mm with 44 parts on 53 nets, routed with 190 tracks and 34 vias.

It is built around the IRM-20-5, AP2112K-3.3 and ESP32-C6-MINI-1. Its parts include 10 connectors, 9 resistors, 9 ICs, 6 capacitors and 3 switches. It belongs with the home automation and IoT boards and the ESP32 and RISC-V boards of this library.

Main components

3

README

README.md

ChickenDoors - ESP32 Kerbl Smart Coop Controller

An open-source MicroPython project for an ESP32 designed to control Kerbl automatic chicken doors and integrate them seamlessly into Home Assistant via MQTT Discovery.

Kerbl doors provide a safe mechanism that protects poultry houses from nocturnal predators like foxes and martens. This project upgrades that reliable hardware with custom limit switch feedback, and full smart home control.

Features

  • Kerbl Door Compatibility: Interfaces directly with Kerbl chicken doors, which safely operate vertical sliders weighing up to 2.5 kg.
  • Home Assistant Integration: Fully supports MQTT Discovery. Switches, buttons, and limit sensors auto-populate in Home Assistant.
  • Custom PCB (KiCad): KiCad files are included in this repository so you can manufacture your own clean, dedicated control board.
  • Hardware Watchdog & Soft Recovery: Uses the ESP32 hardware WDT and socket timeouts to automatically recover from silent network freezes or MQTT broker disconnects.
  • Limit Switch Feedback: Real-time physical door state feedback published every 5 seconds.

Hardware & Pin Configuration

Components Needed

  • Custom Control PCB (See the included KiCad files in this repository) or an ESP32 dev board with relay modules
  • Kerbl Automatic Chicken Door hardware
  • 4-Channel Relay Module (Active-Low)
  • 2x Limit Switches

Custom PCB

The included KiCad files allow you to manufacture a custom PCB with the following components:

  • ESP32-C6-MINI-1U chip
  • PC817 optocouplers to trigger the doors
  • AC input with 5V and 3.3V regulators
  • Direct 5V power for the Doors including physical switches to turn of the power to the doors
  • PC817 optocouplers to read power status of the doors
  • UART Programming header for flashing the ESP32

You can also switch out the ESP32-C6-MINI-1U for a ESP32-C6-MINI-1 if you want an integrated antenna.

Wiring / Pinout

The ESP32 relays interface with the Kerbl door's external button inputs, which use a normally open contact each for Up and Down movements.

RTC (DS3231)

  • I2C SDA: GPIO 21
  • I2C SCL: GPIO 22
  • SQW/INT: GPIO 14 (Configured as input with pull-up)

Relays (Active-Low)

  • Door 1 Lock (Down): GPIO 32
  • Door 1 Unlock (Up): GPIO 33
  • Door 2 Lock (Down): GPIO 25
  • Door 2 Unlock (Up): GPIO 26

Limit Switches

  • Door 1 Limit: GPIO 16 (Active-low with internal pull-up)
  • Door 2 Limit: GPIO 17 (Active-low with internal pull-up)

Indicators

  • Beeper: GPIO 13
  • Status LED: GPIO 2 (Built-in LED on most dev boards)

Installation & Setup

1. Flash MicroPython

Ensure your ESP32 is flashed with the latest standard MicroPython firmware.

2. Clone the Repository

bash
git clone [https://github.com/yourusername/ChickenDoors.git](https://github.com/yourusername/ChickenDoors.git)
cd ChickenDoors

3. Configure Network (WiFi)

Open esp_root/boot.py and update your WiFi credentials:

python
WIFI_SSID = "YourWiFiSSID"
WIFI_PASSWORD = "YourWiFiPassword"

4. Configure MQTT and Home Assistant

  1. Rename config.example.py to config.py.
  2. Edit config.py to set your MQTT broker details and Home Assistant discovery prefix:
python
MQTT_BROKER = "192.168.1.100"
CLIENT_ID = "chicken_coop_1"
MQTT_USER = "your_mqtt_user"
MQTT_PASS = "your_mqtt_pass"
HA_DISCOVERY_PREFIX = "homeassistant"

5. Upload Files to ESP32

Upload the contents of the esp_root folder to the root of your ESP32.

MQTT API

Home Assistant will auto-discover all entities. However, if you wish to integrate this with Node-RED, openHAB, or a custom script, you can use the raw MQTT topics. Command Topics:

  • home/chicken/lock: Payload 1 or 2 locks (closes/down) door 1 or 2.
  • home/chicken/unlock: Payload 1 or 2 unlocks (opens/up) door 1 or 2.
  • home/chicken/sync: Any payload triggers an NTP time sync and resets alarm timers.
  • home/chicken/active/1: Payload ON or OFF activates/deactivates door 1 (software block).
  • home/chicken/active/2: Payload ON or OFF activates/deactivates door 2 (software block).

State / Telemetry Topics:

  • home/chicken/active_state: Publishes block states: {"door1":"ON","door2":"OFF"}
  • home/chicken/limit_status: Publishes switch states every 5 seconds: {"s1":1,"s2":0} (1 = Pressed, 0 = Not Pressed)

Troubleshooting & Crash Logs

The firmware is designed for maximum uptime. If a critical failure causes the main loop to crash, the ESP32 will write the stack trace to error.log in the root filesystem before resetting itself. To debug a crashed device:

  • Connect via USB/Thonny.
  • Open error.log.
  • Read the Python traceback to identify the failure point.

Parts

44
QtyValueFootprintReferences
8Conn_01x02TerminalBlock_Phoenix:TerminalBlock_Phoenix_PT-1,5-2-3.5-H_1x02_P3.50mm_HorizontalJ1, J3, J4, J5, J6, J7, J9, J10
6330Resistor_SMD:R_0603_1608MetricR2, R3, R4, R5, R6, R7
6PC817Package_DIP:DIP-4_W7.62mmU4, U5, U6, U7, U8, U9
4MountingHole_PadMountingHole:MountingHole_2.2mm_M2_PadH1, H2, H3, H4
31uFCapacitor_SMD:C_0603_1608MetricC3, C4, C5
210KResistor_SMD:R_0603_1608MetricR8, R9
2SW_SPSTTerminalBlock_Phoenix:TerminalBlock_Phoenix_PT-1,5-2-3.5-H_1x02_P3.50mm_HorizontalSW2, SW3
10.1uFCapacitor_SMD:C_0603_1608MetricC2
1100uFCapacitor_SMD:C_0603_1608MetricC6
110kResistor_SMD:R_0603_1608MetricR1
122uFCapacitor_SMD:C_0603_1608MetricC1
1AP2112K-3.3Package_TO_SOT_SMD:SOT-23-5U3
1Conn_01x02TerminalBlock_Phoenix:TerminalBlock_Phoenix_MKDS-1,5-2-5.08_1x02_P5.08mm_HorizontalJ8
1ESP32-C6-MINI-1RF_Module:ESP32-C6-MINI-1U1
1FuseFuse:Fuse_Littelfuse_372_D8.50mmF1
1IRM-20-5Converter_ACDC:Converter_ACDC_MeanWell_IRM-20-xx_THTU2
1LOGOLogos:chicken_pictureG***
1SW_PushButton_Switch_SMD:SW_Push_1P1T_NO_E-Switch_TL3301NxxxxxGSW1
1UARTConnector_PinHeader_2.54mm:PinHeader_1x06_P2.54mm_VerticalJ2

The 43 most common of 44 parts.

Questions

How big is the Chicken coop board PCB?

It measures 77.5 × 92.2 mm and has 2 copper layers, 1.6 mm thick.

What parts does the Chicken coop board use?

44 parts, built around the IRM-20-5, AP2112K-3.3 and ESP32-C6-MINI-1. The full list of its parts is on this page, with links to each part's symbol and footprint where PCBKit's library has them.

Where can I download the Chicken coop board KiCad files?

From the ygaspoz/ChickenDoorController repository on GitHub, at the commit this page was made from: the board is board/Chicken_coop_board.kicad_pcb and its schematic board/Chicken_coop_board.kicad_sch. PCBKit opens the board in the browser, with nothing to install.

Can I use the Chicken coop board design in my own project?

Its repository publishes it under the MIT licence: you may reuse it on that licence's terms (keep the author's notice, and for a copyleft licence share your changes alike).

Similar boards

  • 2 layers120 × 68 mmC64-PSU NA, the printed circuit board in 3D

    C64-PSU NA

    wiretap-retro/C64-128-Power-Supply

    This power supply is a simple design for the C64 or C128.

    19 parts8
  • 2 layers203.8 × 88.6 mmAlim Eurorack, the printed circuit board in 3D

    Alim Eurorack

    jojo-monk/eurorack-psu

    DIY Eurorack power supply — 3× Meanwell IRM modules (±12V/5V) with LM350/LM337 linear regulation, KiCad design.

    46 parts1
  • 2 layers98.8 × 79 mmGenv01 2, the printed circuit board in 3D

    Genv01 2

    dimipapr/TalkyPump

    The legacy v1 firmware is preserved under archive/ as a behavioral reference.

    38 parts
  • 2 layers185 × 144 mmMega 12v pwr, the printed circuit board in 3D

    Mega 12v pwr

    adeboni/eurorack

    This repository stores various eurorack module designs I've made

    67 parts1GPL-3.0
  • 2 layers72.3 × 95.5 mmV2a power board, the printed circuit board in 3D

    V2a power board

    ejangelico/SSRTeensy

    The teensy code for the teensy SSR controller.

    25 parts1
  • 2 layers60 × 94 mmPower, the printed circuit board in 3D

    Power

    gugray/InterGalacticReceiver

    Tune in to alien transmissions on a CRT screen! Shaders are involved.

    8 parts
  • 4 layers63 × 63 mmLamp, the printed circuit board in 3D

    Lamp

    marmbrus/circuits

    74 parts