Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 30 Current »

General Information

Instrument: 3 Axis Ultrasonic Anemometer 1590-PK-020/w with 4 14-bit analog outputs

Manual: WindMaster

Current Device Status (12/2/2021)

Analog output settings are configured to read out U, V, W, and sonic temperature at 32 Hz with an output range of 0-5 V. For U, V, W, this range has been set to correspond to -5 to +5 m/s and for temperature this range corresponds to -40 to 70 degrees C.

Analog outputs are then connected to the T7:
U - channel 1 - AIN0
V - channel 2 - AIN1
W - channel 3 - AIN2
sonic speed - channel 4 - AIN3

Sample Dataset taken over 10 min:

image.png

And zoomed in to ~half a second of data taking:

image.png

Code for taking data

Note: this will take data for 10 minutes. It also takes data at a rate of 1 kHz, which is unecessary, as the anemometer takes data at 32 Hz.

# -*- coding: utf-8 -*-
"""
Created on Fri Oct 15 13:55:10 2021
@author: brodi, elanaku
"""
# saves anemometer data
from datetime import datetime, timedelta
import pandas as pd
from labjack import ljm
from sqlalchemy import create_engine
import time

DEVICE = None
PIN_VX = "AIN0"
PIN_VY = "AIN1"
PIN_VZ = "AIN2"
PIN_VSONIC = "AIN3"

sample_time = .001


db_fi = 'sqlite:///anemometer.db'

start = datetime.now()
end = start + timedelta(seconds=60*10)

def readout(PIN_VX, PIN_VY, PIN_VZ, PIN_VSONIC):
    vx = ljm.eReadName(handle, PIN_VX)
    vy = ljm.eReadName(handle, PIN_VY)
    vz = ljm.eReadName(handle, PIN_VZ)
    vsonic = ljm.eReadName(handle, PIN_VSONIC)
    return (datetime.now(), vx, vy, vz, vsonic)

try:
    handle = ljm.openS("Any","Any","Any")
    engine = create_engine(db_fi, echo = False)
    sqlite_connection = engine.connect()
    options = {"index": False, "if_exists": "append"}



    while datetime.now() < end:
        it = 200
        i = 0
        res = []
        while i < it:
            res.append(readout(PIN_VX, PIN_VY, PIN_VZ, PIN_VSONIC))
            time.sleep(sample_time)
            i += 1

        anem = pd.DataFrame(res, columns = ["t", "vx", "vy", "vz", "vsonic"])

        anem.to_sql("anemometer", sqlite_connection, **options)



finally:
    ljm.close(handle)
    sqlite_connection.close()

Relevant code for analyzing binary datafile

# -*- coding: utf-8 -*-
"""
Created on Tue Nov 30 02:11:06 2021
​
@author: brodi
"""
​
import pandas as pd
from sqlalchemy import create_engine
​
def load_pd(db_fi: str, table: str) -> pd.DataFrame:
    """
    loads pandas df from db given table name
    """
    engine = create_engine(db_fi, echo = False)
    with engine.connect() as sqlite_connection:
        df = pd.read_sql(table, sqlite_connection)
        
    return df


If database file is named anemometer, for instance, you can load it into a dataframe and then convert the relevant voltage measurements into wind speed and temperature with:

# Load datafile into pandas data frame
db_fi = r"sqlite:///anemometer.db"
df = load_pd(df_fi, "anem")

# Add columns in correct units
# because the units are +/- 5 m/s, 0 to 5 V
df['vx_ms'] = (df.vx - 2.5) * 2
df['vy_ms'] = (df.vy - 2.5) * 2
df['vz_ms'] = (df.vz - 2.5) * 2

# because sonic temperature is measured on a scale of 0 to 5 V
# from -40 to 70 C
df['tsonic'] = -40 + df.vsonic/5 * 110

#Plot data
plt.plot(df.t, df.vx_ms, label = 'Vx')
plt.plot(df.t, df.vy_ms, label = 'Vy')
plt.plot(df.t, df.vz_ms, label = 'Vz')
# plt.plot(df.t, df.tsonic/8 - np.mean(df.tsonic/8), label = 'Temp')

plt.legend()
plt.xlabel('Time')
plt.ylabel('Wind Speed (m/s)')
plt.show()

plt.plot(df.t, df.tsonic)
plt.xlabel('Time')
plt.ylabel(r'Sonic Temperature ($^o$C)')
plt.show()

Which gives the first plots in the previous section.

Relevant pin connections (all of which are copied from the manual)

Output pins from the anemometer (p. 15 of manual):


To change the analog output settings, connect a RS 432 serial port to a windows computer and to the anemometer outputs. 

RS 432 serial port pin connections (p.32 of manual):

For the serial connector we were using, pin 2 was white, pin 3 was yellow, pin 5 was orange, but apparently this isn't necessarily generically true.

The windows computer should have WIND software downloaded on it. Follow p. 46 of the manual.


Mounting plate



through bolts are McMaster Carr 


Super-cheap hot-wire anemometer for airflow in the dome: 

https://moderndevice.com/product/wind-sensor/ 

Ordered 10 of these. Be sure to use the RV output pin! Requires 5V supply, clean. 

Downside is that the output voltage is a combination of temperature and wind speed. But a separate temperature output is provided, so we should be able to calibrate. dV/d(speed) is also depends on temperature. 

