Choosing optimal hardware for an IoT project is imperative, especially when it comes to creating industry-grade implementations. Related hardware and software for IoT go through a standardized design process: requirements specification, conceptual design, prototyping, testing, and finally the rollout of the hardware and software that are part of the system. Some platforms, such as ESP8266 microcontrollers, facilitate easy prototyping and deployment, but this convenience often comes at the expense of lower processing power when compared to other options.
There are many factors to consider, but they can be categorized into four different factors: data acquisition, data processing, connectivity, and power management.
Data acquisition
Data acquisition is a major part of IoT systems, as many components of a system, in the form of sensors, function to collect data in the environment to provide real-time results and/or feedback. This data is often obtained at a fixed rate within a time known as the data sample rate and transmitted to a remote output device to be read in and sent for further processing.
Sensors are devices within an IoT network that are used to detect and measure physical quantities such as humidity, pressure, speed, light, and temperature. This data is obtained from the environment and sent through to the IoT platform either wired or wirelessly.
The way we interact with sensors also differs from use case to use case. As an example, instead of monitoring the environment, some sensors may instead monitor its internal state; these are known as proprioceptive sensors. There can also be sensors that allow personnel to interact directly with them via buttons or touchscreens while recording the actions that are done; these are known as-machine interfaces.
When evaluating which sensor to use, multiple factors come into play. The first and most obvious one is functionality. What are you going to use the sensor for? If you are going to measure changes in the environment for temperature and humidity, for example, you would consider the DHT11, which is a temperature and humidity sensor developed by Adafruit. It comes standardized in many development kits, including the one that this book uses. However, just because you have obtained a sensor that does what you need it to do does not mean that you have found the optimal sensor.
There are many options that need to be considered that are offered by sensors, which is why comparing sensors by their specifications is very important. The condition in which the sensor can operate is another important consideration. Where will you use it? Will it be used at room temperature or in extremely hot or cold environments?
The next consideration is the accuracy and precision of the sensor. Precision is the repeatability or consistency of the measurement. With high precision, a sensor will be able to produce results that deviate very slightly from one another when the same measurement is taken multiple times with the same conditions put on it. On the other hand, with low precision, a sensor would produce results that would deviate more from each other despite the same conditions put on it. This often comes as a trade-off with accuracy, which is how close the measured value is to the actual value of the physical quantity that is being measured. High accuracy for a sensor can produce results that are very close to the actual value, while low accuracy for sensors outputs results that deviate further from the true value. It is important to understand that a sensor can be precise but not accurate and vice versa. Optimally, we would like the sensor to be both precise and accurate, but there are often trade-offs between the two.
Finally, we must consider the resolution of the sensors. The resolution determines the smallest change within the physical quantity that the sensor is capable of detecting. For example, if a temperature sensor has a resolution of 0.1°C, this means that the sensor can detect changes in temperature as granular as 0.1°C. Hence, higher resolutions for sensors allow them to detect smaller changes within the physical quantity, while lower resolutions are only able to detect larger changes. It is also important to note that other factors aside from the sensor may also affect the resolution, such as the accuracy of the analog-to-digital converter (ADC), which converts the sensor’s output to digital form, and the accuracy of the software that processes the data sent by the sensor, which affects the overall resolution of the measurement system.
For example, we can compare the DHT11 and DHT22 sensors that are both developed by Adafruit. The following are the specifications for them from the Adafruit website:
Figure 1.7 – Comparison of DHT11 and DHT22 sensors from Adafruit
At first glance, they both provide the functionality of being able to measure temperature and humidity, but they both have different specifications that can meet your deployments’ needs differently. When comparing the specifications, we can see that despite there being many factors that are the same between them, each has its own set of advantages. The DHT11 has a lower cost and a better resolution compared to the DHT22, while the latter has higher accuracy and works over a larger temperature range than the former. Depending on our priorities, this will affect how we choose one sensor over another with these specifications.
These sensors then lead to the next part of the consideration of hardware for the architecture, which is within data processing.