Can I calibrate the Aht20 sensor?

Breakout boards, sensors, other Adafruit kits, etc.

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
Locked
User avatar
Broekieman
 
Posts: 4
Joined: Mon Nov 21, 2022 4:00 pm

Can I calibrate the Aht20 sensor?

Post by Broekieman »

I bought the Aht20 breakout board and the temperature is 1 degree lower than my other sensor. Can I calibrate this sensor and how? I am using it in Home assistant with esphome.

User avatar
Franklin97355
 
Posts: 23939
Joined: Mon Apr 21, 2008 2:33 pm

Re: Can I calibrate the Aht20 sensor?

Post by Franklin97355 »

There is no hardware calibration available but you could add 1 to your reading to compensate. There are documents here

User avatar
mikeysklar
 
Posts: 14180
Joined: Mon Aug 01, 2016 8:10 pm

Re: Can I calibrate the Aht20 sensor?

Post by mikeysklar »

The sensor can self calibrate and will return true on success.

This is something you can do with CircuitPython or the Arduino library. There is a bit to enable self calibrate and another to read the result.

https://docs.circuitpython.org/projects ... t/api.html

Code: Select all

#define AHTX0_CMD_CALIBRATE 0xE1     ///< Calibration command
#define AHTX0_STATUS_CALIBRATED 0x08 ///< Status bit for calibrated
https://github.com/adafruit/Adafruit_AH ... it_AHTX0.h

User avatar
Broekieman
 
Posts: 4
Joined: Mon Nov 21, 2022 4:00 pm

Re: Can I calibrate the Aht20 sensor?

Post by Broekieman »

mikeysklar wrote: Mon Nov 21, 2022 4:49 pm The sensor can self calibrate and will return true on success.

This is something you can do with CircuitPython or the Arduino library. There is a bit to enable self calibrate and another to read the result.

https://docs.circuitpython.org/projects ... t/api.html

Code: Select all

#define AHTX0_CMD_CALIBRATE 0xE1     ///< Calibration command
#define AHTX0_STATUS_CALIBRATED 0x08 ///< Status bit for calibrated
https://github.com/adafruit/Adafruit_AH ... it_AHTX0.h
I am new to this. Do i need a special board to use arduino and what is the complete code for arduino to calibrate the sensor? Or can calibration only be done with Circuit Python and a special board?

User avatar
mikeysklar
 
Posts: 14180
Joined: Mon Aug 01, 2016 8:10 pm

Re: Can I calibrate the Aht20 sensor?

Post by mikeysklar »

We don't have example code for doing the calibrate, but I can probably save you some effort here.

The AHT20 is +/- .3C accuracy. Which means you will typically see a 1 degree Fahrenheit skew between devices.
This sensor has a typical accuracy of +- 2% relative humidity, and +-0.3 °C at 20-80% RH and 20-60 °C. There is only one I2C address so it's not a good option when you need multiple humidity sensors.
https://www.adafruit.com/product/4566

User avatar
Broekieman
 
Posts: 4
Joined: Mon Nov 21, 2022 4:00 pm

Re: Can I calibrate the Aht20 sensor?

Post by Broekieman »

It is +-0.3 °C and I have +- 1. °C

User avatar
Broekieman
 
Posts: 4
Joined: Mon Nov 21, 2022 4:00 pm

Re: Can I calibrate the Aht20 sensor?

Post by Broekieman »

What board do you advice for CircuitPython? Can someone explain how sellf calibrating works?

Locked
Please be positive and constructive with your questions and comments.

Return to “Other Products from Adafruit”