From: firstname.lastname@example.org (N. Thornton)
Subject: Re: Alternative design to this?
Date: 25 Sep 2002 07:20:09 -0700
References: <email@example.com> <firstname.lastname@example.org>
NNTP-Posting-Date: 25 Sep 2002 14:20:09 GMT
email@example.com (Peet Grobler) wrote in message news:<3d915b78.9241288@
> On 23 Sep 2002 10:00:37 -0700, firstname.lastname@example.org (N. Thornton) wrote:
> >> I'd like to start off with home automation (my own version thereof).
> >> First off, I'd like to have a computer monitoring the outbuildings (so
> >> my wife doesn't kill me if something goes wrong).
> >> I have 33 inputs, including all doors, windows, lights, etc. I want to
> >> have a PC monitoring all these, and logging changes in them. Later on
> >> I'll add temperature monitors.
> >** Much better **
> >Then there are even simpler methods. Each detector connects to the
> >line via an R: the set of 8 detectors on one wire gives you an 8 bit
> >voltage value (or current). Very very simple. For 33 devices you'll
> >need 3 signal lines using 8 bit, or more if you use a lower bit code.
> >That sounds to me like a real winner. Ultra simple, ultra cheap, very
> >expandable. When you add temp senmsors later, you can decide what the
> >important temp break points are, then you'd only need say 4 bits per
> >temp.. or go the whole 8bit level per temp sensor.
> Yes... I understand this, and would definately investigate it further.
> If I understand correctly, you have 8 different R's on one line, each
> giong to a sensor. Feed this line into an A/D, and get a value (in the
Yup. Here's how I'd set it up:
Each sensor is a simple switch, and has a resistor in series with it.
At the PC end I'd put a power supply to the wire, via a small
resistor. An opamp can measure the Vdrop across the R, and feed it to
the PC or A to D it and feed that in.
Now any combunation of open and closed sensors can be read. In an 8
bit number each bit corresponds to one of the sensors. So all 8 can be
read simulatneously on one line.
> Use this value to determine which one of the 8 devices got
> triggered. This would speed up the entire scanning process, since I'll
> be doing 3 scans to read everything, instead of 33. Also, I can check
> 8 devices at a time, if nothing changed, read on...
> Hey, thanks. I'll experiment with this real soon. This is something I
> haven't done before, that's why I'm so interested!
> >Point 2 is you only _need_ one wire, not a pair, assuming you've got
> >an earth wire already. It is possible that very occasionally you could
> >get a data byte messed up, but not often enough to have any real
> >effect in real world terms. If you never ever want that to happen,
> >just tell the PC to average the result of a few successive readings,
> >or to re-question the device if the reported value changes, or to only
> >believe a result when 3 successive readings are the same.
> Nope, you lost me. I only need one wire? So let's say the sensor gets
> activated. Then what?
When the sensor is activeted it draws current down the 1 wire. That
current is measured at the PC end. So the 1 wire is both supply and
Presumably things like door open closed detectors will just be passive
switches. If you have some active sensors online as well, your active
sensors wil need to be the bits that draw the most current: just put a
R on the sensor's output so that when the sensor goes on it draws a
known amount of current.
This works with 2 wires, supply/data and 0v return, but if you have a
common mains earth connection you can use that as the return wire, so
you'd only need to install one wire for each 8 bits.
If you do that put spike protection on the circuitry, as under mains
faults the earth can momentarily rise upto mains voltage. So 2 wires
might be easier actually.
Good luck, NT