Skip to main content

Automated Chicken Coop V4


I've kept chickens for ~7 years as of this writing and employed automation for the majority of those years. Chickens are great fun and one of the easiest animals to farm; the addition of automation eliminates some of the more mundane chores.

I subscribe to a pasturing approach where chickens are given unrestricted access to my surrounding woodlands, meadows, and wetlands - there are a number of benefits to this system of management that I won't dive into here. Aside from fire mitigation, the property remains in a fairly wild and unaltered state and all active management centers around the coop - this is in contrast to other systems where birds are confined to cages, coops, and optionally attached runs in accordance with metrics on minimum cubic feet per bird.

Motivation

Over the last few months I've been mulling over a new design for my chicken coop automation system. It's been nearly 2 years since the last refresh and few new dynamics are in play for the 4th version:
  • The California power grid has become increasingly tenuous - I can no longer assume connectivity will be present let alone power.
  • My current project box is ~IP33 and I'm growing tired of the creepy crawly ecosystem thriving in there.
  • Desire to expand functionality without rebuilding each time.
  • I've built a few ESP32-based development boards at work and looking for a fun personal project to employ.

Key Features

As I'm not looking to boil the ocean on the first iteration, I settled on a set of basic features which provide a solid foundation for continued development:
  1. IP65+ enclosure
  2. IP65+ connectorized cabling
  3. Modular design
  4. GPS-based time
  5. Automated door
  6. Automated lights
  7. LAN-based OTA via WiFi

Design

Modularity

I've been a big fan of the Adafruit Feather pinout for sensor or MCU-based development boards - nearly all boards I've produced lately follow this spec. Interconnect between boards from various vendors, clean stack-up, large ecosystem - an easy choice. The Feather Tripler was selected to spread the load horizontally as opposed to a single column stack-up.

Adafruit DC Motor+Stepper FeatherWing

An H-bridge motor controller makes operating a linear actuator a breeze. Lighting can also be operated from the motor controller by treating it as a single direction motor. Care must be taken when operating as only 1.2A can be driven per terminal block.

Flex ESP32-WROOM Feather

Although an ESP8266 would have sufficed for the current feature set, I've got a few of my ESP32 development boards around which provide headroom for upcoming features. The Flex ESP32 board provides access to all pins along with an SWD header for easy debugging with an ESP-PROG.

U-blox NEO-6M GPS Module

The core functions of the chicken coop are driven by sunrise/sunset which varies throughout the year for a given set of coordinates - GPS provides location data and UTC time from which the sunrise/sunset can be calculated. Although the NEO-6 series is fairly old, I had a module in my parts bin and the capabilities were more than sufficient for my needs. I wrote a quick library for communication with the module via standard NMEA sentences and will open source when I get a chance to cleanup.

Interconnect with the Feather pinout was achieved through a FeatherWing Proto board on which I soldered a female header strip.

2700-3000K LED Rope Lighting

Chickens govern their egg production based on available resources and the "expectation" of resource availability. I say this in quotes as nature has devised an ingenious method for estimating what the future holds for food - day length (in actuality the inverse - length of night). As the sun powers all vegetative growth and therefore the basis of nearly all life, increasing day length corresponds with increasing potential for food availability while decreasing length indicates the onset of winter and decreasing food availability. The pineal gland is primarily responsible for the sensing of light, though the eyes and hypothalamus are also contributors.

There are numerous studies on the benefits of artificial lighting on egg production and behavior. I mulled over the concept that lighting was a step too far and created unnatural conditions to the detriment of the birds, though consider:
  1. In areas near the equator, day length remains long throughout the year to no ill effect. Chickens are domesticated descendants of Red Junglefowl with an ancestral range in these very areas.
  2. Chickens molt every 12-18 months and will not lay during this time - nature's mechanism for R&R.
  3. Short days correspond with lack of food in the wild which isn't the case under my care. Although my birds consume a significant portion of their diets from the woods and wetlands throughout the year, they do have access to a balanced commercial feed whenever they desire.
Optimal "day length" is 16 hours which I dynamical calculate based on sunrise for the given day of the year at the GPS coordinates. For example if sunrise occurs at 6am, artificial lighting commences at sunset and continues till 10pm.

I installed a 2700-3000K LED light strip with 3D printed mounting brackets. Power is controlled via the DC motor controller.

12V Linear Actuator

Linear actuators are an ideal mechanism for door control as they are highly reliable and forced entry is beyond the abilities of any animal that could possibly fit through the chicken door, in my area namely - owl, hawk, fox, coyote, dog, skunk, possum, and bobcat. 

The most primitive method of operating a linear actuator is through mechanical relays - tie NCs to ground and flip the NO on either relay to +12VDC to extend or retract. As mentioned previously, I utilized a DC H-bridge controller allowing for solid-state actuation and fine-grained speed control - no relay clicking and provides ample time for birds to get out of the way.

My linear actuator has been in service for nearly 7 years and still functioning well.

Project Box

I selected an IP67-rated enclosure to provide ample protection from the elements as well as critters. The included grid plate allows for easy mounting off the tripler as well as GPS antenna.


Power

Ultimately I'd like to transition to 100% solar power, though in the interim 12VDC provides a reasonable stepping stone (many solar charge controllers push 12VDC). I repurposed an IP67 12VDC power supply I had in the parts bin. Within the enclosure, a step down converter provides 5VDC via micro USB to the ESP32 and the other wing boards.


Cabling

As I intend to retrofit in the near future, I've connectorized all external wiring with IP65 rated connectors. I had a few hundred foot roll of 16AWG 2-conductor direct burial wire from a past project which I employed for the 12VDC power run (an acceptable ~10.5VDC at the enclosure) as well as runs to the linear actuator and LED lights.

Completion











Comments

Popular posts from this blog

nVidia RTX 3090 Founder's Edition - Thermal Pad Modification

nVidia's RTX 3090 is a beast of a GPU featuring the latest Ampere architecture with 10,496 CUDA cores and 24GB GDDR6X. Like many products these days it's suffering from limited availability, but I finally managed to acquire one. The 3090 replaces my aging GTX 1070 Ti FTW2 as the primary gamer and boosts my daggerhashimoto rate for Ethereum mining. Unfortunately the 3090 cooling system is not well suited for mining workloads and upon firing up NiceHash, the VRAM temperature quickly reached 110C and began throttling due to excessive heat. Searching the web I found a solution - replacement of the stock thermal pads with higher efficiency aftermarket pads . There are two paths - replacement of all thermals pads front and back or replacement of just the back. I elected to do a full replacement (as it's not terribly difficult to continue once the card is torn apart) and followed  CryptoAtHome's YouTube guide . -WARNING- This process may void the warranty of your GPU and carri

Hardwood Propagation of Hybrid Willows

Our Hybrid Willow is one of my favorite trees - nectar source for the bees in the spring, cool shade in the summer, while keeping algae and cattail growth in check. I wanted to add a few more around the pond this year and decided to try my hand at hardwood propagation. Start off with branches of pencil thickness in the spring and cut down to ~6 inches in length. Place the clippings in cups and fill with 3 inches of water. Clippings release a hormone which promotes rooting, dense occupancy in the cup promotes rapid rooting. Within a few days roots will appear. Interesting observation - thinner cuttings root more rapidly. Keep a close eye as the roots may quickly become tangled. Once the roots reach a few inches in length they're ready for transfer to soil - add an inch of potting soil, careful place the clipping, then add the rest. Ensure the soil stays moist, but not waterlogged. I kept the these clippings in a grow tent with my other springs starts, but a sunny window should suffi