Digital sensors outputs in formats like I2C bus, SPI bus, Microwire/PLUS bus and one-wire single bus, etc. The MPM3808 pressure sensor is digital with I2C bus output.
There are three kinds of sensors inside the integrated underwater open channel flow meter, which collects flow rate, water level, and temperature data in real-time. The ultrasonic sensor is used to detect the flow rate with high accuracy, wide range, and fast response, the measuring point is in front of the probe, the flow field won’t be affected. The water level is measured by the MPM3808 digital pressure sensor installed at the rear, and the pressure is less affected by the water flow. The built-in temperature sensor measures temperature and makes digital temperature corrections.
The velocity area method is used to comprehensively calculate the flow rate of the measured liquid. It is ideal to measure flow rates and flow for rivers, open channels both ordinary and special one where it is difficult to construct standard sections such as the Parshall flume.
The MPM3808 I2C digital pressure sensor has gradually expanded its application field after years of market promotion, and its advantages are obvious as below:
1. The output consistency error of the sensor can reach 0.5% or less, and the characteristic parameters of the sensor can be identical, so it has good interchangeability.
2. Excellent electromagnetic compatibility, increased anti-interference ability of the sensor, and more reliable than analog signals.
3. Standard digital communication interface, the signal can be directly connected to the MCU, the MCU can obtain and process more different parameters, realize multi-functional intelligent instruments.
The data acquisition of the digital signal sensor needs to be programmed by MCU, which is more complicated than the analog signal sensor. We take the MPM3808 I2C pressure sensor as an example to illustrate how digital sensors can read measurement data.
MPM3808 I2C digital pressure sensor, the I2C default communication address is 0x28, write: 0x50, read: 0x51; SCLK clock frequency: 100KHz ~ 400KHz.
The I2C master device (such as a microcontroller) sends a 7-bit slave address (0x28) and an 8th bit = 1 (read). As a slave device, the pressure sensor sends an acknowledge (ACK) as a sign to indicate that the communication is successful. The slave device then returns two bytes of pressure data (P[13:8] and P[7:0]), two bytes of temperature data (T[10:3] and T[2:0] to the master. ]). The I2C communication process is as follows:
I2C is a commonly used communication method. Many integrated development environments (IDE) integrate the I2C library function. When data is acquired, the MCU can directly call the library function to realize the sensor I2C signal reading. For example, if you call the library function wire.h, the communication flow is as follows:
Wire.begin(4,5); // Initialize I2C bus, SDA:4, SCL:5
Wire.beginTransmission(0x28); // Start transferring data once
Wire.endTransmission(void); // The communication ends and the host sends a STOP signal.
Wire.requestFrom(0x28, 4); // Read 4 bytes of data from the 0X28 device
Wire.available(); // Number of bytes received
Wire.read(); // Receive data, P1, P2, T1, T2
Pressure = P1 <<8 | P 2; // 14-bit pressure data (BIN)
Temperature = T1 <<3 | T2 >>5 ; // 11-bit temperature data (BIN)
The data read by the MCU from the MPM3808 pressure sensor is the code value, the pressure is a 14-bit binary number (0 ~ 16383), and the temperature is an 11-bit binary number (0 ~ 2047). For example, the sensor's basic range: 0 ~ 300Kpa, the output signal (5% ~ 95%) corresponds to 819 ~ 15563, the code value and pressure and temperature conversion are as follows:
(I2C data collected by MCU is simulated and printed by the SecureCRT terminal through the serial port)
At present, most sensor applications use analog output signals, but the convenience of digital output sensor applications such as I2C has been recognized by more and more designers. The sensor uses serial bus technology, which can simplify the system's hardware, reduce the size, and improve reliability. At the same time, the system upgrade and expansion are extremely easy.
For specific applications of the MPM3808 digital pressure sensor, please contact us via email@example.com. Our engineers will provide the corresponding product solutions according to your actual needs.