Close

Choosing the Right Sensors

A project log for EXPLOG : Exploration Logger

A modular & multi-purpose embedded sensor device that can log navigation, weather & kinematic parameters and share data over WiFi, BT & LoRa

Vishnu M AieaVishnu M Aiea 03/19/2018 at 11:213 Comments

EXPLOG needs a lot of sensors obviously and there's a large list to choose from. Some of the criteria for selection of sensors are,

We need to make the right choices by considering the global availability and cost of each sensor to make sure that others will be able to get them to replicate/modify the device. These are what I've been able to come up with. Datasheets of all these sensors will be available at the file section of this project.

Barometric Pressure Sensor

  1. DPS310 from Infineon
  2. BMP280 from Bosch
  3. BMP380 from Bosch
  4. BMP388 from Bosch
  5. BME680 from Bosch
  6. MPL3115A2 from Maxim

We need a sensor to accurately measure barometric air pressure becasue we need accurate pressure measurements for calculating the altitude accurately. DPS310 was my first choice becasue I had received an evaluation module from Infineon as part of a give away. But not everybody is going to get these as they are not available in the usual maker markets. BMP280 on the other hand is widely available and most are familiar with. But they're not the best ones out there. Let's have a comparison of features of sensors from leading manufacturers.

DPS310BMP280BMP380BMP388BME680MPL3115A2
Operation range300 - 1200 hPa300 - 1100 hPa300 - 1250 hPa300 - 1250 hPa300 - 1100 hPa200 - 1100 hPa
Abs. Max. Pressure10000 hPa20000 hPa20000 hPa20000 hPa20000 hPa5000 hPa
Max. Resolution (Pressure)24-bit20-bit24-bit24-bit20-bit20-bit
Precision0.005 hPa0.0016 hPa0.003 hPa0.0016 hPa0.0018 hPa0.0025 hPa
Absolute Accuracy ± 1 hPa± 1 hPa ± 0.5 hPa± 0.5 hPa± 0.6 hPa± 4 hPa
Relative Accuracy± 0.06 hPa± 0.12 hPa± 0.06 hPa± 0.08 hPa± 0.12 hPa± 0.5 hPa
Temperature Coefficient Offset0.5 Pa/K1.5 Pa/K1.2 Pa/K± 0.75 Pa/K± 1.3 Pa/KNA
Sampling Rate128 Hz157 Hz200 Hz200 Hz182 Hz100 Hz
FIFO Size32 samplesNA512 Bytes512 BytesNA32 samples
Current Consumption @ 1Hz1.7 uA2.7 uA2.7 uA3.4 uA4.2 uA8.5 uA

-

From evaluating the specifications, BMP380 and BMP388 seem to be the best choices becasue they provide better absolute and relative accuracies, higher sampling rate, highest bit depth and higher absolute maximum pressure. The BME680 is special becasue it crams a pressure, temperature, humidity and air quality sensors in a single package. It might save some PCB real estate but can't compete with specs of other single purpose sensors, and it's going to cost higher than others. So we won't be using that. The DPS310 has its problems such as lower sampling rate, lower FIFO size etc, and it is priced similar to others. So these reasons also favor BMP380 and BMP388.

Absolute accuracy is how close the output reading to the actual reading of absolute pressure (absolute pressure is the pressure reading taken with a zero pressure as reference). The more accurate the absolute pressure, more will be the accuracy of our calculated true altitude relative to seal level. So if we need more accurate altitude measurements we need more absolute accuracy. On the other hand, relative accuracy, as you guessed, is the degree of error between two relative pressure readings (absolute error on two relative readings will be same). This reading is crucial because it is what helps us to determine the relative elevation, for example how high a drone from the ground is etc.

Temperature Sensor

Most pressure and humidity sensors come with internal temperature sensors to compensate for variation in temperature affecting pressure and humidity measurements. So we could simply read the temperature from any of those sensors. But there's a small problem; as suggested by many datasheets, the temperature indicated by the internal sensor of the pressure sensor can be inaccurate due to the heat produced by the sensor itself. The heat produced will depend on the voltage and frequency of measurement. Bosch's datasheet says the measured temperature will be slightly greater than the actual ambient temperature. The other possibility is to measure the temperature from a humidity sensor. The HDC1080 humidity sensor we'll be using has a temperature accuracy of ± 0.2 °C which is pretty good.

