Chicken Coop Circuit

by Tapijtklopper on Sat Feb 23, 2013 8:50 am

Hi, i'm working on a automated door opener for a chicken coop.
Here is the schematic. http://oi50.tinypic.com/ogdma1.jpg I'm using a Parallax Futuba motor (i bypassed the internal circuit, so it became a simple dc motor with sufficient torque)
I just need some help with a few parts.
What transistor should i use (T1)?
What LDR should i use (R1)?
Any recommendations about what relay to use (K1) would be great. And if you can point me to a website with a comprehensive guide on how to calculate all of this myself please do.
Last edited by Tapijtklopper on Sat Feb 23, 2013 7:14 pm, edited 1 time in total.
What makes it tick?
User avatar
Tapijtklopper
 
Posts: 14
Joined: Sat Jun 16, 2012 9:18 am

Re: Chicken Coop Circuit

by modeller on Sat Feb 23, 2013 11:23 am

Tapijtklopper wrote:H
Here is the schematic. http://imm.io/X8ig


What schematic?

It appears that the image you are looking have been recycled. I'm however confident that the pixels of the former image soon will be seen in a new one.
User avatar
modeller
 
Posts: 108
Joined: Sat Jan 19, 2013 10:12 am

Re: Chicken Coop Circuit

by Tapijtklopper on Sat Feb 23, 2013 7:04 pm

Oh i'm sorry, it worked a few hours ago. Here's a working link http://oi50.tinypic.com/ogdma1.jpg
What makes it tick?
User avatar
Tapijtklopper
 
Posts: 14
Joined: Sat Jun 16, 2012 9:18 am

Re: Chicken Coop Circuit

by john444 on Sat Feb 23, 2013 8:06 pm

Hi Tap,

Tapijtklopper wrote:I just need some help with a few parts.
What transistor should i use (T1)?
What LDR should i use (R1)?
Any recommendations about what relay to use (K1)


Your requirements are pretty vague. Let's do this the other way around -
I am going to guess that your Futoba motor only pulls a few amps at most.
This needs to be a relay with a 5-V coil and contacts rated at the motor current (min)
The LDR can probably be a Adafruit ID:161 (also known as a photo-cell or photo resistor)
If you are using a small 5-V relay then you will have a large selection of transistors.
I would probably try a 2N2222 first (ID:756) they are inexpensive and reliable.
If the 2N2222 doesn't work for you then the TIO120 (ID:976) or IRLB8721 (ID:355) should work.
R3 is a variable resistor so that you can adjust the light sensitivity (ID:356)
Don't forget to include the limit switches that turn off the motor when it reaches the fully open and fully closed positions. They were not obvious in the schematic.
Those limit switches are intermixed with relay contacts.

Good luck and let us know how it works out, John
john444
 
Posts: 443
Joined: Sun Mar 04, 2012 1:42 pm
Location: Claremore, Ok

Re: Chicken Coop Circuit

by modeller on Sat Feb 23, 2013 8:07 pm

Tapijtklopper wrote:What transistor should i use (T1)?


If you just want to energize a small relay then you could use a 2N2222. I think it has a gain of something like 100 - 300.

What LDR should i use (R1)?


Well, it depends on what voltage you need at the junction of R1 and R3. You need to fully turn on the transistor. What current the relay requires is important. You should be able to adjust the other resistors to make it work.

If the light coming in isn't fully on or off for a set time, you might get chattering of the relay though. That's going to be a problem. Could be a major problem.

Any recommendations about what relay to use (K1) would be great. And if you can point me to a website with a comprehensive guide on how to calculate all of this myself please do.


Can't say because I don't know what current you want to control.

The circuit is probably the easier part of the problem. I'd be more concerned with how the door is going to move and what is causing the whole event to trigger. Is it chickens walking by the photo resistor? That is going to be really fun. :shock:

Let's see what others have to say.
User avatar
modeller
 
