Sensors

Humidity Readings Drift, and It Is Usually Your Enclosure

The Cheapest Part of the Error Budget

Temperature and humidity is the measurement everybody adds first, because the parts cost a couple of euros and the interface is two wires. It is also the measurement most likely to be quietly wrong in a deployed fleet, and almost never for the reason people look for.

The sensor die on a modern Sensirion part is very good. The SHT3x family holds a couple of percent relative humidity and a few tenths of a degree; the SHT4x generation improved the humidity figure and cut the power substantially, while temperature accuracy is broadly comparable between them. Both families are binned, so the accuracy you get depends on which part number you order rather than on the family name. The pin-type SHT85 exists for cases where the sensor needs to be replaceable rather than reflowed down. Any of them will out-perform your installation.

That is the point worth internalising before choosing between them. In a real deployment the sensor's own specification is the smallest term in the error budget. Where the sensor sits, what it is thermally attached to, what air actually reaches it and what chemistry it has been breathing since assembly all contribute more, and none of them appear on a datasheet.

A custom outdoor sensor with the temperature and humidity probe inside a sintered filter cap

Relative Humidity Is a Temperature Measurement in Disguise

The most common misunderstanding is treating the two outputs as independent. They are not, and the coupling is what makes humidity errors so easy to introduce.

Relative humidity is the ratio of the water vapour present to what the air could hold at that temperature. Warm the air a little and it can hold more, so the same absolute quantity of water reports as a lower percentage. Near room conditions the rule of thumb is that a one degree error in temperature produces something on the order of several percent of relative humidity error, which means a sensor reading a degree warm than the air is also reading noticeably dry, and it is not obviously broken in either channel.

That is why a self-heating problem presents as a humidity problem. A sensor sitting next to a linear regulator dropping a couple of volts continuously, or in a pour of ground copper that runs back to a warm processor, reads a degree or two high, and the humidity channel that everybody is actually looking at reads several percent low with no apparent cause. The fix is thermal, not calibration, and it belongs at layout time. That is a subject of its own, covered in the piece on thermal decoupling.

If what you actually care about is the water content rather than the ratio, derive dew point or absolute humidity and store that alongside. It is arithmetic from the two channels you already have, and it is far less confusing to reason about across a day where the temperature swings fifteen degrees.

Nobody debugs a temperature channel that is a degree out, because a degree looks like nothing. They debug the humidity channel it broke, and they debug it in software, where the problem is not.

The Heater Is Not for Measuring

Every modern SHT part has an on-chip heater, and it is routinely misunderstood as a calibration or compensation feature. It is neither.

Its first job is condensation. When a sensor is taken from cold to warm humid air, water condenses on the die and the humidity channel pins near saturation and stays there for a long time, because the sensor is faithfully reporting the conditions in the film of liquid sitting on it. Pulsing the heater drives that off in seconds instead of hours. Any device that goes in and out of a cold store, a refrigerated vehicle, or a northern morning wants this behaviour scheduled rather than discovered.

Its second job is creep. A polymer humidity sensor held at very high humidity for a long period develops an offset that does not immediately reverse when conditions dry out. Periodic gentle heating keeps the sensor away from the conditions that cause it. Growers, cold stores and anywhere near saturation for weeks at a time benefit from this and almost nobody enables it.

What the heater must not do is run during a measurement you intend to use. It raises the die temperature by several degrees and everything above about relative humidity applies. Heat, wait for recovery, then measure.

Contamination Is the Real Drift Mechanism

When a fleet drifts consistently in one direction over a year or two, the cause is chemical far more often than it is electronic, and it is usually something the device was built with.

The humidity sensing layer is a polymer that absorbs water, and it will also absorb other things. Volatile organic compounds are the problem, and the sources are depressingly close to hand: outgassing from a freshly printed enclosure, solvent from a conformal coating applied over the sensor, plasticiser from a cheap cable gland, adhesive from a foam gasket, silicone from a sealant. Silicone in particular is worth banning from anywhere near these parts.

