Skip to content
  • MySensors
  • OpenHardware.io
  • Categories
  • Recent
  • Tags
  • Popular
Skins
  • Light
  • Brite
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Brand Logo
  1. Home
  2. My Project
  3. Internet of Poultry - Fully automated chicken shed

Internet of Poultry - Fully automated chicken shed

Scheduled Pinned Locked Moved My Project
50 Posts 20 Posters 20.7k Views 22 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • breimannB breimann

    Hi @stefaanv i'm very new to mysensors but am awaiting some parcels to arrive to try my hand at a few things. First on the list is two water tank level sensors, but next will probably be our chook yard automation system. Love this project! It's inspired me to keep dreaming and designing. It would be really helpful to see a few more things in detail like what battery are you using, solar panel, and the door activation system. Also is there another way to do remote upload of sketches?

    stefaanvS Offline
    stefaanvS Offline
    stefaanv
    wrote on last edited by
    #27

    @breimann , all of that will take a few posts to explain. Bear with me.

    The door mechanism took a lot of trial and error. My biggest advise is to estimate the torque needed to open the door before ordering any components.

    Due to lack of a dynamometer, here is how I tackled the problem :

    Attach an elastic band to the door at some position where you know the distance to the hinges (15cm in my case)

    Pulls the elastic band towards you in a right angle to the door until the door starts to move. Measure or estimate how much the elastic band is stretched (in my case, I measured +/-30cm). Be careful the door doesn't smach into your face :-)

    Disconnect the elastic band from the door and suspend some adjustable weight to it until it is stretched the same amount as before. I used a small bottle, an iron wire and changed the amount of water in the bottle. 0_1472752518609_bottle.jpg 0_1472748734920_bottle.jpg

    Measure the weight
    0_1472752530848_bottle on scale.jpg 0_1472748775095_bottle on scale.jpg

    The torque is distance (to the hinges) x the weight, in my case 15cm x 0.285kg = 4.275 kg.cm

    I selected a Modelcraft RB350600-0A101R Transmissiemotor 12 V 1:600 (25€ at Conrad).
    According to the datasheet, at 3.44kg.cm (closest in the list), the motor should run at 9,46 rpm and consume 0,14A (12V).
    In reality, the motor takes about 3,5s to make half a turn, which amounts to 8,6 rpm and pulls between 150 and 200mA with a startup current of +/- 350mA. Pretty close to what the data sheet says !

    For the actuation of the motor, I use two relays of a Seeeduino relay shield of which I connected the NO to 0V, the NC to 12V and each motor wire to one of the COM. The resulting behavior is
    R1 open, R2 open ==> motor stops
    R1 closed, R2 open ==> motor turns CW
    R1 open, R2 closed ==> motor turns CCW
    R1 closed, R2 closed==> motor stops

    Some more advise,
    Don't try to open the door with a stepper motor. i tried it and I got bad oscillations.
    A servo motor could also work, but you'll have to find one that can deliver the torque.

    1 Reply Last reply
    0
    • breimannB breimann

      Hi @stefaanv i'm very new to mysensors but am awaiting some parcels to arrive to try my hand at a few things. First on the list is two water tank level sensors, but next will probably be our chook yard automation system. Love this project! It's inspired me to keep dreaming and designing. It would be really helpful to see a few more things in detail like what battery are you using, solar panel, and the door activation system. Also is there another way to do remote upload of sketches?

      stefaanvS Offline
      stefaanvS Offline
      stefaanv
      wrote on last edited by
      #28

      @breimann , door mechanism and end-of-run contacts

      I did a few attempt to make the door arm out of wood, but wasn't happy with any of them. The biggest problem was to connect the arm to the motor. I usually use the below cable connectors to fasten something to a shaft, but the shaft of the motor is 6mm diam while the biggest connector I can find can only take a 5mm shaft.
      0_1472752999390_Suikertjes.jpg
      In the end I bought two steel corner pieces in the closest DIY shop and adapted them with a drill and a grinder.
      In the same DIY shop I found a cheap router which was fastened to a 6mm drill with a small inbus screw, the router is the black piece in the below photos.
      After some attempts to glue to router to the corner piece, I decided to solder them together with plumbing solder. If you attempt this, be carefull not to burn your fingers. I takes a few minutes to cool down.
      0_1472753490616_soldering overview.jpg
      0_1472753501407_soldering close.jpg

      The end result, when mounted in the shed looks like this
      0_1472753916648_Door mechanism indoor.jpg
      0_1472753926388_Door mechanism outside.jpg

      Here is a video of the door in action
      0_1472754055923_Video deurtje.mp4

      In the pictures and the video you can see the end-of-run magnetic switches which I use to detect the open and close position of the door. These are connected to Arduino input pins.

      breimannB 1 Reply Last reply
      1
      • breimannB breimann

        Hi @stefaanv i'm very new to mysensors but am awaiting some parcels to arrive to try my hand at a few things. First on the list is two water tank level sensors, but next will probably be our chook yard automation system. Love this project! It's inspired me to keep dreaming and designing. It would be really helpful to see a few more things in detail like what battery are you using, solar panel, and the door activation system. Also is there another way to do remote upload of sketches?

        stefaanvS Offline
        stefaanvS Offline
        stefaanv
        wrote on last edited by
        #29

        @breimann , Battery and solar panels

        I'm using a Seeeduino instead of an Arduino because it is more flexible. The (measured) power consumption is about 45mA @ 12V. Since I wanted to bridge a 10day holiday period securely (assuming no input from the solar panels), I selected a 10Ah (240h x 45mA = 10800mAh) Sealed Lead Acid battery from dynoeurope.
        0_1472756044098_Batterij.jpg
        For the solar panels, I chose two 1.35 Wp 9V 150mA panels. 2x9V=18V >14.1V which is typically used to charge a 12V lead acid battery.
        0_1472756270084_Solar panel.jpg
        At first, I just connected the 2 panels in series across the battery and the arduino. This turned out to be a really bad idea ! The system stopped working when the battery was depleted to 4.5V. This wrecked the battery so I had to buy a new one.
        Together with the new battery, I bought a Steca Solsum 6.6 F Solar charger (12V 6A) which provides over- and undervoltage protection. It also provides a suitable charging voltage for lead acid batteries.
        0_1472756693275_Steca charger.jpg

        To be able to track the battery level, I attached an INA219 DC current sensor directly to the battery (it is supposed to be connected to the solar panel). It connects to the Seeeduino over i²c and measures current and voltage of the battery.
        0_1472757174831_ina219.jpg
        This allows me to get nice graphs of the energy production and consumption in the system. Beware that due to an error in Domoticz, negative currents are shown as positive in the charts.

        Voltage charts
        0_1472757433275_spanning.png
        0_1472757452564_spanning_maand.png

        Current chart
        0_1472757475515_stroom.jpg

        After some time, I decided to double the amount of solar panels.
        When I connected the four panels in series I saw no difference at all in the charts.
        When however, I connected the 4 panels 2 in series and 2 groups in parallel I found the produced current was doubled. After some investigation I understand that the Steca charger simple cuts the excess voltage of the panels to protect the battery but doesn't convert the energy in an efficient way. What I really need is an MPPT (Maximum Power Point Tracking) charger.
        These however cost a small fortune, so in the name of matrimonial peace keeping, I decided to leave it like it is :-)

        breimannB 1 Reply Last reply
        0
        • stefaanvS stefaanv

          @breimann , door mechanism and end-of-run contacts

          I did a few attempt to make the door arm out of wood, but wasn't happy with any of them. The biggest problem was to connect the arm to the motor. I usually use the below cable connectors to fasten something to a shaft, but the shaft of the motor is 6mm diam while the biggest connector I can find can only take a 5mm shaft.
          0_1472752999390_Suikertjes.jpg
          In the end I bought two steel corner pieces in the closest DIY shop and adapted them with a drill and a grinder.
          In the same DIY shop I found a cheap router which was fastened to a 6mm drill with a small inbus screw, the router is the black piece in the below photos.
          After some attempts to glue to router to the corner piece, I decided to solder them together with plumbing solder. If you attempt this, be carefull not to burn your fingers. I takes a few minutes to cool down.
          0_1472753490616_soldering overview.jpg
          0_1472753501407_soldering close.jpg

          The end result, when mounted in the shed looks like this
          0_1472753916648_Door mechanism indoor.jpg
          0_1472753926388_Door mechanism outside.jpg

          Here is a video of the door in action
          0_1472754055923_Video deurtje.mp4

          In the pictures and the video you can see the end-of-run magnetic switches which I use to detect the open and close position of the door. These are connected to Arduino input pins.

          breimannB Offline
          breimannB Offline
          breimann
          wrote on last edited by
          #30

          @stefaanv
          Door mechanism and end of run contacts
          This is great info!
          A couple questions.

          1. Are you just using standard door hinges x 2 on the door on the outside?
          2. Is that a magnetic latch you have once it closes to stop a chook accidentally (or deliberately?? ;)) pushing against it?
          3. Did you buy the motor with the tube to fit inside it and bracket or did you fashion that yourself?
            Thankyou!
          stefaanvS 2 Replies Last reply
          0
          • stefaanvS stefaanv

            @breimann , Battery and solar panels

            I'm using a Seeeduino instead of an Arduino because it is more flexible. The (measured) power consumption is about 45mA @ 12V. Since I wanted to bridge a 10day holiday period securely (assuming no input from the solar panels), I selected a 10Ah (240h x 45mA = 10800mAh) Sealed Lead Acid battery from dynoeurope.
            0_1472756044098_Batterij.jpg
            For the solar panels, I chose two 1.35 Wp 9V 150mA panels. 2x9V=18V >14.1V which is typically used to charge a 12V lead acid battery.
            0_1472756270084_Solar panel.jpg
            At first, I just connected the 2 panels in series across the battery and the arduino. This turned out to be a really bad idea ! The system stopped working when the battery was depleted to 4.5V. This wrecked the battery so I had to buy a new one.
            Together with the new battery, I bought a Steca Solsum 6.6 F Solar charger (12V 6A) which provides over- and undervoltage protection. It also provides a suitable charging voltage for lead acid batteries.
            0_1472756693275_Steca charger.jpg

            To be able to track the battery level, I attached an INA219 DC current sensor directly to the battery (it is supposed to be connected to the solar panel). It connects to the Seeeduino over i²c and measures current and voltage of the battery.
            0_1472757174831_ina219.jpg
            This allows me to get nice graphs of the energy production and consumption in the system. Beware that due to an error in Domoticz, negative currents are shown as positive in the charts.

            Voltage charts
            0_1472757433275_spanning.png
            0_1472757452564_spanning_maand.png

            Current chart
            0_1472757475515_stroom.jpg

            After some time, I decided to double the amount of solar panels.
            When I connected the four panels in series I saw no difference at all in the charts.
            When however, I connected the 4 panels 2 in series and 2 groups in parallel I found the produced current was doubled. After some investigation I understand that the Steca charger simple cuts the excess voltage of the panels to protect the battery but doesn't convert the energy in an efficient way. What I really need is an MPPT (Maximum Power Point Tracking) charger.
            These however cost a small fortune, so in the name of matrimonial peace keeping, I decided to leave it like it is :-)

            breimannB Offline
            breimannB Offline
            breimann
            wrote on last edited by
            #31

            @stefaanv
            Solar Panel and Batteries
            I'm all for matrimonial peace keeping!!
            I'm just curious, why did you connect the INA219 DC current sensor directly to the battery and not the solar panel?

            stefaanvS 2 Replies Last reply
            0
            • breimannB breimann

              @stefaanv
              Door mechanism and end of run contacts
              This is great info!
              A couple questions.

              1. Are you just using standard door hinges x 2 on the door on the outside?
              2. Is that a magnetic latch you have once it closes to stop a chook accidentally (or deliberately?? ;)) pushing against it?
              3. Did you buy the motor with the tube to fit inside it and bracket or did you fashion that yourself?
                Thankyou!
              stefaanvS Offline
              stefaanvS Offline
              stefaanv
              wrote on last edited by
              #32

              @breimann
              1/ Yes, 2 standard hinges. There's plenty of different types (big, small, different materials, ...) in DIY shops. One thing to consider is if you want the open or closed type. buy the open type if you want to remove the door, else the closed type. The open type comes in left and right types. Make sure to buy the right ones or your door will fall off the hinges :-)
              2/ There is a chicken crushing protection in the software : if the "door closed" end-of-run isn't read within 4 seconds after the door started closing, then it will fully open again. The end-of-run switches are primarily to stop the motor when the end position is reached. Unlike with a servo or a stepper motor, with a DC motor you don't know at which position the door is. Also the motor is really strong. If it run too far something will break (I assume the internal gears will break first).
              3/ I bought the holding bracket for the motor together with the motor. I found it to be really expensive and badly designed but you can't make everything yourself. (matrimonial peace keeping, remember ;-) )

              1 Reply Last reply
              0
              • breimannB breimann

                @stefaanv
                Solar Panel and Batteries
                I'm all for matrimonial peace keeping!!
                I'm just curious, why did you connect the INA219 DC current sensor directly to the battery and not the solar panel?

                stefaanvS Offline
                stefaanvS Offline
                stefaanv
                wrote on last edited by
                #33

                @breimann
                I figured that if I connect the INA to the solar panels, I only get info about energy generation, not about consumption.
                By connecting it to the battery, I get both info's + the battery voltage which is a good indication for the charging level. What I can't see is the solar voltage and the absolute consumption and generation number (I measure the difference). However, there is physical evidence that it get's dark at night at which time the panels don't generate energy. The consumption is 45mA flat unless the camera or the LED's are switched on. So I can deduce all the information I'm not measuring.
                Ideally you should install 2 or even 3 INA's to measure generation, consumption and battery separately, but I found it was better to spend the money elsewhere.

                1 Reply Last reply
                0
                • breimannB breimann

                  @stefaanv
                  Solar Panel and Batteries
                  I'm all for matrimonial peace keeping!!
                  I'm just curious, why did you connect the INA219 DC current sensor directly to the battery and not the solar panel?

                  stefaanvS Offline
                  stefaanvS Offline
                  stefaanv
                  wrote on last edited by
                  #34

                  @breimann
                  Just for fun, here is one of the evening recordings that is automatically stored on my Synology NAS every day. It provides evidence that the chickens were inside when the door closed. These recordings help me to set the correct ambient light level at which the door closes.
                  0_1472800935919_Evening take.mp4
                  It took some tuning, but this works really well now. The only times the chicks are not indoor when the door closes is on hot days when the temperature inside is still high in the evening.

                  breimannB 1 Reply Last reply
                  0
                  • breimannB breimann

                    @stefaanv
                    Door mechanism and end of run contacts
                    This is great info!
                    A couple questions.

                    1. Are you just using standard door hinges x 2 on the door on the outside?
                    2. Is that a magnetic latch you have once it closes to stop a chook accidentally (or deliberately?? ;)) pushing against it?
                    3. Did you buy the motor with the tube to fit inside it and bracket or did you fashion that yourself?
                      Thankyou!
                    stefaanvS Offline
                    stefaanvS Offline
                    stefaanv
                    wrote on last edited by
                    #35

                    @breimann
                    By the way, in what part of the world in a chicken called a chook ? Austalia according to Google Translate ? Correct ?

                    bjacobseB breimannB 2 Replies Last reply
                    0
                    • stefaanvS stefaanv

                      @breimann
                      By the way, in what part of the world in a chicken called a chook ? Austalia according to Google Translate ? Correct ?

                      bjacobseB Offline
                      bjacobseB Offline
                      bjacobse
                      wrote on last edited by
                      #36

                      @stefaanv
                      In Danish a "kok" is a male chicken

                      stefaanvS 1 Reply Last reply
                      0
                      • bjacobseB bjacobse

                        @stefaanv
                        In Danish a "kok" is a male chicken

                        stefaanvS Offline
                        stefaanvS Offline
                        stefaanv
                        wrote on last edited by
                        #37

                        @bjacobse
                        OK, in Dutch a "kok" is a chef in a restaurant. However, they typically behave like male chickens, so that is not so far off.

                        bjacobseB 1 Reply Last reply
                        0
                        • stefaanvS stefaanv

                          @breimann
                          By the way, in what part of the world in a chicken called a chook ? Austalia according to Google Translate ? Correct ?

                          breimannB Offline
                          breimannB Offline
                          breimann
                          wrote on last edited by
                          #38

                          @stefaanv
                          Yes, google gets it right again... i'm in Australia, or South Australia to be a little more precise. Yep "chooks" is the commonly used word here for chickens.

                          1 Reply Last reply
                          0
                          • stefaanvS stefaanv

                            @breimann
                            Just for fun, here is one of the evening recordings that is automatically stored on my Synology NAS every day. It provides evidence that the chickens were inside when the door closed. These recordings help me to set the correct ambient light level at which the door closes.
                            0_1472800935919_Evening take.mp4
                            It took some tuning, but this works really well now. The only times the chicks are not indoor when the door closes is on hot days when the temperature inside is still high in the evening.

                            breimannB Offline
                            breimannB Offline
                            breimann
                            wrote on last edited by
                            #39

                            @stefaanv
                            Love this recording. I love how you linked the recording to start 5 seconds before the door closes, and how you can see if there are eggs in your laying boxes and if the chooks are roosting!! Love it. Great thinking. What sort of camera are you using?

                            stefaanvS 1 Reply Last reply
                            0
                            • breimannB breimann

                              @stefaanv
                              Love this recording. I love how you linked the recording to start 5 seconds before the door closes, and how you can see if there are eggs in your laying boxes and if the chooks are roosting!! Love it. Great thinking. What sort of camera are you using?

                              stefaanvS Offline
                              stefaanvS Offline
                              stefaanv
                              wrote on last edited by
                              #40

                              @breimann
                              I'm using a cheap indoor dlink camera DCS-933L with night vision. One disadvantage : it can only be powered at 5V so I had to insert a DC/DC converter and it uses a lot of power (up to 200mA). So I only have it powered on about 1 minute every day. Just long enough for the NAS to pick up the signal and take a small clip.

                              Great to have someone from the other side of the world interested in my project !!!
                              Now I'm really curious, since you walk upside-down compared to us, Do chook in Austalia sleep on top of the roost or do they hang heads-down from the roost ? :-)

                              breimannB 1 Reply Last reply
                              0
                              • stefaanvS stefaanv

                                @breimann
                                I'm using a cheap indoor dlink camera DCS-933L with night vision. One disadvantage : it can only be powered at 5V so I had to insert a DC/DC converter and it uses a lot of power (up to 200mA). So I only have it powered on about 1 minute every day. Just long enough for the NAS to pick up the signal and take a small clip.

                                Great to have someone from the other side of the world interested in my project !!!
                                Now I'm really curious, since you walk upside-down compared to us, Do chook in Austalia sleep on top of the roost or do they hang heads-down from the roost ? :-)

                                breimannB Offline
                                breimannB Offline
                                breimann
                                wrote on last edited by
                                #41

                                @stefaanv
                                That's helpful re type of camera.
                                To shed light on your question re how chooks sleep on roosts in Australia... yes they do sleep upside down, a bit like a bat... but maybe bats don't sleep hanging upside down where you live?? ;)
                                No, gravity unfortunately (fortunately) hasn't taken a holiday here, so if they tried sleeping upside down i'm afraid their blood would all drain to their brains!!

                                stefaanvS 1 Reply Last reply
                                0
                                • stefaanvS stefaanv

                                  @bjacobse
                                  OK, in Dutch a "kok" is a chef in a restaurant. However, they typically behave like male chickens, so that is not so far off.

                                  bjacobseB Offline
                                  bjacobseB Offline
                                  bjacobse
                                  wrote on last edited by
                                  #42

                                  @stefaanv said:

                                  @bjacobse
                                  OK, in Dutch a "kok" is a chef in a restaurant. However, they typically behave like male chickens, so that is not so far off.

                                  Yes a kok is also a kitchen chef in DK

                                  1 Reply Last reply
                                  0
                                  • breimannB breimann

                                    @stefaanv
                                    That's helpful re type of camera.
                                    To shed light on your question re how chooks sleep on roosts in Australia... yes they do sleep upside down, a bit like a bat... but maybe bats don't sleep hanging upside down where you live?? ;)
                                    No, gravity unfortunately (fortunately) hasn't taken a holiday here, so if they tried sleeping upside down i'm afraid their blood would all drain to their brains!!

                                    stefaanvS Offline
                                    stefaanvS Offline
                                    stefaanv
                                    wrote on last edited by
                                    #43

                                    @breimann
                                    Here's the pictures of the cleaning. If you make a sliding bottom, do use mechanical sliders (I only have L-profiles) like the ones that are used in kitchen furniture. That way you'll be able to fully extend and your don't have to support the front. Do take care that the whole shed doesn't tip over.
                                    0_1472822231440_Kuisen 1.jpg

                                    0_1472822397045_Kuisen 3.jpg

                                    0_1472822238472_Kuisen 2.jpg

                                    breimannB 1 Reply Last reply
                                    0
                                    • stefaanvS stefaanv

                                      @breimann
                                      Here's the pictures of the cleaning. If you make a sliding bottom, do use mechanical sliders (I only have L-profiles) like the ones that are used in kitchen furniture. That way you'll be able to fully extend and your don't have to support the front. Do take care that the whole shed doesn't tip over.
                                      0_1472822231440_Kuisen 1.jpg

                                      0_1472822397045_Kuisen 3.jpg

                                      0_1472822238472_Kuisen 2.jpg

                                      breimannB Offline
                                      breimannB Offline
                                      breimann
                                      wrote on last edited by
                                      #44

                                      @stefaanv Sorry i've been busy fencing and planting trees last few days... this is a great cleaning system... although i'm planning to make a bit bigger coup so not sure how i can incorporate this but it looks fantastic. Great thinking!

                                      1 Reply Last reply
                                      0
                                      • Mark SwiftM Offline
                                        Mark SwiftM Offline
                                        Mark Swift
                                        wrote on last edited by
                                        #45

                                        May I ask, how do you get debug remotely? I also presume you're using the MYS bootloader?

                                        Great project!

                                        stefaanvS 1 Reply Last reply
                                        0
                                        • Mark SwiftM Mark Swift

                                          May I ask, how do you get debug remotely? I also presume you're using the MYS bootloader?

                                          Great project!

                                          stefaanvS Offline
                                          stefaanvS Offline
                                          stefaanv
                                          wrote on last edited by
                                          #46

                                          @Mark-Swift
                                          Nope, that's what the Fritz.box router is for. It has remote USB which I usb for the debugging. It's not ideal (always fails after computer hibernation) but it does the trick.

                                          1 Reply Last reply
                                          0
                                          Reply
                                          • Reply as topic
                                          Log in to reply
                                          • Oldest to Newest
                                          • Newest to Oldest
                                          • Most Votes


                                          30

                                          Online

                                          11.7k

                                          Users

                                          11.2k

                                          Topics

                                          113.1k

                                          Posts


                                          Copyright 2025 TBD   |   Forum Guidelines   |   Privacy Policy   |   Terms of Service
                                          • Login

                                          • Don't have an account? Register

                                          • Login or register to search.
                                          • First post
                                            Last post
                                          0
                                          • MySensors
                                          • OpenHardware.io
                                          • Categories
                                          • Recent
                                          • Tags
                                          • Popular