Welcome!
...
News
2024 2nQ

Composite Sensors - Part 1

6min

Introduction

Composite sensors or Multiple Output sensors can measure and provide more than one quantity. They are commonly used in mobile devices where space is at a premium and are small form factor. The DHT range and the BMx range of sensors are an ideal component to consider for this role, and there are options within the range to consider.

In this article, we will consider two commonly available sensors, what they deliver, and how to use them.

Sensor Overview

The DHT11 and BMP280 are readily available, low cost, and have been the subject matter of many hobbyist projects. Their simplicity, ease of implementation, and availability have made them a favorite in projects.

The two sensors are shown below and their respective packages. The DHT11 is a bulky package and does have a companion part the DHT22. They can be purchased as a module mounted on a PCB with the supporting circuitry or as a stand-alone sensor as shown in the image below.

The BMP280 is a compact SMT-type sensor and is conducive to smaller PCB assembly. If you have SMT soldering skills you may solder this yourself, however given the small form factor of the module, purchasing as is and then just soldering onto the PCB is an option.

Considering the two parts, the best of both worlds would be if their outputs could be combined and in the BME280 you have this. However, there may be a valid use case for not having all sensor data gathering restricted to a single sensor. The BME280 is also more expensive.

๏ปฟ

DHT11
DHT11
๏ปฟ

๏ปฟ

BMP280
BMP280
๏ปฟ

Measured Quantity

In both cases, the sensor delivers a temperature reading output. Temperature does tend to be the most common value that needs to be measured and generally complements the other value that the sensor returns.

Quantity

DHT11

BMP280

Temperature

Y

Y

Humidity

Y

N

Pressure

N

Y

๏ปฟ

Interface

Both devices employ a serial interface which enables the MCU to return the data from the sensor in a digital format. This digital format removes the need to condition the signal or convert the signal from an analog equivalent to a digital representation.

DHT11

The DHT11 uses a proprietary interface which may make the sensor a little more challenging to use. However, code samples a readily available.

The interface is similar in architecture to the Dallas 1-wire in that it is a 1-wire connection between the sensor and the MCU. Implementing the protocol to be discussed later.

BMP280

The BMP280 has available both I2C and SPI as the communication interfaces. This enables multiple devices to be available on a BUS. The advantage of this is that more than one sensor can be connected to the same bus, and measure the values of different locations.

Implementation

Implementing either interface requires doing the following:

  • Identify the pin location for the sensor
  • Initialize the peripheral
  • Return the value from the sensor and display the values on an appropriate display medium

In the next part, we will delve deeper into the implementation of the composite sensors and how to use them.

๏ปฟComposite Sensors - Part 2๏ปฟ๏ปฟ

๏ปฟA review of the BOSCH sensor Family๏ปฟ๏ปฟ