MikroElektronika
DHT22 2 click
DHT22 2 click
SKU:MIKROE-2818
Low stock
Couldn't load pickup availability
Share
DHT22 2 click is used for measuring the environmental temperature and relative humidity. It uses the CM2322 sensor, with very accurate thermal and humidity measuring capabilities. It can use either 1-Wire or I2C protocol to communicate with the integrated circuit.
Attributes like the ultra-small size, low power consumption,data signal transmission distance up to 20 meters, make this sensor the perfect choice for all kinds of applications that require measurement of the temperature and humidity.
How does the click work?
The sensor used on this click is CM2322. This sensor contains humidity and temperature measurement elements, compensated and calibrated in the accurate calibration chamber. The calibration coefficient is saved in the OTP memory of an integrated MCU. The integrated MCU also provides I2C or 1-Wire interface, selectable by the onboard SMD jumper selectors. The operating voltage can also be selected by the onboard SMD jumper.
Typical temperature accuracy is ±0.3°C, while relative humidity accuracy is 2% RH, with the resolution of 0.1 for both measured properties.
I2C/1-Wire interface is used to communicate with the host MCU, sending the measurement data every 2 seconds. Proprietary data collecting techniques are used to average the sampled values, after which the result is sent via the I2C/1-Wire bus.
Specifications
Type | Temperature / Humidity |
On-board modules | CM2322 sensor with very accurate thermal and humidity measuring capabilities |
Key Features | Great measuring accuracy: ±0.3°C, ±2%RH at 25°C, ultra-small size, low power consumption, signal transmission distance up to 20 meters. |
Interface | 1-wire,I2C |
Input Voltage | 3.3V or 5V |
Click board size | M (42.9 x 25.4 mm) |
Pinout diagram
This table shows how the pinout on DHT22 2 click corresponds to the pinout on the mikroBUS™ socket (the latter shown in the two middle columns).
DHT22 2 click maximum ratings
Description | Min | Typ | Max | Unit |
---|---|---|---|---|
Logic voltage level | 3.3 | 5 | 5.5 | V |
SCL clock frequency | 100 | kHz | ||
Measuring range (T) | -40 | +80 | °C | |
Measuring range (RH) | 0% | 99% | RH |
Onboard settings and indicators
Label | Name | Default | Description |
---|---|---|---|
JP1 | OW/SCL | Right | Digital interface selection. Left position 1-Wire, right position I2C. |
JP2 | OW/SDA | Right | Digital interface selection. Left position 1-Wire, right position I2C. |
JP3 | LOGIC SEL | Left | Logic level voltage selection. Left position 3.3V, right position 5V. |
PWR | Power LED | - | Power LED indicates that the click is powered on |
Software Support
We provide a library for the DHT22 2 click on our LibStock page, as well as a demo application (example), developed using MikroElektronika compilers. The demo can run on all the main MikroElektronika development boards.
Library description
Library contains key functions used to read temperature and humidity data from the DHT22 2 click.
float DHT22_2_getTemperature();
- Function for reading temperature from sensor
float DHT22_2_getHumidity()
- Function for reading humidity from sensor
Examples Description
The example uses the library functions to read the temperature and humidity from the sensor and sends the data to the user, via the UART interface. The two functions use I2C interface to communicate with the MCU. Both of these functions return data in floating format, which only needs to be converted to a string with the compiler function FloatToString, before it is sent to the UART module. After that, the temperature and the humidity data can be viewed using the UART terminal.
void applicationTask() { temp = DHT22_2_getTemperature(); humidity = DHT22_2_getHumidity(); FloatToStr(temp,output); UART1_Write_Text("Temperature: "); UART1_Write_Text(output); UART1_Write_Text("°C"); UART1_Write(13); UART1_Write(10); UART1_Write_Text("Humidity: "); FloatToStr(humidity,output); UART1_Write_Text(output); UART1_Write_Text("%"); UART1_Write(13); UART1_Write(10); Delay_ms(1000); }
The full application code, and ready to use projects can be found on our LibStock page.
Other mikroE Libraries used in the example:
- UART
- I2C
Additional notes and information
Depending on the development board you are using, you may need USB UART click, USB UART 2 clickor RS232 click to connect to your PC, for development systems with no UART to USB interface available on the board. The terminal available in all MikroElektronika compilers, or any other terminal application of your choice, can be used to read the message.




