Electronic – How to achieve Better power consumption (operation of automatic chicken coop door)

power-consumptionrelay

Newbie to electronics and am looking for help with a project I'm working on.
I have a 12 v light detecting relay module which I'm using to drive a 12v motor in h bridge relay figuration, taking the + signal from the n.c or n.o contacts of the light sensor relay to drive the motor in one direction or the other until reaching a switch cutting the power to the motor driver.here are my issues.

  1. Power consumption.. As the relay of the light sensor is activated the whole time during daylight hours the battery(12v 2.3ah)is not lasting very long.

  2. The light sensor keeps flicking from on and off at the switching point.is there a way of latching the relay(or by using other components)once the trigger point is reached then resetting once the light sensor deactivated

Can I some how use the signal which switches the light sensor transistor, to operate an ic or some other arrangement of components to achieve the function I require-being

To drive a 12v motor (using a 12v 2.3ah battery)forwards and backwards which open/closes a door with relation to if it's light or dark?

As i said i am very new to electronics so have no idea where to even start looking for the info to solve my problem so any help would be much appreciated

Best Answer

If you dont want to use arduino.look at the rough sketchenter image description here if you wish to make this then i would post the exact schematic.

Alarm clock would make an alarm at a preset time.the alarm would trigger a IC555 then that would clock the CD4017 one of the first output of CD4017 would go high and that is given to a diode and the another diode is connected through a limit switch if the door touch the forward limit switch the the motor must be stopped (diodes are wired as AND gate during normal operation the output of gate is 1)