Temperature and humidity combined sensor AM2320 digital temperature and humidity sensor is a digital signal output has been calibrated. Using special temperature and humidity acquisition technology, ensure that the product has a very high reliability and excellent long-term stability. Sensor consists of a capacitive moisture element and an integrated high-precision temperature measurement devices, and connected with a high-performance microprocessor .
AM2320 communication using a single bus, two communication modes standard I2C. Standard single-bus interface, the system integration becomes easy and quick. Ultra-small size, low power consumption, signal transmission distance up to 20 meters, making all kinds of applications and even the most demanding applications the best choice. I2C communication using standard communication sequence, the user can directly linked to the I2C communication bus without additional wiring, simple to use. Two communication modes are used as humidity, temperature, and other digital information directly CRC checksum temperature-compensated output, users do not need to calculate the secondary digital output, and no need for temperature compensation of the humidity, temperature and humidity can be accurately information. Two communication modes are free to switch, the user can freely choose, easy to use, wide range of applications.
Specifications
• Operating Voltage: 3.1 VDC to 5.5 VDC
• Operating Temperature Range: -40 ° C to + 80 ° C
• Humidity Range: 0 to 99.9% RH
• Accuracy ( 25 ° C environment)
Temperature: ± 0.5 ° C
Humidity: ± 3%
• RH (10 … 90% RH)
Resolution: Temperature: 0.1 ° C
Resolution: Humidity: 0.1% RH
• Attenuation values
Temperature: <0.1 ℃ / Year
Humidity: <1% RH / Year
• Response time: Temperature: 5s
• Response Time: Humidity: 5s 1 / e (63%)
• Output signal: single bus / IIC signal
• Housing material: PC plastic
Layout
I couldn’t find a fritzing part but as you can see being a simple I2C sensor with a 3.1 to 5.5v range its straightforward to connect this device to a Micro:bit
Code
You will need to install the folllowing library from https://github.com/EngDial/AM2320
This needs updated
This is the default example
[codesyntax lang=”cpp”]
#include <Wire.h>
#include <AM2320.h>
AM2320 th;
void setup() {
Serial.begin(9600);
Wire.begin();
}
void loop() {
Serial.println(“Chip = AM2320″);
switch(th.Read()) {
case 2:
Serial.println(” CRC failed”);
break;
case 1:
Serial.println(” Sensor offline”);
break;
case 0:
Serial.print(” Humidity = “);
Serial.print(th.Humidity);
Serial.println(“%”);
Serial.print(” Temperature = “);
Serial.print(th.cTemp);
Serial.println(“*C”);
Serial.println();
break;
}
delay(2000);
}
[/codesyntax]
Output
Open the serial monitor
Chip = AM2320
Humidity = 47.10%
Temperature = 24.80*C
Chip = AM2320
Humidity = 48.70%
Temperature = 25.10*C
Chip = AM2320
Humidity = 53.60%
Temperature = 25.40*C
Chip = AM2320
Humidity = 55.80%
Temperature = 25.80*C
Chip = AM2320
Humidity = 59.80%
Temperature = 26.20*C
Links
1pcs New AM2320 Digital Temperature and Humidity Sensor Original authentic Can replace SHT20 SHT10
https://akizukidenshi.com/download/ds/aosong/AM2320.pdf