Skip to content

NorthernWidget-Skunkworks/Project-Haar

master
Switch branches/tags
Code

Latest commit

 

Git stats

Files

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

DOI

Project-Haar

Mechanical, electrical, and firmware files for a rugged and submersible temperature, pressure, and relative-humidity sensor

Namesake and history

Haar in Ben Bhraggie Woods, Sutherland Haar in Ben Bhraggie Woods, Sutherland, Scotland. Photo by Andrew Tryon.

Project Haar takes its codename from the North Sea fogs that roll across Britain. Bobby Schulz designed it after the consistently-near-0C temperatures and 100% relative humidity of Chimborazo Volcano, Ecuador, claimed the lives of many brave but misguided BME-280 units, who then catistrophically bricked their I2C buses and those of their associated data loggers, thus taking down a large fraction of our hydromet network.

Determined to avoid future issues with persistently condensing humidity, we worked to design a unit that would survive in this environment, and indeed, withstand full submersion.

Technical specifications

Haar bare board

Electronic Hardware

  • Microcontroller (computer) core
  • Sensors
    • Relative humidity and temperature sensor: SHT35-DIS-F2.5KS with PTFE membrane for water and dust protection
      • Humidity
        • Range: 0--100%
        • Accuracy: ±1.5%
        • Resolution: 0.01%
        • Long-term drift: <0.25%/yr
      • Temperature
        • Range: -40--125 °C
        • Accuracy: ±0.2 °C
        • Resolution: 0.01 °C
        • Long-term drift: <0.01 °C/yr
    • Atmospheric pressure and temperature sensor: LPS35HW
      • Pressure
        • Range: 260 to 1260 mbar
        • Accuracy, calibrated: ±1 mbar
        • Accuracy, uncalibrated: ±4 mbar
        • Resolution: 1/4096 mbar (approx. 0.00024 mbar)
      • Temperature
        • Range, full accuracy: 0 to 60 °C
        • Accuracy: ±1.5 °C
        • Resolution: 0.01 °C
  • Connections and communications protocols
  • Power
    • Voltage limits: @bschulz1701?
    • Power consumption: @bschulz1701?
  • Indefinitely submersible with its Gore-Tex sealed housing
  • Entirely IP67 or greater rated components

Response time @bschulz1701? Let's look at your tests.

Electronic Software and Firmware

  • Programmable using the Arduino IDE https://www.arduino.cc/en/main/software
  • Firmware available in this repository. At the time of writing, "Haar_Firmware_Test" is the most up-to-date prototype firmware.
  • Software to use this sensor with Arduino-compatible devices
  • Open-source licensing via GNU GPL 3.0

Weatherproofing and enclosure

Haar: in housing

Assembly

Sensor circuit board

Assembling this sensor is possible by hand with sufficient skill and the following tools:

  • Temperature-controlled soldering iron
  • Hot-air rework station
  • Equipment for stenciling with solder paste
  • ESD-safe tweezers and workstation
  • Solder wick

Many components on this board are fine pitch and/or have difficult to access pads. However, there are not very many components. We would suggest hand assembly using tweezers, stenciled solder paste, and a hot-air rework station. A soldering iron will be helpful -- if not outright essential -- for attaching the "Hard Mount" plug and (if desired) the 2x3 pin ICSP header to upload the firmware.

THOUGHT: I have basic instructions for assembly on the Project Walrus README; I will not reproduce these here just yet, as we might want to set up a separate assembly guide, mostly with good links to existing resources, since our writing something of this nature would be to reinvent the wheel.

After finishing the main board assembly, solder the HardMount plug onto the four SMD pads with the notch (for plug orientation) at the bottom side of the board.

Housing and cabling

Haar: exploded view

Parts required

Soldering the HardMount attachment to your board

If it is not already attached, you will need to solder the 4-pin HardMount plug onto the four SMD pads at the end of the board far from the isolated humidity sensor. You should do so with the notch (for plug orientation) at the bottom side of the board.

Our recommendation for by-hand assembly:

  • Add small pillows of solder to each of the four pads, enough to create contact with the HardMount solder cups but not so much that it is not possible to slide the HardMount plug over them.
  • Slide the HardMount plug on; it will take a bit of finesse to keep it from being pushed off of the solder pillows.
  • Using some Blu Tack (or equivalent), fix the board and HardMount plug in place
  • Double-check that the notch in the HardMount plug is on the back side of the board
  • Solder on the first connection
  • Check whether the board is straight; reflow the solder as needed until the connection is secure
  • Solder the second connection
  • Flip the board, ensuring that it is straight (if not, make changes)
  • Solder the other two solder-cup connections

Tapping the housing

3D-printed housing barrel tap dimensions:

  • Cable side: M16 x 1.5
  • Vent side: M12 x 1.5

Cable

