I have two coops for hens and roosters. They are medium sized coops with egg collecting nests in the back. I want to attach a string to the top cover of the nesting box so it can be pulled by a dc motor up and down at different times. This will let the hens and roosters in and out. For the hen coop I want the dc motor to pull the nest cover an hour after sunrise everyday, and let it down an hour after sunset. For the rooster coop I want the nest cover to be pulled open at 10 am everyday, and also go down an hour after sunset.
The coops are far away from each other, is there a way I can only use one arduino to control both the motors? Can I waterproof the motors and the arduino? Can I use two waterproof solar panels to power the motors? As a backup can I connect the arduino to a big battery just in case the two solar panels dont produce enough energy for the motor?
I heard I should use something called an LDR chip, but can I program it to turn on an hour after sunrise and also at 10 AM, and then power off an hour after sunset for both coops?
Will wifi chips tell me when the doors are opened and closed if I attach sensors to the top and bottom of the nest covers?
I found this motor online, is it good enough to lift a 15 pound nest box cover? ---> DC-DC 7.4V-16.8V to 75V-660V Battery Booster ZVS Capacitor Charger Controller | eBay
and this one ---> http://www.amazon.com/12Vdc-Right-Angle-Drive-Electric/dp/B005IR1NBA
Thanks for the help
To answer your questions:
Yes. Yes, good idea. Yes, if the sun is shining. Yes. Yes. Yes, if your router is not too far away. Yes, a high torque gearmotor will lift 15 pounds with the right mechanics. Last one, I don't know.
How do I waterproof the motor and arduino and control everything using the router? Do you know the chips and other things to get? Do I need relays and shields? Thanks
It sounds like you're tackling a first project. Why not try to limit it to just something simple first, like letting the chickens out at 10am, use some off the shelf relay boards and run everything from 12V to keep it simple.
When it works, you can expand it.
Yeah it is my first project since middle school. I'm trying to make it as simple as I can but everything has to be waterproof. Maybe the sensors and wifi arent necessary if I have a reliable enough opening and closing operation going. I don't mind getting two arduinos for each motor, but controlling them using one would be easier. If one coop can be programed to open an hour after sunrise then it shouldnt be that hard to make the other coop open at 10.
The nest box looks like the one in this picture. My nest cover is about 15 pounds because I added weights to it so raccoons cant lift it open.
Programming for multiple actions is perfectly achieveable. See, for example, several things at a time.
In your project the real question is how things could be linked together so a single Arduino can control everything. One way is to have all of the control system in one place and just run power cables to the different motors from that location.
If that is not practical then I can't see any alternative to using 2 or more Arduinos - one at each coop. In that case the programming would be much easier if each Arduino was a complete standalone solution without any communication with the other Arduinos.
I doubt if the coop will stay as clean as the picture for very long
The coops are far away from each other, is there a way I can only use one arduino to control both the motors?
You could, but it would be cheaper and simpler to control them separately. An LDR would do the job of detecting sunrise/sunset, but you would need to make sure it didn't get dirty enough to affect that. I'd be more inclined to use an RTC (Real Time Clock) and calculate the times. IIRC, you'll find a thread or two by forum user SouthernAtHeart on this topic.
Thanks a lot for the solutions and explanations. I guess the best option is to get two arduinos and make them separate from each other. Can I connect a waterproof solar battery and a regular battery to each motor? Are there high quality batteries that can be waterproof and left outside? The screwdriver motor is on top of the coop so it has to be weather proof too, can the motors I've linked from ebay and amazon withstand rain and high temperatures? Instead of using an LDR I'll go with the RTC and program the times.
Why don't you put the mechanism inside the coop, or underneath it to protect it from rain ?
It has to be outside because inside the chickens will get the machines and chips really dirty, and my coop isnt 100% waterproof so even from the inside water will still get to it in the rain. I was thinking of putting a linear actuator inside the nest box with them so it can push up the nest and let it back down, but if it rains and the actuator pushes up the door the rain will hit the actuator while the nest cover is open.
Why not use an outdoor watertight box?
Many sizes available.
Can use a Gland to seal wire entry/exits (or have them come out bottom at least).
Here's one all wired up on a boat, with a Mega variant and one of my Screw Shields.
Thank you very much, I'm going to have to find a casing for the motor and the external battery too. Do I need to use relays to perform the functions I want? Can I switch the RTC open/close settings from my computer and not have to remove the arduinos in the waterproof casing?
Yes, you can use simple double pole/double throw relay as H-bridge to let the doors open/close. And a 2nd relay, or a transistor, as the motor drive enable.
I don't know what you mean by this "Can I switch the RTC open/close settings from my computer and not have to remove the arduinos in the waterproof casing?"
Once programmed, the Arduino only needs 5v power to run, no PC connection needed.
Another view of DPDT relay as H-bridge.
Sorry if I'm having a hard time, should I use a DPDT relay for connecting the motor to the 12V power source and the regular relay for connecting the arduino to the motor?
Thanks for telling me I only need 5v battery to power the arduino, but how about the motor, do I need an external 12v battery for that?
I meant to ask if I can program the Real time clock to tell the door to open at 6 instead of 5 in the winter without having to remove the arduino and change the RTC settings.
Thanks a lot for the feedback and sketches.
Sorry if I'm having a hard time, should I use a DPDT relay for connecting the motor to the 12V power source
Yes, that will provide direction control
and the regular relay for connecting the arduino to the motor?
Yes, that will give on/off (start/stop) control.
Whatever voltage your motor needs, I didn't see a spec on it.
You can check the date from the RTC, as well as time, program the code to use daylight savings time equivalent times if you want, and then change back in the spring. Or monthly even, kind of roll with sunrise/sunset.