Posts: 108
Joined: Sat Jan 19, 2013 10:12 am

Re: Chicken Coop Circuit

by john444 on Sat Feb 23, 2013 8:22 pm

Tap,

I made several presumptions that may not be correct.
I was thinking that the photo-cell would be to detect sunlight to open the door.
When it got dark, the door would close. If this is the implementation, ok.
Modeller is right though if you want to detect individual chickens.
That would be more difficult to set up and keep working.

John
john444
 
Posts: 443
Joined: Sun Mar 04, 2012 1:42 pm
Location: Claremore, Ok

Re: Chicken Coop Circuit

by modeller on Sat Feb 23, 2013 8:25 pm

john444 wrote:Modeller is right though if you want to detect individual chickens.
That would be more difficult to set up and keep working.

John


Hello John!

More thoughts ...

If the circuit is triggered, the door has to be allowed to complete a full cycle. You cannot have the transistor/relay going on and off while the door is in some mid-state. So if a chicken triggers it by strutting past it, that might last for a few seconds. The door would start to open and then just stop. Then if another chicken comes along, same thing. Big problems.

You need logic integrated into the design, such as can be provided by a microcontroller (Arduino). If the door is triggered, then the full cycle must complete (open and close). You have to decide how long it will remain open as well. What if it's closing and another chicken comes by? Might that chicken get squashed by the closing door? Then perhaps the door has to stop or go back to the open state.

As you can see, it's not as simple as one might think.
User avatar
modeller
 
Posts: 108
Joined: Sat Jan 19, 2013 10:12 am

Re: Chicken Coop Circuit

by john444 on Sat Feb 23, 2013 8:32 pm

Modeller,

It did not occur to me that Tap might want to open the door for individual chickens.
I don't see how that arrangement would help him.
I presumed that Tap would want the door to open on sunrise
and close at night when the foxes and chicken-eaters are out so that he did not have
to go open/close it himself.

But, maybe I am wrong, John
john444
 
Posts: 443
Joined: Sun Mar 04, 2012 1:42 pm
Location: Claremore, Ok

Re: Chicken Coop Circuit

by modeller on Sat Feb 23, 2013 8:39 pm

john444 wrote:It did not occur to me that Tap might want to open the door for individual chickens.
I don't see how that arrangement would help him.
I presumed that Tap would want the door to open on sunrise
and close at night when the foxes and chicken-eaters are out so that he did not have
to go open/close it himself.

But, maybe I am wrong, John


Maybe I'm wrong, I dunno. He didn't 'splain it very well, but even if it's for sunrise/sunset, it won't work well because what if it's cloudy, what if a chicken poops on the sensor, etc. Might as well just use a timer if that's all it's for.

It sounds kinda like the school lab projects that come up all the time at the Arduino forum. :D

Guess well have to wait for the OP to fill us in. I hope it's for individual chickens because that would be an interesting project.
User avatar
modeller
 
Posts: 108
Joined: Sat Jan 19, 2013 10:12 am

Re: Chicken Coop Circuit

by Tapijtklopper on Sun Feb 24, 2013 6:49 am

