How does it work?
Pressure 10 Click uses the HSPPAD042A IC, a digital pressure sensor, from ALPS ELECTRIC. This sensor consists of a piezoresistive pressure sensing element and a mixed-signal ASIC which performs A/D conversions and provides the conversion results through a digital interface. MEMS technology, which this sensor element is made of, offers a high sensing precision with ±0.7hPa absolute and ±0.05hPa relative pressure accuracy and industry-lowest current consumption of 1.8μA in low power mode. The sensor is enclosed in a small LGA package and can operate in a range of 300 hPa to 1100 hPa but can withstand up to 30,000 hPa before the membrane breaks down.
The HSPPAD042A offers a set of pressure and temperature measurement options. Several measurement modes can be set by CTL1.MODE bit in 0x0F register:
- Register Action Mode: Allows access to ACTL1 (Action Control) register and execute temperature and pressure measurements by setting TDET and PDET bits to “1”. After measurements, the device goes to the standby state and minimizes current consumption waiting for the next command.
- Continuous Measurement Mode: Executes measurement with specified frequency. To move into this mode, PMES bit in CTL2 (Control) register must be set to “1”. Measurement is started immediately after measurement mode transition and the following measurement is repeated.
- Command Action Mode: In this mode, several functions are performed by writing “1” at the same bit name in ACTL1 and ACTL2 registers (perform only pressure or temperature measurement, perform a software reset, or perform both pressure and temperature measurement).
After software reset command is detected, the digital regulator is disabled and all register values are reset and measurement mode is set to Register Action Mode. FIFO buffer allows for an optimization of the host firmware, reducing the data traffic through the communication interface. The interrupt is available over the RDY pin (Data Ready pin), and can be used to indicates measurement completion. Multiple flags can be set to the RDY pin. They are all OR output and the change will be effective immediately even during the measurement.
Pressure 10 Click offers a choice between two interfaces: I2C and SPI. The selection can be done by positioning SMD jumpers labeled as COMM SEL to an appropriate position. Note that all the jumpers must be placed to the same side, or else the Click board™ may become unresponsive. While the I2C interface is selected, the HSPPAD042A allows the choice of the least significant bit (LSB) of its I2C slave address. This can be done by using the SMD jumper labeled as ADDR SEL.
This Click Board™ uses both I2C and SPI communication interfaces. It is designed to be operated only with 3.3V logic levels. A proper logic voltage level conversion should be performed before the Click board™ is used with MCUs with logic levels of 5V. More information about the HSPPAD042A can be found in the attached datasheet. However, the Click board™ comes equipped with a library that contains easy to use functions and a usage example that may be used as a reference for the development.
Specifications
Type
Pressure
Applications
An ideal solution for the development of portable weather station applications, indoor navigation, altitude control for drones, and similar applications that rely on barometric pressure measurements.
On-board modules
Pressure 10 Click uses the HSPPAD042A IC, a digital pressure sensor, from ALPS ELECTRIC.
Key Features
Industry-lowest current consumption, 300 hPa to 1100 hPa range, temperature reading, averaging, noise filtering, FIFO function.
Interface
GPIO,I2C,SPI
Feature
No ClickID
Compatibility
mikroBUS™
Click board size
S (28.6 x 25.4 mm)
Input Voltage
3.3V
Pinout diagram
This table shows how the pinout on Pressure 10 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-JP4 | COM SEL | Right | Communication Interface Selection: Left position SPI, Right position I2C |
JP5 | ADDR SEL | Right | I2C Address Selection: Left position 0, Right position 1 |
Pressure 10 Click electrical specifications
Description | Min | Typ | Max | Unit |
---|---|---|---|---|
Supply Voltage | -0.5 | – | 4.0 | V |
Maximum Load Pressure | – | – | 30000 | hPa |
Operating Temperature Range | -40 | – | +125 | °C |
Current consumption (Low power mode) | – | 1.8 | – | μA |
Pressure absolute accuracy | – | ±0.7 | – | hPa |
Pressure relative accuracy | – | ±0.05 | – | hPa |
Software Support
We provide a library for the Pressure 10 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 contains basic functions for reading temperature and pressure. The user has the ability to set the configuration of the measurement module.
Key functions:
float pressure10_get_temperature ( void )
– Get Temperature data in Cfloat pressure10_get_pressure ( void )
– Get Pressure data in %RHvoid pressure10_control_cfg ( uint8_t ctrl_reg, uint8_t wr_data )
– Set the configuration in the control registers
Examples description
The application is composed of three sections :
- System Initialization – Initializes I2C or SPI module and all necessary GPIO pins
- Application Initialization – Initialization driver init, check communication and configuration module for measurement.
- Application Task – Reads pressure data and temperature data every 1500ms.
void application_task( ) { float temperature; float pressure; char demo_text[ 20 ]; pressure = pressure10_get_pressure( ); temperature = pressure10_get_temperature( ); FloatToStr( temperature, demo_text ); mikrobus_logwrite( ">> Temperature: ", _LOG_TEXT ); mikrobus_logwrite( demo_text, _LOG_TEXT ); mikrobus_logWrite( " C", _LOG_LINE ); FloatToStr( pressure, demo_text ); mikrobus_logwrite( ">> Pressure: ", _LOG_TEXT ); mikrobus_logwrite( demo_text, _LOG_TEXT ); mikrobus_logWrite( " %RH", _LOG_LINE ); mikrobus_logwrite( "-----------------------", _LOG_LINE ); Delay_ms( 1500 ); }
The full application code, and ready to use projects can be found on our LibStock page.
Other mikroE Libraries used in the example:
- I2C Library
- SPI Library
- 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.