Chicken Feeder and Precrastination

In some of my previous posts (Chicken Coop Automation 1 and Chicken Coop Automation Part 2 ), I mentioned preemptive laziness and how it relates to my chicken habit. After reading those posts, my wife coined a new word: precrastination. I liked the term, and I defined it to mean doing a task ahead of time to allow more free time in the future. It turns out precrastination is a real psychological term, and its real definition is performing a task before it is beneficial or optimal to do so. I just can’t win. I guess I need to procrastinate my precrastination to reach an optimal state of crastination.

Regardless, I think I crastinated this chicken feeder just right. The idea actually came from the internet of googles, but it works very well so I thought I’d pass it on.

Originally I had a traditional chicken feeder that fed the ground better than it fed the chickens. I would fill it up with a couple pounds of feed, and most of it would end up on the ground the next day. This didn’t align with my laissez faire chicken policy.

Some research provided some exotic and elaborate feeding systems that had been created: from electronic rationing systems to screw drive feeders with an auger. While I am a firm believer in over engineering and Rube Goldberg devices, I didn’t want to deal with the calibration, sensors, programming, and expense for this particular project. I did some more research and discovered that I could make a very simple feeder with some advanced engineering materials: hot glue, a bucket, and some PVC… pretty much all of the good stuff minus duct tape and zip ties.

The feeder is pretty basic and shouldn’t require much explanation.

  • Get bucket.
  • Get PVC elbow
  • Get hot glue gun
  • Cut hole in bucket
  • Trim one end of PVC elbow
  • Hot glue PVC elbow in hole

Right now, I have one of these made from a square bucket and two made from round buckets. Rather than putting feed in a couple pounds at a time and having it trampled into the ground, I fill up all three about once a month with 50# of pellet feed and have virtually no waste.

The only variable I’ve played with is the height of the internal mouth of the PVC above the floor of the bucket:

  • 1/2″: too low, and the feed does not feed very well
  • 1″: the feed feeds fairly freely
  • 1 1/2″: (.125 feet) feed feeds forth flawlessly forming a fully functional first-rate fowl feeder

I would also like to note the importance of using feed pellets rather than crumbles. Crumbles muck up the whole works.

The neat thing about this project is that more time is spent driving to the store and buying the components than actually building the feeder!

Laziness or Chicken Coop Automation Part 2: Door Control Algorithm

Don’t understand the title? Read “It’s Hard Work Being Lazy or Chicken Coop Automation Part 1: Door Hardware” to elucidate the title and offer some background.

How hard can it be to control a chicken coop door with a microcontroller and DC motor? Just send a voltage to the door’s motive source to open it and reverse the voltage to close it. Right? You’d think so before delving in, but things quickly get more complex.

To explain, let’s use an example to show how the complexity grows :

  • You have a DC motor you want to use for control of a chicken coop door. you also have a microcontroller with plenty of output pins, each of which can be programmed to 5 volts or ground. Great. Wire each of the two wires from the motor to an output pin. Program one pint to be +5 V, the other to be ground, and the motor rotates. Reverse the +5 V and the ground, and the motor reverses. Now put a load on the motor. The motor quits rotating and and the microcontroller releases its smoke. It couldn’t supply enough current.
  • Put the smoke back into the microcontroller and get a proper power supply. Hook it up to the motor, put a load on the motor, power it up, and the motor rotates. Unfortunately, you are only able to rotate the motor one way. You need a way to reverse the motor polarity.
  • Now get an H-Bridge or series of relays to revere the polarity to the motor. Wire it up, program the microcontroller to control the H-Bridge or relays, and you have a reversing DC motor.
  • You hook everything up to automate the chicken coop, but now the microcontroller needs to know when the door reaches the end of its travel. You need sensors. Limit switches? Eddy current sensors? Reed switches and magnets?
  • Limit switches installed. Now, how does the microcontroller know when to open or close the door? Light Sensor? Timer? If using a timer, what about the changes in sunrise and sunset?
  • Do you need any manual external controls to give commands to the microcontroller? Like buttons?

