“Wearable devices with health and fitness tracking functions are becoming increasingly popular. Such applications often use accelerometers as the main motion sensor, but the accelerometer cannot provide an accurate estimate of vertical motion, which is essential for accurately calculating parameters such as calories consumed by climbing. By adding a precision atmospheric pressure sensor, the vertical motion measurement accuracy can be significantly improved, and it can also help verify the information of other sensors.
Author: Richard Quinnell
Wearable devices with health and fitness tracking functions are becoming increasingly popular. Such applications often use accelerometers as the main motion sensor, but the accelerometer cannot provide an accurate estimate of vertical motion, which is essential for accurately calculating parameters such as calories consumed by climbing. By adding a precision atmospheric pressure sensor, the vertical motion measurement accuracy can be significantly improved, and it can also help verify the information of other sensors.
At present, the atmospheric pressure sensors on the market are sensitive enough to detect height changes as low as 13cm, and are small in size, sturdy and durable, and low in power consumption, suitable for wearable designs.
This article discusses the role of such devices in fitness trackers, and introduces a barometric pressure sensor suitable for this application launched by TE Connectivity Measurement Specialties, and explains the application method in detail.
The role of altimeter in fitness tracker
The core components of fitness tracking products are devices such as accelerometers used for inertial motion detection to calculate parameters such as the number of steps, walking distance, and calories consumed (Figure 1). However, vertical motion measurement is a challenge for this type of sensor. As far as the acceleration curve is concerned, activities such as climbing stairs are completely different from ordinary walking, so it is easy to achieve reliable detection, but the difference between walking along a slope and walking on a level ground is small, so it is difficult to distinguish only by acceleration. However, the work done (and the calories burned) in the two cases are quite different.
Some consumer studies on fitness tracking accuracy indicate that some early devices may be underestimated by 30%. In order to determine fitness parameters more accurately, fitness trackers need a simple and reliable method to accurately measure vertical movement.
Figure 1: Wearable devices with fitness tracking functions are increasingly popular with consumers. (Image source: Digi-Key Electronics, original information comes from TE Connectivity)
Atmospheric pressure sensors (ie barometers) can provide a solution. When all other factors are the same, the atmospheric pressure depends on the altitude. The relationship between the two changes is called the “vertical pressure gradient”, that is, the value of atmospheric pressure that changes with altitude. Therefore, the atmospheric pressure (or atmospheric pressure) sensor can be used as a barometric altimeter by using the air pressure formula to solve for the altitude:
P is the current pressure
P0 is the pressure at sea level (h=0)
Height (h) in m
The formula contains multiple assumptions such as atmospheric composition and an ambient temperature of 15°C, so if you need to accurately calculate the absolute altitude, you need more information. But even if the pressure conditions are different, the formula is still applicable, and the temperature conditions are little affected. Therefore, by comparing the pressure values of two consecutive measurements, the exact height change can be easily obtained from Equation 1.
The standard atmospheric pressure at sea level is about 1013mbar, that is, a pressure difference of 1mbar corresponds to a vertical change of about 8m. Therefore, when using Formula 1, the pressure measurement accuracy must be quite high in order to detect the vertical movement of the human body. Fortunately, there are already compact pressure sensors on the market that are sufficient to meet this accuracy requirement.
TE Connectivity Measurement Specialties’ MS5840-02BA micro-electromechanical system (MEMS) pressure sensor is one of such atmospheric pressure sensors (Figure 2). The device can perform 24-bit measurement of atmospheric pressure and ambient temperature, thereby achieving an effective height resolution of 13 cm in altimeter applications-the resolution is sufficient to detect the height change of a first-level step.
Figure 2: The MS5840-02BA compact air pressure sensor module has high performance and high accuracy, with a base surface of 3.3 x 3.3mm and a height of 1.7mm. (Image source: TE Connectivity)
The MS5840 integrates a MEMS pressure sensor and a custom ASIC. The latter can digitize the analog sensor signal and connect the host to the device through the I2C bus. Therefore, the device can be added to the fitness tracker design without other components. The module adopts compact surface mount, the base surface is 3.3 x 3.3mm, the height is 1.7mm, and the compact size is suitable for wearable devices. The sturdy and durable cover strengthens ESD protection through grounding to prevent man-made static electricity.
This type of high-precision module allows designers to perform first- and second-order compensation on the original sensor readings, thereby eliminating errors caused by device and temperature changes. All devices are factory calibrated at two temperatures and two pressures to generate calibration parameters for first-order calculations:
• Reference temperature-TREF
• Pressure sensitivity at reference temperature – SENST1
• Temperature Coefficient of Pressure Sensitivity-TCS
• Pressure compensation at reference temperature-OFFT1
• Temperature Coefficient of Pressure Compensation – TCO
• Temperature Coefficient of Temperature-TEMPSENS
When performing first-order compensation, the designer must retrieve the calibration parameters of the device and obtain the uncompensated 24-bit digital pressure (D1) value and temperature (D2) value readings of the sensor. Then, calculate the difference between the actual temperature and the reference temperature (dT = D2 – TREF), and use it to correct the digital temperature reading (TEMP = 2000 + dT x TEMPSENS) to obtain a degree Celsius (°C) with an accuracy of 0.01°C ( 2000 = 20.00°C).
Next, the designer must use the corrected temperature to correct the pressure reading by first calculating the pressure compensation (OFF = OFFT1 + TCO x dT) and pressure sensitivity (SENS = SENST1 + TCS x dT) at the current temperature. Then calculate the temperature-compensated pressure P = ((D1 x SENS/221) – OFF)/215, in mbar, the accuracy is 0.01mbar (110002 = 1100.02mbar).
The first-order corrected readings are valid when the ambient temperature is high. But at lower temperatures, the sensor needs to be corrected in a second order, as shown in Figure 3. For low temperature (middle box, >10°C) and ultra-low temperature (left box, ≤10°C), the method of calculating temperature and pressure using the results of the first-order correction is different.
Figure 3: The first-order calculation can be used when the ambient temperature is high, but when the temperature drops below 20°C, or even below 10°C, it may be necessary to perform second-order compensation on the sensor readings. (Image source: R. Quinnell, original information comes from TE Connectivity)
The results show that, in a wide temperature range, the pressure and temperature reading accuracy after the first-order and second-order corrections are very high, as shown in Figure 4.
Figure 4: Through first-order and second-order compensation, designers can achieve the high accuracy of the MS5840 pressure sensor over a wide temperature range. (Image source: TE Connectivity)
In addition to its small size and high accuracy, MS5840 also has some other features that make it particularly suitable for wearable applications. The device’s operating voltage is 1.5V to 3.6V, so it is compatible with 1.8V and 3.3V logic designs. In addition, the standby current of this low-power device is less than 0.1µA.
The operating current will depend on the frequency and resolution of the sensor readings. The built-in analog-to-digital converter (ADC) adopts the delta-sigma conversion method, and the over-sampling rate (OSR) is optional. Therefore, developers can achieve the best balance between conversion speed and power consumption. The peak current during the conversion process is typically 1.25mA, but when OSR is set to the maximum value (8192), if one sample is read per second, the conversion time is only 17ms and the average current is 20µA. When OSR is set to the minimum value (256), the conversion time is only 0.54ms and the average current is 0.63µA.
In addition, the sensor resolution is also affected by the OSR setting, so it should also be included in the trade-off. Under the maximum OSR, the module resolution is 0.016mbar, which corresponds to a height difference of less than 13cm. At the minimum OSR (25), the resolution is 0.11mbar, and the corresponding height difference is about 90cm.
Pressure sensor design considerations
To use a pressure sensor as a barometric altimeter, developers need to pay attention to the following system design considerations. Essentially, a MEMS pressure sensor covers a chamber filled with a reference pressure gas (or vacuum) with a piece of silicon wafer. The upper surface of the sheet is connected to atmospheric pressure through the opening or port of the sensor package. The air pressure difference between the chamber and the environment causes the sheet to bend and deform and generate mechanical stress, thereby generating a proportional electrical signal. The built-in ASIC of MS5840 can detect this signal and digitize it.
Since the sensor needs to be connected to the ambient air pressure, the design of the wearable device must provide a smooth path for the sensor port to communicate with the outside air. However, this path not only allows air to enter the device, but also allows water and dust to enter. Therefore, in the design of wearable devices, developers must not only pay attention to the location of the sensor so as not to block the air path, but also consider the design of the device housing to achieve the best waterproof performance.
The design of MS5840 can effectively solve this problem. The module uses a layered structure to protect the sensor (Figure 5). The bottom layer is an alumina substrate, and SMT pads can provide mechanical stability for the component. The MEMS sensor is stacked on the ASIC and mounted on the substrate. The ASIC can provide signal conditioning, digital conversion and I2C interface. The Electronic components and the stainless steel cover are filled with opaque gel, and the stainless steel cover is used as a port for the device to communicate with the atmosphere.
Figure 5: The MS5840 pressure sensor module contains an opaque gel layer, which is the black substance between the port (upper) and the sensor assembly (lower) in the picture, to protect the electronics from light, dust and moisture. (Image source: Digi-Key Electronics, original information comes from TE)
There are many uses of gel, the main function is to transmit atmospheric pressure to the surface of the sensor. The gel not only serves as a mechanical coupling between the sensor and the air, but also prevents dust and moisture from entering the electronic devices. Since the gel is opaque, it also provides additional light protection to avoid electronic noise caused by photons. The cover contains gel to enhance the rigidity of the module, and the grounding option can improve the ESD immunity of the module.
Developers can use this layered structure to stick an O-ring on the sensor cover, place the sensor in the wearable device housing and make the stainless steel port flush with the air opening of the housing to improve the waterproof performance of the wearable device. After the assembly is completed, the O-ring between the device housing and the sensor cover can seal the housing to prevent dust and water from entering the device, while the gel can protect the sensor.
Another consideration to be aware of when integrating barometric altimeters into fitness applications is the potential source of measurement error: wind. The pressure of flowing air is lower than that of still air, so if a strong wind suddenly blows during the measurement process, it will cause the pressure detected by the sensor to drop instantaneously. This “noise” in the air pressure signal may cause the illusion of a sharp change in altitude. However, fitness monitoring equipment developers only need to verify the characterization of height changes against accelerometer readings to eliminate this type of error. If there is no corresponding acceleration, the phenomenon of “steep rise” in height can be completely ignored.
The contrast elimination method is also applicable to acceleration. The acceleration curve produced by riding on rough roads may be similar to climbing stairs. However, if the acceleration characterization of climbing stairs does not cause a corresponding height change, the system may also consider ignoring the accelerometer reading as environmental noise.
With the popularity of wearable fitness trackers, the measurement accuracy of device health data has gradually become a product differentiation factor. Adding a pressure-based barometric altimeter can improve the accuracy of wearable fitness equipment in many ways, especially in terms of calories burned. In addition, this type of sensor also helps to verify the information of other sensors. However, to be suitable for wearable fitness monitoring equipment, the pressure sensor must have high accuracy, and must also use an ultra-small package and be able to operate with low power consumption. As mentioned above, TE Connectivity’s MS5840-02BA has the characteristics of high precision, small size and low power consumption, which fully meets the needs of next-generation wearable fitness trackers.