In this Section, we will take a look at how sensors and actuators are used in building IoT solutions. But, what are sensors? We make sense of the world around us through our sense organs.
Likewise, electrical and electronic circuits take physical inputs through sensors. The process of converting sensed energy into another form is called 'transduction', and the devices that do the transduction are called 'transducers'. Sensors are just one type of transducers. For example, a light sensor transduces luminosity into electrical resistance.
There are a wide variety of sensors available for the IoT enthusiasts. In this section, we will cover some of the most common sensors that are used in IoT solutions.
Photoresistor, also known as a light dependent resistor. Some kind of types of LDRs are in Picture 1.
Picture 1. Light dependent resistor, best known as LDR sensor.
A photo resistor changes its resistance according to the level of visible light that falls on it. When the light intensity is high, the resistance is lower, and the resistance of the LDR increases as the intensity of the light falling on it decreases. The LDR is used in all kinds of projects that involve measuring ambient light, and then controlling some device or a switch based on the level of the light.
The LDR responds to visible light. A flame sensor, on the other hand, works by changing its resistance based on the level of a type of infrared light emitted by flames. In picture 2 there are two types of flame sensors.
Picture 2. Flame sensor types.
One of the most common ways to measure distance is using sound echoes. Ultrasonic sensors, Picture 3, measure distance using echoes by sending out high-frequency ultrasonic sound. This frequency is usually so high that humans can't hear it. An ultrasonic sensor can provide exact distance readings.
How Ultrasonic sensors work, here is link about that: https://www.maxbotix.com/articles/how-ultrasonic-sensors-work.htm
Picture 3. Ultrasonic sensor.
If you have to detect proximity of humans and other living things, you would want to use a passive infrared sensor, commonly known as PIR sensor. A PIR sensor, Picture 4, measures the radiated heat in the form of infrared light. An infrared light is light of such low frequency that humans can't see it. A PIR sensor, however, cannot give you the distance to the obstacle. There is also something called an active infrared distance sensor, which sends invisible light and tests whether it reflects back. This sensor can tell if something is closer than a given distance or that someone is walking in the hallway, opening a door, or moving in a room.
Picture 4. PIR sensor.
Pressure sensor, Picture 5, changes its resistance based on the pressure on its round head. The higher the pressure or the squeeze, the lower the resistance. A pressure sensor is a device for pressure measurement of gases or liquids. Pressure is an expression of the force required to stop a fluid from expanding, and is usually stated in terms of force per unit area. A pressure sensor usually acts as a transducer; it generates a signal as a function of the pressure imposed.
Pressure sensor overview can be found here: https://learn.adafruit.com/adafruit-mprls-ported-pressure-sensor-breakout
Picture 5. Pressure sensor.
There are a number of inexpensive sensors to detect and measure any number of gases as we see in Picture 6 below. These sensors are used for detecting smoke, for detecting alcohol, methane, carbon monoxide, hydrogen, and even LPG. A typical human nose has 400 types of scent receptors enabling us to smell about 1 trillion different odours. But still many of us do not have the capacity to identify the type or concentration of gas present in our atmosphere. This is where Sensors come in, there are many types of sensors to measure different parameters and a Gas sensor is one which comes handy in applications where we have to detect the variation in the concentration of toxic gases in order to maintain the system safe and avoid/caution any unexpected threats. There are various gas sensors to detect gases like oxygen, Carbon Dioxide (CO2), Nitrogen, methane etc. They can also be commonly found in devices that are used to detect the leakage of the harmful gases, monitor the air quality in industries and offices etc.
Picture 6. Different Types of Gas Sensors.
A gas sensor is a device which detects the presence or concentration of gases in the atmosphere. Based on the concentration of the gas the sensor produces a corresponding potential difference by changing the resistance of the material inside the sensor, which can be measured as output voltage. Based on this voltage value the type and concentration of the gas can be estimated.
Suggested reading about one example: https://learn.adafruit.com/adafruit-mics5524-gas-sensor-breakout
Your phone screen goes from portrait to landscape mode when you tilt your phone. That is done by using accelerometer sensor. The phones have built-in accelerometers which are sensors that measure acceleration. There are also a type of sensors called gyroscopes, that are used to measure angular velocity. That is, how fast the sensor is rotating around an axis. Such sensors are used widely in self-balancing devices like two-legged robots and so on devices. One example about accelerometer sensor is in Picture 7. More information is here: https://learn.adafruit.com/adafruit-mma8451-accelerometer-breakout
Picture 7. Accelerometer sensor.
There are also sensors to measure temperature, moisture, and sound. There are sensors that scan your fingerprint and then compare it against a set of stored fingerprints. We have heart rate sensors, and even sensors to measure the ketone levels in your body. The list goes on and on.
Actuators are another type of transducers. Actuators are different from sensors. Rather than reacting to something in the environment, an actuator makes something happen. An actuator is a physical output of a circuit. Actuators are used extensively in IoT solutions. The actuator could be an LED turning on or off. It could be a DC motor, or a stepper motor, or a servo motor. The actuators could be mechanical, electric, pneumatic, or hydraulic. Whatever the case may be, the actuators make something happen.
Here is a good and clear presentation of how actuators work: https://www.youtube.com/watch?v=VU2XCwXH-Bg&feature=youtu.be
In this section, we learned about different types of sensors and actuators. In the next section, we will learn about IoT devices that help connect the sensors and actuators to the internet, controlled actuators, and more importantly, process and transmit the sensor data to the cloud.