Dimensions 0.68 × 1.59 × .125 in

Link to Github example code for temperature compensation: https://github.com/moderndevice/Wind_Sensor/blob/master/WindSensor/WindSensor.ino 

We just need to calibrate this with a 2-d fit of RV output as a function of both windspeed and temperature. Not a big deal. 

This can be mounted into an 18mm ID carbon tube, 20mm OD. Ordered that from Amazon, Jan 15 2022. 

Clamps to hold this essentially 3/4" OD tubing: https://www.amazon.com/LAMPHUS-Off-Road-Vertical-Mounting-Aluminum/dp/B07FT2KVNL/ref=sr_1_3?crid=1NO43HYA9LQWW&keywords=3%2F4%22+clamp+mount+bracket+bull+bar&qid=1642262996&sprefix=3%2F4+clamp+mount+bracket+bull+bar%2Caps%2C86&sr=8-3&qty=10 

also ordered Jan 15, 2022 from Amazon. 

We can use an array of these in the dome to measure scalar wind speed field. Need to calibrate signal vs. theta, phi for these sensors, but we should pretty much know the direction of the prevailing wind- through the slit and out the vents. 

Ordered 100 feet of 4-pair cable from Digikey- 2467CSL005-ND‎ 

Initial tests, 3/18/2022

Wired up one of these units, using 90-degree 0.1 inch header. Used four-pair shielded twisted pair cable: 

Red: +5V
Black: Ground (all pair ground tied together on sensor end, leave output low side cables floating at our end of cable)
red/white: RW out
yellow/white: Temp out
white: "output" but we will most likely use RW above. 

full scale is ostensibly 60 mph which is ~28 m/sec 

But response is highly nonlinear and also depends on temperature so we need a temp-and-windspeed calibration surface to be mapped out. 

Better version, same width of board and same pinout- 3/19/22

Their version P device is now in stock. Ordered ten of them. 

https://moderndevice.com/product/wind-sensor-rev-p/

Has hardware compensation for temperature, at least to first order. Also claims more isotropic response. 

But note needs 12V supply, not 5V like the rev C

Temperature sensor goes down to -10C.

Pinout

We really only need to connect to 4 pins: Vcc=+12V, gnd, buffered temperature output, and Out. Leave shutdown pin floating, if it goes high then the onboard regulator is turned off. 

Temperature sensor is MCP9701 (spec sheet: 20001942G.pdf).  temperature output is V=0.4V + T(C) * 19.6 mV, so T= (V-0.4)/19.6E-3. 

  T(C).      V_temp output

-10.0000    0.2040
   -9.0000    0.2236
   -8.0000    0.2432
   -7.0000    0.2628
   -6.0000    0.2824
   -5.0000    0.3020
   -4.0000    0.3216
   -3.0000    0.3412
   -2.0000    0.3608
   -1.0000    0.3804
         0    0.4000
    1.0000    0.4196
    2.0000    0.4392
    3.0000    0.4588
    4.0000    0.4784
    5.0000    0.4980
    6.0000    0.5176
    7.0000    0.5372
    8.0000    0.5568
    9.0000    0.5764
   10.0000    0.5960
   11.0000    0.6156
   12.0000    0.6352
   13.0000    0.6548
   14.0000    0.6744
   15.0000    0.6940
   16.0000    0.7136
   17.0000    0.7332
   18.0000    0.7528
   19.0000    0.7724
   20.0000    0.7920
   21.0000    0.8116
   22.0000    0.8312
   23.0000    0.8508
   24.0000    0.8704
   25.0000    0.8900


Cabling 

We can use DB9 hardware off the shelf. To connect unit to DB9 connector:

Ribbon cable length is 1 foot. So we'll need to cut down the carbon fiber tubes. 

DB-9 dimensions:

So we need to make a mechanical part to mount this on tail end of carbon stalk. 



So sensor end is DB9 pins. If we use straight-through M to F DB9 cable (no swap of pins 2 and 3) then readout end is also DB9 pins. So we need DB9 female on far end.

Easiest to just solder 4 wires into a panel mount DB9 connector.  

 

Clamps for mounting 20mm OD tubing


Assembly: 

  1. cut carbon tube to 10 inch length
  2. attach DB-9 connector to flange with two 4-40 screws. Use standoffs if it doesn't clear ID.
  3. feed ribbon cable through tube, and plug other end into sensor
  4. test electrical connections and functionality
  5. glue in both the connector flange and the sensor using 5 minute epoxy
  6. add mount clamp at midpoint


Mothership readout box

We need two channels of A/D conversion for each unit. Conservatively, each sensor consumes 60mA at 12V. Assume we deploying ten of them. That means we need a 1A, 12V power supply. There is on-board voltage regulation on the sensor so this doesn't need to be super-well regulated. 

Box needs a power supply for the sensors as well as A/D converter function and a data collection computer. Labjack U3-LV has 16 single-ended inputs, enough for 8 devices with both wind and temperature. We should run it off a dedicated computer, NUC or R-Pi. 

Scintillation coherence scale for acoustics

March 2, 2022

As with optical case, the Fresnel length scale for scintillation fringes is sqrt(lambda*L) = sqrt(L*c/f). For ultrasound with f=40,000 Hz, FL ~ 0.1 m * sqrt(L). 


References

Re-Visiting Acoustic Sounding to Advance the Measurement of Optic.pdf





  • No labels