BX-24 to a Zettler AZ943 relay

Started by harris_cohen November 8, 2004

I am trying to connect a BX-24 to an off-the-shelf driveway motion
detector that provides relay outputs (Zettler AZ943 relay) for this
purpose. The detector comes with no specifications and so my question
is how would I go about doing this? Should I use GetPin, GetADC or
PulseIn to measure the voltage drop? I am new to electronics, sorry
for the basic question.

Thanks,
Harris Cohen





--- In , "harris_cohen" <harris_cohen@y...>
wrote:
> I am trying to connect a BX-24 to an off-the-shelf driveway motion
> detector that provides relay outputs (Zettler AZ943 relay) for this
> purpose. The detector comes with no specifications and so my
> question is how would I go about doing this? Should I use GetPin,
> GetADC or PulseIn to measure the voltage drop?

A relay is just a switch that is electically activated. It has two
states: energized and de-energized.

Assuming that you have a relay with normally open contacts, you can
connect one of the contacts to ground and connect a resistor (1K to
10K or so) from the other terminal to +5. The second terminal (with
the resistor attached) can then be connected to a BX-24 pin which has
been set to be an input.

When the relay is energized, the contacts will be closed and GetPin()
will return a zero. When the relay is de-energized, the contacts
will be open and GetPin() will return a 1.

The next question is how the motion detector energizes the relay. It
is possible that it energizes the relay and keeps it so as long as it
is detecting motion. It is also possible that it energizes the relay
for a fixed time each time it detects motion, resulting in a series
of activations during continuous motion. Depending on what that
system does, it may be possible that the BX-24 could miss detecting
relay closure if it is busy doing other things during a short closure
cycle. If the relay closures are short and your system is busy, you
may need to use a latch to capture the closure event until you can
respond to it.

If you don't have an oscilloscope or logic analyzer, you might be
able to deduce the motion detector's response by replacing the
resistor mentioned earlier with an LED/resistor combination. Then
you can observe the LED's output while stimulating the motion
detector.




That is very helpful. Thank you, Don. From what I gather from the
relay manufacturer's website, the relay is N/O and energizes for a
fixed period upon detection. This should make it easy to implement
your suggestion.

Thanks,
Harris Cohen --- In , "Don Kinzer" <dkinzer@e...> wrote:
>
> --- In , "harris_cohen" <harris_cohen@y...>
> wrote:
> > I am trying to connect a BX-24 to an off-the-shelf driveway motion
> > detector that provides relay outputs (Zettler AZ943 relay) for this
> > purpose. The detector comes with no specifications and so my
> > question is how would I go about doing this? Should I use GetPin,
> > GetADC or PulseIn to measure the voltage drop?
>
> A relay is just a switch that is electically activated. It has two
> states: energized and de-energized.
>
> Assuming that you have a relay with normally open contacts, you can
> connect one of the contacts to ground and connect a resistor (1K to
> 10K or so) from the other terminal to +5. The second terminal (with
> the resistor attached) can then be connected to a BX-24 pin which has
> been set to be an input.
>
> When the relay is energized, the contacts will be closed and GetPin()
> will return a zero. When the relay is de-energized, the contacts
> will be open and GetPin() will return a 1.
>
> The next question is how the motion detector energizes the relay. It
> is possible that it energizes the relay and keeps it so as long as it
> is detecting motion. It is also possible that it energizes the relay
> for a fixed time each time it detects motion, resulting in a series
> of activations during continuous motion. Depending on what that
> system does, it may be possible that the BX-24 could miss detecting
> relay closure if it is busy doing other things during a short closure
> cycle. If the relay closures are short and your system is busy, you
> may need to use a latch to capture the closure event until you can
> respond to it.
>
> If you don't have an oscilloscope or logic analyzer, you might be
> able to deduce the motion detector's response by replacing the
> resistor mentioned earlier with an LED/resistor combination. Then
> you can observe the LED's output while stimulating the motion
> detector.