Raspberry Pi3 Chicken Coop Door

Does not seem like a lot of people are doing the auto coop doors with the Pi. I thought there would be more interest. Seems like a great idea and not expensive. Here is a picture of mine, I call it my KISS coop door. I'm not a programmer so I wanted something dependable and VERY simple. It requires a Pi , L298N motor controller, couple of power supplies one for Pi and one for motor, motor (I used a car window motor got it for free from a car repair shop), some wire, and a door which I made from an commercial aluminum baking sheet I got from a metal recycle place an a 2 x 4 x 8. I am still working on it. I need to tidy up my wires and such, but been up and running for a couple of weeks without a hitch. I don't know that it will every be complete I had so much fun working on it and learning. I now am adding code to text me when door opens and again when it closes.

Coop Door.jpg
 
I now am adding code to text me when door opens and again when it closes.

That's just sending an email, I assume your program is written in Python in that case Python Email Examples will help you out. Next you just need the SMS gateway for your carrier.

An example of sending an email in Python that is tested by me.
Code:
#!/usr/bin/python3

# Import smtplib for the actual sending function
import smtplib

# Import the email modules we'll need
from email.message import EmailMessage

sender = "[email protected]"
receiver = "[email protected]"
user_name = "your_user_name"
password = "your_password"
host = 'smtp.your_host.com'
port = 465
subject = "Chicken Alert"
content = """This is a chicken message
and this is the second chicken message

Multi line message technique.
"""

msg = EmailMessage()

msg.set_content(content)

msg['Subject'] = subject
msg['From'] = sender
msg['To'] = receiver
server = smtplib.SMTP_SSL(host, port)
server.login(user_name, password)
server.sendmail(sender, receiver, msg.as_string())

# lastly quit the server
server.quit()

JT
 
That's just sending an email, I assume your program is written in Python in that case Python Email Examples will help you out. Next you just need the SMS gateway for your carrier.

An example of sending an email in Python that is tested by me.
Code:
#!/usr/bin/python3

# Import smtplib for the actual sending function
import smtplib

# Import the email modules we'll need
from email.message import EmailMessage

sender = "[email protected]"
receiver = "[email protected]"
user_name = "your_user_name"
password = "your_password"
host = 'smtp.your_host.com'
port = 465
subject = "Chicken Alert"
content = """This is a chicken message
and this is the second chicken message

Multi line message technique.
"""

msg = EmailMessage()

msg.set_content(content)

msg['Subject'] = subject
msg['From'] = sender
msg['To'] = receiver
server = smtplib.SMTP_SSL(host, port)
server.login(user_name, password)
server.sendmail(sender, receiver, msg.as_string())

# lastly quit the server
server.quit()

JT

Thanks JT yes my program is with Python I am using Twilio to be able to text my phone seems to work great with the exception I keep losing WiFi on my Pi3. I have done some reading seems like a common problem. Rebooting seems to help so I am using a Crontab to reboot. Door works perfect just not texting reliably yet. I am thinking of adding a WiFi camera also just trying to figure out how to keep the chicken dust off it.
 
I just gave up on WiFi and ran a Cat 5 cable out to my coops. Never had an issue after that.

I just looked at Twilio and I'm not a fan of anything that mentions a cloud lol. That's why I just use the native email in Python and my phones sms gateway.

I have a lot of cameras in my coops and they are all POE. Never had an issue with dust on the lens, they are all pointing down a bit and the sun cover overhangs the lens a bit.

A photo from one of my POE cameras this morning in the Cinnamon Queen Coop.
8-2-20-01.jpg

JT
 
Last edited:
I just gave up on WiFi and ran a Cat 5 cable out to my coops. Never had an issue after that.

I just looked at Twilio and I'm not a fan of anything that mentions a cloud lol. That's why I just use the native email in Python and my phones sms gateway.

I have a lot of cameras in my coops and they are all POE. Never had an issue with dust on the lens, they are all pointing down a bit and the sun cover overhangs the lens a bit.

A photo from one of my POE cameras this morning in the Cinnamon Queen Coop.
View attachment 2272854

JT

Yes Cat 5 would be nice I'm just two far away to hand dig a ditch at this point. We just moved here two years ago got plenty too do. Just ordered and tried a WiFi camera this morning won't keep a good connection. Definitely need to run cat 5 and a water line closer so I don't have to carry water so far. All in time I guess.
 
All of y'all have piqued my interest with the technology BUT I'm not a techie kinda guy. However I am interested in how to keep my chickens safe and an automatic door..we use a "pullet shut door" door now but am interested in some of the features you are talking about... tell me more about it or steer me in a direction that will please.
 
I have seen a lot of automatic chicken coop doors on the net, most take a lot of knowledge to make happen. I have tried a few different ones most are great, but just not simple. You need an engineer degree or a programming degree to make it happen. That why I decided to keep it simple, my door is very simple and you can design into it what every you want as time goes, but in the mean time you have a working door. So on with the door.

What we will need.

  • 2 x 4 x 8
  • 12 volt motor ( I used a window motor form a car door slow speed lots of torque and have of a pulley more on that later)
  • Piece of thin aluminum size of door I used an aluminum commercial baking sheet
  • Some fishing line I used Spider wire
  • Pi3 (and the norms keyboard, mouse, monitor)
  • Motor Controller L298N
  • Some braided wire and some male to male and female to female jumpers
  • Power supply for Pi3 and a 12 DC power supply for door motor
If you are interested I can upload more info on the door. This will get you a working door. You can add to it from there dimmable LED lights, Notifications and more.
  • All of y'all have piqued my interest with the technology BUT I'm not a techie kinda guy. However I am interested in how to keep my chickens safe and an automatic door..we use a "pullet shut door" door now but am interested in some of the features you are talking about... tell me more about it or steer me in a direction that will please.
 

Attachments

  • Coop Door.jpg
    Coop Door.jpg
    574.4 KB · Views: 5
Yes Cat 5 would be nice I'm just two far away to hand dig a ditch at this point. We just moved here two years ago got plenty too do. Just ordered and tried a WiFi camera this morning won't keep a good connection. Definitely need to run cat 5 and a water line closer so I don't have to carry water so far. All in time I guess.

I just threw the Cat 5 on the ground and it's been there for 3 years so far... but yea in your area a buried water line is a must. You can rent a trencher to get a narrow ditch quick unless your like me and very rocky.

JT
 
You can add to it from there dimmable LED lights

What are you using to dim the LED lights from the Rpi? I've been doing a bit of searching the last couple of days and not finding a great solution.

On my door I just used a bank of relays, it's very simple to reverse the DC motor with two relays. Let me see if I can find the wiring diagram I made.

JT
 
Here it is... this one shows a mechanical door stop using the up/down switches.
When you energize the top relay the door goes in one direction and when you energize the bottom relay the door goes the other direction. If you energize both nothing happens, but that's not a good idea.

coop-door.jpg

JT
 

New posts New threads Active threads

Back
Top Bottom