Hi, sorry, i didn't explain the purpose.
The chicken coop needs to have an automated door. Opens at dawn, closes at dusk.
S1 and S2 (http://i599.photobucket.com/albums/tt74 ... G_4119.jpg) are positioned like this http://oi45.tinypic.com/2nhghhx.jpg and make sure the engine doens't keep on going. Don't worry no chicken is going to poop on the sensor :-) The LDR will be placed on the chicken coop roof (covered in a clear epoxy adhesive) and just needs to detect night or day.

I've tried to look for timers but couldn't find anything good. I'm trying to keep this as simple and banned as possible and most timers are expensive.
What makes it tick?
User avatar
Tapijtklopper
 
Posts: 14
Joined: Sat Jun 16, 2012 9:18 am

Re: Chicken Coop Circuit

by modeller on Sun Feb 24, 2013 8:40 am

Tapijtklopper wrote:Hi, sorry, i didn't explain the purpose.
The chicken coop needs to have an automated door. Opens at dawn, closes at dusk.


OK, but it still won't work very well. The reason is, at the cusp of darkness or morning, it will be unreliable. At some point the transistor will be going on and off because the light level will not ever go to dark smoothly or go to light smoothly. For some period during those times the whole system will be chattering and going haywire.

I have a photocell controlled light outside. At dusk or dawn it doesn't flicker until the light goes dark enough or light enough to go past the unstable area. It has a latch. The first time it senses it's dark enough to turn on it won't go back off even if you shine a strong light on the photocell. It latches for about 5 minutes before it allows itself another chance to change state. If it didn't latch, it would flicker like crazy at dusk or dawn.

The light flickering is nothing compared to what's going to happen when your motor "flickers". That's going to be a sight.

And what about a very dark day? My photocell light will come on during the day if it's a dark cloudy rainy day. The same thing will happen to the door, and the poor chickens might be stuck inside during the day.

See, even this is not that simple.
User avatar
modeller
 
Posts: 108
Joined: Sat Jan 19, 2013 10:12 am

Re: Chicken Coop Circuit

by Tapijtklopper on Sun Feb 24, 2013 10:58 am

Damn, i didn't even think about that. (Chicken Guillotine :oops: ) I've been looking for a while but all i can find is expensive products or stuff made from non-standard parts. Do you have any good alternatives?
What makes it tick?
User avatar
Tapijtklopper
 
Posts: 14
Joined: Sat Jun 16, 2012 9:18 am

Re: Chicken Coop Circuit

by adafruit_support_bill on Sun Feb 24, 2013 11:59 am

You might consider a timer-based approach, using an Arduino and an RTC. You could use the photo-cell(s) as a safety interlock to delay closure if there is a chicken in the doorway.
User avatar
adafruit_support_bill
 
Posts: 25414
Joined: Sat Feb 07, 2009 9:11 am

Re: Chicken Coop Circuit

by Tapijtklopper on Fri Mar 08, 2013 11:05 am

The Arduino option is a bit much.
Considering the light flickering problem, i googled some more and found this. http://www.circuitsonline.net/schakelin ... 000041.gif . The schmitt-trigger should solve that problem.
The power supply i have is rated at 5V 20W.
The motor runs at 5v and the current is a tiny bit above 200mA.
I then replace D2 and R5 with a 5V DPDT relay.
Could this work?
I'm trying to keep this banned, easy and small. So no chicken detectors or counters (sadly). The motor pulls the door via a small rope at 50 rpm so it's slow enough.

Thanks by the way for all the replies.
What makes it tick?
User avatar
Tapijtklopper
 
Posts: 14
Joined: Sat Jun 16, 2012 9:18 am

Re: Chicken Coop Circuit

by odometer on Sun Mar 10, 2013 1:39 pm

Considering the prices of digital watches these days, I wonder if a timer really would be all that expensive. Probably not. But the hard part is finding one that meets your needs.

Wait a minute... I think Evil Mad Science sells a timer for art projects. But I don't think it would be anywhere near accurate enough for your needs.

And I really hope you don't end up with a "chicken guillotine". (Hmmm, I wonder... maybe something like the mechanism whereby an elevator door won't shut on your hand?)


It would be quite useful to have a timer which would give the time not as we usually give it, but rather according to the ancient system of "unequal hours":
http://www.autodidacts.f2s.com/astro74xx/info/unequ.html
Then you could just set it to open at 0:00 and close at 12:00.


Just a bit of nostalgia: when I was a kid, I made a clock out of a 555 timer and some decade counters and loose LEDs. It kept horrible time, but I thought it was cool anyway.
Ladyada, is there anything like a 555 timer, but without such horrible accuracy?
odometer
 
Posts: 98
Joined: Sun Aug 21, 2011 10:01 pm