The issue that prompted the re-design, is that the coop needs of some overdue maintenance, including a deep cleaning and fresh wood preservative, which in turn requires that the coop was empty. Further, the existing electronics was showing its age, parts were not working as well as they should and maintainability was an issue due to the prototype nature of the boards. The moisture seals in one box had failed was allowing moisture and mites to get into the warm electronics, so a plan was put in place to design and build new boards over the winter months and get the existing code base ported and working, with the aim of installation during the summer of 2023.
To achieve that plan, I need to know what I am going to build, so there must be a design. Starting from the initial v1 functional spec and considering the lessons learned along the way, its good to review what we actually need, what works, what doesn't work so well, what was not used, so that we can decide what to do with the new platform.
Requirements
Many of the existing functional requirements will be carried forwards, including:
- Keep the chickens safe and not hurt them in any way
- Be able to tell us when it has a problem, so we can resolve it
- Be weatherproof so it can work all through the year
- Be reliable in operation and fail safe if things go wrong
- Automatically open and close the pop hole door at the correct times
- Require minimal human involvement, except for normal activities such as cleaning, filling food, water and collecting eggs etc.
- Reduce our running costs by using solar electricity to charge and operate the system during the summer months, or from a battery charger in the winter months, when the solar panel produces no power.
- Indicate if the system is OK or has a problem, so that we can fix it
- Have an inside light that acts as a night light to aid roosting, since the bars are raised and chickens are not good with low light levels. The lights also aid cleaning the coop as it removes the need to use a torch.
- Have a manual override the system to lock the chickens in or to let them out – locally from the hen house
- Be as fox proof as possible
- Not make the chicken house look ugly
- Allow operation from the house, so that problems can be quickly identified, as an example when a chicken is locked-out and needs letting back in.
Future enhancements
Provide modularity and expandability so that we can integrate new modules and functionality without any significant change to what is already there, this will include:
- AI Webcam modules for the main coop and the conservatory under the coop, to detect the presence of chickens or rats, eggs and stones (as in not eggs) in the conservatory area
- Level monitoring for consumables, including food and water feeders
Technology requirements
A key limitation of the 9 year old solution was the obsolete technology components being used, therefore its a good time to refresh the systems
- Use modern electronic components and manufacturing processes.
- Use custom printed circuit boards (PCB's) to improve reliability and improve maintainability
- Reduce the power budget, to keep running costs low and allow longer running time during power failures.
- Be easily maintainable and upgradeable
- Use up-to-date development tools
- Be secure, so as not to impact the house or home network security
- Re-use the existing code base, at least in the short term
- Allow me to perform development, debugging and fault fixing, locally on a separate instance in my office
- Allow remote debugging and updates to the main unit in the coop.
Functionality to be removed
The following functionality will be removed, since it was not being used, or is to be replaced with better alternatives.
- ChickenCam, the webcam that shows what the chickens are up to. This wasn't being used as the light levels inside the coop were not compatible with the webcam that was being used, even when several 1 Watt LED's were added, these caused their own problems due to the heat they produce - in a wooden box that is full of straw and chickens.
- The Web interface as people preferred to use buttons on the front of the unit and look at the lights.
- RatLights, since alternative vermin control methods are now used that remove their need.
- Solar panel interface and the positioner module.
- This was used to make the panel track the sun, however, the gearbox assembly rusted out in 2018 and because the USA manufacturer disappeared, a replacement could not be obtained.
- Further, the high hedge the panel was placed on top of was replaced with a lower hedge, leading to the solar panel being re-mounted on top of the chicken coop, this is not an ideal location for it due to other trees in the same area.
- Data Logging to the EEPROM's. This will come back, but in a different manner at a later point
- The Far Away Arduino (farduino) code I wrote, that allowed the standard Arduino build process to perform a remote firmware update on a device that is remote, by sending the new firmware over SSH to an intermediate host, which then used AVRDUDE to program the Atmel chip.