Measure and monitor both temperature and relative humidity with high accuracy and ease of use.
A
A
Hardware Overview
How does it work?
Temp&Hum 9 Click is based on the SHTC3, a relative humidity and temperature sensor with I²C Interface, by Sensirion. This sensor IC integrates two very accurate sensing components: temperature sensor, and relative humidity sensor. By utilizing the proprietary CMOSens® manufacturing technology, this sensor integrates the complete temperature and humidity measurement system on chip. The output data is processed and compensated by the SHTC3 IC itself, requiring only basic conversion formulas to be applied within the firmware of the host microcontroller (MCU). These conversion formulas are given in the SHTC3 datasheet, and provide readings in °C and %RH, directly. The SHTC3 incorporates an accurate bandgap temperature sensor, which can measure the temperature in the range between -40°C and 125°C while retaining accuracy of ±0.8°C, typically. The accuracy is even greater if the range is narrowed down: when used over the range between 0°C and 60°C, the typical accuracy is ±0.2°C. Also, the repeatability of the temperature measurement is
very good, in the range of 0.1°C. The SHTC3 sensor IC can be reliably used for prolonged periods of time, as it has a very low thermal drift of less than 0.02°C per year. After the measurement has been converted by high-precision ADC, it is fed to a logic back-end which applies factory-calibrated correction and converts the raw data into a compensated value. By applying a simple conversion formula, the temperature measurement can be read directly in ℃. Note however, that the sensor will take some time to accommodate to the ambient temperature, especially if the temperature changes quickly, considering the thermal conductivity of the PCB itself. However, the Click board™ surface is not very large, resulting in lower thermal inertia. The humidity sensor is a capacitor-based sensor which changes the capacitance proportionally to the relative humidity. However, the capacitance of this sensor is affected by changes of the ambient temperature, as well. The datasheet of the SHTC3 offers a map of the RH accuracy at different temperatures, covering a range of different
values. The RH sensor accuracy varies in the range between ±2% and ±4%, depending on the measurement conditions. This table can be used to check the exact accuracy for some specific ℃ and %RH conditions. After the measurement has been converted by high-precision ADC, it is fed to a logic back-end which applies factory-calibrated correction and converts the raw data into a compensated value. By applying a simple conversion formula, the temperature measurement can be read directly in %RH. Note that capacitor-based humidity sensors commonly suffer from a small hysteresis, which may occur if the sensor is used in very humid conditions for prolonged periods of time. However, this hysteresis is not irreversible. The SHTC3 datasheet specifies that its hysteresis should stay within the range of ±1 %RH. Temp-Hum 9 click uses the I2C communication interface. It has pull-up resistors connected to the mikroBUS™ 3.3V rail. A proper conversion of logic voltage levels should be applied before the Click board™ is used with MCUs operated with 5V.
Features overview
Development board
EasyAVR v8 is a development board designed to rapidly develop embedded applications based on 8-bit AVR microcontrollers (MCUs). Redesigned from the ground up, EasyAVR v8 offers a familiar set of standard features, as well as some new and unique features standard for the 8th generation of development boards: programming and debugging over the WiFi network, connectivity provided by USB-C connectors, support for a wide range of different MCUs, and more. The development board is designed so that the developer has everything that might be needed for the application development, following the Swiss Army knife concept: a highly advanced programmer/debugger module, a reliable power supply module, and a USB-UART connectivity option. EasyAVR v8 board offers several different DIP sockets, covering a wide range of 8-bit AVR MCUs, from the smallest
AVR MCU devices with only eight pins, all the way up to 40-pin "giants". The development board supports the well-established mikroBUS™ connectivity standard, offering five mikroBUS™ sockets, allowing access to a huge base of Click boards™. EasyAVR v8 offers two display options, allowing even the basic 8-bit AVR MCU devices to utilize them and display graphical or textual content. One of them is the 1x20 graphical display connector, compatible with the familiar Graphical Liquid Crystal Display (GLCD) based on the KS108 (or compatible) display driver, and EasyTFT board that contains TFT Color Display MI0283QT-9A, which is driven by ILI9341 display controller, capable of showing advanced graphical content. The other option is the 2x16 character LCD module, a four-bit display module with an embedded character-based display controller. It
requires minimal processing power from the host MCU for its operation. There is a wide range of useful interactive options at the disposal: high-quality buttons with selectable press levels, LEDs, pull-up/pulldown DIP switches, and more. All these features are packed on a single development board, which uses innovative manufacturing technologies, delivering a fluid and immersive working experience. The EasyAVR v8 development board is also integral to the MIKROE rapid development ecosystem. Natively supported by the MIKROE Software toolchain, backed up by hundreds of different Click board™ designs with their number growing daily, it covers many different prototyping and development aspects, thus saving precious development time.
Microcontroller Overview
MCU Card / MCU

Architecture
AVR
MCU Memory (KB)
64
Silicon Vendor
Microchip
Pin count
40
RAM (Bytes)
4096
Used MCU Pins
mikroBUS™ mapper
Take a closer look
Click board™ Schematic

Step by step
Project assembly
Track your results in real time
Application Output
1. Application Output - In Debug mode, the 'Application Output' window enables real-time data monitoring, offering direct insight into execution results. Ensure proper data display by configuring the environment correctly using the provided tutorial.

2. UART Terminal - Use the UART Terminal to monitor data transmission via a USB to UART converter, allowing direct communication between the Click board™ and your development system. Configure the baud rate and other serial settings according to your project's requirements to ensure proper functionality. For step-by-step setup instructions, refer to the provided tutorial.

