mLink DHT22 Temperature and Humidity Sensor
The mLink DHT22 sensor is a serial (I2C/IIC) temperature and humidity sensor module. It adds the ability of your microcontoller/Arduino to measure temperature (in oC) and relative humidity (%RH) to 1 decimal place using only its I2C interface. It is compatible with other mLink or standard I2C modules allowing you to daisy-chain several different types of modules together using only the two I2C pins of your microcontroller.
For Arduino users you can use the mLink library (see below) to control any type of mLink module. Only one single instance of the library is needed to control multiple types of mLink modules resulting in very little resources overhead and therefore making it great for Arduinos with small amounts of memory and pin counts.
The mLink DHT22 sensor is a serial (I2C/IIC) temperature and humidity sensor module. It adds the ability of your microcontoller/Arduino to measure temperature (in oC) and relative humidity (%RH) to 1 decimal place using only its I2C interface. It is compatible with other mLink or standard I2C modules allowing you to daisy-chain several different types of modules together using only the two I2C pins of your microcontroller.
For Arduino users you can use the mLink library (see below) to control any type of mLink module. Only one single instance of the library is needed to control multiple types of mLink modules resulting in very little resources overhead and therefore making it great for Arduinos with small amounts of memory and pin counts.
Module specifications:
Module code: HCMODU0181 Supply Voltage (VDD): 3.3V to 5.5V Current consumption (idle): 5mA Current consumption (sleep): 1.5mA Interfaces: I2C I2C Interface speed: 400kbits/s (fast mode) I2C default address (HEX): 0h51 Maximum number of modules: 5 with pullups fitted, 112 with pullups removed* Module dimensions (inc headers): 64mm x 17mm x 11.5mm DHT22 specifications: Operating range: Humidity 0-100%RH Temperature -40~80 Celsius Accuracy: Humidity +-2%RH(Max +-5%RH) Temperature <+-0.5Celsius Resolution or sensitivity: Humidity 0.1%RH Temperature 0.1Celsius Repeatability: humidity +-1%RH Temperature +-0.2Celsius Humidity hysteresis: +-0.3%RH Long-term Stability +-0.5%RH/year Sensing period Average: 2s *Note the maximum number of connected modules will depend on cable lengths and power requirements of each module.
Do not exceed 5 mLink modules connected in series with all fitted to all modules.
Arduino Connection Example:
Arduino Temperature & Humidity Example:
This sketch uses the mLink to read the temperature (in oC) an humidity (in RH%) from the mLink DHT22 sensor module (SKU: HCMODU0181).
-
#include "mLink.h" // Include the library
-
-
mLink mLink; // Create an instance of the library
-
-
#define I2C_ADD 0x51 // Default I2C address
-
-
void setup()
-
{
-
Serial.begin(9600);
-
-
mLink.init(); // Initialise the library
-
}
-
-
-
void loop()
-
{
-
mLink.write(I2C_ADD, DHT22_START_MEAS); // Trigger a new measurement
-
-
while(mLink.busy(I2C_ADD)); // Wait for the new measurement
-
-
float temp = mLink.DHT22_Temp(I2C_ADD); // Get the temperature in oC
-
float hum = mLink.DHT22_Hum(I2C_ADD); // Get the humidity in %RH
-
-
Serial.print("Temperature: "); Serial.println(temp);
-
Serial.print("Humidity: "); Serial.println(hum);
-
-
delay(1000);
-
}
For more information including documentation and the mLink library please visit this products forum page here:
https://forum.hobbycomponents.com/viewtopic.php?f=131&t=2999