How to use a photo cell to open and close a chicken coop door

Thread Starter

marcovlusa

Joined May 12, 2021
25
Yes, I was getting to that, but its a big step for Marco I suspect... plus I doubt the coop has an internet connection!

With a bit of leeway and given the location which generally has (I'm led to believe) reasonably constant weather a simple light detector should work (its useless here in UK!)
Here you are, the relay user's manual. Hopefully, you can understand the kind of odd English translation.
 

Attachments

Thread Starter

marcovlusa

Joined May 12, 2021
25
By the way, right now, I'm using the module number six of the relay to turn on and off the synchronous motor every 12 hours.
 

Irving

Joined Jan 30, 2016
3,843
Here you are, the relay user's manual. Hopefully, you can understand the kind of odd English translation.
No problem, perfectly clear...
Timing mode 12 to generate 1min of motor action on an incoming high-level (5v) pulse from the photocell.

But to be honest, by the time you've created the solution to generating a trigger pulse from the sunrise and (delayed) sunset edges of the photocell output you could do the whole thing fairly trivially with a $5 Arduino microcontroller (though I'd probably use something better), a 5v USB adapter and a relay module. Add a light-sensitive resistor and a couple of other parts and small display to see what's happening and your total cost is probably <$25 tops. And, sadly, the timer is redundant.
 

Thread Starter

marcovlusa

Joined May 12, 2021
25
Could you help me with the Arduino microcontroller process? I don't have any idea of what's that is and how it works. This project of mine is based on a class/workshop that I take as an honor student to try to help people down the border in Mexico to care in a better way for their poultry at a small price and mainly recycling material that otherwise go to the trash. Before I started this project, I checked out chicken coop prices and automatic chicken coop does. A sturdy chicken coop costs approximately $800 and the automatic doors process are from the $100 up to $200. That's an amount of money too high for a lot of people and not only in Mexico. To fence the chicken coop I used almost new pallets which were treated with heat instead of chemicals. I asked a VW dealer to sell them to me for a lot price. They asked me what I wanted them for. So I explained my project and they gave me several pallets for free. So far, I've built 3 chicken coops with their chicken runs with those pallets too.
 

Thread Starter

marcovlusa

Joined May 12, 2021
25
The problem with using a photosensitive detector to determine sunrise and sunset is that they don’t necessary correlate to the amount of light on the sensor.

If you don’t want to depend on a network connection to a source of local sunrise and sunset data, the alternative is a realtime clock (RTC) and a precalculated table of sunrise/set data for the location of the coop. Quite a few years of data could be compactly stored and a very small MCU would be enough to manage the whole thing.
Your approach is very interesting. Could you help me with that?
 

Irving

Joined Jan 30, 2016
3,843
Could you help me with the Arduino microcontroller process? I don't have any idea of what's that is and how it works. This project of mine is based on a class/workshop that I take as an honor student to try to help people down the border in Mexico to care in a better way for their poultry at a small price and mainly recycling material that otherwise go to the trash.
Your approach is very interesting. Could you help me with that?
@Yaakov and I are on the same page. Now you've explained the background (very commendable!) it begs the question about availability of mains power supply to these Mexican coops? Its clear they probably won't have internet access, but they do have a lot of sun...

Thr Arduino is a small microcontroller that can be programmed to do almost anything. It is beloved (and hated LOL) by the Maker community as being a cheap way to get intelligence into a project.
 

Irving

Joined Jan 30, 2016
3,843
Could you help me with the Arduino microcontroller process? I don't have any idea of what's that is and how it works.
The Arduino is a small microcontroller that can be programmed to do almost anything. It is beloved (and hated LOL) by the Maker community as being a cheap way to get intelligence into a project. It can act as a timer, measure light levels (with an external sensor), control motors (via a relay), check switch inputs and drive a small display and much more. And run off a cheap 5v USB adapter.
 

Thread Starter

marcovlusa

Joined May 12, 2021
25
@Yaakov and I are on the same page. Now you've explained the background (very commendable!) it begs the question about availability of mains power supply to these Mexican coops? Its clear they probably won't have internet access, but they do have a lot of sun...

