Choosing the Best Low Budget Sensor for a Temperature-Related ESP32 IoT Project.
Smart home systems based on Internet of Things (IoT) technologies were a novelty available only to Silicon Valley residents just a few years ago. Now, any U.S. citizen can afford to install a smart home system for a moderate price. Besides, anyone with basic programming skills can build a home automation system thanks to chips with microcontrollers from such well known world-wide manufacturers as Espressif and Arduino. In order to do this, one simply needs to connect the necessary expansion cards and sensors to the main board and write some short standard C/C++ code.
So, we will take a closer look at the sensors that can be used to activate heating and climate-control systems. In this article, we’ll review the most popular temperature monitoring sensors. Particular attention will be given to sensors suitable for the low budget yet powerful ESP32 system-on-a-chip microcontroller.
Let’s take a quick look at what ESP32 is, for a start. ESP32 represents a very powerful and at the same time cheap modular platform manufactured by a Chinese company, Espressif. It is based on a microcontroller, and it can work both as standalone equipment and as an element of Arduino platforms. ESP32 has a built-in wi-fi module and supports Bluetooth through two interfaces.
Due to its wi-fi and Bluetooth features, this piece of hardware can be actively used as part of smart home systems. In particular, an ESP32 combined with appropriate temperature sensors is often used as a low power IoT sensor node for various purposes, including home automation systems and standalone temperature logger sensors. This modular platform doesn’t require any manual adaptation to the local parameters of the external circuit as it supports advanced calibration schemes installed at the manufacturing stage. We also need to note that the ESP32 is characterized by extremely low power consumption. The level of power consumption is additionally controlled by provided proprietary software. The sturdy body of this platform must also be pointed out: even though it may look quite fragile, it won’t get damaged by a random fall. The operating temperature range is -40°C … +85°C.
Temperature Sensor LM35: Review
The LM35 is one of the most popular temperature sensors. It stands out in the high precision of the resulting data. Determining the temperature level is performed by calibrating the output voltage in accordance with the Celsius temperature scale. This scale has proved to be more convenient for everyday use compared to the Kelvin temperature scale that is used in most similar hardware items. Operating temperature range is -55 …+150°C, and the error in temperature measurement doesn’t exceed 0.25°C. This is more than sufficient to enable the automatic configuration of heating and air-conditioning systems.
The temperature sensor itself doesn’t heat up when it’s on: temperature fluctuations do not exceed 0.1°C in still air. That’s why you won’t need to install any other additional hardware to control the chip’s performance. Notably, if you use an LM35, you won’t have to manually adjust its settings for the input voltage parameters within your electrical wiring. This is done in the manufacturing process. By the way, this is the reason for such affordable pricing for this piece of hardware. It is worth noting that the LM35 is compatible with both unipolar and bipolar supply voltages. The LM35’s nominal current intensity amounts to just 60 μA, which means that a smart home system that is using the LM35 will require very little electricity.
Temperature Sensor TMP36: Review
The TMP36 is one of the most popular temperature sensors from the TMP series. Just like the previous sensor, this sensor is characterized by its low output voltage, linearly proportional to the Celsius temperature. The TMP36 also doesn’t require additional manual adjustments and adaptation to parameters of particular electrical wiring. All calibration is managed by the manufacturer.
Testing under laboratory conditions of +25°C environment temperature showed the TMP36’s measurement error to be 1°C. In the temperature range of -40° … +125°C, the measurement error turned out to be 2°C. Such measurement errors are not critical in practice and allow this hardware to be used in indoor heating and microclimate control systems. As for the sensor’s requirements for power supply, the current intensity required for its operation is below 50 μA, which is negligible in terms of electricity consumption. Besides, this feature positively influences the level of TMP36 heating, which is below 0.1°C. This means that you won’t encounter any problems with overheating, and you won’t need to install any additional hardware such as coolers.
Temperature Sensor DHT11: Review
The DHT11 is a low-cost temperature/humidity sensor that transforms analog signals from the surrounding environment into digital ones. Its design represents a combination of a thermistor and a humidity sensor.
Such sensors are usually used for building miniature weather stations within the limits of one room. The DHT11’s range amounts to 20 meters. It allows the measurement of surrounding temperature and relative humidity, as well as tracing and coordinating their correlation every second. For instance, increasing the air temperature via a heating system leads to decreasing humidity in a room, and this is a direct call to activate humidifiers. The optimal level of humidity in accommodation is considered to be 50%, and the DHT11 sensor does a great job in maintaining this. It is worth noting that this sensor is not perfectly accurate due to its quite limited operational range—from 20% to 80% in terms of humidity and from 0°C to +50°C in terms of air temperature. That’s why it is more suitable for educational or domestic use. Nevertheless, this particular sensor represents the optimal price–quality ratio, especially as a part of low-cost smart home systems. For example, DHT11’s “brother,” DHT22, provides more accurate data, but its price is much higher. The maximum power consumption is at the 150 μA mark in standby mode.
Choosing the Best Sensor
Let’s sum up everything mentioned above. As you can see, the LM35 sensor operates within the widest temperature range (-55…+150°C) and is more precise compared to its two competitors. Nevertheless, it is not the possible measurement error that is critical to most IoT solutions—it is the maximum amperage and the output voltage. As you can see, the LM35 can be powered by sources of between 4 V and 30 V; the TMP36 requires sources of between 2.7 V and 5.5 V; and the DHT11 requires sources of between 3 V and 55 V. Thus, the first sensor is not compatible with some Photon chips, as the acceptable voltage for them is 3.3 V. So, the TMP36 is perfect for integrating into solutions that require working with temperatures below 0°C because you won’t be able to connect the LM35 to analogue contacts on Arduino chips. If you need maximum accuracy for Arduino based solutions that will be used indoors, the LM35 is your best option. If you need the additional feature of determining humidity levels, the DHT11 represents the best price-quality ratio.
Here is a comparative table of the main specifications for the three sensors that we reviewed in this article.
As you can see, all the sensors we have reviewed in this article operate well within the design parameters while being sold at an affordable price. If you have decided to create a project based on the IoT concept that requires using temperature sensors, don’t hesitate to contact our engineers. We are ready to turn your idea into reality as rapidly as possible.