How does it work?
Diff Press 2 Click as its foundation uses the SDP31-500PA, a highly versatile differential pressure sensor designed for high-volume applications from Sensirion. It builds on the next-generation CMOSens® sensor chip at the heart of Sensirion’s new differential pressure and flows sensing platform. It features fast measurement speed, excellent accuracy, and long-term stability, has no zero-point drift, and offers an ultra-low power consumption, making the SDP31-500PA the perfect choice for applications where accurate and reliable pressure monitoring is essential.
The SDP31-500PA is very flexible regarding measurement speed. This flexibility allows for optimizing the sensor’s performance to a specific application and for adapting the sensor to different use cases. For example, the sensor detects the smallest and quickest changes in one use case, whereas, in another mode, the sensor can measure in larger intervals while consuming only little energy.
Diff Press 2 Click communicates with MCU using the standard I2C 2-Wire interface to read data and configure settings, supporting Fast Mode up to 400kHz. Besides, the SDP31-500PA allows choosing the least significant bit (LSB) of its I2C slave address using the SMD jumper labeled ADDR SEL. It also possesses an additional interrupt signal, routed on the INT pin of the mikroBUS™ socket labeled as INT, indicating when a specific interrupt event occurs, such as indicating whether new measurement results are available.
This Click board™ can operate with both 3.3V and 5V logic voltage levels selected via the VCC SEL jumper. This way, it is allowed for both 3.3V and 5V capable MCUs to use the I2C communication lines properly. However, the Click board™ comes equipped with a library containing easy-to-use functions and an example code that can be used, as a reference, for further development.
Specifications
Type
Pressure
Applications
Can be used for weather station equipment, industrial, consumer applications, and similar applications which rely on accurate and reliable pressure monitoring
On-board modules
SDP31 – highly versatile differential pressure sensor designed for high-volume applications from Sensirion
Key Features
Low power consumption, measurement range ±500Pa, excellent accuracy and repeatability even below 1Pa, no zero-offset and drift, calibrated and temperature compensated, and more
Interface
I2C
Feature
No ClickID
Compatibility
mikroBUS™
Click board size
M (42.9 x 25.4 mm)
Input Voltage
3.3V or 5V
Pinout diagram
This table shows how the pinout on Diff Press 2 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 | Logic Level Voltage Selection 3V3/5V: Left position 3V3, Right position 5V |
JP2 | ADDR SEL | left | I2C Address Selection R4/GND: Left position R4, Right position GND |
Diff Press 2 Click electrical specifications
Description | Min | Typ | Max | Unit |
---|---|---|---|---|
Supply Voltage | 3.3 | – | 5 | V |
Measurement Range | -500 | – | 500 | Pa |
Accuracy | – | 3 | – | % |
Resolution | – | 16 | – | bit |
Operating Temperature Range | -40 | +25 | +85 | °C |
Software Support
We provide a library for the Diff Press 2 Click as well as a demo application (example), developed using MikroElektronika compilers. The demo can run on all the main MikroElektronika development boards.
Package can be downloaded/installed directly from NECTO Studio Package Manager(recommended way), downloaded from our LibStock™ or found on Mikroe github account.
Library Description
This library contains API for Diff Press 2 Click driver.
Key functions
-
diffpress2_get_id
Reads device ID’s -
diffpress2_reset
Reset device -
diffpress2_trigger_measurement
Pressure and temperature reading
Example Description
This example application showcases ability for device to read and calculate mass flow or diff press pressure in Pascals and temperature in degrees Celsius.
void application_task ( void )
{
float pressure;
float temperature;
if ( diffpress2_trigger_measurement( &diffpress2, DIFFPRESS2_CMD_TRIGGER_MEAS_DIFF_PRESS,
&pressure, &temperature ) )
{
log_error( &logger, " Read data." );
}
else
{
log_printf( &logger, " > Pressure[Pa]: %.2frn", pressure );
log_printf( &logger, " > Temperature[degC]: %.2frn", temperature );
log_printf( &logger, "*************************************rn" );
}
Delay_ms( 300 );
}
The full application code, and ready to use projects can be installed directly from NECTO Studio Package Manager(recommended way), downloaded from our LibStock™ or found on Mikroe github account.
Other Mikroe Libraries used in the example:
- MikroSDK.Board
- MikroSDK.Log
- Click.DiffPress2
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. UART terminal is available in all MikroElektronika compilers.
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.