ATH21 heating up? Or insufficient separation?

I’m struggling with calibrating an esphome temperature sensor I built, with an ESP32 and a small ATH20 (or 21 depending on which document I read) sensor.

The basic setup looks like this:

The case is 3d printed to fit (I’m using a different esp32 chip than this photo but the rest is the same). The esp32 case and the sensor (left) case have lots of holes all around them. The tube-like tunnel for wires in between is intended to minimize airflow between (just by wire density there) and is not ventilated. I install the sensor left (as shown) or below as well.

Here’s an IR image (the sensor is down in this one):

Don’t take the temperatures as accurate, this is a cheap Seek Nano, but the relative temperatures seem pretty close, so there appears to be a 7 degree difference in the wall ambient and the sensor chamber, and the chamber seems hotter than the little tunnel. The wall heat behind the top is a USB wall wart.

If it was heat conduction through the wire (20AWG copper x 4) I would expect the tunnel to be hotter and cooling close to the sensor. This looks like whatever the sensor electronics do they are heating up substantially. I’ve calibrated it by an offset but for reasons unclear this seems to vary a bit over time. I’m running it at 5v off a USB VIN on the ESP32.

I’m not much of a hardware person. Any thoughts on this? Do I not have enough separation? Or is this just “those sensors are crap, use a XXXX instead” sort of thing?

I plan to use these scattered about to control a 4 zone HVAC system and losing faith in their suitability.

Linwood

As an example, here is a new version I just did. When powered on the temperature was 80.1F. After sitting a few minutes it went up to a whopping 100.6F. The little old-school 8266 with DHT22 beside it reads fairly accurately and is at 76.8F.

Now I can bias that difference out, but that 20+ degree (F) rise on powerup is just weird. Maybe broken.

Thoughts?

So in case anyone else ends up here…

I’m about 85% sure it’s the wires.

I did some experimenting. I got 3 of these chips and hooked up with long (about 0.5m) test leads in open air, and they were +/- 1.5 of each others and also a calibrated thermometer.

I also ran the display brightness from zero to 50% to 100%. This changed the internal temperature of the ESP32 from 40C to 67C (+27C), and the AHT reading from 18C to 27C (+9C) with very little lag.

I can’t see any reason the AHT would self-generate more heat due to the display on the ESP32, and the lack of a time lag implies a much faster reaction than radiation or conduction through the plastic. I think it has to be the copper wires between the two PCB’s.

Other than a much longer tunnel I don’t know how to address. Maybe thinner wires (I assume conduction is proportional at least to some degree to cross sectional area?).

I guess the good news is in testing with the display at a fixed setting the relative temperature of Ambient vs sensor (over a few degrees anyway) was fairly precise. But the bad news is the impact is huge, so the startup temperature can be about 15C or so below what it is after a few minutes.

To put some closure to this. I redid one of these with a much longer tunnel.

The tube length here is 83mm, and I changed the wiring from a regular hookup wire (I think 20 AWG with relatively large insulation) to Cat 6 wire, which is I think 22 or 24 AWG and also much thinner insulation (so it should cool off more in between). I also ventilated about half the tube nearest the ESP32.

I now get a sensor end that looks more like ambient (it’s very near the edge of this shot and invisible against the wall).

So overall I think the issue was the conduction of the wires. A non-display ESP32 would of course have been less of a problem but in testing it did not nearly get cool enough. And sleeping would also solve the problem but I like to be able to poll and know it is up.