I have 7 sensors (1 outside and 9 in various locations in my house)
that log the temperatures every 15 minutes. Before, I only had two
sensors; one on each 1-Wire run and rarely logged any errors, although
I would sporadically get a string of errors for maybe 10 minutes or
so. After I added some cable and a few more sensors I started seeing a
lot more errors. The errors usually show up as a temperature
measurement of "-88.88".
Here is my config:
- One IOM142 module from www.phanderson.com. This has two separate
1-Wire interfaces, along with 4 relays and 4 digital inputs.
- One 15' run of CAT5E going from the first IOM142 interface to the
outside sensor (DS18S20).
- One 80' run of CAT5E going from the second interface through the
house.
- All the sensors are the Dallas DS18S20's.
The ends of the cable that attach to the IOM142 are terminated with a
modular plug. The sensors are all attached by punching down standard
Leviton RJ12 jacks along the lines. I run the wires through the jacks
and punch them down rather than breaking the wire. Each sensor is
soldered to a 3" piece of CAT5E with a modular plug on the other end.
So far, I've tried two methods but neither seems much better than the
other:
1. Use only one pair (GND and DQ) and solder GND and Vdd together at
the sensor.
2. Use one pair plus one wire from second pair and connect the
additional wire to Vdd at the sensor end and +5v at the interface end.
Here are my questions:
- Is anyone else in this forum using 1-Wire sensors for temperature
measurement?
- Are there any published standards for wiring 1-Wire runs using
modular plugs/jacks?
- How many pairs and grounds should I use? That is, should I only use
one pair in the cable and connect pins 1 and 3 together where the
sensor is attached to the cable? Or should I use two pairs and connect
GND and Vdd together at the interface box? Should I use two separate
grounds?
- What about a separate 5v power supply going through the cable to
Vdd? Also, if I use this, should the grounds be connected to avoid
floating?
Any ideas would be appreciated.
Thanks.
Bill McLaughlin
Interesting arithmetic ;-)
> that log the temperatures every 15 minutes. Before, I only had two
> sensors; one on each 1-Wire run and rarely logged any errors, although
> I would sporadically get a string of errors for maybe 10 minutes or
> so. After I added some cable and a few more sensors I started seeing a
> lot more errors. The errors usually show up as a temperature
> measurement of "-88.88".
That's one of the values you can get which means the read failed
(85.0 is the other).
I continually read the temperature settings in a program loop (probably
takes a second per sensor to go round the loop). In software, I then
remove these glitches by ignoring readings of -88.8, and ignoring any
reading which is miles away from the readings either side of it.
(Sometimes get these when fridge clicks on, or similar.)
I then smooth out the readings, because at a temperature of, say,
10.25C, the sensor will alternately report 10.0C and 10.5C, which I
don't want reported as an oscillating temperature change every 5
seconds. (It is possible to read the sensors more accurately, but
Phil's microcontroller I have doesn't do that, and it takes longer
in any case, and I'm not interested in any more accuracy than 0.5C.)
Then I log the changes in this smoothed temperature value...
% grep Temperature /var/log/alarm | tail -20
Nov 18 10:21:17 Temperature - Freezer -21.5
Nov 18 10:22:06 Temperature - Freezer -22.0
Nov 18 10:22:55 Temperature - Freezer -22.5
Nov 18 10:23:56 Temperature - Freezer -23.0
Nov 18 10:24:23 Temperature - Outdoors 9.5
Nov 18 10:25:01 Temperature - Freezer -23.5
Nov 18 10:26:17 Temperature - Freezer -24.0
Nov 18 10:27:29 Temperature - Freezer -24.5
Nov 18 10:28:29 Temperature - Fridge 1.0
Nov 18 10:28:56 Temperature - Freezer -25.0
Nov 18 10:32:29 Temperature - Freezer -24.5
Nov 18 10:34:45 Temperature - Freezer -24.0
Nov 18 10:37:02 Temperature - Freezer -23.5
Nov 18 10:39:18 Temperature - Freezer -23.0
Nov 18 10:41:35 Temperature - Freezer -22.5
Nov 18 10:41:46 Temperature - Outdoors 10.0
Nov 18 10:44:24 Temperature - Freezer -22.0
Nov 18 10:47:19 Temperature - Freezer -21.5
Nov 18 10:50:46 Temperature - Freezer -21.0
Nov 18 10:52:03 Temperature - Fridge 0.5
%
Interestingly, you can see most of the cycling of the freezer
compressor here; cooling from around start of log to 10:28:56,
and then warming up from then to around the end of the log.
Looking at my logs, I've only had 5 misreadings this week so far...
% grep misread /var/log/alarm
Nov 15 07:06:22 Temperature - Loft misread (-88.8)
Nov 15 19:08:30 Temperature - Loft misread (-88.8)
Nov 17 01:17:31 Temperature - Garage misread (85.0)
Nov 17 07:11:22 Temperature - Freezer misread (-88.8)
Nov 17 20:35:58 Temperature - Fridge misread (-88.8)
%
> Here is my config:
>
> - One IOM142 module from www.phanderson.com. This has two separate
> 1-Wire interfaces, along with 4 relays and 4 digital inputs.
> - One 15' run of CAT5E going from the first IOM142 interface to the
> outside sensor (DS18S20).
> - One 80' run of CAT5E going from the second interface through the
> house.
> - All the sensors are the Dallas DS18S20's.
I have a different module from Phil Anderson, but similar setup.
I use Cat5e for most of the wiring as it's through the house anyway,
but there are lengths with other bits of twisted pair I happened to
have around and even some untwisted alarm cable in places. My wiring
is star topology, not a single long bus.
> The ends of the cable that attach to the IOM142 are terminated with a
> modular plug. The sensors are all attached by punching down standard
> Leviton RJ12 jacks along the lines. I run the wires through the jacks
> and punch them down rather than breaking the wire. Each sensor is
> soldered to a 3" piece of CAT5E with a modular plug on the other end.
I haven't actually used punchdowns for any of the DS18S20 runs. My
connections are all chocolate block type connectors with leaf protection
springs. In another house I did use jacks in a couple of places, and I
did get more misreads now I come to think of it. Some of the DS18S20's
are soldered, some screwed into the chocolate block connectors and some
in TO92 sockets.
> So far, I've tried two methods but neither seems much better than the
> other:
> 1. Use only one pair (GND and DQ) and solder GND and Vdd together at
> the sensor.
I believe that's the correct way.
> 2. Use one pair plus one wire from second pair and connect the
> additional wire to Vdd at the sensor end and +5v at the interface end.
Phil's boards are intended to drive the DS18S20's only in parasytic
power mode as far as I know, i.e. only 2-wire connections.
> Here are my questions:
>
> - Is anyone else in this forum using 1-Wire sensors for temperature
> measurement?
Yes.
> - Are there any published standards for wiring 1-Wire runs using
> modular plugs/jacks?
Never looked.
> - How many pairs and grounds should I use? That is, should I only use
> one pair in the cable and connect pins 1 and 3 together where the
> sensor is attached to the cable?
Yes.
> Or should I use two pairs and connect
> GND and Vdd together at the interface box? Should I use two separate
> grounds?
No - that defeats using a twisted pair.
> - What about a separate 5v power supply going through the cable to
> Vdd? Also, if I use this, should the grounds be connected to avoid
> floating?
I think the microcontroller would have to drive the DS18S20's
differently (different commands) for that hardware setup to work,
but I've not examined this area closely.
One other thing -- Dallas (now Maxim) don't recommend using parasytic
power mode for high temperature measurement, because high temperature
increases the leakage current inside the device and it might run out
of power before it finishes transmitting the result. It might also
affect other DS18S20's on the same bus (this wasn't clear in their
datasheet).
--
Andrew Gabriel
not if you're reading this in the southern hemisphere.
of course, that means he has "L" sensors.
--
be safe.
flip
Ich habe keine Ahnung was das bedeutet, oder vielleicht doch?
Remove origin of the word spam from address to reply (leave "+")
Hello
I've used a lot of 1-wire sensors on short and long runs with Cat-5
cable and mostly parasite power. 50 to 100 meters is workable but it
gets tricky as you get longer or add more sensors.
The protocol is much more reliable on short runs. A twisted pair doesn't
do a lot for it because it's not a ballanced signal.
Connecting gnd and vdd is recommended by Dallas when using parasite
power. With more sensors it's best to run the extra +5V feed so that you
don't have so much load on the limited power available from the data
line. I have on occasions run a +12V line and regulated it down to +5V
at each sensor.
It may help to put an extra resistor between the data line and the +5V
supply at the interface to reduce the pull-up resistance and make a
little more power available to the devices (assuming that the interface
doesn't have an active pull-up). This may not work because it raises the
data signal gnd level and may cause the interface to miss-read.
I've only used my own interface circuits so I'm not familiar with Phil
Andersons interfaces. When expecting to connect to a longer run I use a
schmit input or a comparator to raise the threshold to about 2V. This
allows pretty nasty looking data to be received.
If you feed the sensor power via a seperate conductor, you could put a
small capacitor accross vdd and gnd at each sensor; 0.1uF should do. It
will act as a little energy store and ensure that the sensor has a
supply of clean power.
Regard
Paul Bealing
www.pmb.co.nz
Also the Dallas forum is a great place to find info
(http://discuss.dalsemi.com/) The people there are friendly and responsive
My net has 4 legs, up to 100' each and 20+ total sensors, ds2401's, and
ds2405/6's.. I'll admit that within my code I have to be a bit "forgiving"
in that if I get bogus data from a temp sensor, I may need to read it again
(bad CRC or bad convert)
If you're using DS18b20 or DS1822, are you sure they are being init'd
correctly? (different resolutions take vastly different times to convert)
Also, make sure that your 1-wire segments have good connections.. I traced
down a problem a few weeks back that turned out to be an "iffy" connection,
and effected sensors not directly involved in the connection...
"Paul Bealing" <pa...@pmb.co.nz> wrote in message
news:rT9nd.6621$3U4.1...@news02.tsnz.net...
Yeah, it was a long day. :-)
>
> I continually read the temperature settings in a program loop (probably
> takes a second per sensor to go round the loop). In software, I then
> remove these glitches by ignoring readings of -88.8, and ignoring any
> reading which is miles away from the readings either side of it.
> (Sometimes get these when fridge clicks on, or similar.)
> I then smooth out the readings, because at a temperature of, say,
> 10.25C, the sensor will alternately report 10.0C and 10.5C, which I
> don't want reported as an oscillating temperature change every 5
> seconds. (It is possible to read the sensors more accurately, but
> Phil's microcontroller I have doesn't do that, and it takes longer
> in any case, and I'm not interested in any more accuracy than 0.5C.)
> Then I log the changes in this smoothed temperature value...
>
> % grep Temperature /var/log/alarm | tail -20
> Nov 18 10:21:17 Temperature - Freezer -21.5
> Nov 18 10:41:46 Temperature - Outdoors 10.0
<snip>
Unfortunately, the IOM142 controller doesn't have the capability to
address an individual sensor; it can only report all temperatures at
once. Right now I poll it once every minute but only log the changes
either every 15 minutes or if there is a quick temperature rise or
drop.
> %
>
> Interestingly, you can see most of the cycling of the freezer
> compressor here; cooling from around start of log to 10:28:56,
> and then warming up from then to around the end of the log.
>
> Looking at my logs, I've only had 5 misreadings this week so far...
>
> % grep misread /var/log/alarm
> Nov 15 07:06:22 Temperature - Loft misread (-88.8)
> Nov 15 19:08:30 Temperature - Loft misread (-88.8)
> Nov 17 01:17:31 Temperature - Garage misread (85.0)
> Nov 17 07:11:22 Temperature - Freezer misread (-88.8)
> Nov 17 20:35:58 Temperature - Fridge misread (-88.8)
> %
I very rarely get the "85.0" error. I think the 85 error is due to not
enough voltage at the time. Most of my errors are the "-88.88".
>
> I have a different module from Phil Anderson, but similar setup.
> I use Cat5e for most of the wiring as it's through the house anyway,
> but there are lengths with other bits of twisted pair I happened to
> have around and even some untwisted alarm cable in places. My wiring
> is star topology, not a single long bus.
I found that when I tried using a star I got huge numbers of errors.
> I haven't actually used punchdowns for any of the DS18S20 runs. My
> connections are all chocolate block type connectors with leaf protection
> springs. In another house I did use jacks in a couple of places, and I
> did get more misreads now I come to think of it. Some of the DS18S20's
> are soldered, some screwed into the chocolate block connectors and some
> in TO92 sockets.
I'm not familiar with the "chocolate block" connectors. What are
those?
Thanks for the info.
Bill
Oh, mine's the same too. It's just that I request it do a new cycle
as soon as it finishes one. (Actually, I have a 1 second delay so
that if something goes wrong and a cycle finishes instantly, the
program doesn't spin using excessive CPU.)
> Right now I poll it once every minute but only log the changes
> either every 15 minutes or if there is a quick temperature rise or
> drop.
Mine's pretty similar, except I poll once every 5 seconds or so.
0.5C changes are logged after a minute to cut out variations due
to temperature sitting on the cusp, and larger changes are logged
faster.
> I'm not familiar with the "chocolate block" connectors. What are
> those?
Might be called something different in the US (or might not exist
at all). Here's an example (watch the long URL for wrapping)...
http://custom1.farnell.com/cpc/product.asp?catalog%5Fname=CPC+Catalogue&category%5Fname=Electrical%2C+Security+and+Test+%2D+Connectors+%2D+Mains%2C+Test+%2D+Terminal+Blocks%2DStrips&product%5Fid=257816
--
Andrew Gabriel
I believe the 85 degrees is the reading Dallas provides when the
temperature conversion was not completed. Just why it occurred in
your data, I don't know.
All of my designs use the same core code for the temperature
measurements; TM #125, #127, #128, IOM #142A, IOM #135E, IOM #136, WX
#175. I would guess that I have some 500 units out there and people
seem happy. But, this doesn't do anything for the person who does
have a problem.
One thing on the IOM #142A. I have installed the 4.7K pullup
resistors on the flip side of the board. If you can, you might touch
these up with a soldering iron. That is, this may be the bad
connection. I try hard, but have been know to make an error.
Note that anything can be returned for a full credit within a
reasonable period of time.
Best wishes.
Peter H Anderson, http://www.phanderson.com
mcbi...@yahoo.com (Bill McLaughlin) wrote in message news:<313a9e6e.04111...@posting.google.com>...
Right now I have a buggy 8 sensor net whose topology I'm more or less stuck
with. Would the use of a hub help out here?
Does the host software have to do anything special/different to support it?
thanks much in advance - Steve
"Bill McLaughlin" <mcbi...@yahoo.com> wrote in message
news:313a9e6e.04111...@posting.google.com...
Oops, I mean Peter Anderson, not Phil Anderson...
--
Andrew Gabriel