Once you get all of that sorted, you also need to think about the algorithm the microcontroller will use to make its decisions. Most of the things listed above relate to specific motive sources and configurations, so I will not go into details. Each of my coops are set up totally differently, and what applies to one does not apply to the other. The control algorithm is common between the two, and I will elaborate on that.

Algorithm Considerations:

I wanted a couple features integrated into the control methodology:

  1. External inputs to adjust opening modes (do not open in the morning, open now, close now, etc)
  2. Decisions can be made mid movement (you can command the door to close while it is opening or vice versa)
  3. Controlled by a timer
  4. Account for changes of season
  5. Account for daylight savings

The first feature was to override the automatic controls. For instance: the yard crew is coming the next day and I want the chickens locked in their desolate little cells.

The second feature was mainly needed due to the speed of the actuator. One of the doors moves very v-e-r-y   s–l–o–w–l–y, and I didn’t want to wait for the door to move all the way before making another command. It would be like a windows update… me standing there helplessly slack jawed and gawking at something with no apparent progress. I would like to mention that even moving at a snails pace, the coop managed to capture the pictured cat. I came home one night heard one of the chickens meowing, and found the cat in there.

As far is the third feature goes, I thought about using a light sensor versus a timer. I opted for the timer because I didn’t know how well a light sensor would handle inclement weather and eclipses… I didn’t want a hen squished in the door when she was trying to rush out with her pinhole projector.

I wanted the fourth feature to account for the changes in sunrise and sunset between seasons.

I intentionally did not include the fifth feature because daylight savings is an annoyance, the microcontroller doesn’t know what it is, it stresses out the chickens, and I don’t think it should exist. In fact, it didn’t enter into consideration. I made reference to daylight savings to tell a quick story. I once knew of a man convinced daylight savings causes it to cool in the winter because it takes an hour of afternoon sun away. “That hour of sunlight is just added to the morning,” one might protest. He had already thought about that. “The hour is taken from the hot part of the day and added to the cool part of the day.” Sounds legit.

Control Algorithm: State Machine

The initial consideration for controlling the given example might be to simply apply voltage to the DC motor and wait for the door to trigger the limit switch at the end of its travel. However, what if a particularly stupid chicken is in the way and the door cannot finish its travel? Do you keep applying power and burn up the motor? What if the motor overheats, catches fire, and the other chickens attempt to save the burning, squished chicken? Do you want to risk losing the whole flock? I think not.

Taking all of the mentioned features into account, the algorithm I used was that of a state machine.

This state machine essentially:

  • Reads all inputs (user input, current time vs sunrise/sunset, reached limit of travel, timed out)
  • Interprets inputs to determine the desired state
  • Looks at the current state(door position or door movement)
  • Commands new state (or leaves it alone)
  • Repeats

Rather than telling the motor to do something and waiting for it to happen, the microcontroller continually polls its inputs, makes a decision, makes a command based on the current state, and goes back to polling its inputs. It does not make a command and lock everything up while it waits for verification. It goes back to work looking for inputs and making decisions. Practically, the processor can take new input,  process new information, make commands, and squish a chicken at the same time.

Calculating Sunrise and Sunset:

One of the “inputs” mentioned above is not what one might think of as an input. The processor calculates sunrise and sunset times on a daily basis and uses them to decide when to open and close the chicken squisher. The internet machine told me that sunrise and sunset times roughly follow a sine wave. Therefore, the algorithm estimates sunrise and sunset using a sine wave with periods, amplitudes, and offsets to match the peaks at the summer and winter solstices. I am including the snippet code so nobody else has to look for it. I hope that my comments are clear to others.

If you use this, you will have to match the times to your particular latitude, longitude, and time zone. If it is not clear, feel free to comment and I can provide more info.

