Shop OBEX P1 Docs P2 Docs Learn Events
Automatic chicken door opener. — Parallax Forums

Automatic chicken door opener.

orrinbareorrinbare Posts: 32
edited 2012-03-19 08:48 in BASIC Stamp
We got our chickens a little over a year ago and quickly realized we hated getting up early to let them out. and we forgot to open/shut the door a few times, thankfully none were killed by foxes etc. anyways, i used a relay, a cordless screwdriver, and some limit switches all powered by an appliance timer to open and shut the door to the coop every day and it worked well...for a time.

failure one: the door jammed in the track and the motor burned up trying to raise it all day. trying to replace the motor i damaged the relay and had to rebuild the whole system.

failure two: the rope broke off of the door and so the motor ran wide open all day, by the time i got home and found it like that it was already too late. luckily neither time started a fire or anything, so no fried chickens.

i would just keep fixing these small issues and rebuilding the same basic system, but eventually its gonna catch fire or somethin will get in and kill my birds, so i'm wanting to use a basic stamp microcontroller and a solder breadboard i guess to build a better version, with some failsafes. i would like to use an encoder to track the revolutions of the rope spindle on the motor and stop it if it doesn't reach certain amount of revolutions in a set time, or if it doesn't stop from the limit switches. maybe in the future would be nice to have an led scroller that would display an error message or something. just wondering if you have any ideas for this project? anything usefull. also, i'm amazed with what my boe bot can do, but it only runs for 15 minutes or so at a time, how well would the microcontroller do with being on constantly? and environment-wise, this is in a chicken coupe, its not the best place for sensitive electronics, any ideas to help protect it? i don't wanna waste money on this if its not a for sure thing. thanks in advance
«1

