Circuit for two NO sensors

cestor

Active Member
Hi,
I have an electric gate that has 3 possible positions - Fully open, Fully closed and partially open. It has two output circuits, one for Fully open and one for Fully closed. Now, I can connect each of these separately to their own zones and therefore work out what position it is in, however, if I only want to use one zone, is this achievable with an OP2? Additionally the gate could be half opened and then opened or closed with a remote, which means that I can't just remember the last state and assume that it is the opposite. 
 
Well assumming a zone is either secure or violated (two states) then one zone cannot convey three states of information (open, closed, other).
 
I would just use two zones - the simplest approach.
 
However, temperature and wireless zones are not Boolean - there are multiple different voltages and you can read a loop value, so why not something similar here...
 
cestor said:
However, temperature and wireless zones are not Boolean - there are multiple different voltages and you can read a loop value, so why not something similar here...
 
Yes you could but then you need a few resistors, decide what voltage represents what, hook them up, use the correct value in automation rules, etc. So why not just wire the existing contacts to two zones (which can have meaningful names) and be done? You have four possible states and two zones covey that just fine - I understand that in normal circumstances you only have three states but in the event of a failure of a switch you might have four states.
 
I know I could do it simply with 2 zones...just wondering if there is a more elegant solution that does it in one.
 
I suppose that depends on your definition of elegant. To me the simplicity of two zones with no extra parts is the elegant solution. But as pointed out you could use an analog zone with extra parts to generate unique readings for each state.
 
I'd just use two zones, and write some logic to change a variable to something like 0 = closed, 1 = open, 2 = halfway, etc.  If it took to long to open or close you could trigger a message.  A single zone can measure a voltage or current with a 1/255 resoultion, but it won't be pretty to do.  Unless your really short on zones, why bother? 
 
To use Zone Loop Readings you have to trigger off of something.
They can be used as a conditional but not a trigger.
 
The zone going secure or not ready are the only zone triggers.
 
If you used going secure as a trigger and conditional, i.e. the gate is closed, you'd still need a way to trigger a block when the zone was not ready because the zone would be not ready from the point it started to open all the way through being fully open.
 
You could use two flags.
One as a timer and one as a numerical variable.
 
And perhaps split the 1000 Ohm EOL into two 500 Ohm resistors to generate different loop readings.
 
When the zone goes not ready, start the timer flag. 
You need a short duration for it to re-check the status.
Something like 5 seconds.  Assume the gate transit time to fully open is longer than 5 seconds.
 
Each time the timer expires, check the zone loop reading and assign the variable value accordingly, then restart the timer.
When the zone becomes secure, set the variable value accordingly and turn off the timer.
 
This is a bit more elegant than using an EVERY trigger which would continuously evaluate the condition 24/7.
 
Let me do a bit of pseudo code typing and I'll post blow.
 
OK
 
Maybe something like this:
You'll have to experiment electrically with resistors to get the right loop readings.
 
Zone is "Gate"
 
Assign Flags:
"Gate Timer"
"Gate Status"  0= closed, 1 = half open, 2 = open
 

WHEN Gate SECURE
    THEN SET Gate Timer TO 0
    THEN SET Gate Status TO 0
 
WHEN Gate NOT READY
    THEN Gate Timer ON FOR 5 SECONDS
 
WHEN Gate Timer OFF
    AND IF Gate ZONE LOOP READING IS GREATER THAN 160
    AND IF Gate ZONE LOOP READING IS LESS THAN 190
        THEN SET Gate Status TO 1
        THEN Gate Timer ON FOR 5 SECONDS
 
WHEN Gate Timer OFF
    AND IF Gate ZONE LOOP READING IS GREATER THAN 200
        THEN SET Gate Status TO 2
        THEN Gate Timer ON FOR 5 SECONDS

 
 
 
 
Rough Schematic
 
GateZoneLoop1.png


I like this schematic better, but the logic is a bit less intuitive (doesn't match the code above).

GateZoneLoop2.png
 
I'd have to look at the HAI docs, but if both are NO circuits, one would end up being NC when the gate hits it's limits. You could base what you are looking to do based on either a secure vs. short circuit scenario.
 
Not as clean as 2 zones/circuits, but is doable.
 
DELInstallations said:
I'd have to look at the HAI docs, but if both are NO circuits, one would end up being NC when the gate hits it's limits. You could base what you are looking to do based on either a secure vs. short circuit scenario.
 
Not as clean as 2 zones/circuits, but is doable.
 
Actually I think this is what happens - the 3 states are:
 
Z1    Z2                     Status
NR   Trbl(162)          opening or closing
NR    S                      open
S      S                       closed
 
so the difficulty is in detecting a change from Open to Closing as there is nothing to trigger
 
Back
Top