Skip to content

PERSONAL PROJECT · EMBEDDED SYSTEM · APR 2025

Automatic chicken coop door

Daylight controls a drawbridge-style door. A geared motor drives a winch, cables move the door, and a limit switch detects closure.

Watch the drawbridge moveExplore the mechanism

Project at a glance

Context
Personal project: automating a drawbridge-style chicken-coop door using ambient light.
Timeframe
April 2025
Team
Personal project · Aurélien Capron.
My role
Building the mechanism, electronic controller and embedded program.
Technologies
ATmega328P · C++ / Arduino · light sensor · relays · geared motor
Outcome
Working motorised door controlled by light levels, with a closed-position switch and timeout.
Open drawbridge and control box on the front of the coop.
On this page
01

Moving the door

Inside the coop, the winch winds the lifting cables.

The door pivots like a drawbridge. The geared motor turns a metal shaft to wind or unwind the cables, converting motor rotation into movement of the door.

02

Sensing light and driving the motor

A photoresistor provides an analogue reading to the ATmega328P. One relay switches motor power and two others select its direction. A separate input reads the limit switch.

Microcontroller board and motor relays.
View the system diagram
Connections between sensors, controller and geared motor.
03

Deciding when to move and when to stop

At startup the controller uses the current light reading as its threshold and assumes the door is open. Its opening and closing thresholds differ by ten analogue counts, reducing repeated switching when light fluctuates near the threshold.

8 sMotor run time when opening
38 sMaximum closing time
10 sPause after movement

During closure the motor stops when the limit switch activates. If the switch does not activate, power is cut after 38 seconds. The software then marks the door closed in either case, so the physical position is unconfirmed after a timeout.

04

Local control of the drawbridge

Controls accessible from outside the coop.

One button requests movement according to the current door state. The other sets the threshold to the current light reading when polled during movement or the following pause.

Design and firmware

Explore related work

Pont-levis · Démonstration / Demo