Relative Humidity Sensor

Humidity is the measure of amount of water vapor in air. Some of the best available are,

  1. HDC1080 from TI - ±2% humidity accuracy, ±0.2°C temperature accuracy, 14-bit humidity and 14-bit temperature.
  2. Si7021 from Silicon Labs- ±3 humidity accuracy, ±0.4°C temperature accuracy, 12-bit humidity and 14-bit temperature.
  3. SHT3x-ARP from Sensirion - ±2% humidity accuracy, ±0.3°C temperature accuracy, 0.01 %RH humidity resolution and 0.015 °C temperature resolution.
  4. SHT15 from Sensirion - ±2% humidity accuracy, ±0.3°C temperature accuracy, 12-bit humidity and 14-bit temperature resolutions.

We'll use the HDC1080 for its better accuracy and resolution figures. It comes factory calibrated and has I2C interface.

Air Quality Sensor

An air quality sensor, unlike a gas sensor, measures the amount of Volatile Organic Compounds (VOCs) and equivalent CO2 (eCO2) in the surrounding air. VOCs are what give the air its odor and are originated from natural and human made substances such as paints and fuels. Abnormal levels of VOCs can lead to long-term health effects. Equivalent CO2 represents the potential of mixture of all greenhouse gases in the air to produce global warming. It is a relative measure based on a standard reference and is known as Global Warming Potential (GWP). Most of the times, the measure of total mixture of compounds in air will better indicate the quality of the air, than measuring individual gases or compounds. That's where a typical gas detectors that can detect one or tow specific gases differ from an air quality sensor. CCS811 from AMS is an air quality sensor that measures the VOCs and eCO2 in air and outputs the measurements in a range of values which are 400 ppm to 64000 ppm for eCO2 and 0 ppb to 64000 ppb for TVOC. The sensor is available in an LGA package and is interfaced via I2C.

Light Intensity Sensor

For this we need one or more light sensors to detect the intensity levels of visible, infrared (IR) and ultraviolet (UV) light. Some sensors are designed to measure multiple regions of light wavelengths and some are dedicated to a single spectrum and thus blocks other ranges of light. Also a proximity sensor emits IR light in order to detect the distance to an object in the proximity field. The reflected light from the object could affect other light intensity sensors and therefore needs to be compensated (some for example Si1145 has dedicated registers for compensation values). Some sensors have filters to block the unwanted spectrum of light and some don't. So these are the considerations to be given while choosing a light intensity sensor. Our candidates are,

  1. Si1145 from Silicon Labs - This can measure ambient visible light, IR and UV levels as per the datasheet. The internal IR photodiode has good IR wavelength response and thus can be used for proximity sensing too for up to 50 cm. The Si1145 model has one IR LED driver pin with programmable current sink of up to 300 mA which makes it ideal for a proximity sensor. Moreover, the IR light reflected back from an object can be internally compensated for accurate ambient IR level measurement. The visible light photodiode has a nominal response range from 330 - 950 nm and therefore can also serve as a UVA (330 - 400 nm) sensor. By adjusting the integration time via registers, it is possible to measure ambient light as low as 100 mLux. The UV levels are reported as UV index range rather than raw values.
  2. VEML6070 from Vishay - This is a dedicated UV sensor with sensitivity range 320 - 410 nm (UVA) with all the required signal conditioning and compensation components and outputs the measurements as 16-bit values.
  3. MAX44009 from Maxim - This is a dedicated and low power Ambient Light Sensor (ALS) with IR and UV blocking capabilities. It has 12-bit resolution and high dynamic range of 0.045 Lux to 188,000 Lux. The on-chip photodiode’s spectral response is optimized to mimic the human eye’s perception of ambient light.
  4. TSL2561 from TAOS - This is also an ALS that has a spectral response of similar to human eye and outputs two 16-bit values; one for Visible+IR channel and one for a separate IR channel. The problem with using silicon detectors to measure ambient light intensity is that our eyes don't respond to IR but the photodiodes do. This is circumvented by using a separate IR sensor that only responds to IR light.

