Basically i bought some chickens a while ago and thought about making something to automatically open the door when it gets light cos im pretty lazy in mornings ;) .
After looking on ebay i found out they were between £90 - £110 so i decided to get my thinking cap on and make my own.
I have seen a few floating around but they all seem to be done by time not by light level.
What it must do:
open the door as it gets light
close the door when it gets dark
pretty simple huh? haha
Before we begin i would like it know i am planning on making some of these up and selling them online for about £60-70 if anyone cannot or doesnt have the time to make it themself. i will post it up when thery're on ebay.
so...anyway thats enough chat lets get on with it.
Im also plainning on adding a solar pannel with a diode to charge the batteries when its light but not allow the batteries to discharge through it.
here is the project set up as a trial in my garage :)
Step 1: What You Will Need:
i went to http://www.techsupplies.co.uk which i would advise all of you to go to, really quick delivery (one of my orders was at 11 oclock in the evening and arrived midday next day).
PICAXE-14M Starter Pack (USB) (for ease of project)
IC Holders (14 pin)
IC Holders (16 pin)
L293D motor driver
Stranded Wire (either colour will do)
Worm drive gearbox pair (solar motor)
ABS Box largest one
Light Dependent Resistor ORP12
2 x Miniature Microswitch
peice of wood the same size as your chicken coup door
small scraps of wood
Step 2: The Circuit
Step 3: Building the Circuit
mistakes i mad:
Installed a regulator that was then removed as it is run at 6v ( 4 AA batteries) and has no problem with the voltage
Was going to insert the chip into the ic holder but then decided to use the prototypeing board and simply use wires to connect the boards together, i did leave the ic holder there though as it makes it easier to work out were to put the wires.
Step 4: Programming the Chip
Before i give you the code i want to explain how it will work.
1) test the circuit by running the motor forwards then backwards
2) if the light levels are high then start the motor running in a direction untill the switch is pressed (the swich it pressed when the door is fully open)
3) once the light levels decrease then run the motor in the opposite direction untill the other switch is pressed.
Step 5: The Enclosure
Step 6: Making the Door
now mount the LDR where it will see the sun when it rises in the morning.
now insert the batteries and wait a few seconds for the tests to run
now simply go out about 2-3 hours after your chickens have fallen asleep and turn the pot very slowly untill the door closes, now when the light is any heigher than this the door will open, thats how easy it is to tune :)
I've included my test set up, all attatched to my bench before i do the real thing, and a video of it in action i simply cover the ldr and then expose it to the light to simulate the sun rising and setting.