Door Controller … for a Chickshaw?



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



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.








  • N/A




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

void loop() {

    lightReading = digitalRead(A1);
    if (lightReading == 1){
        daylight = false;
    else {
        daylight = true;


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!


  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.

      • I’ve ordered all my parts and would like to implement the solar panel for charging the battery…can you give me an idea on the size I would need?

        So excited to get this up and running on my new eggmobile!

    • 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 (, a generic USB wall charger ( and a micro USB cable (

      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 I could use or could you ship one to me?


  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 (

      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 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.

  8. Any long term reports on this project? Does having the constant closed or open circuit sending power to the actuator have any negative effects?

    • Hi Nicholas,

      Sorry for the slow response. I have a similar version of this working for a duck enclosure that has been operational for a couple of years. Actuators like these are pretty rugged and are designed to be opened and closed on a regular basis. The nice thing about them is they have built-in limit switches, which are built specifically to handle continuous power … i.e., they turn off the power to the motor internally once the rod is has been fully extended or contracted.

      Hope that helps.


  9. Are you a teacher? Your explanations and photos are so clear. I love it! When I build a chickshaw, I’ll come back to this. Thanks!

    • Just rewatched some of the video. Its VERY dark out when the door shuts. How long after dark is it before it shuts? Has this been addressed with the code?

      • Hi Jason. I’ll start with saying that there are multiple options when it comes building the sensor for this project. The one I describe in this post uses a little circuit board that has a tiny dial you can adjust with a screwdriver. This lets you change how dark it has to be before it opens/closes. I’ve also built a similar version that has a non-adjustable sensor, but aligns very closely with the light levels at dusk ( And the final version, which is the one I use, has an internet connection to a weather channel feed that gets an alert at sunset/sunrise. This one is based on location and time of the year, rather than actual light levels.

        My point being is there are definitely options that allow you to control the level of darkness that triggers the door.

      • If you’re interested, I could pre-build and program the control unit and ship it to you. What would be left for you to do would be the physical installation of the door, battery, actuator, and wiring. The cost of a base control box would be around $80 plus shipping. If you wanted a more advanced version with weather channel data (like I mentioned in my other reply), etc., that would cost more … but most people don’t need extra bells and whistles.

        • thanks for the reply and sorry i took so long to get back. I’d be interested in buying the system for $80, i’m just so busy it makes sense for me. Also, think someone else had asked this but no reply yet…can i use my Solar IntelliShock® 60 Energizer for this? I’m not really using it anymore so it has a battery and solar panel on it already. guessing not because not but let me know. If i’m going to make this more “self sufficient” i should go all the way! If i use another battery how long does it stay charged for based on your experience and how do you recharge it?

  10. Cdfairchild: I would like to take you up on the programming and wiring of everything. I am too busy to do it myself. Can you please e-mail so that we can work out a deal?


  11. Ok, so I’ve built it. But I think I’ve done something wrong. I wired it up and it started opening, I couldn’t believe it. But, it won’t close. I’ve covered it, left it in pitch black for hours, but I’m starting to think I’ve done something wrong. Any suggestions on where I should start troubleshooting? Thanks in advance, I love this project.

  12. I’m still wrestling with this. The IN1 and IN2 lights on the 4 relay module remain lit at all times. In the video it doesn’t seem like they are ever on. Can you let me know what that means?

  13. This is entirely too awesome, great stuff! How much work would it be to control the opening and closing of the door through a wireless router?

    A couple years ago I got home late one night and we had lost all of our chickens before we could secure the coop. An automated door like the one you designed would help prevent loss.

  14. I am in the process of building chickshaw been thinking about automatic door and I would like to purchase the door controller would you build one for me please

  15. I wanted to install the door controller on the MiniMe version of the ChickShaw, but it appeared that I would need to continue to use the front door, since the Mini’s floor looked too small for the door to go there. Finding a geometry that worked was a little difficult, but did manage to find a setup that works.
    If anyone wants to try this, I can help with figuring out exactly where to mount things.


Please enter your comment!
Please enter your name here