Skip to content

A Matlab class for communicating with the Davis Vantage Pro2 (cabled)

Notifications You must be signed in to change notification settings

Math1a/DavisWeather

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 

Repository files navigation

DavisWeather

A Matlab class for communicating with the Davis Vantage Pro2 (cabled)

The class uses the serial port (USB) to communicate with the weather station, it can read indoor as well as outdoor sensors.

The calculations and serial protocols are as mentioned in This Datasheet

To set up the console, see Console Manual

How do I connect the weather station?

  • If the weather station is connected to the EnviroMonitor Gateway (separate big white solar panel box), disconnect it. Connect the outside sensors to the console. The EnviroMonitor is unnecessary.
  • The console requires 2 USB connections; one for data transmission, and the other for power.
  • To initiate the connection, use:
W = inst.DavisWeather
  • This will automatically call the "connect" function, that searches the serial ports and tries to find the weather station.
  • Make sure no other serial ports are open or being used by Matlab, as they may interfere and cause errors.
  • The weather data is stored in the class properties. They will update each time the class is called ('W') no more than once a minute, and they will display all the relevant data.
  • To force an update, use:
W.getData

What weather data does the class display?

 InsideTemperature   % Temperature of the console in C
 InsideHumidity      % Humidity of the console in %
 Barometer           % Barometric pressure in Bar
 OutsideTemperature  % Outside temperature in C
 OutsideHumidity     % Outside humidity in %
 WindSpeed           % Current wind speed in km/h
 WindDirection       % Wind direction in angles, 360 is north
 Rain                % Rain rate in mm
 SolarRadiation      % Solar radiation in watt per meter squared
  • Note that this is only a portion of all the data that the weather station gives, and more data could be implemented if needed.

Data logging

Start data logging:

W.logData
  • This function will read the weather station sensor data every W.Period seconds, and write it to a .csv table in W.Datapath

This class is still incomplete. Known issues:

  • CRC not implemented (Altough the console checks for it)
  • The outdoor humidity and temperature sensors do not agree with the indoor ones! Sensors should be calibrated

About

A Matlab class for communicating with the Davis Vantage Pro2 (cabled)

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published