Chicken coop

Thread Starter

redmeat

Joined Feb 19, 2021
13
I built an automatic chicken door to let my chickens out in the morning and lock them in at night. It works great. I have the actuator and 2 channel wifi switch that works through google home and allows me to put it on a timer. However I want to add a sensor that would stop the door from coming down if a chicken or dog was in the way.(already killed 2 chickens)it doesnt have to go back up, just stop from coming down. I bought a normally open npn photoelectric sensor (not sure even if this was the correct one to buy) and dont know how to wire into my system to make it work or even possible. Do I need to add an relay or is my 2 channel wifi relay enough? Although my system works I have very limited skills. I followed a video to get this going but want to add a sensor. 20210217_142354.jpgScreenshot_20210217-143053_Amazon Shopping.jpgScreenshot_20210217-143125_Amazon Shopping.jpgThanks for your help.
 

dl324

Joined Mar 30, 2015
16,845
Welcome to AAC!

Post a wiring diagram or schematic showing how you have things connected. A datasheet for the sensor would be helpful (is it affected by ambient light?).

Do you realize that you're going to need to mount the sensor low and that dust/dirt will be a problem? That could cause the door to not close.
 
With a 2 meter sensing distance, doesn't it mean it will always sense the other side?

OH, it has a reflective plate.

Either the NPN transistor is ON when something is in the way or it's off. Can;t tell from the description.

What is the NPN's transistor's current rating?

Depending on the rating, you would use the NPN transistor to interface to a relay or digital input port.
A reverse biased diode needs to be placed on the relay coil.

You probably wired the relays wrong. i.e. The actuator doesn't stop instantly.

I could see something like "electrically pushing" the "UP" button, possibly even with no extra parts. Depends if everything works out in your favor. What happens if you push the up button "for a long time".

Stopping midway and continuing is probabky what you want to do. I could see that by adding a relay and inhibiting it's operation,

Hopefully, you have the system wired such that 1 channel is UP and the other is down?
 

Thread Starter

redmeat

Joined Feb 19, 2021
13
With a 2 meter sensing distance, doesn't it mean it will always sense the other side?

OH, it has a reflective plate.

Either the NPN transistor is ON when something is in the way or it's off. Can;t tell from the description.

What is the NPN's transistor's current rating?

Depending on the rating, you would use the NPN transistor to interface to a relay or digital input port.
A reverse biased diode needs to be placed on the relay coil.

You probably wired the relays wrong. i.e. The actuator doesn't stop instantly.

I could see something like "electrically pushing" the "UP" button, possibly even with no extra parts. Depends if everything works out in your favor. What happens if you push the up button "for a long time".

Stopping midway and continuing is probabky what you want to do. I could see that by adding a relay and inhibiting it's operation,

