The electronics and software may be the majority of this project, but when it comes right down to it, those boards need to be installed and protected against the elements and the reality of being installed in a Chicken Coop, from the dirt, through to the moisture, bugs and temperature swings through the year. For this reason, the systems need to be protected from the elements and ABS plastic boxes with hermetic seals and brass inserts are used. The plastic will move over the years and the seals will eventually fail, but replacement boxes are not expensive and they are easy to work with. The brass inserts, along with some copper grease are added to ensure that the threads do not corrode and being metal, they last a lot longer than screws direct into plastic, particularly when the covers are on and off through the year. 

The main box

The main box house the main PCB, plastic cable glands are used to allow the cables to enter and seal, keeping moisture and creepie crawlies out.  Additional cable entries are installed and clear perspex rods are inserted, these are much easier to remove and install, compared to removing the box, drilling a hole in the right place and re-installing everything, its called planning for future change.

The board is not fixed in place in this picture, but it shows how everything will be once its all installed. You may also notice an increasing number of bodge wires as problems are identified and upgrades are performed on the unit. This diagram also shows the prototype SDCard module in expansion socket 1, this allows for the ESP32 to see and manipulate files on a FAT32 formatted partition, it also allowed for an alternative firmware update method, where if a firmware.bin file is detected on insertion, then it will be applied to the module and the unit rebooted. This gives another way of recovering the unit, without needing a laptop and cable. The ESP32's onboard serial LED shows varying colours during the install process to show that the firmware has been detected, is being programmed and has either succeeded or failed in the update. A problem identified during the creation of this feature is that only certain SanDisk SD Cards will work effectively with the Arduino SDCard module, 32Gb cards being problematic, but 64Gb cards being fine. Basic file manipulation is also provided via the command line interface and it looks to be similar to the basic syntax used in Linux - cp, rm, mkdir, etc. 

Front Panel

The Front Panel module is fairly basic in its design, however, the position of the TFT display over the ESP32 should be noted. The ESP32's WiFi aerial is above the display since that provides a clearer route towards the house and the access point.

The close proximity between the incoming cable gland and the connector should be noted as this is tighter than I would have hoped for and it makes assembly more difficult than I like. Similarly, the rotary encoder on the right only just has enough space for the connector to be installed. 

The bottom waterproof switches are cabled up and ready to install and the easiest way to place the LED's turned out to be to mount them on the Molex connector. Future versions of the board will have an extra set of pins on the PCB to allow the LED to be placed directly on the board. 

 

 

Power Sensing

The power sensing module just needs to take some chunky cables in on its cable runs, terminate them on the screw terminals and provide a data link back to the main coop. Cable routing could be better and the connectors would benefit from a slightly larger form factor, since the cables with their butt splice connectors installed are a little tighter than I had hoped for. The next iteration of board will use a slightly larger connector.  A number of additional filtering capacitors and a small bodge wire at the top can be seen in the diagram. These, as with all their predecessors are now resolved in the next PCB iteration. The form factor of the orange 100nF capacitors is not ideal, but it was what I had in my box of spare capacitors and more importantly, they work as required.