Comments

  • PTaylorPTaylor Posts: 12
    edited 2011-02-28 06:15
    One Thing I could think of is maybe some type of color coded light system, like the ones used in Industrial plants.

    Example: We use different color light bulbs ti indicate the condition of the machine, RED meaning something is wrong, GREEN, everything a ok, etc.... you get the idea.

    That way, you can get a visual idea from some distance if everything is working or not.

    Some type of sensor that states if the door is clear or not, no need to drop the door when chickens are coming in or out, and if one get's stuck in the door while closing, you need to know.

    It would be nice if you could maybe....maybe integrate some type of communication system in it, like with X10..assuming it's all the same source/leg

    For example, the stamp could transmit a simple good/not good signal over the power line and something in your house could give an indication of the status of the stamp, if everything was good or not.


    Error code, getting something to work is simple. when it doesn't work, that's where a lot of code comes from. you need to flowchart this and write code for everything that could go wrong (like the motor overheating, something getting stuck, chickens can't get out. Backup system?
  • doggiedocdoggiedoc Posts: 2,240
    edited 2011-02-28 17:12
    First off, welcome to the site!

    Secondly, I am planning a chicken coup now and expect to build robotic doors and ventilation systems. I will be following your thread here for ideas!

    Paul
  • PJAllenPJAllen Banned Posts: 5,065
    edited 2011-02-28 18:50
    Stop, please, it's coop, c-o-o-p.
    http://www.merriam-webster.com/dictionary/coop

    So it's a coop door opener, or is it to open a chicken door, or a door opener that's chicken? I get like this when people talk about "HUAC", too.

    :)

    Anyway, you need to get the mechanicals right, or nothing else will matter. It's all, otherwise, very achievable, providing that the birds don't decide to pick it apart. Put it in an aluminum box, if the birds can survive then the Stamp can, too.
  • doggiedocdoggiedoc Posts: 2,240
    edited 2011-02-28 18:54
    PJ Allen wrote: »
    Stop, please, it's coop, c-o-o-p.
    http://www.merriam-webster.com/dictionary/coop

    You'd think with my level of education I'd have caught that! Darn Mississippi Edumacation!! :D:D
  • orrinbareorrinbare Posts: 32
    edited 2011-02-28 20:11
    My sincerest apologies for my lack of grammar. I was not aware that I would be critiqued on it.
  • Spiral_72Spiral_72 Posts: 791
    edited 2011-03-01 12:30
    orrinbare wrote: »
    My sincerest apologies for my lack of grammar. I was not aware that I would be critiqued on it.

    OUR sincerest apologies... they were having a out of place argument amongst themselves and it in no way involved you.

    If you come back to visit after all that:

    There is a fella on here that built just what you describe. He used a linear actuator of sorts to make a horizontal sliding door. If I remember correctly he already had the actuator which is why he used that method.

    I use a vertical sliding door on my coop, but it's not powered. It jams constantly and takes a little wiggling, so I don't think that would be a good candidate without some kind of linear bearings BUT the nice thing is gravity holds it down..... so it has it's own "Locking mechanism".... It's very secure. I don't think an animal could figure out how to open it, or overpower it..... maybe a grizzly which we don't have :)

    A good ol' hinged door would be simplest, but you have to lock it.


    Just a thought. Maybe two drawer slides from the hardware store, some 20+ test fishing line, a spool and another drill motor or similar. If you vertically lift it, assuming the line never breaks, I don't think you could hurt a chicken if it DID close on the bird..... just annoy it surely :) Limit switches would be easy and no lock required.

    The Basic Stamp would be plenty for this project and give you some visual cues if you want. Weather should not be a problem if you use all DC sensors and motor and a project enclosure with rubber-insert cord grips. All standard stuff I would think.
  • Spiral_72Spiral_72 Posts: 791
    edited 2011-03-01 12:39
    Oh, one more thing.... you could also program the BS to only run the motor for 15s or whatever in case the line breaks. It'd be a timeout to save your motor.
  • doggiedocdoggiedoc Posts: 2,240
    edited 2011-03-01 15:27
    Spiral_72 wrote: »
    OUR sincerest apologies... they were having a out of place argument amongst themselves and it in no way involved you.

    If you come back to visit after all that:
    I second that!

    Back on topic:
    I like the idea of a vertical sliding door. I'm thinking a failsafe position of "open" would be more desirable perhaps. But I'm thinking out loud here. If the door fails in the open position the chickens can traverse in or out as needed. If the door fails closed they are trapped inside or trapped outside. I've not worked out the details on a failsafe open strategy yet.

    Paul
  • PJAllenPJAllen Banned Posts: 5,065
    edited 2011-03-01 16:03
    Like I posted, if the OP can't nail the "chicken door" mechanicals then nothing else matters; open is open, the fox is in the hen-house.
    Instead of making sure of making sure of making sure, why not strive for a sounder "chicken door" mechanism?
    All of the Stamps are made with industrial-rated components.
    Parrots are super-destructive and little (nothing) escapes their notice / curiosity; how to bird-proof your situation beyond the obvious is more your call the anyone else's.

    [Whether one gets nudged off a ledge by some accident or an act of malice, the law of gravity still applies.]
  • icepuckicepuck Posts: 466
    edited 2011-03-01 17:40
    One thought would be to cover the moving parts with Plexiglas, that way the birds or humans can watch it without being hurt by it.
    A PIR sensor could be used to check for chickens in the door way before closing.You wouldn't want any chickens loosing their heads before their time;)
    -dan
  • orrinbareorrinbare Posts: 32
    edited 2011-03-11 16:16
    ok i'm back. i'll apologize in advance for any grammar mistakes this time :P anyways. i purchased a bs1 microprocessor and a project board or whatever u call it, a dpdt relay( to switch the motor between forward and backward rotation) and a dpst relay to keep from running higher voltage thru my circuit board. also got red, yellow, green leds for status indicators (so i don't have to go all the way out there to see it). i'm still thinking about how to program it, any suggestions would be appreciated. also, how much storage space is there on this thing? the program itself should be fairly simple, but if i have extra room, i'm going to program some failsafes into it.
  • $WMc%$WMc% Posts: 1,884
    edited 2011-03-11 22:37
    What is needed is a ZERO-SPEED on the door it self.(not the motor)
    This is nothing more than an encoder that sees a change in logic state from a sensor.. 0 to 1 to 0 or 1 to 0 to 1
    A simple peace of Plumbers tape and a couple of IR components would do the trick.(IR emitter/detector) The IR's will need to be shielded from Sun light.
    '
    This is what Plumbers tape looks like.
    O O O O O O O O O O O ' Its metal tape about .035" thick X 3/4" wide usually sold in 6' rolls.(about $3 to $5 a roll)
    '
    Evenly spaced magnets and a fix reed switch would also work and wouldn't need the Sun light shielding.
    '
    The code for a Stamp to do this is pretty simple.
    '
    I have a BS2 that opens and closes the Coop door for my chickens. It has never once failed since late 2004 when I rebuilt my chicken coop after 3 Hurricanes leveled the first one I built. (Yes; The chickens survived)
    '
    My coop is PC controlled via two BS2's. One is in the coop and the other is in the house next to my PC. The two BS2 talk to each other via RF. I have some simple PC code that runs all of this.
    '
    Stick with the forums and you'll see how all of this works.Its not that difficult.
  • doggiedocdoggiedoc Posts: 2,240
    edited 2011-03-12 04:22
    Great tips $WMc% - I like your ideas.

    Some ideas I'm bouncing around and the OP might want to consider is 1) automated feeding 2) temperature controlled ventilation.

    Paul
  • $WMc%$WMc% Posts: 1,884
    edited 2011-03-12 16:50
    doggiedoc wrote: »
    Great tips $WMc% - I like your ideas.

    Some ideas I'm bouncing around and the OP might want to consider is 1) automated feeding 2) temperature controlled ventilation.

    Paul
    '
    I have all of this implemented.
    '
    DS2760 for reading temperature using a type K T/C.
    '
    2 27981's and 2 27980's for RF
    '
    2 S202S02 (solid state relays) for vent fan and small 120v space heater
    '
    A PING to read the level in the feeder hopper
    '
    A passive IR detector to count the number of chickens passing through the door. This also stops the door from closing if a chicken is in the door way.
    '
    A home-made float switch too make sure the water trough is full. I use a toilet style float valve to maintain the water level.
    '
    A full rotation servo to open and close the door.( I used two small rack and pinion gears for the door )
    '
    I wrote a simple little HMI/GUI interface using LibertyBasic on my PC to talk to the BS2 in the house that transmits and receives data from the BS2 in the Coop via RF.
    '
    Most of the parts needed are from Parallax.
    '
    Parallax is soon to release a WiFi unit that will be sweet for this application. it will free up the BS2 I have inside the house too.
    '
    '
    P.S. You can try out a free version of LibertyBasic called JustBASIC. It has some really good examples of how to do what I mentioned aboved.www.Justbasic.com
  • ercoerco Posts: 20,256
    edited 2011-03-13 19:41
    Which came first, the chicken or the Stamp? It's funny how many of us here have or in my case, had, chickens. Before our twins came, we raised our Easter chicks through August before Los Angeles animal control knocked on our door and gave us 30 days to get rid of them. So I never had time to automate my coop, but those were 3 beautiful and friendly Rhode Island Reds, one rooster and 2 chickens. All I wanted was to keep them long enough to have some fresh eggs. Naturally they didn't lay anything until 2 weeks after I gave them away. The rooster also started crowing ~2 weeks later, so it was good timing overall. Good luck on your robo-coop!
    816 x 612 - 108K
    coop.jpg 108.2K
  • orrinbareorrinbare Posts: 32
    edited 2011-03-19 23:19
    we live away from any major city, so animal control isn't an issue here. we have rhode island reds also, they're some pretty good chickens so far, they lay more eggs than we need usually.
  • APStech-AttilaAPStech-Attila Posts: 38
    edited 2011-03-20 02:50
    Hi!

    If you have timing issues(e.g. motor is not shout down after a timeout period) why not using PICoPLC? It's free, and it can compile for Propeller!

    Ladder programming is simple and meant for these kind of tasks. A simulator is included, so you can test your code before frying the birds!
    You can get PICoPLC here: http://www.apstech.hu/index.php?option=com_rokdownloads&view=folder&Itemid=19&id=6%3Apicoplc&lang=en

    Regards,
    Attila
  • orrinbareorrinbare Posts: 32
    edited 2011-03-20 10:06
    no, before i considered using the basic stamp for this, it was an appliance timer that switched a dpdt relay. the relay controlled the direction of the motor, stopped by limit switches... the only "timer" issue was when my dad unplugged the the extension cord for the timer to use it for God knows what and when he plugged it back in, now the door opens at 2 a.m. ( and the chickens are like o_O ). the issue with the motor not stopping was that it somehow got stuck in the tracks going up and the motor gave out trying to pull it. then the second time i'm guessing the same thing happened and the cord broke and the motor just ran all day. i have a plc simulator already for one of my classes, but i don't have a propeller chip. i didn't know that ladder programing could be made to work with propeller though, that's pretty interesting.
  • LloydsLloyds Posts: 75
    edited 2011-03-20 12:21
    Orrin,
    If you incorporate everything folks are talking about you.... will have some serious over engineering, LOL! And I KNOW there are an abundance of us around here!!
    Limit switches, reed switches, and a visible green light all sound pretty good.
    Regarding the mechanical part of the door, i always try and incorporate a counter weight of some kind to ease the load on the motor. Basically a pulley and weight system, with the weight moving up and down in a safe location, or inside a piece of PVC pipe.
    Sounds like a fun project.
    Lloyd
  • orrinbareorrinbare Posts: 32
    edited 2011-03-20 18:12
    yeah i'm not really considering the propeller with the plc programming, i just thought it was interesting. thats why i'm going with the bs1, i don't need anything fancy. i'm trying to use the KISS (keep it simple stupid) method on this. the less fancy parts and programming there is the fewer bugs (in theory). and as for the counterweight, i thought about that too, but the door is probably about a pound or so, just sheet metal cut in a rectangle. i'm using a little cordless 4.5 volt screwdriver's motor to pull it up and down. (i just used an old spool from some wire to actually pull the wire). i really need a better track for the door though. i'd like to find an old dishwasher and steal the tracks and wheels out of it and use that, i'd like to see that jamb
  • $WMc%$WMc% Posts: 1,884
    edited 2011-03-20 18:24
    I would look at the BS2 over the BS1
    '
    The BS2 is easier to use since it has a lot more command options.
  • orrinbareorrinbare Posts: 32
    edited 2011-03-20 20:54
    oh, with using the relay its says you can't connect it directly to an output, you have to run it thru something (i want to say transistor or something, my internet is slow or i'd go look for myself. anyways, my ORIGINAL plan was to run wires from an output P0 or P1 for example just to energize the coil. i have an external power source to actually run the motor, i just need the bs1 to energize the coil. since it will only be on for less than 5 seconds at a time, is it REALLY necessary to put whatever it is in the circuit first?
  • bot7711bot7711 Posts: 16
    edited 2011-03-20 21:03
    Just out of curiousity, how do you program the portion out on the actual chicken coop? I know when my parents had chickens, it was out on the acre by the ditch. Sounds like you have stuff in the house to read from it?
  • APStech-AttilaAPStech-Attila Posts: 38
    edited 2011-03-21 01:48
    Hi!
    I think you are saying you're using a timer to start the opening process. (2 a.m.)

    I talking about a timer of e.g. 25 seconds (PLC : delayed turn off timer) to limit the ON-time for the drill. This ensures that your motor will be shut off, even if the end-switch is not reached.
  • ercoerco Posts: 20,256
    edited 2011-03-21 13:42
    @orrinbare:

    Yep.
  • orrinbareorrinbare Posts: 32
    edited 2011-08-14 21:44
    hmm, i like the pulley and weight idea. the door isn't heavy enough to need it in this, but it gives me ideas for another project haha
  • PliersPliers Posts: 280
    edited 2011-08-17 16:50
    Keep it simple?
    How about a light detector. When the sun comes up, the door opens.
    When the sun goes down, the door closes.
    Limit switches for top and bottom position. Current limiter to save the motor.
  • orrinbareorrinbare Posts: 32
    edited 2011-08-17 17:48
    @Pliers, because i want the timer to open before there is light. they are usually out about 30 mins before any real sunrise. plus a light detector would shut the door again if it got cloudy, locking the poor chickens out
  • bsnutbsnut Posts: 521
    edited 2011-08-19 20:10
    orrinbare,
    I have two suggestions for you.

    1) I don't know how many amps the motor pulls. But, I have this suggestion, that you can use HB-25 to control the motor and the good thing is the HB-25 uses a servo cable to control to the HB-25 this means you only need one I/O pin.

    2) A astronomical time clock to tell the basic stamp to open the door. Which would replace the photoeye (light detector) This type of time clock automatically adjusts to the sunrise and sunset times, eliminating the need for a separate photoeye (light detector).

    These idea here is to save you I/O pins and to KISS (keep it simple stupid) method the control the door. Last I/O = last programming.
  • orrinbareorrinbare Posts: 32
    edited 2011-08-19 20:57
    @bsnut, i've done a lot of work since this thread started so most of my problems aren't the same now. i used 2 i/o pins for the "motor controller". i used 2 transistors to switch the relays that control the motor on/off and direction. as for the clock i used the ds1302 on here instead of the light detector. it doesn't adjust like yours does, but i can program it so that it adjusts quarterly year round for open/close time. Thanks anyway though, I may use that in a future version of this. as i get better and have more effecient pieces, i may replace the current model
Sign In or Register to comment.