How does it work?
SHT AN Click is featuring SHT31-ARP-B that was built on a completely new and optimized CMOSens® chip, which allows for increased reliability and improved accuracy specifications. Sensor can be ordered with filter membrane which is a PTFE film that protects sensor from opening from water and dust.
Since the SHT31-ARP-B is a temperature and humidity (T and RH) sensor with two analog outputs for each measurement, and on the mikroBUS socket we have only one Analog output we multiplexed sensor output by suing 74LVC1G3157GV, 2-channel analog multiplexer/demultiplexer. Switching between temperature and humidity measurements is performed by asserting the selection input (SEL) which is connected to the multiplexer and by that way selecting desired data output.
Measured data is supplied as radiometric voltage output, after reading the temperature or humidity analog signal user will have to do conversion to a physical value. The physical values as measured by the sensor are mapped to a radiometric voltage output (VT, VRH as 10 to 90% of VDD). Prior to conversion into a voltage signal, the physical values are linearized and compensated for temperature and supply voltage effects by the sensor. Additionally, the voltage output is calibrated for each sensor.
The nRST pin is active low and may be used to generate a reset of the sensor. A minimum pulse duration of 1 µs is required to reliably trigger a reset. The nRST signal is routed to the mikroBUS™ RST pin.
This Click board™ can be supplied and interfaced with both 3.3V and 5V without the need for any external components. The onboard SMD jumper labeled as VCC SEL allows voltage selection for interfacing with both 3.3V and 5V microcontrollers.
Specifications
Type |
Temperature & humidity |
Applications |
Industrial RH and temperature measuring applications, smart home, air conditioner, home and environmental monitoring, etc... |
On-board modules |
SHT AN Click uses the SHT31-ARP, a high accuracy temperature and humidity sensor from Sensirion. |
Key Features |
Key Features Low energy consumption, wide temperature and humidity operating range with low RH response time, small package |
Interface |
Analog,GPIO |
Compatibility |
mikroBUS |
Click board size |
S (28.6 x 25.4 mm) |
Input Voltage |
3.3V or 5V |
Pinout diagram
This table shows how the pinout on SHT AN Click corresponds to the pinout on the mikroBUS™ socket (the latter shown in the two middle columns).
Notes |
Pin |
|
Pin |
Notes |
---|
Analog Output |
AN |
1 |
AN |
PWM |
16 |
NC |
|
Sensor Reset |
RST |
2 |
RST |
INT |
15 |
NC |
|
Selection of measurement channel |
SEL |
3 |
CS |
RX |
14 |
NC |
|
|
NC |
4 |
SCK |
TX |
13 |
NC |
|
|
NC |
5 |
MISO |
SCL |
12 |
NC |
|
|
NC |
6 |
MOSI |
SDA |
11 |
NC |
|
Power Supply |
3.3V |
7 |
3.3V |
5V |
10 |
5V |
Power Supply |
Ground |
GND |
8 |
GND |
GND |
9 |
GND |
Ground |
Onboard settings and indicators
Label |
Name |
Default |
Description |
---|
LD1 |
PWR |
- |
Power LED Indicator |
JP2 |
VCC SEL |
Left |
Power Supply Voltage Selection Jumper: Left position 3.3V, right position 5V |
SHT AN Click electrical specifications
Description |
Min |
Typ |
Max |
Unit |
---|
Supply Voltage |
2.4 |
- |
5.5 |
V |
Operating Temperature Range |
-40 |
- |
125 |
°C |
Temperature accuracy |
- |
+/- 0.3 |
- |
°C |
Humidity accuracy |
- |
+/- 2.0 |
- |
%RH |
Software Support
We provide a library for the SHT AN 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
The library covers all the necessary functions to control SHT AN Click board.
Key functions :
void shtan_set_mode ( uint8_t adc_mode )
- Set ADC mode function.
void shtan_reset ( void )
- Hardware reset function.
Examples description
The application is composed of three sections :
- System Initialization - Initializes GPIO and start to write log.
- Application Initialization - Initialization driver enables - GPIO, sw reset, initializes ADC, set ADC channel and sets ADC read mode.
- Application Task - (code snippet) This is a example which demonstrates the use of SHT AN Click board. Measured temperature and humidity ADC data and calculate temperature data to degrees Celsius [ ??C ] and humidity data to percentarg [ % ]. Results are being sent to the Usart Terminal where you can track their changes. All data logs on usb uart for aproximetly every 3 sec.
void application_task ( )
{
shtan_calculate_temperature( );
mikrobus_logWrite( " Temp. : ", _LOG_TEXT );
display_log( temperature );
mikrobus_logWrite( degCel, _LOG_LINE );
shtan_calculate_humidity( );
mikrobus_logWrite( " Hum. : ", _LOG_TEXT );
display_log( humidity );
mikrobus_logWrite( " %", _LOG_LINE );
mikrobus_logWrite( "------------------", _LOG_LINE );
Delay_ms( 1000 );
}
void shtan_calculate_temperature ( void )
- Calculate temperature
void shtan_calculate_humidity ( void )
- Calculate humidity
void display_log ( float value )
- Displays readings as floating point value with two decimal places
The full application code, and ready to use projects can be found on our LibStock page.
Other mikroE Libraries used in the example:
Additional notes and informations
Depending on the development board you are using, you may need USB UART click, USB UART 2 click or 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.
mikroSDK
This Click board™ is supported with mikroSDK - MikroElektronika Software Development Kit. To ensure proper operation of mikroSDK compliant Click board™ demo applications, mikroSDK should be downloaded from the LibStock and installed for the compiler you are using.
For more information about mikroSDK, visit the official page.
Resources
Downloads