General Information
...
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:
And zoomed in to ~half a second of data taking:
Code for taking data
Note: this will take data for 10 minutes.
Code Block | ||
---|---|---|
| ||
# -*- 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 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:
...