Yet another chicken coop door opener

tracecom

Senior Member
Attached is a schematic of my chicken coop door opener. I am reasonably satisfied with the circuit, and have built and tested a prototype.

I have also written some very rudimentary PICAXE code. While it is functional with the hardware, it is very basic, and I would appreciate constructive criticism.

Thanks.

Code:
init:
b1 = 0
 
main:
readadc 4, b1	'read value on pin 4 into variable b1

if b1>150 and PinC.3=1 then 'if b1 is greater than 150, and SW1 is (normally) closed, then open door
 goto open
endif

if b1<150 and PinC.2=1 then	'if b1 is less than 150, and SW2 is (normally) closed, then close door
 goto close
else
 goto motoroff	'if neither set of conditions is met, turn motor off	
endif

goto main

open:
low 0		'disable clockwise rotation
high 1	'turn motor counter-clockwise
goto main 

close:	
low 1		'disable counter-clockwise rotation
high 0	'turn motor clockwise
goto main
 
motoroff:	'disable all motor rotation
low 0
low 1
goto main
 

Attachments

techElder

Well-known member
Tracecom, I would be creating most of the circuit operation that garage doors have so you don't squash a chicken. You should at least have limit switches for the fully down and fully up positions of the door.

Someone else on here "trained" his chickens to respond to a buzzer at the required times.
 

inglewoodpete

Senior Member
Tracecom, don't forget the ground connection to your programming socket.

As an aside, you may be interested in a solar clock program, using an LDR, that I wrote for a recent 08M2 project. I haven't posted the details yet (too busy:rolleyes:) but plan to in the next 2 or 3 weeks.
 

geoff07

Senior Member
In fact you may want to include a clock because opening the door at dawn in mid-summer will let them out at 0430 (in the UK, your time depends on your lattitude/hemisphere). A good time for M. Renard to have his breakfast.

And if you don't want to keep changing the batteries, then some sleep time would be good.

My own (commercial) unit uses clever levers and magnets to detect the tension on the supporting line, and operates reed relays accordingly. I suspect optical would be the best approach for a one-off. My batteries (4 x AA) last four years.
 
Top