Hopefully, you have the system wired such that 1 channel is UP and the other is down?
[/QUOTE

I guess it would be simpler to add the sensor after the wifi control right before the 2 wire actuator. When I power the sensor I get no voltage when the signal is interrupted. I thought great just add the sensor before the actuator. However when I add the actuator I get power when the signal is interrupted (not good for chickens) I got similar results when I wired it to the wifi switch. Do I need to add a 8pin relay? Yes it is wired so one channel is up and the other is down. Is this what you mean by current rating?
  • Output Type : NPN NO 3 Wires; Working Voltage : 10-36VDC; Output Current : 300mA; Sensory Distance : 2m
 

ericgibbs

Joined Jan 29, 2010
18,766
hi redmeat,
Is there enough space to add a lightly sprung strip along the bottom edge of the door, ?
Mount a 'power cut off micro switch' , operated by the switch strip bar.

This method would stop the door coming down and allow the bird to pull itself out.
E
 

Thread Starter

redmeat

Joined Feb 19, 2021
13
Welcome to AAC!

Post a wiring diagram or schematic showing how you have things connected. A datasheet for the sensor would be helpful (is it affected by ambient light?).

Do you realize that you're going to need to mount the sensor low and that dust/dirt will be a problem? That could cause the door to not close.
I am not sure about ambient light... I hope to mount it about 6 inches off the ground to keep away from dirt.
 

Attachments

Thread Starter

redmeat

Joined Feb 19, 2021
13
hi redmeat,
Is there enough space to add a lightly sprung strip along the bottom edge of the door, ?
Mount a 'power cut off micro switch' , operated by the switch strip bar.

This method would stop the door coming down and allow the bird to pull itself out.
E
May work but the base of the door inevitably gets food and poop so that may trigger the switch and potentially disable it from opening up.
 
TS said:
Is this what you mean by current rating?

  • Output Type : NPN NO 3 Wires; Working Voltage : 10-36VDC; Output Current : 300mA; Sensory Distance : 2m
yes.

So, you would have power, ground and the NPN output.

Do you have a voltmeter with a "diode test" on it?

You can use the meter in the diode mode with + of the meter on the output and - on ground. The beam break should cause a change from OL to 0.6 or so. What's the state with and without a beam break?
 
Your relays should be wired:
NC of both relays got to ground
NO of both relays got to +12 (voltage of actuator)
C or common terminals goto each end of the motor respectively.

If one relay is on, the actuator will move up or down.
if no relays or both relays are on, the actuator brakes and stops quickly.
 

Thread Starter

redmeat

Joined Feb 19, 2021
13
yes.

So, you would have power, ground and the NPN output.

Do you have a voltmeter with a "diode test" on it?

You can use the meter in the diode mode with + of the meter on the output and - on ground. The beam break should cause a change from OL to 0.6 or so. What's the state with and without a beam break?
Am I giving the sensor power when I do this?thanks for your help
 

Thread Starter

redmeat

Joined Feb 19, 2021
13
Your relays should be wired:
NC of both relays got to ground
NO of both relays got to +12 (voltage of actuator)
C or common terminals goto each end of the motor respectively.

If one relay is on, the actuator will move up or down.
if no relays or both relays are on, the actuator brakes and stops quickly.
I dont have it wire like that exactly but everything works and has work for a year I am trying to ad the sensor.
I have this green is ground and outer black is positive smaller red and black wires go to the actuator. Thanks for your help.
 

Attachments

The wiring method gives you dynamic braking.

Ok so .0L when uninterrupted and .004 when interrupted..
Great! Hopefully, the reflective plate is in the equation.

I think the best way of handling it is to connect an SPDT automotive relay to the NPN output of the sensor.
one end of the relay coil gets +12, the other side of the coil, the NPN output. Connect +12 and ground as well to the sensor. The coil current is rather high but I think it's less than 300 mA. The diode protects the NPN transistor.

Put a diode 1n400x, where x =1 or 2 across the relay coil. MAKE SURE the band is connected to +12.

Now use the C and NC contacts to interrupt the power to the actuator.

Based on your measurements, the relay will activate (opening the NC contact) when the beam is interrupted.
 

Thread Starter

redmeat

Joined Feb 19, 2021
13
The wiring method gives you dynamic braking.



Great! Hopefully, the reflective plate is in the equation.

I think the best way of handling it is to connect an SPDT automotive relay to the NPN output of the sensor.
one end of the relay coil gets +12, the other side of the coil, the NPN output. Connect +12 and ground as well to the sensor. The coil current is rather high but I think it's less than 300 mA. The diode protects the NPN transistor.

Put a diode 1n400x, where x =1 or 2 across the relay coil. MAKE SURE the band is connected to +12.

Now use the C and NC contacts to interrupt the power to the actuator.

Based on your measurements, the relay will activate (opening the NC contact) when the beam is interrupted.
Ok so this is getting wired after my 2 channel switch and before the actuator? If so will it matter that my switch works the actuator by reversing the polarity going to the actuator making it go up and down. Or wire it into the one switch that causing it to go down I guess. So I should get this below? Thanks. Anything else before I order?Screenshot_20210219-150154_Amazon Shopping.jpg
 

Attachments

LesJones

Joined Jan 8, 2017
4,174
Why not just use the actuator to raise the door using a cord or wire ? That way it is only the weight of the door providing the closing force.
 

Thread Starter

redmeat

Joined Feb 19, 2021
13
Why not just use the actuator to raise the door using a cord or wire ? That way it is only the weight of the door providing the closing force.
Yes that is definitely my backup plan but what I have is already designed and working so hoping to just add the sensor.
 

AnalogKid

Joined Aug 1, 2013
10,986
What is the width of the gate area?

At what height above ground do you want to start sensing. For example, if the gate retracts 3 feet, but your chickens can get out of the way with only 1 foot of clearance, Then the sensed area is the width of the gate x 1 foot. You can cris-cross this with a "light curtain", a form of photo-electric beam-break sensing system.

ak
 

dl324

Joined Mar 30, 2015
16,845
I hope to mount it about 6 inches off the ground to keep away from dirt.
If you have a dirt near the door, keeping dust down will be impossible. I kept chickens in a horse stall in my barn for years and dust covers everything from floor to ceiling.

We need a diagram of how you have the motors wired so we can see where the photo sensor can be inserted. We also need to know if the sensor will be affected by ambient light. The cheap ones will likely be affected by ambient light.
 
Top