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.
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
The other main component is the Raspberry Pi (Model A) is the human end of the system, it provides all the web interface, sends e-mails to us when things go wrong and can graph things like internal hen house temperature or the battery charge levels throughout the day. The Pi is also used for debugging and programming the Arduino, but more on this later.
The device is a Linux computer operating at 700Mhz, it has 256Mb of RAM, 16Gb of FLASH storage, one USB port, no Ethernet
I chose the Model A because I wanted the lower power version - to make the battery last longer and because I had no need for the power hungry Ethernet chip.
The two devices are connected together via a couple of level shifters that convert the 5V signals from the Arduino into 3.3V signals for the Raspberry Pi and vice-versa. The connections provide both an SPI connection and an I2C connection, hence all devices on the I2C bus are accessible by both devices. The Real time clock chip and logging memory being the primary things both will share. The SPI interface is there as another way to re-program the Arduino
Power wise, the unit will be run by a 12 volt, 12 Amp Hour (AH) leisure battery, which should provide plenty of power - or so I thought from my power budget estimates.