Temperature problem with an ENS160+AHT21

I have a combo ENS160 + AHT2X, purchased from cheap AliExpress supplier and can confirm the AHT2X measurement is useless. It reads >5 DegC too high when the ENS160 is enabled and >1 DegC too high with ENS160 disabled. The ground backplane on the board just equalises the heat from all components, even with the AHT2X out on a little island.

[Corrected Post]

Ah, but the purpose of the AHT2X combo is not so we humans can measure ambient temperature and %RH, but rather so the temperature and RH data can be used to compensate the ENS160 to improve accuracy. If we RTFM, (yes, I admit, I did this when all else failed) then we will find that the ENS160 is quite a sophisticated little animal and can accept temperature and RH data written to its registers to improve the accuracy of the eCO2 and TVOC measurements.

6 Likes

I’ve noticed that the Temperature and Humidity are consistent in their ‘error’ and track closely with a known control sensor.

If you’re not using this for fine homeostasis temperature control and just need a ‘it’s there or thereabouts’ comfort level measurement:
if you copy the AHT21 sensor section of your code, change the ID’s of the Temp & RH sensors in the copy, then remove the Names from the original sensors (which are used for the ENS160 compensation).
Add a filter offset - use the difference observed from a control to each of new Temp and Humidity sensors… and you’re reading in HA will be ‘corrected’, within a margin of error but negligible, for HA use. And the compensation will still be correct for the ENS160 to function correctly.
I’ve added a heatsink and 47uF 10v cap to all boards whether it was working or not.

2 Likes

According to the esphome manual, the standard I²C bus frequency is 50kHz, so this should not be an issue.

I found an interesting reddit comment on this issue.

The module’s power supply must always be connected to Vin , because the 3V3 pin on the module is the output of its internal voltage regulator. Additionally, the supplied voltage must match the supply voltage of the controlling MCU—for an ESP8266 , that means 3.3V . This is because the module’s level shifters are referenced to Vin .

All ESP boards use 3.3V for their internal UP voltage, so the board needs to be connected to the 3.3V pin, not 5V!

Regarding the temperature he says:

apply no correction at all and pass the AHT21’s raw temperature and humidity values directly to the ENS160.
Why? Most people assume that AHT21 measures inaccurately due to self-heating. However, as long as AHT21 operates within its specified range, it measures correctly—it accurately reports the temperature and humidity in its immediate surroundings, which is also the environment surrounding the ENS160.

In other words: yes the temperature is too high when you are trying to measure room temperature and thus useless as a temperature sensor in home assistant, but it is the correct temperature for the environment the ENS160 is measuring in.

3 Likes

The ENS160 datasheet explains why it gets warm. This is completely normal, the gas sensors are heated internally in order for them to function.

2 Likes
  1. Heat mostly from linear (both, even I provide 3.3v only).
  2. Values not so good as specialized co2 device (orange is ENS160+AHT21)
  3. I did some changes to improve temp values: removed 3.3v stab and moved 1.8v further from AHT plus use some capton tape to separate it from pcb.