Door Controller … for a Chickshaw?

22
698

BACKGROUND

In case you’re not up on the latest home-scale farming trends, the big buzz these days is a thing called a Chickshaw. Think of this as a rickshaw for chickens. The basic function of this device is that of a mobile chicken coop. The idea is you move it to a new spot every few days so the chickens always have a fresh patch of grass to play on. At night, you tuck the chickens away inside so they don’t get eaten by coyotes, racoons or owls. In the morning, you let them back out. My buddy Dan from The Grass-Fed Homestead recently acquired one of these contraptions.  And after a few weeks of closing the chickens up at night once it got dark, nearly 10:00 his time, he decided it needed an upgrade.  And at that point, the seeds for a Chickshaw door controller were sown.

 

Here’s how you make a Chickshaw

 

THE SOLUTION

Dan’s setup provided several big challenges. The first is that he has a lot of property, and most of it isn’t near an electrical outlet. This meant our solution had to be battery powered. Fortunately, he already uses a 12V battery and charger for some of his electrical fencing. So we decided to build the Chickshaw opener using the same type of battery. The other difficulty we encountered is that Dan’s chicken pasture isn’t WiFi enabled. This eliminated the option of using a Particle Photon. We briefly considered using the Photon’s cellular-based sibling, the Electron. And while he does have good cell coverage, we opted to go with a simpler, non-connected controller. This decision was driven partly because there wasn’t a compelling need for “remote” operation. The other factor is that while the cellular option is cheap (around $3/month), Dan didn’t want to hassle with a recurring bill.  So at the end of the day, we decided on a version of the Arduino, known as a Micro.

An Ardunio Micro board

 

The final obstacle we encountered was how to actually open and close the door. At first we toyed with the idea of using a small winch connected to the top of the door. This would have allowed us to raise and lower it. The tricky part with this approach would be stopping the motor when it reached its final positions. We could have used a magnetic “reed switch” at the top, which would work like the door sensor in a home security system.  The switch would break the circuit and turn off the motor once the door was closed.  Unfortunately, this approach wasn’t nearly as easy when we looked at the door in the open position.  There just wasn’t a convenient place to mount the sensor.

 

Magnetic reed switch used for a door alarm sensor

 

No mounting support for a limit switch

 

Our next option was using a linear actuator. We considered mounting the motor to the existing door and surrounding frame. But there just wasn’t enough space. We also couldn’t get the geometry to work so the door would open all the way to the ground. I was starting to get frustrated, when suddenly inspiration hit. I had a flashback to the Millennium Falcon (from Star Wars) and how its loading ramp worked. Problem solved!

 

A little inspiration from Star Wars’ technology

 

Fancy new automated Chickshaw door

 

The last piece of the puzzle was how to generate the open and close commands. If our project was connected to the Internet, we could get data from one of many online weather services. These would alert us to the exact time the sun sets and rises in Dan’s part of the country. Since this wasn’t an option, I opted for a simple photo sensor board. These only run a couple of bucks, and can give you a nice clean on-off signal for the Arduino to read. These boards also have a manual dial that allows you to adjust the sensitivity of the photo sensor. Otherwise, you could run into situations where the door closes on a cloudy day.

Here’s what everything looks like assembled.

 

Dan lives more than 2,000 miles away, so I wasn’t able to help him put things together. Instead, I pre-assembled the controller and mailed it to him.  Fortunately, he captured some pretty cool videos to document the setup and installation.

HAVE FUN BUILDING!

 

 

 

PARTS

 

CLOUD SERVICES

  • N/A

 

THE CODE

 

bool daylight = false;
int lightReading = -1;
// For more info on Arduino pin numbers, check out https://playground.
// arduino.cc/Learning/Pins
     
void setup()
{
    pinMode(A1, INPUT_PULLUP);
    pinMode(2, OUTPUT);
}

void loop() {

    lightReading = digitalRead(A1);
    if (lightReading == 1){
        daylight = false;
        digitalWrite(2,LOW);
    }
    else {
        daylight = true;
        digitalWrite(2,HIGH);
    }
   
    delay(1000);
}

 

UPDATE: 9/7/17

For those interested in a door for a standard chicken coop, below is a vertical example. This works well for keeping racoons and possums out.

 

Vertical coop door configuration

 

UPDATE: 9/8/17

Several folks have asked for a wiring diagram, so I’ve drafted one using a new tool (at least it’s new to me).  So take a look and let me know if this helps.  Here’s a link to the original file that you can zoom in on to see the details – chickshaw-wiring-diagram.png.

CAUTION: When assembling the 12V side of your project, don’t touch the black and red, or the two cyan wires together. If you do, you will short-circuit your battery, fry the wires and release the magical smoke genie contained within your electronics. If you want an example, go to the 6:17 minute mark in Dan’s Part II video above.

 

Wiring diagram for chickshaw controller

 

