前言
需要买热风枪了,这玩意是底部贴片的元件,要不然就自己开个小板做了,赶时间,最后多花了20买了个成品的模块,心疼钱。
MS5837-02BA
MS5837-02BA 数字压力传感器 是一款凝胶填注、超紧凑的防水型压力和温度传感器模块,针对健身跟踪器、无人机和可穿戴设备等消费类设备进行了优化。
板装式压力传感器类型: 数字压力和高度传感器模块 板装式压力传感器种类: 绝对 压力(mbar): 2000 耐压范围: 10 bar 压力(bar): 2
FEATURES
- Ceramic and metal package: 3.3 x 3.3 x 2.75mm
- High resolution module: 13 cm
- Supply voltage: 1.5 to 3.6 V
- Low power: 0.6 µA (standby ≤ 0.1 µA at 25°C)
- Integrated digital pressure sensor (24 bit ΔΣ ADC)
- Operating range: 300 to 1,200 mbar, -20 to +85 °C
- I2C interface
- No external components (internal oscillator)
- Water resistant sealing with 1.8 x 0.8mm O-ring
- Shielded metal lid option
PRESSURE AND TEMPERATURE CALCULATION
GENERAL
The MS5837 consists of a piezo-resistive sensor and a sensor interface integrated circuit. The main function of the MS5837 is to convert the uncompensated analogue output voltage from the piezo-resistive pressure sensor to a 24-bit digital value, as well as providing a 24-bit digital value for the temperature of the sensor.
MS5837 可以采集的数据包括了 24-bit 的压力和 24-bit 的温度。
FACTORY CALIBRATION
Every module is individually factory calibrated at two temperatures and two pressures. As a result, 6 coefficients necessary to compensate for process variations and temperature variations are calculated and stored in the 112-bit PROM of each module. These bits (partitioned into 6 coefficients) must be read by the microcontroller software and used in the program converting D1 and D2 into compensated pressure and temperature values.
压力 D1 和温度 D2 的数据补偿存储在 112-bit 的 PROM 中,在读取数据时需要额外读取并修正 D1 和 D2。
COMMUNICATION INTERFACE
The MS5837 has been built with I2C serial interface.
PRESSURE AND TEMPERATURE CALCULATION
Maximum values for calculation results: = 10mbar, = 2000mbar = -40°C, = 85°C = 20°C
Read calibration data (factory calibrated) from PROM
Variable | Desription (Equation) | Type |
---|---|---|
C1 | Pressure sensitivity () | unsigned int |
C2 | Pressure offset () | unsigned int |
C3 | Temperature coefficient of pressure sensitivity () | unsigned int |
C4 | Temperature coefficient of pressure offset () | unsigned int |
C5 | Reference temperature () | unsigned int |
C6 | Temperature coefficient of temperature () | unsigned int |
Read digital pressure and temperature data
Variable | Desription (Equation) | Type |
---|---|---|
D1 | Digital pressure value | unsigned long |
D2 | Digital temperature value | unsigned long |
Calculate temperature
Variable | Desription (Equation) | Type |
---|---|---|
dT | Difference between actual and reference temperature | long |
TEMP | Actual temperature ^{{\circ}}C | long |
Calculate temperature compensated pressure
Variable | Desription (Equation) | Type |
---|---|---|
OFF | Offset at actual temperature | long long |
SENS | Sensitivity at actual temperature | long long |
P | Temperature compensated pressure | long |
SECOND ORDER TEMPERATURE COMPENSATION
- TEMP < 20
- Low temperature
- Calculate pressure and temperature 2nd order
I2C INTERFACE
COMMANDS
The MS5837 has only five basic commands:
- Reset
- Read PROM (112 bit of calibration words)
- D1 conversion
- D2 conversion
- Read ADC result (24 bit pressure / temperature)
Each I2C communication message starts with the start condition and it is ended with the stop condition. The MS5837 address is 1110110x (write: x=0, read: x=1).
Size of each command is 1 byte (8 bits) as described in the table below. After ADC read commands, the device will return 24 bit result and after the PROM read 16 bit results. The address of the PROM is embedded inside of the PROM read command using the a2, a1 and a0 bits.
| Bit number | 0 1 2 3 4 5 6 7 | | Bit name | PROM - CONV - NULL - Typ - Ad2/Os2 - Ad1/Os1 - Ad0/Os0 - Stop |
| Command Name | hex value |
| :--- | :---- | :---- |
| Reset | 0x1E (0b00011110) |
| Convert D1 (OSR=256) | 0x40 (0b01000000) |
| Convert D1 (OSR=512) | 0x42 (0b01000010) |
| Convert D1 (OSR=1024) | 0x44 (0b01000100) |
| Convert D1 (OSR=2048) | 0x46 (0b01000110) |
| Convert D1 (OSR=4096) | 0x48 (0b01001000) |
| Convert D1 (OSR=8192) | 0x4A (0b01001010) |
| Convert D2 (OSR=256) | 0x50 (0b01010000) |
| Convert D2 (OSR=512) | 0x52 (0b01010010) |
| Convert D2 (OSR=1024) | 0x54 (0b01010100) |
| Convert D2 (OSR=2048) | 0x56 (0b01010110) |
| Convert D2 (OSR=4096) | 0x58 (0b01011000)|
| Convert D2 (OSR=8192) | 0x5A (01011010) |
| ADC Read | 0x00 (0b00000000) |
| PROM Read | 0xA0 to 0xAE (0b1010-Ad2-Ad1-Ad0-0) |
RESET SEQUENCE
The Reset sequence shall be sent once after power-on to make sure that the calibration PROM gets loaded into the internal register. It can be also used to reset the device PROM from an unknown condition. The reset can be sent at any time. In the event that there is not a successful power on reset this may be caused by the SDA being blocked by the module in the acknowledge state. The only way to get the MS5837 to function is to send several SCLs followed by a reset sequence or to repeat power on reset.
PROM READ SEQUENCE
The read command for PROM shall be executed once after reset by the user to read the content of the calibration PROM and to calculate the calibration coefficients. There are in total 7 addresses resulting in a total memory of 112 bit. Addresses contain factory data and the setup, calibration coefficients, the serial code and CRC. The command sequence is 8 bits long with a 16 bit result which is clocked with the MSB first. The PROM Read command consists of two parts. First command sets up the system into PROM read mode. The second part gets the data from the system.
CONVERSION SEQUENCE
The conversion command is used to initiate uncompensated pressure (D1) or uncompensated temperature (D2) conversion. After the conversion, using ADC read command the result is clocked out with the MSB first. If the conversion is not executed before the ADC read command, or the ADC read command is repeated, it will give 0 as the output result. If the ADC read command is sent during conversion the result will be 0, the conversion will not stop and the final result will be wrong. Conversion sequence sent during the already started conversion process will yield incorrect result as well. A conversion can be started by sending the command to MS5837. When command is sent to the system it stays busy until conversion is done. When conversion is finished the data can be accessed by sending a Read command, when an acknowledge is sent from the MS5837, 24 SCL cycles may be sent to receive all result bits. Every 8 bits the system waits for an acknowledge signal.