How does it work?
PHT Click is based on the MS8607, a digital combination sensor providing 3 environmental measurements all-in-one: pressure, humidity, and temperature from TE Connectivity. The MS8607 includes two sensors based on the MEMS technologies used to measure pressure, humidity, and temperature. The first is a piezo-resistive sensor providing pressure and temperature measurements, and the second sensor is a capacitive type humidity sensor providing relative humidity measurement. Each sensor is interfaced to a ΔΣ ADC integrated circuit for the digital conversion. The MS8607 converts both analog output voltages to a 24-bit digital value for the pressure and temperature measurements and a 12-bit digital value for the relative humidity measurement.
Pressure measurement accuracy comes in at +/- 2 mbar, relative humidity at +/- 3% RH, and the temperature within 1°C. One standout feature of the MS8607 is it’s very respectable low power consumption at as low as 0.78 µA. Perfect for sensing general weather conditions, the MS8607 really shines for high altitude low-pressure applications. Capable of sensing down to 10mbar, the MS8607 is simple to use and gives the user some powerful readings with very little power and conversion time.
PHT Click communicates with MCU using the standard I2C 2-Wire interface with a maximum clock frequency of 400kHz. Since the sensor is supplied with 3.3V logic voltage level only, also featured on this Click board™ is a PCA9306 voltage-level translator from Texas Instruments. The I2C interface bus lines are routed to the dual bidirectional voltage-level translator that allows this Click board™ to be interfaced with both 3.3V and 5V MCUs.
This Click board™ is designed to be operated with both 3.3V and 5V logic voltage levels that can be selected via VCC SEL jumper. This allows for both 3.3V and 5V capable MCUs to use the I2C communication lines properly. However, the Click board™ comes equipped with a library that contains easy to use functions and an example code that can be used as a reference for further development.
Specifications
Type
Environmental
Applications
Can be used for environmental monitoring, as well as PHT applications such as HVAC and weather stations.
On-board modules
PHT Click is based on the MS8607, a digital combination sensor providing 3 environmental measurements all-in-one: pressure, humidity, and temperature from TE Connectivity.
Key Features
Ultra-low power consumption, integrated pressure, humidity and temperature sensor, fully factory calibrated, high-resolution, and more.
Interface
I2C
Feature
No ClickID
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 PHT Click corresponds to the pinout on the mikroBUS™ socket (the latter shown in the two middle columns).
Onboard settings and indicators
Label | Name | Default | Description |
---|---|---|---|
LD1 | PWR | – | Power LED Indicator |
JP1 | VCC SEL | Left | Power Supply Voltage Selection 3V3/5V: Left position 3V3, Right position 5V |
PHT Click electrical specifications
Description | Min | Typ | Max | Unit |
---|---|---|---|---|
Supply Voltage | -0.3 | 3.3 | 3.6 | V |
Operating Pressure Range | 300 | – | 1200 | mbar |
Operating Relative Humidity Range | 0 | – | 100 | %RH |
Operating Temperature Range | -40 | – | +85 | °C |
Software Support
We provide a library for the PHT 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 PHT Click board™. Library performs a standard I2C interface communication.
Key functions:
(float *pressure )
– Get temperature and pressure function.void pht_get_relative_humidity ( float *humidity )
– Get humidity function.(uint8_t press_ratio )
– Set Ratio function.
Examples description
The application is composed of three sections :
- System Initialization – Initializes I2C and start to write log.
- Application Initialization – Initialization driver enables – I2C, performs the device reset and determines the oversampling ratio, also write log.
- Application Task – (code snippet) This is an example that demonstrates the use of the PHT Click board™. PHT Click board™ can be used to measure Pressure, Temperature and Relative Humidity. All data logs write on USB uart changes every 3 sec.
void application_task ( ) { pht_get_temperature_pressure( &temperature, &pressure ); Delay_ms( 10 ); pht_get_relative_humidity( &humidity ); Delay_ms( 10 ); mikrobus_logWrite( " Pressure : ", _LOG_TEXT ); FloatToStr( pressure, log_text ); mikrobus_logWrite( log_text, _LOG_TEXT ); mikrobus_logWrite( " mBar", _LOG_LINE ); FloatToStr( humidity, log_text ); mikrobus_logWrite( " Humidity : ", _LOG_TEXT ); mikrobus_logWrite( log_text, _LOG_TEXT ); mikrobus_logWrite( " %", _LOG_LINE ); mikrobus_logWrite( " Temperature : ", _LOG_TEXT ); FloatToStr( temperature, log_text ); mikrobus_logWrite( log_text, _LOG_TEXT ); mikrobus_logWrite( " C", _LOG_LINE ); mikrobus_logWrite( "-----------------------------", _LOG_LINE ); Delay_ms( 3000 ); }
The full application code, and ready to use projects can be found on our LibStock page.
Other mikroE Libraries used in the example:
- I2C
- UART
- Conversions
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.