|
Saturday, December 15, 2007
WxService Update Available
- WxService ow4j071210
- Added extreme fault tolerance for 1-Wire MicroLan
WxService is now available with extreme fault tolerance. Although one would like a 1-Wire network to be relatively error
free, that is often not the case. Even implementing all of the recommendations in Guidelines for Reliable 1-Wire Networks, I have found my 1-Wire network to be extremely unreliable. It is very susceptible to slight configuration changes. Reliability
seems to change with the phase of the moon. You might expect that a 50KW AM station within a mile of my network would cause
problems, and it does. During the day when they’re on full power, several sensors fail more often than not. Even at night,
when interference is less, 1-Wire network error rates are unacceptable.
The 1-Wire protocol was originally designed to extend a few inches. People stretched it to hundreds of feet – far beyond
the original design parameters. To expect this thing to be unconditionally reliable is simply not reasonable. The only way
to make a reliable system is to compensate for hardware failures in software. Fortunately, the 1-Wire Network provides
fairly good error detection. This is where extreme fault tolerance comes in.
For each sensor, the WxService retries every operation up to ten times before giving up and reporting a fatal error. If
the first attempt is successful, then great – the system will have excellent performance. On the other hand, if nine out of
ten attempts fail, the system might have poor performance, but it will keep working, the weather conditions will be recorded
on schedule, and no readings will be missed. The design is thread-friendly, so if one sensor requires many retries, it will
allow other sensors to run between retries. It will not hog the 1-Wire network during the retries.
For optimal performance, the goal is to tune the network to get retries to a minimum. To allow you to evaluate 1-Wire network
health, WxService logs network errors at different verbosity levels. WxService logs fatal initialization errors at the “severe”
logging level to indicate that a sensor failed to initialize. Sensors that fail to initialize after ten retries will not be
operational. WxService logs fatal read access at the “warning” logging level. Sensors that fail to read after ten retries
will run again at the next scheduled time. WxService logs retries in the system log at the “fine” logging level, so you can
see if a sensor is having trouble initializing or running. Logging levels in increasing order of severity are: finest, finer,
fine, config, info, warning, severe. The default logging level is “info”, so you don’t normally see levels “config” and lower.
(download the latest version)
12:38 am pst
Saturday, December 8, 2007
The 1-Wire MicroLan Might Never be "There Yet"
I am about to give up all hope of having a "really clean" 1-Wire network. After the 50KW blowtorch went back on high
power, the errors came back. I reverted the filter to the configuration shown here (Appendix D), which improved things slightly.
Instead of trying for high 1-Wire performance, I have opted for extreme fault tolerance in the WxService software. Whenever
OWAPI throws a OneWireException, I simply retry the operation, up to 10 times. The only sensor I cannot do this with is the
anemometer, which is time-critical. Since it reads every 3 seconds anyway, I just let it try again next time. Fortunately,
I have had practically no 1-Wire errors on that device.
I will post a new version of WxService here, after the usual shakedown period.
3:42 pm pst
Thursday, December 6, 2007
DS9097U 1-Wire Serial Adapter Not Quite There Yet
At sunrise today, the 50,000 watt AM station less than a mile from here went to daytime power, and the 1-Wire network
started having errors again. I changed the 1-Wire filter capacitor to the recommended value for the "reversed" filter (see
my previous post) of 470pf. Things seem a bit more stable now, but it is dark now and the radio station is on nighttime power,
so we won't know for sure until tomorrow.
7:32 pm pst
Wednesday, December 5, 2007
Installed the DS9097U 1-Wire Serial Adapter
Never having been happy with the DS9490R 1-Wire USB Adapter, I decided to try the DS9097U. The problems I had with the
USB adapter included periodic lockups, as well as communication errors. However, right out of the box, the DS9097U did not
impress. With the setup that I had finally tuned to work with the DS9490R, CRC errors and missing devices were the rule.
Most puzzling was the fact that the low-pass filter that I had built for the DS9490R (from Guidelines for Reliable 1-Wire Networks -- Appendix D. R-C Filter Helps DS2480B Interfaces on Short-to-Medium Networks) seemed to hamper DS9097U operation. Then,
I found Figure 10. RC Filtering in this document, which has 1/10 the capacitor value, and with the filter reversed! Now I don't know if one of the documents is in error,
or if they are both valid for different conditions. Reversing the filter seems to dial the DS9097U right in. I never tried
reversing the filter with the DS9490R, so I don't know if it would have worked better with the filter reversed as well. Now
that the filter has been reversed, it would be relatively easy to try it out with the DS9490R next time I have the weather
station offline.
The DS9490R is handy for bench-testing sensors. It seems to work fine for short lines, short run-times, attached to my
laptop, which doesn't have an RS232 port.
9:25 pm pst
Sunday, December 2, 2007
WxMonitor Update Available
- WxMonitor ow4j071202
- Fixed a bug with metric rainfall rate scale.
The multiplier was off by a factor of 10. If you are upgrading an installed system, you might need to verify that the precipitation
rate configuration properties (metric settings) are set to 254e-3, as shown here:
precipitation.rate.metric.data.scale=254e-3 precipitation.total.metric.data.scale=254e-3
and
precipitation.rate.csv.data.scale=254e-3 precipitation.total.csv.data.scale=254e-3
(download the latest version)
7:39 pm pst
Saturday, December 1, 2007
WxService Update Available
- WxService ow4j071201
- Enhanced temperature compensation for the Honeywell HIH-4000 humidity sensor.
- Enhanced power supply compensation for the Honeywell HIH-4000 humidity sensor.
The new parameter allows you to enter sensor slope, sensor zero and now the calibration supply voltage, vdd. The original
defaults were precompensated, but it was not clear how the values were derived.
If you are updating an installed system, you might need to update the hygrometer parameters. The new default values are
hygrometer.task.sensor.slope=32.0e-3 hygrometer.task.sensor.zero=800e-3 hygrometer.task.sensor.vdd=5.0
Honeywell calibrates their sensors at vdd = 5.0V, but if you calibrate it yourself, vdd might not be 5.0V. This new parameter
allows you to more accurately compensate for supply voltage.
(download the latest version)
2:28 pm pst
|
|
Contact Us
Use the form below to send comments about this site.
|
|
|
|
|
Welcome!
This site is dedicated to my interest in engineering. I use it as a place to just put stuff "out there" for anyone who
might be interested, as well as a job search tool. This page contains my engineering web log (to your left). Anything that
seems timeless enough, or too involved for a log entry may get it's own page as a full-blown article. And, of course, my resume
is here for anyone who might be considering hiring me to do something. Email me.
About Me
I have worked as a broadcast engineer, electronics designer (analog and digital) and software developer. I especially
enjoy audio engineering, although I've been writing software for the last several years, since that's where the opportunities
are in the Pacific Northwest (this is Microsoft country after all). I'm currently working as a Senior Staff Engineer -- Resume at another large independent software vendor in Washington State.
I majored in mathematics and physics in college. Other interests include music appreciation (baroque, classical and early
romantic, ragtime, and 60's and 70's rock & roll), high fidelity audio electronics, meteorology and of course, computing
hardware and software. I tend to think a lot like this guy.
|
|
|
|