Product description: LPS331AP - pressure and altitude sensor 126kPa I2C / SPI 3-5V
The module is containing the MEMS LPS331AP pressure sensor from ST. On the Board are also required passive elements and a voltage regulator low-dropout, which enables sensor work with systems of 3.3 V and 5 V.
LPS331AP system (documentation) has a built-in temperature compensation and a lot of customizable options, including: selectable resolutions, as well as two programmable external interrupts. The sensors works in the range of 26 kPa to 126 kPa with an accuracy of 0.2 kPa. In the highest resolution mode, noises are at a level of 0.002 kPa. The communication interface is I2C or SPI bus.
The product is compatible with Arduino The manufacturer has preparedan Arduino libraryfor the sensorLPS331AP which allows for simple maintenance of the sensor, using the module of Arduino. |
Connection of sensor
The sensor has nine pins for mounting goldpin connectors - 2.54 mm pitch (included). On request, we can solder the strap.
The power is in the range of 2.5 V to 5V, which has to be connected to VIN and GND pins. In the case of using the system powered with the voltage of 3.3 V, VIN pin can be left disconnected, and the power has to be brought directly into the system via pin VDD.
The system communicates via digital I2C or SPI interface. Voltage of the logic signals on the bus must have the same value as the voltage supplied to VIN. In the case of using I2C buss, pins SCL and SDA must be connected. SPI requires the connection of 4 pins: SDI, SDO, CS and SPC.
PIN | Description |
---|---|
SDA SDI SDO |
The data line of the I2C bus, the line of the input SPI data (SDO in mode 3-wire). High status is equal to the voltage VIN, low GND. |
SCL SPC |
Clock line of the I2C bus. High status is equal to the voltage VIN, low, GND. |
SDO SA0 |
The line of output data of SPI bus (data-out) or change of address in case of I2C. High status is equal to VDD, low GND. (without voltage Converter). |
CS | Chip select - SPI Enable. Pin is by default in high status (active interface I2C), to begin the SPI communication, you must specify the low status. |
INT2 | Programmable interrupts - high status is equal to the high voltage VDD, low GND. (without voltage Converter). |
INT1 | Programmable interrupt - high status is equal to the high voltage VDD, low GND. (without voltage Converter). |
VIN | Supply voltage from 2.5 V to 5.5 V |
VDD | In the case, where the supply voltage is higher than 3.3 V, the output can be used as the voltage output of 3.3 V with maximum current of up to 150mA. |
GND | The potential of the ground of the system |
The I2C bus
By default, the system uses the I2C interface - the CS output is in high state (pulled up, using a resistor to VDD). Details about the I2C communication, can be found in thedocumentationand in cataloge note from NXP, about the specification of I2C bus.
The sensor has a 7-bit address, whose latest bit is determined with the help of the status on pin SA0. The pin is pulled up to VDD through a 4.7 kΩresistor, what determines the address to a value of 1011101b.
The bus operates correctly with a frequency of 400 MHz (fast mode), higher values may work correctly but have not been tested.
The SPI bus
To choose the connection via the SPI, at pin CS, specified should be the low status (connected to ground). The details of the transfer and a description of the registers is in thedocumentation of the system.
Tips of first use
All the necessary information about communication and service of the module, are inthe documentation. Below are several basic facts:
- By default, the pressure sensor is in the mode of low consumption of energy, to run it, you must enter the appropriate value to the CTRL_REG1 register.
- Possible is a multi-read and multi-write using one command of I2C, through the setting of the most significant bit of the address (starting autoinkrementation).
- You can run autoinkrementation mode in SPI mode through setting the MS bit - details indocumentation.
Dimensions of module
The system is small in size, its contour has is a rectangle with the size of: 22,86 x 10,16 mm. For mounting, used is the hole with inside diameter of 2.18 mm.
Scheme
The system includes: a voltage regulator, filtering capacitors, pulling up resistors (e.g. I2C bus' lines) and other passive components to facilitate maintenance of the sensor.
Specification of LPS331AP sensor
- Supply voltage: 2.5 V - 5.5 V
- Current consumption: 2 mA
- Communication interface: I2C (TWI) or SPI
- Data format: 24-bits
- Measurement range: 26 kPa to 126 kPa
- Size: 22,86 x 10.16 x 2.54 mm
- Weight: 0.6 g (without connectors)
Useful links |