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.