A Two-Dollar Part That Decides Whether Anyone Trusts Your Data

Temperature and humidity sensing looks like the easy part of a product. Pick a part with a good datasheet, wire up I2C, read a register. Then the first field units come back reading three degrees high, the humidity reading drifts after a month in a greenhouse, and the whole value proposition of the product is in question. The sensor is rarely the problem. Where it sits, how it is powered, and what surrounds it usually are.

Accuracy Versus Resolution

These are different specifications and datasheets deliberately blur them. Resolution is the smallest change the part reports, often 0.01 degrees C. Accuracy is how far the reported value can sit from truth, and for a typical digital combo sensor that is plus or minus 0.2 to 0.5 degrees C and plus or minus 2 to 3 percent relative humidity. A part that reports two decimal places and is accurate to half a degree is normal, not contradictory.

Read the accuracy across the full range, not at the single flattering point. Most parts quote best accuracy at 25 degrees C and 50 percent RH, then widen substantially below freezing or above 80 percent RH. If the product lives in a cold chain or a bathroom, that widened figure is your real spec.

Then look at three numbers vendors bury: long-term drift, typically 0.25 percent RH per year on a good polymer element; hysteresis, often plus or minus 1 percent RH after a wet-to-dry excursion; and response time, which for humidity can exceed eight seconds with a filter cap fitted. Decide up front what the product needs. A frost alarm needs one degree. A vaccine fridge logger needs a quarter of a degree with traceable calibration.

Digital or Analog Interface

For combined temperature and humidity, a digital part on I2C is almost always the right answer. Calibration coefficients live in the part, the output is a number rather than a voltage you have to condition, and cable length is short and predictable. The bus tradeoffs are covered in I2C vs SPI vs UART.

Analog still wins in specific cases. A 10k NTC thermistor costs a few cents, survives being potted into a heater block, and can hang on the end of a two-meter cable where I2C would not survive. An RTD gives excellent stability across a wide range but needs a precision current source and three- or four-wire compensation. A thermocouple is the only option above roughly 150 degrees C, and it brings cold junction compensation with it.

Two implementation traps recur. Many digital sensors offer only two selectable I2C addresses, so three units on one bus means adding a mux and a firmware layer nobody planned for. And an NTC divider read by an on-chip ADC picks up every switching artifact on the board, so filter at the pin and average in firmware.

The Power Budget on a Battery Product

Datasheet current figures for these parts look harmless: a few hundred microamps while measuring, well under a microamp in sleep. The trap is duty cycle. A sensor read every second with a 15 ms conversion, plus the microcontroller waking to service it, can dominate the energy budget of a device that was supposed to run for two years on a coin cell.

Do the arithmetic before choosing a sample rate, and measure the wake-read-sleep cycle on real hardware with a current probe rather than summing datasheet numbers, because bus timeouts and firmware overhead routinely triple the figure. Then adapt: sample every ten minutes when values are stable, faster when they move. The techniques are in low-power firmware and sleep modes. Note too that the on-die heater many humidity sensors carry costs tens of milliamps whenever it runs.

Placement and Enclosure Decide the Measurement

This is the part most teams get wrong, and no sensor upgrade fixes it. The reading reflects the sensor's own environment, which inside a sealed plastic box is not the room.

Self-heating is the first offender. A linear regulator dissipating a quarter of a watt, a cellular modem transmitting, or a display backlight will warm the interior several degrees above ambient. Put the sensor as far from heat sources as the board allows, on a thermally isolated tab with slots milled in the PCB to break the copper path, and with no ground plane connecting it to the hot region. The broader problem is covered in thermal management in electronic products.

Humidity needs airflow. A sensor behind solid plastic reads whatever the box interior settles at, hours late. Provide a vent path with a hydrophobic membrane, or mount the sensor in a recess open to outside air with a sintered filter cap. If the product also needs a sealing rating, those goals conflict directly and must be resolved at concept, not after tooling; see IP ratings explained and waterproof electronics design.

Contamination, Condensation, and Recovery

Polymer humidity elements absorb what is in the air. Off-gassing from silicone adhesives, uncured potting compound, cleaning solvents, and even the flux residue on the board itself will shift the reading, sometimes by five percent RH or more. Specify low-outgassing adhesives near the sensor, keep the part out of no-clean flux paths, and if the assembly requires washing, follow the manufacturer's reconditioning bake procedure rather than assuming the part recovers on its own.

Condensation is survivable but slow to clear, so if the product cycles across a dew point the heater is worth the current. Plan firmware behavior for physically impossible readings, such as 100 percent RH for hours in a heated room, so the device flags a fault instead of publishing nonsense.

Availability, Cost, and Three Years From Now

Sensor pricing at volume runs from about $0.30 for a basic NTC and its resistor to $1.50 to $4.00 for a calibrated digital combo part, and up to $12 for an industrial-grade element with a calibration certificate. That spread is small next to a board respin, so choose on fit rather than unit price. What matters more is lifecycle: pick a part with a published longevity commitment and identify at least one footprint- and protocol-compatible alternate before release, ideally from a different manufacturer. Sensor packages are small and unforgiving, and a substitution needing a new footprint is a new board, as laid out in a component went end-of-life.

Get the Sensing Design Right the First Time

Projects House specifies sensing subsystems as part of full electronics development: part selection against the real accuracy requirement, thermal isolation on the board, venting in the enclosure, and firmware that handles drift and faults. Send your accuracy target and operating environment through our contact form.