Here we assume that you are using [standard Alpha Wire cables with waterproof attachments](Alpha Wire 5004C. Because of the wire insulation colors available for these cables and the locations of their attachment points to the 4-pin "HardMount" plug (3D model), our HardMount devices do NOT match standard wire-color definitions (or any kind of standard). Wire-color definitions are:

Color Connection
Brown V+ (3.3-5.5 V)
White GND
Black SDA
Blue SCL

@bschulz1701: is the voltage range correct?

For reference, these are the definitions of the four pads to which the HardMount connector attaches:

  • Top left: SDA
  • Top right: SCL
  • Bottom left: VCC (3.3V to 5.5V)
  • Bottom right: GND

Firmware

Downloading and installing the Arduino IDE

Go to https://www.arduino.cc/en/main/software. Choose the proper IDE version for your computer. For Windows, we suggest the non-app version to have more control over Arduino; this might change in the future. You will have to add custom libraries, so the web version will not work (at least, as of the time of writing). Download and install the Arduino IDE. Open it to begin the next steps.

AVR ISP

To install firmware on the Haar board, you use the 2x3-pin 6-pin ICSP (also called ISP) header with a special device called an "in-circuit system programmer" (or just "in-system programmer; yup, that's what the acronym stands for).

Many devices exist to upload firmware, including:

IMPORTANT: The Haar has a half-sized (0.05" pitch) ICSP header. Therefore, you will need to have the appropriate 2x3-pin header to form a connection.

Note: Be sure to download and/or update drivers for your ISP.

Uploading the firmware

Using this ISP, upload (as of the time of writing): the Arduino sketch in this folder. To do so, follow these steps:

  1. Open the Arduino IDE.
  2. Follow these instructions to install the ATTinyCore board definitions
  3. Select ATTiny1634 (No bootloader)
  4. Plug your ISP of choice into your computer (via a USB cable) and onto the 6-pin header. There are two ways to place it on; the header is aligned such that the ribbon cable should be facing away from the board while programming. If this fails without being able to upload, try flipping the header around. This should both power the board and provide communications.
  5. Go to Tools --> Programmer and select the appropriate programmer based on what you are using.
  6. Go to Tools --> Burn Bootloader. Yes, we know that you just selected "ATTiny1634 (No bootloader)", but this step sets the fuses, which configure their internal oscillator and brown-out detection.
  7. Go to Sketch --> Upload Using Programmer. After several seconds, you learn whether you succeeded or failed. Hopefully it worked!

Upload using programmer

Uploading using the in-system programmer.

Important note for Linux users: You must supply permissions to the Arduino IDE for it to be able to use the ICSP, or you will have to run it using sudo. The former option is better; the latter is easier in the moment.

Writing a program to connect to the Haar sensor

Once the is bootloaded and connected with a LiDAR Lite sensor, you should be able to use any standard Arduino device to connect to it and read its data.

Very simple Arduino code

This code is intended for any generic Arduino system.

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

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

// Instantiate class
Haar myTPRH;

void setup(){
    // Begin Serial connection to computer at 38400 baud
    Serial.begin(38400);
    // Obtain the header just once
    header = myTPRH.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
    myTPRH.updateMeasurements();
    data = myTPRH.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 libraries
#include "Margay.h"
#include "Haar.h"

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

// Instantiate classes
Haar myTPRH;
Margay Logger; // Margay v2.2; UPDATE CODE TO INDICATE THIS

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

// I2CVals for Haar
uint8_t I2CVals[] = {0x42}; // DEFAULT

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

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

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

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

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

Northern Widget Okapi code

Currently nearly identical to Margay code, by design. Add telemetry with Particle Boron.

// Include the libraries
#include "Okapi.h"
#include "Haar.h"

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

// Instantiate classes
Haar myTPRH;
Okapi Logger;

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

// I2CVals for Haar
uint8_t I2CVals[] = {0x42}; // DEFAULT

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

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

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

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

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

Characterization

Response time

Lab fridge test

Response-time testing. Our initial tests demonstrate that, with the vent detached, the Haar exhibits sensitivity and response time similar to the T9602 temperature and relative humidity sensor. With the vent cap on, this response is dampened significantly.

@bschulz1701: Application note about when to use the cap? Notes about the IP ratings of the devices and practical ratings as well? And I've been looking for a M12 vent without any membrane so it can still physically protect the sensor (or act as a roof for rain) but have not yet found one. Thoughts on this? @awickert: The cap would desire to be used when there is the potential for the device to become fully submerged and slow response time is not a problem (for getting system averages instead of response time or quick variance). All elements of the device (uncapped) are rated to >IP67, however, the conformal coating of the board is not specifically rated for any pressure. It would likely survive breif immersion but not for extended periods of time. As for the a cap with no membrane: since be 3D print the body, we would just design a body with a "roof" instead of a thread at the top, and holes or slots in the side, whichever we desire. Then instead of replacing the end cap, you just replace the entire body (which just screws on to the bottom). This would actually make it a bit easier to make, since it would be one less thread that would need to be made by hand.

Acknowledgments

Support for this project provided by:

UMN ESCI



NSF

WMO



Creative Commons License
This work is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License.

About

A highly rugged temperature-pressure-humidity sensor

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages