Pictured below is the connection diagram for the Arduino based standard REUK Dawn/Dusk Henhouse Door Controller. This device is sold as shown including the light detector (non-waterproof), but NOT including the rollers switches and motor which you must source yourself. We recommend the following:
Choosing a Motor
The choice of motor is particularly important. We favour the high torque low RPM type of motors linked to above because they are very strong, slow moving, and they do not draw a lot of current. Most importantly, if they are prevented from turning, they still draw well under 1 Amp. Other motors may draw only a couple of Amps in normal operation, but if the door becomes jammed (debris, snow, ice, motor or mechanism seizing, etc) then they can draw very high currents which exceed the 10 Amp rating of the components used on this controller. We suggest that a 5 Amp fuse is fitted in the positive line between the 12V battery (or power supply) and the positive Power Input of the controller.
You will have to double check which way the motor turns to open/close the door, and reverse the connections to it from the controller if the motor is turning the wrong way – i.e. trying to open the door at night, or close the door in the morning.
For the roller switches, pretty much any will do the job electrically, so you just need to ensure that the ones you choose are sturdy enough to operate reliably with the door mechanism you have put together. The switches need to be wired to the controller such that the terminals are shorted out (closed) when the switch is closed, and are open when the switch is open. Most roller switches have three terminals – a COM (common), an NO (normally open), and an NC (normally closed). You need to use the COM (usually found in the centre), and the NO.
Setting the Light Level Threshold
You have one thing to set up – that is the light level threshold at which you consider it to be the point between day and dusk (and therefore the point between night and dawn). This calibration option is only available between connecting the power to the controller and it detecting dusk – i.e. during what it considers to be day time.
To calibrate the light level threshold, press and hold the Light Level Calibration Button. The red and green LEDs will both turn on. When they turn on (after around one second), release the button. Whatever is the measured light level by the light detector at this time will be stored in memory as the light level ‘threshold’. The red and green LEDs will rapidly flash for 10 seconds to let you know that calibration has been successfully completed. From now on, whenever the light level is brighter than this threshold it is ‘day’, and whenever the light level is darker than this threshold it is ‘night’. Obviously you need to go through this process at dusk when the ambient light level is the same as you want it to be when the door is to close. You need to have the light detector in the actual location and orientation it will have in operation.
The light detector is not waterproof and must therefore be protected from rain and also condensation. Ideally face it in a Southerly direction – if it is facing East or West then then ‘dawn’ will be detected late or early respectively.
Using the Door Controller
The controller starts off assuming that it is day time, so you want to start off with the door open. If the light level falls below the threshold you have set, the red LED will turn on. If the light level remains below the threshold continuously for 10 seconds, then the controller will assume that it is now dusk and will run the motor to close the door until the lower roller switch closes. The controller will then sleep for 2 hours to avoid a false dawn detection if the sun brightens up as it gets close to the horizon (as it often seems to do). During this time the red and green LEDs will blink so you know what is happening.
When the controller finishes sleeping, the ambient light level will be much lower (since it will be 2 hours further into the evening). The light detector will then wait until dawn. When the measured light level exceeds the threshold, the green LED will turn on. If the measured light level remains higher than the threshold continuously for 10 seconds, the controller will assume it is now dawn and run the motor to open the door until the upper roller switch closes. Again the controller will sleep for 2 hours to avoid false dusk detections.
This process will repeat every day.
If you have any questions about the connection, setup, and use of this controller, email email@example.com.