How to calibrate temperature / humidity sensors. Tips on the procedure (not the code)

Hey everyone,

So i have six aqara temperature / humidity sensors around the house.
I ran and grabbed them all and closed them in a box for some time.

They all report different temperatures -+1 degree C.
The same goes for humidity, the differences there are more significant.

I know the drill on how to create template sensors and apply offsets, what im looking for is the procedure on how to find out the true temperature and humidity and apply the changes to the other sensors.

I have a cheap IR themometer that i can use but is this accurate enough?
I also have an old handheld FLIR thermal camera which reports around 2 degrees more than the IR thermometer.
Which one should i trust?
Is there any other ideas to accurately measure the correct temperature?

What about humidity? what’s the drill here?
Only thing i could think of is cigar box calibration sets that i can buy. Any other methods?

Lastly, i also have a couple of DHT sensors wired around the house, but i thought i should first calibrate the wireless ones, then set them beside the DHT for some time and apply the offsets to the DHTs afterwards.

Thanks in advance

1 Like

None of them. Neither are accurate enough to be used as a standard.

If your sensors are within a degree that’s pretty good. You’re probably not going to get any better as they will drift over time. So even if you had a highly accurate thermometer and adjusted your temperature sensors today, next month they could all be different again.

The method of humidity sensor calibration I know of uses salts, though I’ve never done it:

1 Like

There is a feature request for calibrating sensors:

1 Like

Did you ever figure out a reasonable method?

Generally, a single point calibration is sufficient for the sensors we’d be using for home automation. This isn’t precision scientific work, after all :slight_smile:

For temperature, the easiest method is to seal a sensor into a ziplock back, squeeze all the air out, and place it into a jar of ice water. The water should be 0C, and there’s your reference point.

I’ve used the salt method for humidity calibration. Diamond Crystal kosher salt is over 99% pure sodium chloride. I’ve just used 75% as the reference, though the table provided by tom is more accurate, and accounts for temperature. There’s your reference for humidity.

For my application, temperature accuracy is far more important than humidity accuracy, so I do the ice bath calibration on all new temperature sensors. Only my humidor humidity sensor needs to be accurate, so that’s the only sensor I’ve humidity calibrated. Otherwise, I’m just using the humidity sensor to determine when humidity is rising/falling, and don’t really care that much about the accurate value.

1 Like

Hi @Nick2253,

if you calibrate your sensor in this way (at 0C), do you find that they also agree at say 20C degrees?

@tom_l wrote this:

@Nick2253 Have you noticed such drifts?

I find that they are reasonably accurate. Most of the technology behind temperature sensors gives a pretty linear output, so a single-point calibration is enough.

I also notice the drifts. Usually, the biggest culprit of drifts is because the battery is getting bad. I’ve found that it’s really important to use good batteries with temperature sensors. If you have a sensor that takes AA or AAA batteries, I’ve found that rechargeable batteries are best, since NiMH has such flat voltage curves.

I agree with @tom_l: ±1 degree is excellent. Combining drift, errors from non-linear calibration, and in-built error of these sensors, if you can get agreement within a degree, you’re golden! If you need temperature accuracy higher than that, you need to invest in industrial-grade temperature sensors.

1 Like

Thank you - that’s excellent to know!

With NiMH, do you mean the ‘low discharge’ varieties? NiMH is supposed to have high self-discharge.

Self-discharge is a different problem.

When batteries discharge (whether due to load or just naturally), the voltage changes. In alkaline batteries, this voltage drop off is pretty pronounced, whereas with NiMH, it’s very flat. This chart shows it very well:

image

(from Choosing and Using Nickel-Metal-Hydride (NiMH) Rechargeable Batteries)

By using NiMH, you make sure that the voltage is flat(ish), so the reference voltage (battery) isn’t changing (much). I would assume that a high-quality sensor would have some degree of circuitry that would account for this, but it’s probably easier to just build the device to work with 1-1.5V, accuracy be damned.

For sensors, since they use so little power, I’d definitely recommend low discharge varieties of NiMH batteries. No sense in having to change out batteries earlier than needed.

1 Like

Thank you, that’s very helpful! I’ve had a quick look, and Li-Ion seems to be fairly flat as well. Do you have a sense of how Li-Ion vs. NiMH might perform?

Also, do you know of many temperature sensors that take AA / AAA (with Zigbee)? Most of them seem to be button-type cells.

I’ve recently bought this: “Tuya Smart Wifi / ZigBee Temperature Humidity Sensor Monitor Smart Alexa Google”, Tuya Smart Wifi / ZigBee Temperature Humidity Sensor Monitor Smart Alexa Google | eBay, but otherwise haven’t seen many AA/AAA + ZigBee sensors around.

Li-ion is pretty good. Most coin-cell batteries are Li-ion. From what I’ve seen, Li-ion is somewhere between NiMH and Alkaline.

I purchase pretty much all of my Zigbee gear from Aliexpress. I use these Aqara temp/humidity sensors (https://www.aliexpress.us/item/3256804691621738.html) for any place where I’m concerned with aesthetics or size (they use coin-cell batteries), and various Tuya temp/humdity sensors (similar to the ones you linked) everywhere else (2x AAA batteries).

I’m not sure that there are any “room”-scale Zigbee temperature sensors that use AA batteries, but I have a few other Zigbee devices that do temperature checking that use AA batteries (for example: https://www.aliexpress.us/item/3256804875382073.html)

1 Like

Thanks @Nick2253, that’s good to know. Do you have a link to the Tuya sensor you use, or is it the same as the one that I linked?

Same as the ones you linked. Or, at least similar to. The ones I bought from Aliexpress aren’t listed anymore (at least with the store I bought them from).

I believe the Tuya temp/humidity sensors w/ AAA batteries come in two different models: WSD500A and ZTH01. Not sure exactly what the differences are other than external case.

1 Like

Hi @Nick2253 and @bjohas I’m very interested in the Tuya sensors.

There’s a discussion here Tuya TS0201 temperature sensor which is quite negative.
However I have some Tuya wifi sensors which externally look exactly the same and they are OK.

How are you guys getting on with the Zigbee ones?

I use Zigbee2MQTT, and I have not had any issues with my sensors. Perhaps I just got lucky, or perhaps it’s because I’m religious about using my rechargeable batteries. That thread is correct that they don’t update regularly; they need a large enough temperature change before reporting, but that’s just fine with me, because it means less battery drain.

I also have a number of Sonoff Zigbee outlets that I purchased for the express purpose of creating a stable backbone for my Zigbee sensors. It may be that these Tuya sensors are not reliably able to determine how to get back to the base station, and since I have an “always on” backbone, that helps my stability.