Record the lab’s temperature, humidity and pressure with every measurement
Let’s do this the right way. A measurement without its conditions is half a result, so BenchMesh puts the room into every recording: plug a sensor board into a USB-I2C adapter and its readings land on the same second as your power supplies, meters and scopes.
| Time | DC voltageHP 34401A · V | TemperatureBME280 0x76 · °C | HumidityBME280 0x76 · %RH | PressureBME280 0x76 · hPa |
|---|---|---|---|---|
| 13:00:00 | 10.00012 | 22.8 | 44 | 1013.4 |
| 13:30:00 | 10.00013 | 23.1 | 43 | 1013.3 |
| 14:00:00 | 10.00014 | 23.6 | 42 | 1013.1 |
| 14:30:00 | 10.00015 | 24.3 | 40 | 1012.9 |
| 15:00:00 | 10.00016 | 24.9 | 39 | 1012.8 |
| 15:30:00 | 10.00017 | 25.2 | 38 | 1012.6 |
| 16:00:00 | 10.00016 | 25.0 | 38 | 1012.6 |
Why the conditions belong in the recording
Drift you can explain
Voltage references, shunts, crystals and meters all move with temperature. With the room in the same recording, a slow change is either the device or the afternoon sun, and you can see which.
Specs hold in a temperature band
Instrument accuracy is usually specified around 23 °C, within a few degrees. A recording that carries the temperature shows whether the instrument was inside its band for the whole run.
Humidity changes high-impedance results
Leakage, insulation resistance, capacitor values and anything with a high-value resistor shift with humidity. Record it and the outlier at 70 %RH stops being a mystery.
Characteristics you can reproduce
When you take down a characteristic - a tempco, a regulation curve, an efficiency map - the conditions are part of the result. Calibration labs record them anyway; ISO/IEC 17025 asks for it where they influence the results.
How it records
- While a sensor reports, every running or paused recording gets one series per reading, sampled by the same whole-second sampler as the instruments.
- The series cannot be removed from a recording: no result leaves the lab without its conditions. They are on the chart and in the CSV export like any other series.
- Every chip is its own series, named after it and its I2C address, e.g. “Temperature (SHT4x 0x44)”. The title bar shows each quantity from the most accurate chip that measures it.
- A reading older than 5 s is never shown or recorded: an unplugged adapter leaves a gap, never a stale value. The adapter is opened again every 2 s until it answers.
- The sensors are read every second; the bus is scanned again every 30 s for boards connected later.
In your units
- Temperature
- °C, °F, K
- Humidity
- relative humidity (%RH), dew point (in the temperature unit), absolute humidity (g/m³)
- Pressure
- hPa, mbar, kPa, Pa, bar, atm, mmHg, inHg, psi
The sensors measure °C, %RH and hPa; BenchMesh converts, so the title bar, the API and the recordings agree. Changing a unit ends the series and starts a new one.
Set up in three steps
Wire the boards
Connect one sensor board or several to the SDA, SCL, VCC and GND of a CH341A USB-I2C adapter (USB 1a86:5512) and plug it into the bench computer.
Pick the sensor
In Instruments - Sensors - Environmental sensors choose BenchMesh Sensors I2C. The bus is scanned and every supported chip is found; a board added later is found within 30 s.
Choose your units
Pick the units for temperature, humidity and pressure. The readings appear in the title bar and go into every recording from now on.
Windows reaches the adapter through Microsoft’s generic WinUSB driver: the Sensors tab installs it with one button. On Linux the tab shows the udev command that gives your user access. macOS needs nothing.
Supported sensors
50 sensor chips, in any mix on one bus. Each chip is identified by what it answers - an ID register, a CRC-checked reply, a valid calibration PROM - never by its address alone, so an unknown device at a shared address is left alone.
| Maker | Chips | Measures | I2C address |
|---|---|---|---|
| Bosch | BME280 | temperature, humidity, pressure | 0x76, 0x77 |
| Bosch | BME680, BME688 | temperature, humidity, pressure | 0x76, 0x77 |
| Bosch | BMP280 | temperature, pressure | 0x76, 0x77 |
| Bosch | BMP388, BMP390 | temperature, pressure | 0x76, 0x77 |
| Bosch | BMP580, BMP581, BMP585 | temperature, pressure | 0x46, 0x47 |
| Bosch | BMP180, BMP085 | temperature, pressure | 0x77 |
| Sensirion | SHT40, SHT41, SHT43, SHT45 | temperature, humidity | 0x44, 0x45, 0x46 |
| Sensirion | SHT30, SHT31, SHT35, SHT85 | temperature, humidity | 0x44, 0x45 |
| Sensirion | SHTC3 | temperature, humidity | 0x70 |
| Sensirion / TE | SHT20, SHT21, SHT25, HTU21D | temperature, humidity | 0x40 |
| Infineon | DPS310, DPS368 | temperature, pressure | 0x76, 0x77 |
| TE | MS5611, MS5607 | temperature, pressure | 0x76, 0x77 |
| ST | LPS22HB, LPS22HH, LPS22DF | temperature, pressure | 0x5C, 0x5D |
| ST | LPS25HB, LPS25H | temperature, pressure | 0x5C, 0x5D |
| ST | HTS221 | temperature, humidity | 0x5F |
| TI | HDC1080 | temperature, humidity | 0x40 |
| TI | HDC2080, HDC2010 | temperature, humidity | 0x40, 0x41 |
| TI | TMP116, TMP117, TMP119 | temperature | 0x48 - 0x4B |
| Silicon Labs | Si7006, Si7013, Si7020, Si7021 | temperature, humidity | 0x40 |
| Aosong | AHT10, AHT20, AHT21, AHT25, DHT20 | temperature, humidity | 0x38 |
| Microchip | MCP9808 | temperature | 0x18 - 0x1F |
T temperature · H humidity · P pressure. A BME280 gives all three from one board; an SHT41 next to a BMP390 is a more accurate pair.
Questions
- Which sensors can I use?
- Breakout boards with any of 50 sensor chips from Bosch, Sensirion, Infineon, TE, ST, TI, Silicon Labs, Aosong and Microchip - BME280, SHT4x, BMP390, DPS310, HDC2080, TMP117 and more - on a CH341A USB-I2C adapter. Each chip is identified by what it answers, never by its address alone.
- Can I connect several sensors?
- Yes. Put several boards on the same bus, for example an SHT41 for humidity next to a BMP390 for pressure. Every chip gets its own series in a recording, named with its I2C address; the title bar shows each quantity from the most accurate chip that measures it.
- Do I need a driver?
- On Windows the adapter uses Microsoft’s generic WinUSB driver: BenchMesh installs it with one button (Windows asks for administrator approval once). On Linux the app shows the one udev command that gives your user access. macOS needs nothing.
- Can I record without the environment?
- No, and that is the point: while a sensor reports, every running or paused recording gets its readings and the series cannot be removed. Choose None as the sensor to record the instruments alone.
- What if the sensor is unplugged during a recording?
- Its series get a gap - a reading older than 5 s is never recorded - and the adapter is opened again every 2 s until it answers. When you change a unit, the series ends and a new one starts in the new unit.
- Is it in the open-source build?
- Environmental sensors come with the BenchMesh download. The open-source server has the hooks (recordings, the title-bar readout, GET /environment) but no sensor of its own.