It’s Hard Work Being Lazy or Chicken Coop Automation Part 1: Door Hardware

That title might be a little deceptive. Let me elaborate. I will work hard on something now anticipating it will allow for laziness in the future. “Laziness in the future” allows time to work hard on something else in the future, so I can be lazy about that in the more distant future… which allows me to be even more lazy about even more things in the even more distant future. I guess I am just doing my best to maximize my laziness.

All of that leads into an update on my first post. It was about a chicken coop and my reluctance to got out and open it every morning and close it every night. It has been in operation for years now, I’ve automated another, and I want to provide an update. Maybe it will help someone else to maximize their laziness.

 

BACKGROUND

My original coop is a semi-portable “chicken tractor” designed to be moved about the yard on wheels. In theory, I could periodically move the tractor and fertilize different sections of the yard. In practice, it obliterated all plant life anywhere near its presence. While it failed as a fertilizer, it succeeded that much more in my maximization of laziness! I no longer need to move it about the yard.

I bought the chicken tractor on Craigslist, so the coop door (visible here and here) was a 12″ X 12″ piece of plastic that slides horizontally to open and close.

My second coop was built around laziness with a door that opens and closes by sliding vertically. It also has features allowing it to be cleaned in a few minutes, supplying weeks of food and water, and can be shut in if it is cold. However, my FAVORITE feature is the slick ramp out of the door. If I “accidentally” increase the slope by removing the bricks at the bottom, the chickens can’t get enough traction and fall right down it.

Door Automation Hardware:

I am not going to provide details on the watering and feeding system in this post. I decided not to actively control those because mechanical systems were too simple and reliable. I am also not going to go into details due to space, boredom of the reader, and my laziness. Feel free to comment with questions and I will elaborate.

The chicken tractor door was not designed with electric controls in mind, so it required some jackassery. Its motive force is supplied by an electric screwdriver. I removed the guts and wired it directly to a relay that is controlled via an Arduino microcontroller. It has an angle attachment from a drill that rotates the drive axis by 90 degrees. It also has micro switches to detect when the movement of the door has reached its limits.

The chicken coop door uses a universal power antenna mechanism for the automotive industry but controlled by an Arduino microcontroller. Using an antenna was not my idea, there are multiple examples on the internet so I don’t know who to give credit.

The power antenna took some adaptation due to the door’s weight. When winter brought colder temperatures, an internal clutch mechanism would slip rather than lifting the door. I disassembled the antenna and found I could modify the clutch mechanism to increase its torque output. Things were great until summer brought warmth and the modified clutch transferred too much torque, stripping the internal gears.

Rather than continually adjusting the clutch mechanism based on the weather forecast (minimizing laziness), I opted to make a counterweight (maximizing laziness). It consisted of a couple clothesline pulleys, an Oxford comma, some string, and couple pieces of 2×4. Notice their odd shape. I cut off pieces off to balance their weight with the door (with the drive mechanism unattached).

After putting all of the work into these coops, I began to wonder if it was worth it. Do the chickens even need a door that closes at night? If they’ve been around for thousand and thousands of years, shouldn’t they be able to fend for themselves? The answer is no, they are unable to fend for themselves. One night there was a glitch and the door didn’t close. When I went out to check on them, I found a headless chicken laying on the floor. I have since remedied the glitch, and the offender has been dispatched to a better (maybe worse) place.

This has gotten longer than intended, so I have provided some information on the control algorithm in this link.

Overall, both of the coop’s door mechanisms have afforded me the opportunity to be quite lazy indeed! So lazy that I can’t even bring myself to finish this senten

An Egg-cellent Drying Rack?

There is quite the online debate about washing fresh eggs versus leaving them unwashed. I sometimes find “nastiness” (most polite term I can think of) on eggs when I retrieve them from the nest box. I feel the “nastiness” should be rinsed off, but there is also something called a “bloom” protecting the eggs. Some feel the bloom should be retained at the expense of the “nastiness”. I personally don’t want the blooming “nastiness” in the fridge, so I rinse the eggs.