The Si1145 seems to be good for our application but tests need to be conducted before we can make the final choice becasue all of them have some pros and cons. We'll test all four sensors soon.

IR Proximity Sensor

We've seen that an IR sensor can be used as a proximity sensor if coupled with an IR emitter diode. But there are some dedicated IR proximity sensors available as single packages in the market, which reduces the overhead of adding IR emitters to a standalone IR sensor. There are multiple methods of range sensing including but not limited to Time of Flight (ToF), Phase difference, laser based etc. For compact spaces ToF or Phase Detectors are best suitable. Phase detectors work by measuring the phase (or angle) and intensity of a reflected light from an object to determine the distance where a ToF measures the time taken by a pulse of light to reflect and return from an object to calculate the distance. Our choices here are,

  1. APDS-9930 from Avago - is an IR proximity sensor with fully calibrated 100 mm range, 16-bit ALS and 0.01 Lux sensitivity.
  2. APDS-9960 from Avago - is an IR proximity, 16-bit ALS with UV and IR blocking, RGB and gesture sensor with programmable integration time, and LED current.
  3. TMG3993 from Avago - is an IR proximity, 16-bit ALS with UV and IR blocking, RGB and gesture sensor with programmable gain and integration time.
  4. VL6180X from ST Microelectronics - is an IR proximity sensor with 100 mm absolute range and ALS with 16-bit output, < 1 Lux up to 100 kLux range, and 8 level gain setting.
  5. VL53L0X from ST - Time of Flight (ToF) ranging sensor with absolute range up to 2 metres and gesture recognition.
  6. VL53L1X from ST - Long range ToF sensor with accurate measuring range of 4 metres.
  7. VCNL4020X01 from Vishay - IR proximity sensor and ALS with 16-bit resolution, 0.25 Lux to 16 kLux range, flicker rejection and 200 mm detection range.
  8. VCNL4040 from Vishay - IR proximity sensor and ALS with 16-bit resolution, 0.0125 Lux/step sensitivity, flicker rejection and 200 mm detection range.
  9. VCNL4010 from Vishay - IR proximity sensor with 200 mm range and 16-bit ALS.
  10. GP2Y0D810Z0F from Sharp - IR proximity sensor with 100 mm range.

It's going to be hard to choose one from this list without testing them first, though VL53L0X and VL53L1X seem a good choices. Our primary requirement is to detect some range of distance accurately in varying environmental conditions. All of these sensors come with integrated ALS for compensation. Having programmable gain, integration time and IR LED current will come handy for accurate measurement in all situations.

Inertial Measurement Unit (IMU)

These include standalone MEMS (Micro-Electro-Mechanical Systems) based accelerometers, gyroscopes, magnetometers, and also multi-sensor packages. I think it's better to use any sensor that has all three sensors in a single package. One such sensor is the LSM9DS1 from ST which integrates 3-axis accelerometer, 3-axis gyro and 3-axis magnetometer in an LGA package.

Ambient Noise Level Sensor

For this, we could use any high sensitivity microphone with good audio frequency response and either digital or analog output. Sensors with integrated conditioning circuits and amplifier are preferred. Analog output will be needed to sampled by a precision ADC that has I2C interface. ADMP401 MEMS microphone from Analog Devices can fulfill our requirements. For ADC we could use MCP3421 18-bit single channel ADC from Microchip.

Discussions

Andreas wrote 03/28/2018 at 12:46 point

Hi. Were can i buy a breakout board with a BMP380 or BMP388 to connect it to my flight controller (Omnibus F4) via i2c? I only found modules with the BMP280. Thank you.

  Are you sure? yes | no

Bub Rascal wrote 03/28/2018 at 17:47 point

It seems pretty hard to find these sensors. Even at digikey, you can only find the BMP388 with a lead time of 2 weeks. They have a dev board at mouser for the BMP388 for 27EUR with a lead time of 14 weeks. Might be your only option.

  Are you sure? yes | no

Vishnu M Aiea wrote 03/28/2018 at 18:33 point

Hello. Unfortunately, I've never seen breakout boards for BMP380 or BMP388. So I assume nobody is making them. www.mouser.in where I source components from has BMP388 in stock. So evaluation boards or bare parts are your options.

  Are you sure? yes | no