Help support my work via Patreon!

22 COMMENTS

  1. I know this would be overkill for the application, but I have the actuator for a lift chair. Could this be used instead of the 16″ Linear Actuator?

    • The answer to this is probably. The key things you’d want to make sure of: (1) does the voltage to match your battery, (2) is it the right length, (3) is it water proof and, (4) do you have compatible mounting hardware and/or can you rig something that works. To your point, I wouldn’t have any concerns over whether the chair lift component is powerful enough to work the door.

    • Hi Joshua. Well, yes and no. For this project, you’ll always need a battery since the door opens and closes when it’s mostly dark. However, you can use a solar panel to charge this battery. That would eliminate the need for having to remove the battery for charging. If you decide to actually built this kind of setup, let me know and I can run some quick calculations on how big of a solar panel you’d neet.

    • Yes, you can definitely hook this up using AC power. There are two different voltages you’ll need to provide: (1) 12V for the actuator and (2) 5V for the USB components.

      The simplest solution for this would be to use a standard 12V power supply (http://amzn.to/2vRiEhF), a generic USB wall charger (http://amzn.to/2ew19Rp) and a micro USB cable (http://amzn.to/2wq4wza).

      The big thing to look out for with the 12V power supply is you want to make sure it can supply enough current, which is why I’ve listed a 5 amp model.

  2. Auto Chicken Door: The photo sensor method has too many false triggering scenarios with stray light from other sources at night because it is set to a high sensitivity to detect “really dark” after dusk. Any false triggering will open the door and a predator will get in and wipe out the whole flock in one night. Even a high rate of perfect function, one error event could destroy the whole flock. Too high of risk. You need a more precise and accurate means to sense day and night and make sure that the door is always closed at night, false triggers down to 1 in 100,000. Use an internal clock which compares to a sunrise and sunset database loaded into an EPROM.

    • Thank for the feedback! There are definitely multiple ways to tackle this project. One solution Dan and I explored was using a web-connected service available from various weather sites. These actually provide exact sunrise and sunset times based on your location and the time of year. We opted not to go this route because of the connectivity challenges at this location.

  3. Great project

    I’m in the uk and looking on the uk amazon website I cannot find the
    Gowoops Micro Board for Arduino, Leonardo Mini Controller 5V 16 MHz ATmega32u4 Module
    Is there something else on http://www.amazon.co.uk I could use or could you ship one to me?

    Thanks
    David

  4. Can you please post a schematic on the wiring of everything or do we need you to do it and we pay you for it.i really like this Idea and I’ve been looking for a reason to get into arduino projects.

    Could I run this system off a 12 volt battery and also my electric fence charger that takes a 12 volt battery?

    • Sure, I can put together a wiring diagram and post it, no need to pay for that. 🙂

      This is actually a good project to get into because there’s very little coding, but you do get the experience of using what’s called a “relay” to control higher voltage things (in this case the actuator). Once you’ve got that down you can move into to controlling anything electrical like lights, motors, fans, etc.

      As for your question about 12 volt systems, what you’re describing is exactly what Dan Ohmann built. He uses an extra fence charging battery that he swaps out when it needs charging. The only parts of the system that don’t run on the 12V are the electrics, which is why I have the 12V to 5V converter module (http://amzn.to/2wwyscV).

      Let me know when you think you’ll get started, and I’ll try to have a schematic put together by then.

      Thanks for checking out the site!

    • Hi Elijah. I’ve drafted a schematic that shows how to connect the wiring for the system. Take a look and let me know if you have any feedback. It’s my first time using this kind of software to document a project, so I’m curious if it make sense and is readable.

  5. I would also like to see a schematic. As soon as I saw this I wanted to buy everything and build it. My only hang ups were how to properly wire and how to program the code. Thanks in advance for posting! I can’t wait to build this!

    • Hi DJ. I’ve posted a schematic, which I hope helps. And here’s a link on the basics of getting an Arduino up and running with new code https://www.youtube.com/watch?v=64oEr1zTlOg. The only thing you’ll need to do different from the video is change the “board” to an Arduino/Genuino Micro (if you bought the one in my post), and cut and paste the code from above. I’m also going to spend some time working to create a simpler version of this control unit that won’t need any coding.

  6. Thanks for putting a wiring diagram together. I really like this project, but Ardunio is new for me. I’m trying to understand relays and move into the physical world.

  7. Thanks for putting this together! I’d like to use this but I only need to move a door vertically like a guillotine. Is a linear actuator still the best way to do this?

    • Hi Daniel. Yes, the linear actuator is definitely the best way to go for a guillotine-style door. That’s what I use for my duck house. The features I especially like about this setup are that it doesn’t require any special sensors to stop it at the top and bottom, and it’s impossible for racoons and possums to lift. I’ve added an image at the bottom of this post.

LEAVE A REPLY

Please enter your comment!
Please enter your name here