Electronic – I need help in rewiring a chicken coop pop door

actuatorphotosensorrelaywiring

4 years ago I purchased an automatic chicken pop door for my coop. It is 12 volts and the door opens at dawn and shuts at dusk by means of a photosensor. It is a home built device that works quite well. It stopped working recently. Of course, I took it apart to diagnose the problem and made a sketch where all the wires went (they are all either red or white) and promptly lost the sketch. I need help in correctly wiring the linear actuator to the relay. Can someone tell me how to wire this? Sorry for the primitive sketch. The linear actuator is from a hospital bed and stops when it is fully extended or fully retracted. When the polarity is reversed the actuator travels in the opposite direction. The microswitch is at the bottom of the door to stop travel when an obstruction is hit and signals that the next direction of travel is in the opposite direction. The relay is an Omron LY2N-J DPDT on a PTF08A base. The wiring shown I KNOW to be correct. I just do not know where to attach the switch (possibly 1 and 4) or the actuator.

enter image description here

It is important to me – I know I look like a rube – I'm not electronically oriented but can handle the wiring.

Best Answer

The following should work for you. You may have to switch the motor wires around to find the right polarity though.

If there is an obstruction the relay will flip back and cause the thing to reverse till the switch clears then it will re-engage and should continue to try to close. Relay may buzz a bit though if the obstruction remains, significantly reducing the life of the relay. But I can't see any better solution with the minimal parts you have indicated.

schematic

simulate this circuit – Schematic created using CircuitLab

This may be a better solution.

schematic

simulate this circuit

Here the switch opening stops the motor going down and it will stay there till either the obstruction is removed or it gets light and the door opens.

UPDATE: According to your video it's probably the second circuit.. minus the diode. Video does not show what happens when it gets light when obstructed, but I am guessing it just stays stuck. So adding a diode actually makes it better :)