# Help please! Arduino Chicken Coop

#### 1ofakindwork

Joined Jul 27, 2011
58
I am new to ever thing on this site. I have no idea what I'm getting into but I figure the best place to start is here. I've been researching my idea for about three weeks with minimal answers to my questions. So if you could help me out I would greatly appreciate it.

My plan is to use a 45 Watt solar kit hooked to a 12V Deep Cell battery. I've had the solar kit for two years and now I want to put it to some use. I hope this can power a micro-controller to accomplish this list of actions...
1.Use a real time clock to control
A.1 car window motor with regulator 12V DC to open door at 6:00am
B. Run the motor listed in A (reverse polarity)to close door at 9:00pm
C. Control servo (1) to open and close a flap at set intervals. (every three hours for 30 minutes) (I need two of these set up) This will control the automatic feeders.

2.Audio board
A. Audio file for door opening (audio sounds 30 seconds before door opens)
B. Audio file for door closing (audio sounds 3 minutes before closing) I would like control to change these times as needed.
C. Audio file for food servos open (audio sounds 30 seconds before flaps open)

3.Wifi-I would like to send information to my computer or another device in my home
A. Temperature
B. Humidity
C. Video ?
D. Battery level
E. Potential problems or errors (door didn't close on time)
F. Calender reminders (clean cage, add feed)
4. Things I would also like some input on are.
A. Instead of using the RTC to control the servo for feeding, could I use a RIFID scanner and put RIFID tags on the birds. So when they where near the feed tray it would open. The main reason for the feed control is to keep black birds out, the feed dry and fresh. It would be nice to be able to add time restrictions with this though.
B. Temperature and Humidity sensor to control heat lamps and fans. I think this would be something that would be powered by AC not through the solar panel due to power consumption. I'm wondering if it would just be a better bet to skip the micro-controller and do this manually through a thermostat relay. It would be nice to later have the read outs all in one place.

Well that is all I can think of now...Thanks in advance for any help...
At this point I have abandoned the whole idea of a micro-controller, I've started ordering parts to make the the systems independent of each other. I don't believe this is the best way to make this project happen. I am hoping someone can point me in the right direction to get me back on track with this.

#### strantor

Joined Oct 3, 2010
5,333
I am new to ever thing on this site. I have no idea what I'm getting into but I figure the best place to start is here. I've been researching my idea for about three weeks with minimal answers to my questions. So if you could help me out I would greatly appreciate it.

My plan is to use a 45 Watt solar kit hooked to a 12V Deep Cell battery. I've had the solar kit for two years and now I want to put it to some use. I hope this can power a micro-controller to accomplish this list of actions...
1.Use a real time clock to control
A.1 car window motor with regulator 12V DC to open door at 6:00am
B. Run the motor listed in A (reverse polarity)to close door at 9:00pm
C. Control servo (1) to open and close a flap at set intervals. (every three hours for 30 minutes) (I need two of these set up) This will control the automatic feeders.

2.Audio board
A. Audio file for door opening (audio sounds 30 seconds before door opens)
B. Audio file for door closing (audio sounds 3 minutes before closing) I would like control to change these times as needed.
C. Audio file for food servos open (audio sounds 30 seconds before flaps open)

3.Wifi-I would like to send information to my computer or another device in my home
A. Temperature
B. Humidity
C. Video ?
D. Battery level
E. Potential problems or errors (door didn't close on time)
F. Calender reminders (clean cage, add feed)
4. Things I would also like some input on are.
A. Instead of using the RTC to control the servo for feeding, could I use a RIFID scanner and put RIFID tags on the birds. So when they where near the feed tray it would open. The main reason for the feed control is to keep black birds out, the feed dry and fresh. It would be nice to be able to add time restrictions with this though.
B. Temperature and Humidity sensor to control heat lamps and fans. I think this would be something that would be powered by AC not through the solar panel due to power consumption. I'm wondering if it would just be a better bet to skip the micro-controller and do this manually through a thermostat relay. It would be nice to later have the read outs all in one place.

Well that is all I can think of now...Thanks in advance for any help...
At this point I have abandoned the whole idea of a micro-controller, I've started ordering parts to make the the systems independent of each other. I don't believe this is the best way to make this project happen. I am hoping someone can point me in the right direction to get me back on track with this.
already grew out of your simple relay control, eh? haha. ok, well now we're back where we started in the last post. Again, my input is "whoah! slow down there buddy; one step at a time!" - I believe they call that putting the cart before the horse.
Why have you struck microcontrollers from the picture? I would think that an Arduino (or other μC, but I prefer Arduino) should get you started in the right direction and leave plenty of room for future upgrades; adding RFID, humidity, temp, wifi, etc features will almost certainly necessitate one at some point. Better to start off and familiarize yourself with it now on simple tasks.
Step 1. order your arduino, the real time clock, and some mosfets*
Step 2. research H-bridge circuits and see what you are going to need (*which mosfets).

Basically, before you go implanting RFID chips in your chickens, lets just get that timer & relay out of the picture, and lets make arduino do all the work. And then go from there.

#### 1ofakindwork

Joined Jul 27, 2011
58
So I guess I didn't hide this deep enough from you huh strantor...JK...I'm just doing the research...I know one step at a time...And I see how the circuit I've built and easy be controlled by the micro-controller. I just like too, keep my ideas rolling....Of course my wife might leave me over all this due to how quickly you can sink the dollars into a simple project. And that wire harness I put together is a beast....I will continue to keep taking one step at a time, I promise. Well my next step is making the food flaps. To open and close. I'm guessing I should use the same schematics you posted for the door, but instead of the window motor I should use servos and smaller limit switches. Any suggestions on servos or limit switches. I repaired the DPDT switch, I burnt up...I had to stretch the tension spring so the 12V would activate it. And then rewire and solder some parts. I think I'll use that to control the servos....Thanks for keeping me in check!

#### 1ofakindwork

Joined Jul 27, 2011
58
A.1 car window motor with regulator 12V DC to open door at 6:00am
B. Run the motor listed in A (reverse polarity)to close door at 9:00pm
Ok, so I have this part wired temporary with a DPDT switch and it is working perfectly thanks to the guys on my last forum post.. Thanks to: strantor and praondevou for sticking in there with me till the end!!!!

Control servo (1) to open and close a flap at set intervals. (every three hours for 30 minutes) (I need two of these set up) This will control the automatic feeders.
I think I can control the servos temporarily with the same schematic and later add the other controls by substituting out the DPDT Relay for the microcontroller.

I think the arduino would be the easiest for me to learn due to the open source. I don't know anything about microcontrollers so I may be way off. I will research any suggestions. Thanks

#### 1ofakindwork

Joined Jul 27, 2011
58
I hope I've explained things better this time!

#### 1ofakindwork

Joined Jul 27, 2011
58
Here is the schematic posted By strantor on my last forum post. I just wanted to put everything here for future readers. I used this for my coop door to open. I works perfectly. i will post pictures of the finished product when I install it. I think it cost me around $60 to build, that doesn't include the motor because I got it FREE....And then the car battery cost me$45 with a coupon at Auto Zone. I've had the solar set up for three years now and haven't used it until now, I think I spent \$150 for it!.

#### Attachments

• 50.3 KB Views: 84

#### strantor

Joined Oct 3, 2010
5,333
Ok, making a day timer with arduino:
I have done it before when I designed a laser beam break sensor input, solenoid output pig trap that would arm for specific periods of time on specific days. What I learned is that you can do it without a real time clock, using the Arduino millis() function. This is a function that keeps a running total of the milliseconds that the arduino has been turned on. There are a couple of drawbacks to this; 1. the arduino only keeps 31 days running total then it resets. 2. you have to power it up a specific time so that the time in the arduino is correct. kinda limiting. 3. if the arduino loses power, the time will reset. So, I would recommend you get the RTC. You can find them on sparkfun.com.

How much do you know about H-bridges? here's some info: http://www.modularcircuits.com/h-bridge_secrets1.htm
looking at the pic on that page; imagine Q2 & Q3 switch at the same time, it will rotate CCW; Q1 & Q4 switch, it will rotate CW. You can do this with 2 outputs on the arduino and it will be more power efficient since you don't have to hold a relay closed all day.

The arduino programming language I have found to be easier to understand than most. Also the forum support for it is unmatched. Arduino is a little pricier than PIC chips, but it is also a self contained circuit (it is a development board vs PIC which is just a chip). physically it is also very straight forward. plug it into USB, attach a sensor, button, LED, whatever, and go. Also it is compatible with lots of lots of stuff and many premade solutions available. For example, you can buy premade H-bridge "shields" (an expansion card) and start controlling motors easily. While this doesn't help you learning much about circuits and how things work, it does help someone who is only interested in achieving a goal, achieve that goal quickly and efficiently. have a browse around sparkfun.com and see all the little gadgets available for arduino and you will fall for it.