New Products
-
Sold out
OAK 4 D Pro Wide
Vendor:LuxonisRegular price Rs. 117,969.00Regular priceUnit price / perSold out -
Sold out
OAK 4 D Pro Fixed Focus
Vendor:LuxonisRegular price Rs. 106,719.00Regular priceUnit price / perSold out -
Sold out
OAK 4 D Pro Auto Focus
Vendor:LuxonisRegular price Rs. 106,719.00Regular priceUnit price / perSold out -
Sold out
OAK 4 D Auto Focus
Vendor:LuxonisRegular price Rs. 95,479.00Regular priceUnit price / perSold out -
Sold out
OAK 4 D Fixed Focus
Vendor:LuxonisRegular price Rs. 95,479.00Regular priceUnit price / perSold out -
Sold out
OAK 4 D Wide
Vendor:LuxonisRegular price Rs. 106,719.00Regular priceUnit price / perSold out -
Sold out
OAK-FFC IMX577 M12
Vendor:POLOLURegular price Rs. 8,499.00Regular priceUnit price / perSold out -
Pololu Ideal Diode Reverse Voltage Protector, 4-60V, 20A
Vendor:POLOLURegular price Rs. 329.00Regular priceUnit price / perSold out -
Pololu Ideal Diode Reverse Voltage Protector, 4-60V, 25A
Vendor:POLOLURegular price Rs. 439.00Regular priceUnit price / perSold out -
Pololu I²C Isolator, ISO1640
Vendor:POLOLURegular price Rs. 449.00Regular priceUnit price / per -
3pi+ 32U4 OLED Robot Kit with 30:1 MP Motors (Standard Edition Kit)
Vendor:POLOLURegular price Rs. 15,549.00Regular priceUnit price / per -
Conductivity Calibration K 1.0 Set (4 pouches)
Vendor:Atlas ScientificRegular price Rs. 1,599.00Regular priceUnit price / perSold out -
Analog Discovery 3 Pro Bundle
Vendor:DigilentRegular price Rs. 42,569.00Regular priceUnit price / per -
Lighthouse swarm bundle - Crazyflie 2.1+ (250mAh batteries)
Vendor:BitcrazeRegular price Rs. 474,999.00Regular priceUnit price / perSold out -
Loco Swarm bundle - Crazyflie 2.1+ (250mAh batteries)
Vendor:BitcrazeRegular price Rs. 544,999.00Regular priceUnit price / per -
Kopis X8 Cinelifter 5" Kit - Caged (Frame Kit)
Vendor:HolybroRegular price Rs. 28,199.00Regular priceUnit price / per -
Atlas Scientific i3 InterLink
Vendor:Atlas ScientificRegular price Rs. 6,349.00Regular priceUnit price / per -
PoE Injector
Vendor:LuxonisRegular price Rs. 2,099.00Regular priceUnit price / per -
1-Port VINT Hub Phidget
Vendor:PhidgetsRegular price Rs. 2,699.00Regular priceUnit price / per -
Power Distribution Board (PDB) Board (With XT30 Pre-soldered)
Vendor:HolybroRegular price Rs. 1,099.00Regular priceUnit price / per -
Holybro 1045 Propeller 2 Pair CW+CCW-Black
Vendor:HolybroRegular price Rs. 1,549.00Regular priceUnit price / per -
ACS37220LEZATR-100B3 Current Sensor Large Carrier -100A to +100A, 3.3V
Vendor:POLOLURegular price Rs. 829.00Regular priceUnit price / per -
CT433-HSWF50MR TMR Current Sensor Compact Carrier -50A to +50A, 3.3V
Vendor:POLOLURegular price Rs. 1,039.00Regular priceUnit price / per -
A5984 Stepper Motor Driver Carrier, Adjustable Current, Blue Edition
Vendor:POLOLURegular price Rs. 409.00Regular priceUnit price / per -
A5984 Stepper Motor Driver Carrier, Fixed 1A@5V / 660mA@3.3V, Blue Edition (Soldered Header Pins)
Vendor:POLOLURegular price Rs. 489.00Regular priceUnit price / per