CHEERSNetworkClimate & health

Home / Resources / Weather station

CHEERS technical resources · WindChaser

wind_bearer_software.sensor_func package

WindChaser technical documentation: wind_bearer_software.sensor_func package. Original instructions, component references and source limitations.

Original documentation: Min Tai Yap and Julian Walker · © 2025. Migrated to CHEERS on 3 December 2026. This is working documentation; unresolved source gaps remain visible.

Technical manual
On this page

Implements interfaces to read from all the sensors.

Submodules

wind_bearer_software.sensor_func.ads1115_voltage_V2 module

Contains a helper method to read from the battery voltage sensor. As we currently cannot read the battery voltage directly, we attach a voltage sensor to an ADS1115 converter and measure the voltage input to the raspi. This converter acts as a 5:1 voltage divider, so the battery voltage will differ by a factor of 5 from the measured voltage. For more information, refer to :ref: https://robu.in/wp-content/uploads/2017/05/datasheet1.pdf Note that this module is still experimental and we do not guarantee consistent and precise measurements.

Authors:

Min Tai Yap

async wind_bearer_software.sensor_func.ads1115_voltage_V2.bat_volts(i2c)[source]

Initializes an ADS1115 ADC driver and reads the battery voltage measurements. The scaling factor 5 is already applied to the output.

Parameters:

i2c – A busio.I2C object for the communication on the I2C bus

Returns:

The measured battery voltage in V upon successful reading, otherwise -1

wind_bearer_software.sensor_func.as5600 module

Contains a helper function for reading data from the AS5600 sensor.

Authors: Min Tai Yap

async wind_bearer_software.sensor_func.as5600.as5600_read(bus)[source]

Reads the raw wind direction angle from the AS5600 sensor. By default, the IC2 address of the AS5600 sensor in use is 0x36.

Parameters:

bus – An smbus2.SMBus object to communicate on the I2C bus

Returns:

The raw wind direction read from the AS5600 sensor upon successful reading, otherwise -1

wind_bearer_software.sensor_func.bmp388 module

Contains some helper functions to initialize and communicate with the BMP390 sensor, which shares the same code base as the BMP388 sensor.

Authors:

Min Tai Yap

async wind_bearer_software.sensor_func.bmp388.bmp388_init(i2c, bmp_slp)[source]

Initializes the BMP390 sensor on a given I2C bus. Tries both possible I2C addresses, which are 0x76 and 0x77. The driver object for the BMP390 sensor is initialized with pressure_oversampling set to 8 and temperature_oversampling set to 2. Also, the sea level pressure of the driver object is initialized to the bmp_slp value specified in parameter/parameters.txt.

Parameters:
  • i2c – A busio.I2C object for the communication on the I2C bus

  • bmp_slp – The sea level pressure in hPa in the deployment region

Returns:

adafruit_bmp3xx.BMP3XX_I2C driver object for the I2C bus-connected BMP390 sensor

async wind_bearer_software.sensor_func.bmp388.bmp388_read(bmp)[source]

Reads temperature, pressure, and altitude from an initialized BMP390 sensor.

Parameters:

bmp – adafruit_bmp3xx.BMP3XX_I2C driver object for the I2C bus-connected BMP390 sensor

Returns:

A tuple containing the temperature in °C, the pressure in hPa, and the altitude in m upon successful reading, otherwise -1 repeated three times

wind_bearer_software.sensor_func.rain_gauge module

Contains a helper function to measure the rainfall per minute using the rain gauge. We use the measurements ml for the volume of water that is caught in one bucket of the rain gauge before it tips, and mm for the depth of water that accumulates on a flat surface after all evaportation, percolation, and runoff have been accounted for. 1mm of rainfall is equivalent to pouring one liter of water over one square meter.

For further information about rainfall measurement, refer to :ref: https://www.niubol.com/Product-knowledge/Understanding-rainfall-measurement.html#:~:text=The%20rain%20gauge’s%20working%20principle,electrical%20circuit%20to%20the%20recorder.

