Baromètre 2 Click Board
Baromètre 2 Click Board
Le Barometer 2 Click Board™ est un baromètre numérique sur Click Board™. Le Barometer 2 Click Board™ est équipé du LPS35HW, un capteur de pression piézorésistif absolu avec boîtier en céramique résistant à l'eau, fabriqué à l'aide d'une technologie exclusive. Ce capteur offre de nombreux avantages, notamment une faible consommation d'énergie, une haute résolution des données de pression, une compensation thermique intégrée, un tampon FIFO avec plusieurs modes de fonctionnement, une mesure de température, etc. La caractéristique la plus distinctive de ce capteur est sa capacité à mesurer la pression dans une large plage entre 260 et 1260 hPa, offrant des lectures calibrées via l'interface numérique I2C.
The pressure sensor is packed in ceramic, water-resistant housing, preventing water or humidity to damage the circuit. Additionally, it is protected from overpressure, allowing it to withstand pressure peaks up to 20x its measurement range. These features make the Barometer 2 Click Board™ a perfect tool for the development of various pressure-based applications, especially when low-power consumption is required: portable weather stations, IoT and other battery-operated pressure-related applications, wearables, and similar.
How Does The Barometer 2 Click Board™ Work?
The Barometer 2 Click Board™ features the LPS35HW, an absolute digital output barometer IC in water-resistant package, from STMicroelectronics. It can be used to measure absolute pressure values from 260 - 1260hPa. The sensor can be exposed up to 2MPa of pressure peaks, without causing any permanent damage. However, prolonged exposure to such high pressure can affect the reliability and accuracy of the sensor.
The LPS35HW IC comprises a piezoresistive MEMS and an ASIC. The MEMS consists of a suspended membrane manufactured using a proprietary technology, developed by ST. The piezoresistive elements on the membrane form a Wheatstone bridge. By applying a pressure, the balance of the bridge is disturbed, which causes a proportional voltage to appear on its output. The output of the Wheatstone bridge is then processed by the ASIC, which outputs conditioned and factory-calibrated data over the I2C interface, in 24-bit, two's complement format.
The Barometer 2 Click Board™ supports the I2C communication interface, allowing it to be used with a wide range of different MCUs. The slave I2C address can be configured by an SMD jumper, labelled as ADD SEL. An SMD jumper is used to set the least significant bit (LSB) of the I2C address. When set to 1, the 7-bit I2C slave address becomes 0b1011101x. If set to 0, the address becomes 0b1011100x. The last digit (x) is the R/W bit.
One of distinctive features of the LPS35HW is a highly configurable FIFO buffer, with 32 slots of 40-bit data, allowing to buffer both pressure and temperature readings. The FIFO buffer can be configured to work in one of several available modes, offering a great flexibility. Along with the extensive interrupt engine which can signal several FIFO-related events over a dedicated INT_DRDY pin, the FIFO buffer can be very useful for writing an optimized MCU firmware.
Besides FIFO-related events, the extensive interrupt engine of the LPS35HW IC can be configured to signal several other events over a dedicated INT_DRDY pin, including events when a programmable low or high threshold level is exceeded, and events when there is a data ready to be read from the output. The INT_DRDY pin of the LPS35HW IC is routed to the mikroBUS INT pin. Its active state (active LOW or active HIGH) is freely configurable.
Pressure data at the output is in 24-bit, two's complement format. Thanks to the highly advanced ASIC, the output is already formatted in physical units, with minimum operations required from the host MCU. Since the sensitivity is 4096 LSB/hPa, the output result should be divided by 4096 in order to obtain the value in hPa units. Temperature data is in 16-bit two's complement format, and it does not require any conversions. The sensitivity of the temperature sensor is 100 LSB/⁰C so the output result should be divided by 100 in order to obtain the value in ⁰C units. ASIC also offers some other processing functions such as the lowpass filtering of the output data, which helps reducing the inconsistencies due to sudden pressure changes.
The Barometer 2 Click Board™ uses both I2C, and it is designed to be operated only with 3.3V logic level. A proper logic voltage level conversion should be performed before the Click Board™ is used with MCUs with logic levels of 5V.
SPECIFICATIONS
Type | Pressure |
Applications | The Barometer 2 Click Board™ is a perfect tool for development of various pressure-based applications, especially when low-power consumption is required: portable weather stations, IoT and other battery-operated pressure-related applications, wearables, and similar. |
On-board modules | LPS35HW, an absolute digital output barometer IC in water-resistant package, from STMicroelectronics. |
Key Features | Built in ASIC for output data processing, 24-bit conversion, low count of external components required, water-proof casing offers reliability and long-term stability, extensive programmable interrupt engine, advanced FIFO buffer with several operating modes, etc. |
Interface | I2C |
Compatibility | mikroBUS |
Click Board™ size | S (28.6 x 25.4 mm) |
Input Voltage | 3.3V |
PINOUT DIAGRAM
This table shows how the pinout of the Barometer 2 Click Board™ corresponds to the pinout on the mikroBUS socket (the latter shown in the two middle columns).
Notes | Pin | Pin | Notes | ||||
---|---|---|---|---|---|---|---|
NC | 1 | AN | PWM | 16 | NC | ||
NC | 2 | RST | INT | 15 | INT | Interrupt | |
NC | 3 | CS | RX | 14 | NC | ||
NC | 4 | SCK | TX | 13 | NC | ||
NC | 5 | MISO | SCL | 12 | SCL | I2C Clock | |
NC | 6 | MOSI | SDA | 11 | SDA | I2C Data | |
Power Supply | 3.3V | 7 | 3.3V | 5V | 10 | NC | |
Ground | GND | 8 | GND | GND | 9 | GND | Ground |
ONBOARD SETTINGS AND INDICATORS
Label | Name | Default | Description |
---|---|---|---|
LD1 | PWR | - | Power LED Indicator |
A0 | ADDR | Left | Slave I2C address LSB selection: left position 0, right position 1 |
BAROMETER 2 Click Board™ ELECTRICAL SPECIFICATIONS
Description | Min | Typ | Max | Unit |
---|---|---|---|---|
Pressure range | 260 | - | 1260 | hPa |
Operating temperature range | -40 | - | +85 | ˚C |
Output Data rate | 1 | - | 75 | sps |
Software Support
Software Support
We provide a library for the Barometer 2 Click Board™ 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 initializes and defines the I2C bus driver and drivers that offer a choice for writing data in register and reads data form register. The library includes function for read Pressure data in Bar/mBar/hPa/kPa/Torr or mmHg and Temperature data in Celsius/Kelvin or Fahrenheit. The user also has the function for reset device and function for read interrupt state.
Key Functions
float barometer2_getPressure(uint8_t pressureIn)
- Pressure data in ... (Bar, mBar, hPa, kPa, mmHg and Torr).float barometer2_getTemperature(uint8_t tempIn)
- Temperature data in ... (Celsius, Kelvin and Fahrenheit).
Example Description
The application is composed of three sections :
- System Initialization - Initilization I2C module and sets INT pin as INPUT
- Application Initialization - Initializes driver init, test communication, software reset and configuration module for measurement
- Application Task - Reads Pressure data in mBar and Temperature data in C. This data logs to USBUART every 1 sec.
- note - Pressure data is available in the following units: mBar, Bar, kPa, Torr and mmHg - Temperature data is available in the following units: Celsius, Kelvin and Farenhajt
void applicationTask() { float Temperature; float Pressure; char demoText[ 50 ]; Temperature = barometer2_getTemperature(_BAROMETER2_TEMPERATURE_IN_CELSIUS); FloatToStr(Temperature, demoText); mikroBUS_logWrite(" Temperature : ", _LOG_TEXT); mikroBUS_logWrite(demoText, _LOG_LINE); Pressure = barometer2_getPressure(_BAROMETER2_PRESSURE_DATA_IN_mBar); FloatToStr(Pressure, demoText); mikroBUS_logWrite(" Pressure : ", _LOG_TEXT); mikroBUS_logWrite(demoText, _LOG_LINE); mikroBUS_logWrite("--------------------------", _LOG_LINE); Delay_ms( 1000 ); }
Other mikroE Libraries used in the example:
- alarmOn - Generates an alarm sound for charger power ON.
- alarmOff - Generates an alarm sound for charger power OFF.
- alarmFault - Generates an alarm sound for fault condition.
- writeLegend - Writes possible valid commands to the uart terminal.
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
- UART Library
- Conversions Library
Additional Notes and Information
Depending on the development board you are using, you may need a USB UART Click Board™, USB UART 2 Click Board™ or RS232 Click Board™ 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
The Barometer 2 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.
Software Support
Software Support
We provide a library for the Barometer 2 Click Board™ 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 initializes and defines the I2C bus driver and drivers that offer a choice for writing data in register and reads data form register. The library includes function for read Pressure data in Bar/mBar/hPa/kPa/Torr or mmHg and Temperature data in Celsius/Kelvin or Fahrenheit. The user also has the function for reset device and function for read interrupt state.
Key Functions
float barometer2_getPressure(uint8_t pressureIn)
- Pressure data in ... (Bar, mBar, hPa, kPa, mmHg and Torr).float barometer2_getTemperature(uint8_t tempIn)
- Temperature data in ... (Celsius, Kelvin and Fahrenheit).
Example Description
The application is composed of three sections :
- System Initialization - Initilization I2C module and sets INT pin as INPUT
- Application Initialization - Initializes driver init, test communication, software reset and configuration module for measurement
- Application Task - Reads Pressure data in mBar and Temperature data in C. This data logs to USBUART every 1 sec.
- note - Pressure data is available in the following units: mBar, Bar, kPa, Torr and mmHg - Temperature data is available in the following units: Celsius, Kelvin and Farenhajt
void applicationTask() { float Temperature; float Pressure; char demoText[ 50 ]; Temperature = barometer2_getTemperature(_BAROMETER2_TEMPERATURE_IN_CELSIUS); FloatToStr(Temperature, demoText); mikroBUS_logWrite(" Temperature : ", _LOG_TEXT); mikroBUS_logWrite(demoText, _LOG_LINE); Pressure = barometer2_getPressure(_BAROMETER2_PRESSURE_DATA_IN_mBar); FloatToStr(Pressure, demoText); mikroBUS_logWrite(" Pressure : ", _LOG_TEXT); mikroBUS_logWrite(demoText, _LOG_LINE); mikroBUS_logWrite("--------------------------", _LOG_LINE); Delay_ms( 1000 ); }
Other mikroE Libraries used in the example:
- alarmOn - Generates an alarm sound for charger power ON.
- alarmOff - Generates an alarm sound for charger power OFF.
- alarmFault - Generates an alarm sound for fault condition.
- writeLegend - Writes possible valid commands to the uart terminal.
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
- UART Library
- Conversions Library
Additional Notes and Information
Depending on the development board you are using, you may need a USB UART Click Board™, USB UART 2 Click Board™ or RS232 Click Board™ 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
The Barometer 2 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.
Baromètre 2 Click Board
Frequently Asked Questions
Have a Question?
Be the first to ask a question about this.