In this tutorial, we will see how to interface AHT sensor using I2C bus with ARIES v3.0 Board. AHT sensors are used to measure temperature and humidity. AHT25 is a quick-response, calibrated, reliable temperature and humidity sensor.
AHT Sensor
AHT15 temperature and humidity sensor uses standard pitch plug type. The connector can be easily replaced in the application. AHT15 is in protection waterproof and dustproof PTFE membrane that does not affect RH measurement response time. Allowing the sensor use in harsh environmental conditions (like spray water and high contact) Dust), ensuring the best precision performance, making the AHT15. The best choice in the most demanding application conditions. The applications of AHT sensor includes HVAC, dehumidifiers, test and inspection equipment, consumer goods, automotive, automatic control, data loggers, weather station, home appliances, humidity regulation, medical and other related temperature and humidity detection and control. For more details refer the datasheet.
Prerequisites
- Windows 10 or above/Linux (64 bit)
- Arduino IDE
- VEGA ARIES Board support package
Components Required
- ARIES v3.0 Board
- USB type C to USB type A cable
- Adafruit AHT sensor
- Jumper Wires
Note: All of the following boards can be used for this project
Note :: If you are using ARIES v2 boards, 4.7 KOhms pull-ups are required on SDA and SCL lines.
Connection Diagram
Connections
AHT Sensor | ARIES V3 board |
VCC | 3.3V |
GND | GND |
SCL | SCL-0 |
SDA | SDA-0 |
Procedure
Open and set up the Arduino IDE as described in Getting Started with ARIES v3.0.
- Make sure you have selected ARIES v3 Board from Tools -> Board -> VEGA Processor: ARIES Boards -> ARIES v3
- Select Programmer as VEGA XMODEM from Tools -> Programmer -> VEGA XMODEM
- Also select appropriate port from Tools -> Port -> COM* (ARIES Board)
Now, Open Files -> Examples -> Under Examples for ARIES v3 -> Wire-> adafruit_aht25_test
Required Libraries
Arduino libraries extend the standard Arduino API and are created by the community. They simplify complex code. Each Arduino IDE version includes a library manager for easy installation. The libraries needed for this project are:
- Adafruit_AHTX0
- Adafruit Unified Sensor
- Adafruit SH110X
To install the libraries required for this project.
Go to Tools -> Manage Libraries -> and search for Adafruit_AHTX0
Click on Install all
Once you have downloaded the required libraries you can upload the code to ARIES board.
Output
Once the program is uploaded open the serial monitor in 115200 baud rate. This demo will give weather reading of the environment. You can see the temperature and humidity readings displayed on the serial monitor.