Skip to content

NorthernWidget/T9602_Library

master
Switch branches/tags
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
src
 
 
 
 
 
 
 
 
 
 

DOI

T9602_Library

Arduino library interface for the Telaire T9602 humidity and temperature sensor

T9602 from Telaire

T9602 sensor. Image from Amphenol/Telaire (see link above).

Library

Library reference documentation generated by doxygen and moxygen.

  • Class description
  • Function descriptions

Key sensor features

  • IP67 rated
  • -20 to 70 °C operating range
  • Accuracy
    • ±2% RH, 0-95% RH
    • ±0.5°C
  • 14 bit resolution

Data sheet for the full T9602 series.

Application guide for the ChipCap® 2 Humidity and Temperature Sensor (core unit within the T9602). Importantly, this includes a guide to the I2C bus. This library operates only using the default I2C address (0x28), so you will need to consult this and this library (and make a pull request, please!) if you want to allow for different addresses to be set/used.

Sensor options

Our two most commonly used sensors are:

5V versions, as well as those with other communications protocols, are available as well.

Wiring

WARNING: LAYOUT DIFFERS FROM OUR STANDARD CONVENTIONS

Color Connection
Red V+
Green GND
White SDA
Black SCL

We typically snip off the connector at and wire the sensor directly into the screw terminals of our data logger (Resnik or Margay) or into our Heptapod I2C expander. You may instead choose to find a mating plug; the wires feel a bit delicate, but in our experience hold up better than expected.

T9602 Digi-Key image with connector

T9602 and connector. Image from Digi-Key (see links above).

Writing a program to connect to the T9602

You should be able to use any standard Arduino device to connect to the T9602 and read its data.

This code is untested. If you do test it, please confirm that it works and/or create a PR and/or an issue for it to be fixed.

Very simple Arduino code

This code is intended for any generic Arduino system. It is not proven.

// Include the T9602 library
#include "T9602.h"

// Declare variables -- just as strings
String header;
String data;

// Instantiate class
T9602 mySensor;

void setup(){
    // Begin Serial connection to computer at 38400 baud
    Serial.begin(38400);
    // Obtain the header just once
    header = mySensor.getHeader();
    // Print the header to the serial monitor
    Serial.println(header);
}

void loop(){
    // Take one reading every (10 + time to take reading) seconds
    // and print it to the screen
    mySensor.updateMeasurements();
    data = mySensor.getString();
    Serial.println(data);
    delay(10000); // Wait 10 seconds before the next reading, inefficiently
}

Northern Widget Margay code

The Margay data logger is the lightweight and low-power open-source data-logging option from Northern Widget. It saves data to a local SD card and includes on-board status measurements and a low-drift real-time clock. We have written a library to interface with the Margay, which can in turn be used to link the Margay with sensors.

// Include the T9602 library
#include "Margay.h"
#include "T9602.h"

// Declare variables -- just as strings
String header;
String data;

// Instantiate classes
T9602 mySensor;
Margay Logger(Model_2v0, Build_B); // Margay v2.2; UPDATE CODE TO INDICATE THIS

// Empty header to start; will include sensor labels and information
String Header = "";

// I2C address for T9602
uint8_t I2CVals[] = {0x28};

//Number of seconds between readings
uint32_t updateRate = 60;

void setup(){
    Header = Header + mySensor.getHeader();
    Logger.begin(I2CVals, sizeof(I2CVals), Header);
    initialize();
}

void loop(){
    initialize();
    Logger.Run(update, updateRate);
}

String update() {
    initialize();
    return mySensor.getString();
}

void initialize(){
    mySensor.begin();
}

Acknowledgments

Support for this project provided by:

UMN ESCI

NSF

About

Arduino library interface for the Telaire T9602 humidity and temperature sensor

Resources

License

Stars

Watchers

Forks

Packages

No packages published