Sensors Rundown

For people starting up with IoT this section contains a rundown of the most commonly available sensors, sensor types and the various brands that can be found, along with their flaws and advantages over other competitors.

Merchants will also typically label things like "buttons" as sensors, when, in fact, it is just a button. Truly, for such cases "things" is a better label because it provides an all-encompassing meaning for sensors and controls.

Sensor Types

  • One of the main dividers for sensors as category is the distinction between digital or analog signals that the sensor is capable of. Sensors that have a digital output are an all-or-nothing sensor that can tell the user whether a condition has been met or not, but much better sensors have an analog output that allow the user to quantify "how much" of a condition has been met. In simple terms, "digital output" tells you whether something is or isn't, whereas "analog output" performs an actual measurement.
  • Relative or "physically meaningful" output values distinguishes between sensors that offer a relative quantification of their output value, as in, "less" versus "more", whereas "physically meaningful" sensors are more than often pre-calibrated to output a value that can be expressed in units meaningful in physics. It does not mean that sensors that provide "relative" output values cannot be calibrated, but more than often it is hard to do so (imagine having to calibrate a sensor that detect $NO_{3}$, which would imply that the user would need an $NO_{3}$ source, as well as the instrumentation needed to disperse into a black box enclosure a very precise concentration expressed in PPMs of that $NO_{3}$ gas in order to calibrate the sensors - for hobbyists, or people playing around with these commercial sensors of this price, not bloody likely!).
  • For sensors that provide meaningful measurements, there are different interfacing modes that vary from module to module, for example: analog, PWM, I2C, SPI or serial. Perhaps the best one, if the module is well-made, is the analog output or PWM because those require just one wire. I2C and SPI require multiple wires but also provide a bus that can be used to attach a large number of sensors. Serial, maybe, is the worst one but due to logistics because most ESPs out there only have a single usable serial port via the pins such that one and only one sensor will be able to be used with the ESP serial without having to purchase something like a serial multiplexer.

Shopping Guide

One of the glories of the wild capitalism in Asian countries, in particular, China is that producers tend to rip off each-other, by stealing each other's idea and then also having the infrastructure to produce the very same product and set it up at the same price or lower than the person coming up with the idea in the first place. Long story short, we wanted to purchase an USD100 $CO_{2}$ sensor by Gravity, only to realize that a competing Chinese producer offered the exact same one for USD20 (the "Gravity" inscription was missing but the PCB and the sensor itself were all identical, along with the components). In other words, be aware that prices can fluctuate wildly and that by searching a little you might come across the exact same product as a knockoff and not all knockoffs are bad, especially if they stick to the original design.

"Meaningful" sensors will always be more expensive than "relative" sensors but be aware that engineering is intertwined with economics such that blasting away money on expensive sensors that might provide "meaningful" values is redundant and a waste of money depending on what the application requires. If you are looking to determine when it is time to water plants, then a "relative" USD7 "soil humidity" sensor that reports some meaningless value, the distinction only being made in terms of "more" or "less', would be perfectly suitable, but obviously if you're looking for a precise measurement, let's say, as in monitoring a plotting soil in general, then you might need to scale up the price. In that sense, "spending more money" is not always better given the constraints of a project and investing too much in one particular area leaves less money for the rest of the project.

"Starter kits", "engineering kits" and all of that are not too great and generally speaking they are way overpriced compared to getting the sensors individually. The main reason for that is that these kits contain a bunch of sensors that are unlikely to be used. The workflow should be to think of the project and then buy the necessary sensors. "IoT kits" are lined with sensors like photoresitor LDEs and MQ-sensors that are less than educational, even for a school-level background. LDEs can be bought in bulk and the circuit is trivial such that the module is overkill and MQ sensors need to be calibrated.

When purchasing sensors, before buying, always look online for:

  • the datasheet,
  • example code

and assess the consistency, maturity and congruency of the materials that are found. Very often you can find yourself the owner of a new sensor but without any documentation, or it turns out that there are no libraries for it, or that the documentation on how to read the sensor seems conflicted online with different formulas, or that simply is no Arduino code out there to deal with it. While most of the time it is possible to interface with an unknown and undocumented sensor, that would require knowing the specifications of a sensor extremely well, and as things go hand-in-hand, chances are that an unknown sensor does not even have a datasheet.

Index


iot/sensors_rundown.txt ยท Last modified: 2025/04/05 14:22 by office

Wizardry and Steamworks

© 2025 Wizardry and Steamworks

Access website using Tor Access website using i2p Wizardry and Steamworks PGP Key


For the contact, copyright, license, warranty and privacy terms for the usage of this website please see the contact, license, privacy, copyright.