Controller that opens or closes a chicken coop gate. It uses Node-RED as the brain and MQTT for communication. The gate opens and closes based on sunrise/sunset. You can set time windows for opening and closing; if sunrise or sunset falls outside the window, the window times are used instead. You can adjust the sun time events.
- ESP32-based gate controller with a linear actuator and encoder feedback.
- Node-RED handles scheduling and publishes MQTT commands.
- Node-RED dashboard for manual open/close control.
Controller overview with the gate hardware.
Example settings:
- open from: 6:00 AM
- open until: 8:00 AM
- close from: 5:30 PM
- close until: 7:30 PM
Example cases:
- Sunrise @ 5:40 AM, gate opens @ 6:00 AM
- Sunrise @ 7:20 AM, gate opens @ 7:20 AM
- Sunrise @ 8:10 AM, gate opens @ 8:00 AM
- Linear actuator with integrated rotary encoder
- ESP32 Matrix Core + WiFi antenna
- VNH3ASP30-E full-bridge motor driver
- DC-DC stepdown
- Waterproof connectors (TE Connectivity AMP Superseal 1.5)
- 3D-printed sealed housing
Components
Assembled controller electronics and enclosure.
Gate and actuator installation in the coop.
Wiring overview for the motor driver, power, and sensors. Current-sense output of the motor driver is filtered with a low-pass.
Node-RED dashboard used for manual control and status display.
Node-RED flow that schedules open/close actions and publishes MQTT commands.
src/Example Docker Compose.ymlsrc/Example MQTT Configsrc/Node Red Flow.json