The symptoms are gradual and consistent, which is what makes them look like sensor ageing rather than poisoning. Sensirion documents a reconditioning bake that recovers much of it, and it is worth knowing that this exists, but it is a laboratory procedure rather than something you do to two hundred devices on walls. The practical answer is upstream: cure printed and moulded parts before assembly, keep conformal coating off the sensor aperture with a mask or a keep-out, choose gaskets and cable glands with low outgassing, and do not seal a fresh enclosure around a sensor and ship it the same day.

If a design is going into an environment that is chemically hostile by nature, a laboratory, a workshop, a cleaning cupboard, then a replaceable sensor is the right architecture and a soldered-down part is not. That is precisely the case the pin-type packages exist for.

Filter Caps Trade Response for Survival

Sensor housings with ventilated caps in several sizes, printed for a prototype run

Almost any field sensor wants something over the aperture, because dust, insects and splashing water are all fatal in their own way. What the cap costs you is time.

A sintered filter or a membrane slows the exchange of air at the sensing surface, and the humidity channel is the one that notices. Response time can go from seconds to minutes depending on the cap, which is completely fine when logging a room or a field every quarter hour and completely wrong when trying to catch a door opening or a process step.

The decision is therefore about what the measurement is for. A slow, well-protected sensor that runs for five years is the right answer for climate and building monitoring. A fast, exposed one is right for a process where the transient is the signal, and it will need cleaning.

The mistake to avoid is putting a fast requirement and a heavy filter in the same device and then wondering why events are being missed. If both are genuinely needed, that is an aspirated design with a small fan pulling air across the sensor, which costs power and a moving part.

Choosing Between the Parts

Most of the time this decision matters less than the installation, but there are a few genuine discriminators.

Power is the first. If the device wakes, measures once and sleeps, look at the single-shot current and the conversion time rather than the continuous figure, because the continuous figure describes a mode you will never use. The newer generation is materially better here, and on a device reporting every fifteen minutes for five years that difference is real.

Serviceability is the second, and it is the one people forget until year three. A reflowed sensor is a board replacement. A pin-type part in a socket, or a small daughterboard, is a five minute job that a technician can do on site. Where the environment is chemically aggressive or the accuracy requirement is tight enough to need periodic verification, design for that from the start.

The third is whether you need a certified reference at all. If a reading has to stand up in an audit or a dispute, no low-cost sensor satisfies that on its own regardless of its specification, and the answer is a calibrated instrument with a certificate and a schedule. The low-cost fleet is then for coverage and the reference is for defensibility, which is a perfectly sensible architecture as long as nobody claims the fleet is something it is not.

Where the Reading Comes From

Two placement rules produce most of the field accuracy, and both are free.

The sensor must see the air you are asking about, not the air inside the box. A sensor sealed in an enclosure measures the enclosure, which is warmer than ambient during the day, slower than ambient always, and drier than ambient because it is warmer. Vent slots on opposite faces to create a path, and put the sensor in the path rather than in a corner.

And it must not see the sun. A device in direct sunlight reads high by a margin that reaches ten degrees or more on a light-coloured box and considerably worse on a dark one, and no amount of averaging removes it because it is a real temperature that is not the one you wanted. Outdoors this means a radiation shield, which is a stack of louvred plates with air moving between them, not a lid.

What I Provide

I specify and lay out these sensors as part of devices I build, which means the decisions above are made at schematic and enclosure stage rather than discovered afterwards: the thermal keep-out around the part, the vent path through the housing, the filter chosen against the response time the application actually needs, and materials selected so the enclosure is not slowly poisoning what is inside it.

Where a fleet is already deployed and drifting, the useful first step is usually a small co-location exercise, a handful of field units next to a reference instrument for a fortnight, which distinguishes a placement error from a contamination problem from a genuine sensor fault. Those three look identical in the data and have completely different fixes, and guessing between them is how people end up replacing hardware that was working.

Does this describe your project?

If any of the above sounds like something you are dealing with, tell me about it. You will get a straight read on the right approach for your situation, and the first conversation costs nothing.

Start a conversation

Prefer to see the finished thing first? There is one running on real devices