Thr Arduino is a small microcontroller that can be programmed to do almost anything. It is beloved (and hated LOL) by the Maker community as being a cheap way to get intelligence into a project.
Regarding power supply, those communities I'm interested in helping do have an uninterrupted power supply because we helped them build solar panels with the help of a solar power company and a municipality contribution. Altho the power supply is uninterrupted, their wattage use indeed is limited in order to help the majority of families. So, we looked for led bulbs suppliers to reduce the amount of electricity consumed which are the most energy efficient light bulbs. Right now also, there's a internet provider that offers a profit plan 20 Gigas at a 5MB for US$10. That provider is trying to provide its services to the whole country. I've seen first hand how this kind of services have been off a great help during the covid-19 pandemic for children to be able to take classes via internet.
 

Thread Starter

marcovlusa

Joined May 12, 2021
25
The Arduino is a small microcontroller that can be programmed to do almost anything. It is beloved (and hated LOL) by the Maker community as being a cheap way to get intelligence into a project. It can act as a timer, measure light levels (with an external sensor), control motors (via a relay), check switch inputs and drive a small display and much more. And run off a cheap 5v USB adapter.
A few minutes ago, I read an article about Arduino, but I'm not lectured on C language which supposedly Arduino uses. Nonetheless, I can make an effort and learn it. So, I'll be able to build the automatic chicken coop does. Moreover, I'll be able to teach people from those communities to use Arduino. Somehow, it will help them. Is there a place on the internet that at least I can learn the basics of Arduino programming?
 

Irving

Joined Jan 30, 2016
3,843
A few minutes ago, I read an article about Arduino, but I'm not lectured on C language which supposedly Arduino uses. Nonetheless, I can make an effort and learn it. So, I'll be able to build the automatic chicken coop does. Moreover, I'll be able to teach people from those communities to use Arduino. Somehow, it will help them. Is there a place on the internet that at least I can learn the basics of Arduino programming?
Wow, thats quite impressive.

How many motors are you going to be able to salvage\recycle? That seems like a limiting item, as your design is predicated on that specific motor or type of motor...
 

Thread Starter

marcovlusa

Joined May 12, 2021
25
Please, forgive me for all the typos or odd words that are found in my postings. My phone changes the words as I type these messages.
 

Irving

Joined Jan 30, 2016
3,843
A few minutes ago, I read an article about Arduino, but I'm not lectured on C language which supposedly Arduino uses. Nonetheless, I can make an effort and learn it. So, I'll be able to build the automatic chicken coop does. Moreover, I'll be able to teach people from those communities to use Arduino. Somehow, it will help them. Is there a place on the internet that at least I can learn the basics of Arduino programming?
What programming languages do you know? Some of the other candidate microcontrollers can be programmed in Java, Python, C, C++ .

There are many YouTube tutorials, I wouldn't get too bogged down by that...
 

Thread Starter

marcovlusa

Joined May 12, 2021
25
Right now, I have 30 motors that I got from second hand electrical shops. I plan to build and teach how to build at least 78 chicken coops for that's the amount of families that I'm trying to help. The money was collected in many ways. For example, I asked my parents to ask their church to pitch in from their offerings, I asked all my friends to contribute monetarily, people from those communities also collected money. I organized a car wash event for three weekends and so on. And that's why with the money I collected, I cannot go over the $150 budget for each chicken coop.
 

Irving

Joined Jan 30, 2016
3,843
A few minutes ago, I read an article about Arduino, but I'm not lectured on C language which supposedly Arduino uses. Nonetheless, I can make an effort and learn it. So, I'll be able to build the automatic chicken coop does. Moreover, I'll be able to teach people from those communities to use Arduino. Somehow, it will help them. Is there a place on the internet that at least I can learn the basics of Arduino programming?
If you know Java then programming in C/C++ is very similar, it won't be a problem.

I'd probably not use an Arduino for this but an ESP32 which is similarly priced but has Wifi/Bluetooth built-in which means its easy to use a Smartphone as a user-interface to adjust timings etc. and saves on a display module. Also the ESP32 has a built-in real-time clock, which runs even when its in a deep sleep to save power... The programming environment is the same for both.
 
Last edited:
Top