Having had chickens for around 4 years, the novelty of going out to them every morning has worn off a little, it became apparent that a little automation would help improve our sleep time as we would not have to get up as early. Chickens can be quite noisy - if they think they should be out and you have forgotten. So, some automation was necessary, but loads of people have done automatic pop hole door openers and closers, that would be boring and you can go and buy one for around £70, how could this be made more useful and interesting ?

It can't be that hard either, a couple of weeks should have it sorted, or so I thought.

To get things kicked off, we needed to know what we are trying to achieve, so a functional spec was needed. We settled for the following basic specification that we can build onto over time.

Must Have functionality

The system must :

  1. Not hurt the chickens
  2. Help to keep the chickens safe
  3. Be able to tell us when it has a problem
  4. Be weatherproof so it can work all through the year
  5. Be reliable
  6. Automatically open and close the pop hole door at the correct times

The first question was where to start on this journey, luckily, this was an easy one. There was a pressing issue we needed to overcome, that was the old hen house.

The old hen house

After a bit of work on-line selecting the components we needed a couple of days in Eagle, to draw up the basic design (which like the code, I'm not releasing btw). I also had a design for the case, so we could start making things. The approach for assembly is to keep things flexible whilst we iron out the design issues - and to show the assembly methods to my children. At a future point, I'll produce the proper PCB's and miniaturise the platform a bit.

There are four main components to the system.

Going clockwise from the bottom left, they are :

So, now we have the house, whats the technology going to look like ?

I settled on Arduino Mega 2560, for all the real-time processing, it looks like this.

 Arduino

The device uses and Atmel ATmega 2560 CPU which operates at 16MHz, it has 8K of RAM; 256K of FLASH memory for code; 8K of EEPROM and 54 pins for hooking things onto. This doesn't sound a lot, but for a micro-controller, its huge ! I chose this model is because:

  • I had one or two kicking around
  • I always need more pins to hook thing up to (you can never have too many)
  • It was a safe bet

The device is in complete control of the Chicken Coop and can operate without any Raspberry Pi or connection to the outside world

As there is a lot of external connectivity and all the wires have to terminate somewhere plus we need some space to condition the input signals, we need a main board. I chose to use a standard euro card and wire wrap the board, since I had all the bits and it allows me to easily change the design as we go. The PCB can come later once the defects have been ironed out.

So, the main board was laid out and looks like this.