# Diode or relay?

#### Do you have a question? Post it now! No Registration Necessary

Translate This Thread From English to

•  Subject
• Author
• Posted on
I am a hobbyist with limited understanding of electronics curcuit
design, so that's why I am turning here for possible help.

I have an wired electronic "barking dog" alarm that is triggered by a
PIR motion sensor outside my entry way. The PIR is connected by a
4-conductor telephon wire to the inside "barking" speaker box that is
also connected to the power supply. I bought this alarm about 25 years
ago from Heath/Zenith. I would like to put its PIR sensor to dual use to
also trigger a new X10 burglar interface device that works with low
voltage input.

After some testing I discovered that two wires (green and yellow, aka
GY) of the phone wire connection between the PIR and the "dog" are
really soldered together on the PCB, so in effect there are only 3
conductors between the sensor and the dog. The other two wire colors are
black for the ground (B) and red for + (R.) I also found that when the
PIR is in inactive state, the voltages are as so:
between B & R: 5.06 V
between B & GY: 0.19 V
between GY & R: 4.69 V.

Then, during activation (for about 2 secs:)
between B & R: 5.06 V (unchanged)
between B & GY: 1.5 V (raised from 0.19 V)
between GY & R: 3.32 V (dropped from 4.69 V)

When I saw this, I figured that the voltage between the B & GY
conductors would also be a good candidate to also trigger the low
voltage input of my new burglar alarm interface. The 1.5V created
between those two conductors when PIR sees a motion is high enough to
also trigger my burglar alarm but here is the rub: so is the 0.19V that
exists there during inactive PIR. This means that I have to somhow make
that 0.19V -> 1.5V change into 0V -> 1.5V change for the new burglar
alarm interface. I figure this would probably be simple to accomplish
with a diode that presents an open circuit below -- say -- 0.5V and
shorts above it. I'm just guessing. Perhaps an appropriate relay would
provide a better solution. In either case, I wouldn't know the specs for
such diode or relay that I could use to buy them either online, or at
places, such as Frys. Could you help me with this?
Thanks.

## Re: Diode or relay?

To the  X10 input.

+------------+
|
|
|
|
|
| C
1.5k            +
___       B  |/
To GY  +-----+-|___|-+------+|    small NPN transistor
|>
+
| E
|            Common of the X10
|
+-------------------+
|
|
+ to the (B)

we'll assume (B) is your common
(created by AACircuit v1.28.6 beta 04/19/05 www.tech-chat.de)

Try that.

It's most likely the X10 unit is operating at the 2.5 Volt threshold
trigger point. It is common to activate devices using a LOW INPUT (SINK)
and there for, many devices have what is called a open colloector output
as you see above, to trigger these devices.

The reason you see this activity either way is, you're not getting above
the shut off point. You are in the on state level either way.

Jamie

## Re: Diode or relay?

Don't know the specification of the X10 inputs but the doc of the burglar
alarm should tell it. If you're right, it's the best solution. So try this
first. If it does not work, try the schematic below. X10 devices have inputs
for hard contacts i.e. relays. Use a fixed width font like Courier to look
at the schematics.

R--------+-----+      +--------
|     |reed  |
-    _|_     o  /
1N4148 ^   |_/_|-     / to
|     |relay  /  X10
+-----+      o
|      |
___     |/       +--------
GY--|___|----| 2N3904
2k2     |>
|
|
B-------------+
created by Andy´s ASCII-Circuit v1.24.140803 Beta www.tech-chat.de

petrus bitbyter

## Re: Diode or relay?

Unfortunately that X10 burgler alarm interface module does not have much
of a spec beyond stating that a low voltage *or dry contact* is needed
for triggering. A toggle needs to be set for one or the other.
(Come to think of it, there might be even a simpler solution for the dry
contact trigger, huh?)

Actually, this X10 module is meant to facilitate the conversion of real
burglar alarm output to X10 events on the home power network. That X10
event can then be "read" by another X10 module in another part of the
home and used to activate some kind of alarm or -- in my case -- turn on
an IP camera's recording function to make a video clip. In another
thread I already mentioned that this cam's recording function can be
triggered by either NO or NC digital input.

Ideally it would be best to just connnect the outside PIR sensor
directly to the inside camera (behind the window) without all this
intervening X10 stuff, but I don't want to drill through the wall and
floor just to run some long wires between them when I can use the
existing power wiring for that.

Thanks Petrus, will do.

That goes without saying but I also might want to look into Andy's handy
ASCII-Circuit software that you guys have been using here.

## Re: Diode or relay?

Petrus, just in case, I decided to get the parts for both solutions when
I go to Fry's, probably this weekend. If I guess right, the 2k2 resistor
is really 2.2K ohms, but I have no idea what specs or part number should
I look for the in the reed relay. Can you name one like you did for the
transistor and diode? Thanks.

## Re: Diode or relay?

As for the resistor a 2k2/0.25W (2.2 kiloOhm indeed) will do.
Diode 1N4148 or any other general purpose Si diode.
Same for the transistor 2N3904 or any other general purpose NPN transistor.
The relay may be more dificult. I'd use a 5V DIL reed relay like a MEDER
DIP05-1A72-13L or one of the its other 5V family members, COMUS has similar
relays available from Conrad (www.conrad.de), COTO TECHNOLOGY (Farnell
1081659 ) and doubtless several others.
FAIK FRYS offers only one 5/6V relais #6401152 manufactured by NTE and one
3V relay #6007528 by PHILMORE. The latter is meant to switch  10A and
requires 120mA to switch so it is rather useless for your application. So if
you're limmited to FRYS you're stuck at that #6401152.