Debate aside, I needed a way to dry the eggs after rinsing and before storage. I searched the intergoogles and found all sorts of egg stands, but I couldn’t find one that exactly met my needs:

  • Open to allow the surface of the eggs to dry
  • Minimal points of contact to allow water to drip off of the eggs
  • Something to catch the water so it doesn’t make a mess

 

I finally settle on the design shown to the left that uses about $1.50 worth of materials. It is simply a couple 2×4’s with some holes and a few dowels glued through them. It comfortably holds 4 eggs, uncomfortably holds 5, and can accommodate 6 in a bind. The width is matched to a paper towel which is used to catch the drips and can be disposed of after several uses. It has also been stained and painted with polyurethane for sanitary purposes.

In retrospect, I wish I had made the stand a few inches wider and fitted to some sort of drip tray. I might save up another $1.50 to make a better one if I get more chickens or time.

Tuna of the Yard: A Chicken Update

It has been quite a while since I’ve posted as I’ve had some career changes and gotten married. Things are getting caught up, so I wanted to post some anxiously awaited updates. I will start with chickens.

I read that once a chicken habit started, it was hard to keep control of the addiction. My initial plan was to “try” only one chicken, but that immediately segued into three:

  • 1 Chicken would be lonely
  • 2 Chickens minimum would be required (one to keep the 1st chicken company)
  • 3 Chickens would be ideal  (an extra chicken as a backup)

My thought process was that 3 chickens would yield about 2 eggs per day, and a “flock” of 3 chickens shouldn’t be too hard to maintain. What I didn’t include in my thought process was:

  • The stupidity of chickens
  • Chickens should be isolated before being introduced to a flock
  • A new isolated chicken by itself would be lonely (hence a need to buy two at a time)

One of my first 3 chickens had to be dispatched due to stupidity (I think she ate several feet of twine), so I needed a new backup chicken. Since I needed to buy new chickens in pairs and keep them isolated.KIMG0004 it lead me to build a new coop (on which I will post more details later).

Now I had a secondary coop. I bought 2 new chickens, got them acclimated with the old chickens, and things were going well with 4 hens… for a while. I eventually realized that I had extra capacity that was not being utilized, mentioned it to a friend, and we agreed that I would take 2 of his chickens. He brought 4.

Things get kind of squirrelly after that. One of the hens turned out to be a rooster and was given away, a friend gave us a couple “prettier” hens, another hen died of stupidity, a hen was potentially hawked, one decided to provide her services elsewhere, we acquired some chickens wandered to our flock from a neighbor…

Chicken Summary to date:

  • The flock peaked at 9 chickens
  • It currently consists of 6 hens and 1 rooster
  • We’ve acquired a total of 14 chickens
  • 7 chickens have left the flock

Summary of lost chickens:

  • Stupidity – potentially ate a bunch of twine, pendulous crop
  • Stupidity – went through cat door, couldn’t find way back out of shop
  • Maleness – turned out to be a rooster and was given away
  • Possum – potentially attacked by a possum
  • Hawk – was found injured in the middle of the day, there was a hawk lurking about
  • Sickness – the hen was never quite right and was attacked by the other hens
  • Stupidity– naively set out to make it on her own somewhere else

I KIMG0207have included an example of chicken stupidity just to prove my point. It was one of the coldest days of the year, so I heated their coops and provided in-coop food and water. This bird brain decided she’d rather spend the afternoon standing in cold water. It should also be noted that 3 of the chickens opt to stay in a tree during subfreezing temperatures rather than their heated coop.

Lessons Learnt:

  • It is impossible to have just one chicken
  • Like gasses, chicken populations grow to match their contained volume
  • Chickens are stupid
  • Eggs taste great