For a bit of fun and because we can, my children and I are currently building a fully autonomous Chicken House Controller.

The system is build around our Monmouth Major 14-18 hen hen-house and custom perspex lined base which gives some extra shelter and the all-important dry dust-bath area. The system is powered by an Arduino Mega 2560 and a Raspberry Pi model A and some custom electronics, it has the following features :

Power and environment

  • Nuclear powered (OK, indirectly via a solar panel from the Sun, but the fact still stands!).
  • Sufficient power to run the system for 5 days - for example in winter when the solar panel may be covered in snow.
  • Waterproof and weather proof for year-long automatic use.
  • Ability to automatically power up and down USB devices such as the Wi-Fi link to the house, the serial interface on the Arduino and the Webcam - to save some power when not in use.
  • Ability to detect low battery and alert via e-mail
  • Ability to detect lack of solar charge when charge is expected during the day.
  • Power reduction technologies that conserve the energy.

Automated and manual actions

  • Full Real-Time Clock, accessible by both the Raspberry Pi and the Arduino.
  • Automatic pop-hole door opening at sun-up, (but not before 6am) - so we still get a lie-in.
  • Automatic pop-hole door closing at sun-down plus 15 minutes to allow stragglers to find their way home.
  • Automatic pop-hole door locking and unlocking to keep Mr Fox out.
  • Automatic door opening and re-locking for the two nesting boxes, so that we can collect the eggs more easily.
  • Automatic door opening and re-locking for the main human door.
  • Web interface to control the system from the house.
  • Auto-off ChickenCam - A pan and tilt webcam that we can control via the web interface.
  • Auto-off, dimmable back-light and bedtime light (mounted on the webcam), so the chickens can see the roosting bars and we can look at them.
  • Auto-off RatLights - Two infra-red Rat Lights (under the nesting boxes) so that we can see the rats that come to feast in the evening and have a pop at them to reduce diseases and food consumption.

Data Logging

  • Full Data logging of system state every 15 seconds (temperature, current consumption, energy harvested, current error state).
  • Full Event log to help identify and resolve problems.
  • Temperature sensing inside the chicken coop, external temperature and the charge control unit temperature.
  • Voltage and Current sensing on the Solar panel and the batteries.
  • Ability to graph any of the above over a week, month or year.

Management

  • Automatic monitoring for error conditions such as door open, charge over temperature; freezing conditions; loss of solar energy (monitored during the day only).
  • Status box and user interface on the front that shows the systems health on an RGB LED giving at-a-glance system status.
  • Full local user interface on the box in the chicken coop - to test sensors and check current state.
  • Full remote web interface to monitor live state of any part of the system and to control the components such as the lights, webcam - the only exception is the doors, which must be accessed locally to prevent accidental opening.
  • Remote reset of the Arduino from the Pi.
  • Automatic reset of the Pi from the Arduino.
  • Watchdog timer to ensure Arduino availability.

Upgradability and diagnostics

  • Remote Raspberry Pi upgrade and management.
  • Remote Arduino firmware upgrade - from the Arduino IDE in my main PC to the Raspberry Pi and into the Arduino over SPI.
  • Remote Arduino Serial monitor from the house (via the Raspberry Pi).

Possible Add-ons

  • RFID's on the Chickens to see who's laying and who's not; when and long they take to lay.
  • Fox Alert during the night - using a Passive Infra-Red sensor (PIR).
  • Automatic water refilling.

If you want to read about the construction and problems along the way, take a look at our blog. Use the "previous" button at the bottom of each article to go the next article -- don't you just love reverse date ordered lists :-/