petrus bitbyter

## Re: Diode or relay?

Thanks, Petrus. I wonder what do you think of the two reed relays on the
following RadioShack web pages:

## Re: Diode or relay?

The first one is the right one for you as it has a 5V coil. I'm missing the
coil resistance or coil current in the specs and I could not extract a
manufaturer either. Only one of the comments stated the coil resistance to
be 250 Ohm which means you need 20mA from the power supply. That should be
acceptable.

The other is a 12V relay that does not fit in your application.

petrus bitbyter

## Re: Diode or relay?

I dropped in at a RadiShack and checked the specs on the package of the
5V reed relay.

Specifications:
Nornally Open type
Voltage: 5VDC
Coil resistance: 250 ohms
Contact rating: 0.5A at 125VACC
Nominal current: 20mA

I guess these specs are OK then, right?

Joe

## Re: Diode or relay?

Yes, they are. (The specs I expect to be available when I'm looking for a
relay that suits my requirements. So Radio Shack has something to do to
improve their webpages.)

petrus bitbyter

## Re: Diode or relay?

Thanks, I'm going to get it then. I agree that their web pages could use
some make-over.

## Re: Diode or relay?

Well, I tried Jamie's solution but that didn't work. So I'm going to try
yours as soon as I get a different input terminal block for my circuit
board because your scheme uses 3 inputs. BTW, with my limited
understanding of circuits, I can't imagine the purpose of that diode
there. It seems that its cathode will always be more positive than its
anode, so no current will flow through it. Would you explain its purpose?

## Re: Diode or relay?

Well, that diode serves to protect the transistor. When the transistor is
switched on, a rapidly growing current flows through it and through the
relay coil, building up a magnetic field that activates the contact. After
some time the current stabilizes due to the resistance of the coil. Now when
the transistor is switched off, the current flow through it stops but the
current through the coil cannot stop immediately. The collapse of the
magnetic field induces a high voltage on the collector of the transistor
that can be several times the voltage of the power supply. That voltage can
easily blow the transistor. With the diode in place, the voltage cannot rise
but a little bit above the power supply voltage. Then the diode starts
conducting, effectively shorting the coil and the current flows harmless
back into the power supply.

petrus bitbyter

## Re: Diode or relay?

Wow! Thanks for that very useful tutorial. You have a gift of explaining
the complex even I can understand.

## Re: Diode or relay?

There also is a second order effect that can cause grief: The diode
delays the relay dropout time.

--
Many thanks,

Don Lancaster                          voice phone: (928)428-4073
Synergetics   3860 West First Street   Box 809 Thatcher, AZ 85552
rss: http://www.tinaja.com/whtnu.xml   email: don@tinaja.com

Please visit my GURU's LAIR web site at http://www.tinaja.com

## Re: Diode or relay?

You're going to a lot of trouble based on guesswork. What is the problem you
can't tell us the make and model of the " new X10 burglar interface device " ???

## Re: Diode or relay?

can't tell us the make and model of the " new X10 burglar interface device " ???

Never mind. Bitbyter's solution works for me now.

## Re: Diode or relay? Transistor!

Well, thanks a lot to you (and also to Petrus) for that. It turns out I
guessed wrong with diode or relay. That may be because I don't have any
hobby experience with transistors.

I'm afraid this is right now over my head, especially since I mentioned
earlier that even .2V triggers the X10 burgler alarm adapter. So I don't
understand the 2.5 V threshold above. Despite of that, I could easily
solder up something for your design if I could just knew the specs of
that NPN transistor which I could use to actually pick it up at Frys.
The 1.5 K resistor is easy; could probably use the lowest watt rating I
can find for it.

Thanks again,
Joe

## Re: Diode or relay? Transistor!

2N2222 type or anything in that class.

THe problem is, that X10 works with a sink input. This means it wants
to see its own input pulled down below 2.5 volts. In your case,
everything you're throwing at it is well below that which means the
circuit in your IR unit has a path to the common when not active. WHen
the IR unit turns on, it over rides this sink signal and gives you the
+ signal you have been seeing.

Just do the simple lay out with the collector directly connected to
the  X10 input. The Emitter connected to your B line and the base will
pass through a 1.5k ohm R which then gets connected to your GY signal.

No matter how you slight it, you need to some how invert the signal if
you don't use a relay coil, because the X10 wants to see a LOW state for
an on condition and your IR sensor is generating a HIGH state for the on
condition. Using a NPN will invert this signal and allow the X10 input
to float at its own internal pull up to make the off state..

Just go to frys or what ever you call it and get a 2N2222, 2N3904,
2N4401 something close to it.

I would love to look at Frys for you how ever, it seems that i've
never been able to connect to their site. the DNS finds the address but
always times out with no response...

Jamie

## Re: Diode or relay? Transistor!

OK, I I've got it now, thank you. I happened to also check Radio Shack
for the transistors, and they've got both 2N3904 and 2N4401, but not the
2N2222.

Does that make a difference that they call the first one Small Signal
Transistor and the other one Switching Transistor?
BTW, what Watt ratung do you recommend for the resistor?

Hm, I don't recall such a problem for myself.

Thanks again,
Joe