3. Plot Output - The Plot feature offers a powerful way to visualize real-time sensor data, enabling trend analysis, debugging, and comparison of multiple data points. To set it up correctly, follow the provided tutorial, which includes a step-by-step example of using the Plot feature to display Click board™ readings. To use the Plot feature in your code, use the function: plot(*insert_graph_name*, variable_name);. This is a general format, and it is up to the user to replace 'insert_graph_name' with the actual graph name and 'variable_name' with the parameter to be displayed.

Software Support
Library Description
This library contains API for Temp&Hum 9 Click driver.
Key functions:
temphum9_get_temperature
- Calculating temperaturetemphum9_get_humidity
- Calculating relative humiditytemhum9_get_data
- Calculating temperature and relative humidity
Open Source
Code example
The complete application code and a ready-to-use project are available through the NECTO Studio Package Manager for direct installation in the NECTO Studio. The application code can also be found on the MIKROE GitHub account.
/*!
* \file
* \brief TempHum9 Click example
*
* # Description
* This example demonstrates the use of TempHum 9 click board by reading and displaying
* the temperature and humidity measurement results.
*
* The demo application is composed of two sections :
*
* ## Application Init
* Initializes I2C driver and sends SLEEP and WAKEUP commands.
*
* ## Application Task
* Performs simultaneous temperature and relative humidity measurements and logs both values
* on the USB UART once per second.
*
* \author MikroE Team
*
*/
#include "board.h"
#include "log.h"
#include "temphum9.h"
static temphum9_t temphum9;
static log_t logger;
void application_init ( void )
{
log_cfg_t log_cfg;
temphum9_cfg_t cfg;
/**
* Logger initialization.
* Default baud rate: 115200
* Default log level: LOG_LEVEL_DEBUG
* @note If USB_UART_RX and USB_UART_TX
* are defined as HAL_PIN_NC, you will
* need to define them manually for log to work.
* See @b LOG_MAP_USB_UART macro definition for detailed explanation.
*/
LOG_MAP_USB_UART( log_cfg );
log_init( &logger, &log_cfg );
log_info( &logger, " Application Init " );
// Click initialization.
temphum9_cfg_setup( &cfg );
TEMPHUM9_MAP_MIKROBUS( cfg, MIKROBUS_1 );
temphum9_init( &temphum9, &cfg );
Delay_ms ( 100 );
temphum9_send_command( &temphum9, TEMPHUM9_SLEEP );
Delay_ms ( 500 );
temphum9_send_command( &temphum9, TEMPHUM9_WAKEUP );
Delay_ms ( 500 );
log_info( &logger, " Application Task " );
}
void application_task( )
{
float temperature = 0;
float humidity = 0;
temhum9_get_data ( &temphum9, TEMPHUM9_NORMAL_MODE, &temperature, &humidity );
log_printf( &logger, " Temperature: %.2f degC\r\n", temperature );
log_printf( &logger, " Relative humidity: %.2f %%\r\n", humidity );
log_printf( &logger, "-----------------------------\r\n" );
Delay_ms ( 1000 );
}
int main ( void )
{
/* Do not remove this line or clock might not be set correctly. */
#ifdef PREINIT_SUPPORTED
preinit();
#endif
application_init( );
for ( ; ; )
{
application_task( );
}
return 0;
}
// ------------------------------------------------------------------------ END
/*!
* \file
* \brief TempHum9 Click example
*
* # Description
* This example demonstrates the use of TempHum 9 click board by reading and displaying
* the temperature and humidity measurement results.
*
* The demo application is composed of two sections :
*
* ## Application Init
* Initializes I2C driver and sends SLEEP and WAKEUP commands.
*
* ## Application Task
* Performs simultaneous temperature and relative humidity measurements and logs both values
* on the USB UART once per second.
*
* \author MikroE Team
*
*/
#include "board.h"
#include "log.h"
#include "temphum9.h"
static temphum9_t temphum9;
static log_t logger;
void application_init ( void )
{
log_cfg_t log_cfg;
temphum9_cfg_t cfg;
/**
* Logger initialization.
* Default baud rate: 115200
* Default log level: LOG_LEVEL_DEBUG
* @note If USB_UART_RX and USB_UART_TX
* are defined as HAL_PIN_NC, you will
* need to define them manually for log to work.
* See @b LOG_MAP_USB_UART macro definition for detailed explanation.
*/
LOG_MAP_USB_UART( log_cfg );
log_init( &logger, &log_cfg );
log_info( &logger, " Application Init " );
// Click initialization.
temphum9_cfg_setup( &cfg );
TEMPHUM9_MAP_MIKROBUS( cfg, MIKROBUS_1 );
temphum9_init( &temphum9, &cfg );
Delay_ms ( 100 );
temphum9_send_command( &temphum9, TEMPHUM9_SLEEP );
Delay_ms ( 500 );
temphum9_send_command( &temphum9, TEMPHUM9_WAKEUP );
Delay_ms ( 500 );
log_info( &logger, " Application Task " );
}
void application_task( )
{
float temperature = 0;
float humidity = 0;
temhum9_get_data ( &temphum9, TEMPHUM9_NORMAL_MODE, &temperature, &humidity );
log_printf( &logger, " Temperature: %.2f degC\r\n", temperature );
log_printf( &logger, " Relative humidity: %.2f %%\r\n", humidity );
log_printf( &logger, "-----------------------------\r\n" );
Delay_ms ( 1000 );
}
int main ( void )
{
/* Do not remove this line or clock might not be set correctly. */
#ifdef PREINIT_SUPPORTED
preinit();
#endif
application_init( );
for ( ; ; )
{
application_task( );
}
return 0;
}
// ------------------------------------------------------------------------ END
Additional Support
Resources
Category:Temperature & humidity