Authors:

Min Tai Yap <Min.Yap2@monash.edu>

wind_bearer_software.sensor_func.rain_gauge.rain_detect(rain_count, hall_effect_sensor1_pin, rain_scoop, funnel_area)[source]

Detects a bucket tip of the rain gauge, which corresponds to a tip in the voltage of the Hall effect sensor. Everytime a bucket tip is detected, the number of bucket tips up until execution is updated by one. The rainfall measured in ml collected in the rain gauge and mm up until execution are calculated based on this number of bucket tips.

Parameters:
  • rain_count – Number of bucket tips recorded until execution

  • hall_effect_sensor1_pin – Pin of the hall effect sensor installed in the rain gauge

  • rain_scoop – ml of water needed to tip a bucket in the rain gauge

  • funnel_area – Area of the funnel mm^2

Returns:

A tuple containing the current number of recorded bucket tips, as well as the currently measured uncalibrated rain in mm and ml/m^2

wind_bearer_software.sensor_func.sht45 module

Contains some helper functions to initialize and communicate with SHT45 sensor, which measures the heat and the humidity.

Authos:

Min Tai Yap

async wind_bearer_software.sensor_func.sht45.init_sht45(i2c)[source]

Initializes the SHT45 sensor with heating disabled and high precision enabled.

Parameters:

i2c – A busio.I2C object for the communication on the I2C bus

Returns:

An adafruit_sht4x.SHT4x driver object for the SHT45 sensor upon successful initialization, otherwise None

async wind_bearer_software.sensor_func.sht45.sht45_read(sht)[source]

Reads temperature and humidity from the SHT45 sensor. For more consistent data collection, a waiting time of 0.1 seconds is incurred before reading.

Parameters:

sht – An adafruit_sht4x.SHT4x driver object

Returns:

The temperature reading in °C and the humidity in % upon successful reading, otherwise -1 repeated twice

wind_bearer_software.sensor_func.sht45_heater module

Initiates the heating loop for the SHT45 sensor if the measured humidity is above 98% for more than ten minutes after the last heating loop or boot. This is done to prevent the accumulation of condensed water on the sensor.

Authors:

Min Tai Yap

async wind_bearer_software.sensor_func.sht45_heater.sht45_heat_nb(i2c, interval)[source]

Initializes the SHT45 sensor driver and initiates the heating loop for one minute.

Parameters:
  • i2c – A busio.I2C object for the communication on the I2C bus

  • interval – Number of times the 1s-heating mode of SHT45 sensor is activated

Returns:

None upon successful heating, a tuple of -1s when no sensor could be found

wind_bearer_software.sensor_func.sunlight_detect module

Module to read the measurements from the sunlight sensor. The largest part of this module is based on :ref: 0hotpotman0/Seeed_Si115x . Please refer to the authors for further information.

Authors:

Min Tai Yap

async wind_bearer_software.sensor_func.sunlight_detect.sunlight_read()[source]

Reads the illuminance measurement from the SI1151 sensor in lux.

Returns:

A tuple containing the illuminance measurement from the visible spectrum, from the UV spectrum, and from the IR spectrum upon successful reading, otherwise a tuple containing -1 three times

wind_bearer_software.sensor_func.wind_speed module

Contains a helper function to measure the wind speed.

Authors:

Min Tai Yap <Min.Yap2@monash.edu>

wind_bearer_software.sensor_func.wind_speed.measure_wind_speed(cal_count, hall_effect_sensor2_pin)[source]

Catches peaks in the voltage of the Hall effect sensor, which corresponds to half a rotation of the anemometer. Whenever a peak is detected, the number of counted half rotations is increased by 1.

Parameters:
  • cal_count – Old number of half rotations

  • hall_effect_sensor2_pin – Pin of the hall effect sensor that measures the wind

Returns:

Updated number of half rotations