Contact closure

I have this crazy idea that...

  1. I can use contact closure from a Home Depot style motion sensing light fixture to provide a 120vac relay with contact closure-not illumination.

  1. With that contact closure on the relay I can use ________________ to inform a program running on my computer that the contact closure has occurred. It doesn't have to be wireless. It could be serial (distance ~60' to PC).

  2. With contact closure sensed at the computer, a program running on the computer would sense the signal, and act. I can write for Linux or Windows, with .NET the preferred solution due to graphics for monitoring.

I want to trigger actions on my audio port on the computer based on an interim program that is listening for a signal/state to occur. Simple.

There are Rube Goldberg solutions out there with wireless, web, etc. but this really doesn't need to be. Most every sstem-including the risky/noisy X10 are designed to _send_ contact closures, not _receive_ them.

- I can solder a relay into a disassembled driveway motion detector in

2 minutes.

- I can run a contact closed pair to the PC.

- I _cannot_ convert that contact closure right next to the PC into a signal that a running program/daemon can use as a trigger to act upon.

How can I convert a contact closure into a signal that a running program can use?



Reply to
Loading thread data ...

Here's one of several products that you could use to make the connection between a dry contact and your PC.

formatting link
That said, you might want to consider an alternate approach if the overall system is to be responsible for the security of the property. There are simple to install alarms, both wired and wireless, which can provide security and/or varying degrees of lighting and automation control available for DIY. Models like Napco's P9600 and P3200 systems can include an RS-232 port with real-time status reports to the PC.

I'm a bit biased in this area since I sell Napco, but they do make reliable systems. ELK Products and a few others also offer ways to integrate their systems with a PC. Elk is pricier than Napco but it's a full-blown home automation system whereas Napco is an alarm with HA integration options.

Reply to
Robert L Bass


Thanks for writ>

This is $89, and way outside the budget.

Well, that might help in certain scenarios, but mine is not security. My purpose is to create a "mosquito" (see:

formatting link
I have a ..."neighbor" problem. In short, they are up all night partying outside our bedroom window.

So I have all the components, except for that one link that will allow a program of my own design on a PC to sense/react to a contact closure right next to the computer.

Thanks for the advice, and any other advice that comes my way!

pat :)

Reply to
B☼gus Excepti

a écrit dans le message de groupe de discussion :

You have a cheap and dirty way of doing this...

if you have a simple joystick connected to your computer you could use the trigger button to trig a action in a software..

cheap usb joystick are sold below 5$

use a 110 volt relay connected in place if the 110 volt light bulb in the detector system and use one of the contact of the relay (n.o.) as the signal to close the trigger button in the joystick i am sure you can find ready made routine in .net to monitor a joystick...

Reply to


This is fiendishly simple... Perfect!

I was already doing all the rest (110vac relay and all), but shorting a 'Fire' button is really clever. Nobody else thought of that! :)

pat :)

Reply to
B☼gus Excepti

There a re much more way of doing this..

on a old pc, using the Lpt1 port printer ready input could alos do th trick..

thye same on the serial 1 port terminal ready pin could also be used..

I didnt put it on the first post cause you want to use your standart pc to do the job...and most new pc dont have those port anymore..

"B?gus Excepti?n" a écrit dans le message de groupe de discussion :

Reply to


Thanks for writing.

Here is what things look like so far (as good as text can do)...


Wall timer 1 (~$5)

- Applies power to motion sensor (below) during desired hours of operation)

Motion sensor (standard driveway type (~$11))

- Senses motion up in the attic through vents

- Provides 120vac when "tripped"

120vac DPDT relay (~$2)

- Uses 120vac from motion sensor above to provide contact closure

Cat 5 cable to basement (one pair soldered to relay above, carrying no voltage contact closure to basement)

- I could use the other 3 pairs in a similar fashion in future


USB Joystick ($7)

- Torn apart to solder the Cat 5 pair above to one of the buttons' contacts


- Existing Win 2003 Server box acting as file and VM server for home data center

- Hosts a V.NET application

- Has audio/line out hooked up to Crown D-150A II (150watts/channel boat anchor), with attentuation adjustments on front of chassis

VB.NET application

- Will be monitoring the USB joystick for signal that is recognized as a button press, which is really contact closure from the attic via the Cat 5 above.

- Brings up and down the audio level so the chosen tone(s) is/are brought up and down very slowly. The idea is to be covert and not overt.

- Can choose random MP3s (created with various tone/signal generators (like Visual Analyzer) randomly, based on time of day, on demand, etc.

Wall timer 2

- Powers up the Crown audio amplifier during desired hours of operation (too expensive otherwise)

- Acts as a second assurance that tones not generated outside desired time of day range

Audio amplifier (25 years old) Crown D-150A II

- The definition of overkill-you can weld with this thing

- Takes audio in from computer, attentuates it per knobs on front, and supplies speaker output

Speaker wire

- Run up to the basement, where the speakers are

Attic (again):


- At and under 1uf to act as both tweeter protection and provide HPF

Speakers (4 various for ~$10)

- 50w capacity and higher, avoiding accidental damage

- Various directional and unidirectional designs

- Soldered together in series/parallel (lower ohms =3D higher capacitance needed for HPF)


IR Camera ($250) IP wireless w/pan/tilt on first floor

- Have already placed a similarly shaped/colored object where camera will be, as it will be visible

- IP wireless will be available in basement control center

Microphone (headset?)

- Will need to stick a microphone outside to hook up to the PC spectrum analyzer

- Will provide relative level measurements (signal to ambient)

- Used to determine how loud signals are when detected, using this threshold to work under

I think that is it.

I want to experiment with varying/cycling tone frequency and intensity, as well as combining frequencies close to each other and their harmonics. Unlike my laptop's amplifier (10% THD), the Crown is at 0.001% THD, which means there will be no unwanted lower harmonics giving the device/system away.

So there you have it!


Reply to
B☼gus Excepti


Reply to
Robert L Bass

The joysticks came in today!

I wonder if they are from the U.S., though... The first feature is:

"Exquisite design and comfortable handle make you handy to play;"

Who doesn't want some of that?!

pat :)

Reply to
B☼gus Excepti Forums website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.