Newsgroups: comp.robotics
Path: cantaloupe.srv.cs.cmu.edu!das-news.harvard.edu!news2.near.net!MathWorks.Com!europa.eng.gtefsd.com!howland.reston.ans.net!spool.mu.edu!sgiblab!sgigate.sgi.com!enews.sgi.com!wdl1!mail!cps201!dombrows
From: dombrows@lds.loral.com (Brian Dombrowski, 5424)
Subject: Re: ELECTRONIC WINDSENSOR
Message-ID: <1994Sep20.135542.20367@lds.loral.com>
Sender: news@lds.loral.com
Reply-To: dombrows@lds.loral.com
Organization: LORAL Data Systems
References: <35lrij$h4k@hpchase.rose.hp.com>
Date: Tue, 20 Sep 1994 13:55:42 GMT
Lines: 89

In article h4k@hpchase.rose.hp.com, gregh@hprnd.rose.hp.com (Greg Holdren) writes:

> Overkill :)   You can use a 8748 with the timer input
> pin (T1). I built one and calibrated it to match my Heathkit unit.
> (The one with the teflon bearings.)
>
It may be overkill if all you want to do is measure instantaneous
wind speed.  My goal was to sample wind speed, 
direction, and air temperature and record min/max temps and peak
wind gust values.  The 68HC11 was a perfect single chip solution
for this ( especially since I can get them for $2 each.)  I doubt
you could keep track of all those parameters in a practical manner
with an 8748.  I also use the 68HC11's SCI port to connect to
a PC.  That way I'm able to suck that data out of the 68HC11
and pipe it into an Excel spreadsheet under Windows.
 
> 
> Did you figure out how to convert the directional portion into
> digital form?  I havn't got around to looking at this problem yet.
>

I came up with an interesting solution for this problem.  If you
have the same sensor I do, the wind direction indicator has
8 magnetic reed switches with a single magnet on the shaft.
Two adjacent switches can be simultaneously closed to provide
a resolution of 16 points.  If you set up a truth table you get:


	sw7 sw6 sw5 sw4 sw3 sw2 sw1 sw0   d3 d2 d1 d0
         1   0   0   0   0   0   0   0     0  0  0  0
         1   1   0   0   0   0   0   0     0  0  0  1
         0   1   0   0   0   0   0   0     0  0  1  0
         0   1   1   0   0   0   0   0     0  0  1  1
         0   0   1   0   0   0   0   0     0  1  0  0
         0   0   1   1   0   0   0   0     0  1  0  1
         0   0   0   1   0   0   0   0     0  1  1  0
         0   0   0   1   1   0   0   0     0  1  1  1
         0   0   0   0   1   0   0   0     1  0  0  0
         0   0   0   0   1   1   0   0     1  0  0  1
         0   0   0   0   0   1   0   0     1  0  1  0
         0   0   0   0   0   1   1   0     1  0  1  1
         0   0   0   0   0   0   1   0     1  1  0  0
         0   0   0   0   0   0   1   1     1  1  0  1
         0   0   0   0   0   0   0   1     1  1  1  0
         1   0   0   0   0   0   0   1     1  1  1  1

I first defined four boolean equations for d3, d2, d1, and
d0 in terms of sw0-sw7.  I then used K-maps to minimized
the equations.  The equations were not that simple when
minimized.  It wouldn't have been a problem if I had
access to a PLD programmer w/ programming software but
I didn't.  However, I did have a whole bunch of 2764
2K x 8 EPROMS and a EPROM programmer.  What I did was
use the EPROM as a fancy 16/4 encoder.  The switch
lines sw0-sw7 are fed to the 2764's address lines 0-7.
The remaining address lines are tied low.  The /OE
and /RD lines are held active so that the 2764 is
always driving its data outputs.

What you get is sw0-sw7 selecting addresses in the
EPROM.  At each location in the left side of the
truth table I programmed the 4-bit data value on the
right.  For example for the first row in the table
address 0x80 gets the value 0x0.  For the second row
address 0xC0 gets the value 0x1, etc.  These four
bit data values appear on D0-D3 of the 2764.

I then had 16 position values encoded on 4 digital 
data lines.  I wanted to feed these directly to 
inputs on the 68HC11 but the 5V signals were not
in very good shape after traveling through 75 feet
of sensor cable.  What I ended up doing is using
4 of the 68HC11 A/D inputs to evaluate the digital 
inputs.  I implemented hysteresis on the inputs
using software to clean up the noisy signals.  This
worked great and I have yet to see it glitch. 
     
 
> (I assume that you have the same Heath unit.)

I had the digital wind speed and direction unit.  I got it in
'79 and the readout unit went bezerk in '90 so I scrapped the
sensors.  Haven't got a catalog in a few years.  Do you know
if they even make any weather station kits anymore?

Brian



