0% found this document useful (0 votes)
10 views16 pages

Unit-2 Dipl

Unit II of the Fundamentals of IoT covers Sensors and Actuators, defining sensors as devices that detect environmental changes and actuators as devices that convert electrical signals into mechanical work. It discusses various types of sensors, such as PIR, Sharp IR, LDR, Gyro, Ultrasonic, and DHT sensors, along with their working principles and applications. Additionally, it explains the importance of ADC chips for converting analog signals to digital for microcontroller processing and provides insights into servo motors as a type of actuator.

Uploaded by

Jansari Kashish
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
10 views16 pages

Unit-2 Dipl

Unit II of the Fundamentals of IoT covers Sensors and Actuators, defining sensors as devices that detect environmental changes and actuators as devices that convert electrical signals into mechanical work. It discusses various types of sensors, such as PIR, Sharp IR, LDR, Gyro, Ultrasonic, and DHT sensors, along with their working principles and applications. Additionally, it explains the importance of ADC chips for converting analog signals to digital for microcontroller processing and provides insights into servo motors as a type of actuator.

Uploaded by

Jansari Kashish
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 16

Subject Name: Fundamentals of IoT Unit No: 2 Subject Code: 4360703

Unit-II: Sensors & Actuators


What are Sensors?
 Definition: “A sensor is a device that detects changes and events in a physical environment.
It may convert physical parameters like humidity, pressure, temperature, heat, motion, etc.,
into electrical signals.”
 This signal can be converted into a human-readable display and sent across a network for
additional processing. Active sensors and passive sensors are the two primary types of
sensors. Active sensors necessitate a power supply, whereas passive sensors don't require a
power supply.
 There are various types of sensors available, including temperature, ultrasonic, pressure, and
location sensors, among others. They are utilized for detecting and measuring the relevant
quantities.
 A sensor works by sensing a quantity by utilizing a particular detecting device. Each sensor
operates on a distinct principle, such as an electromagnetic sensor, a resistive sensor, a
capacitor sensor, etc. In general, they sense the matching attribute in the environment and
convert it into a proportional magnitude electrical signal.

What are Actuators?


 Definition: “A device that changes electrical signals into mechanical work is known as
an actuator.” It is used to cause movement or a change in the surroundings.
 For instance, a fan is utilized to lower the temperature, and a servo motor is utilized to
change position, among other things.
 Actuators are connected to a system's output. It receives an electrical signal as input and
produces mechanical movement as output. It receives input or instruction from a system or a
signal conditioning device and outputs it to the environment.
 The actuator is dependent on the sensor data. The sensor sends data to a signal condition
unit, which analyzes the data or information and transmits commands to the actuator
depending on that data.
 Ex: A "temperature control system" is an instance of an actuator system in which a
temperature sensor manages the temperature. If the temperature surpasses a specific limit,
the device instructs the fan to increase its speed and decrease the temperature.

2.1 Voltage Considerations for Sensors

Choosing the right voltage sensor is essential to ensuring accurate voltage measurements. This
decision is generally based on several factors:
 Measurement Range: The sensor should be capable of measuring the entire voltage range of
the application. For high-voltage applications, indirect sensors are generally more suitable.
 Accuracy: The accuracy of a voltage sensor is another crucial consideration. This factor is
determined by the sensor’s resolution, linearity, and other properties.
 Environmental Conditions: The sensor should be capable of operating under the
environmental conditions of the application, which may include high or low temperatures,
humidity, and more.
 Cost and Size: Practical considerations like cost and size may also influence the choice of
sensor, especially in cost-sensitive or space-constrained applications.
Prepared By: Department of Computer Engineering Page 1
Subject Name: Fundamentals of IoT Unit No: 2 Subject Code: 4360703

2.2 Sensors (working)

PIR Motion Sensor:

 PIR sensor is widely used as motion sensor to detect the human or animal activity in a
particular area.
 All objects emits heat energy in the form of radiation which can be visible when the wave
length reaches in the visible spectrum.
 But there are certain ranges of radiations which could not be recognised with human eye but
can be sensed with certain sensors.
 Infrared radiation emitting from human or animal body can’t be sensed by our naked eye
but can be detected by pyroelectric sensors.
 The sensor which detects infrared radiation emitting from other objects are called passive
infrared sensors.
 They are called “passive” since the sensor itself doesn’t emit any IR radiation but passively
sense the radiation emitting from the source. . It is now an unavoidable entity in building
automation systems

Working of PIR Sensor

 The sensor consists of two Pyroelectric IR sensors which are placed adjacent to each other.
 In normal case the infrared radiation reaching on the sensor will be same for each of the
sensors but it changes when a second object like human or animal having higher body
temperature approach in the sensor range.
 This change can be taken as a sign of motion in the particular area.

Applications:
1. Automatic door open: The doors can be controlled by sensing human presence, highly
useful for physically handicapped personals.
2. Escalators: Often we have seen escalators functioning in malls and airports without any
users, using these technology escalators will function only when users come near its
vicinity.

Prepared By: Department of Computer Engineering Page 2


Subject Name: Fundamentals of IoT Unit No: 2 Subject Code: 4360703

3. Burglar alarm: The PIR based motion detector is very commonly used in burglar alarms as
the sensor picks up any unusual movement in the area.
4. Automatic light systems: How often we have wished that the light in our room gets turned
on the moment we step our foot inside, well the PIR sensor exactly does that.
5. Military Surveillance: Since PIR covers a vast area, it is perfectly suitable for surveillance
across borders.

Sharp IR Distance Sensor:

 The Sharp distance sensors are a popular choice for many projects that require accurate
distance measurements. This IR sensor is more economical than sonar rangefinders, yet it
provides much better performance than other IR alternatives.

 Interfacing to most microcontrollers is straightforward: the single analog output can be


connected to an analog-to-digital converter for taking distance measurements, or the output
can be connected to a comparator for threshold detection. The detection range of this
version is approximately 20 cm to 150 cm (8″ to 60″).

 The GP2Y0A02 uses a 3-pin JST PH connector that works with our 3-pin JST PH cables for
Sharp distance sensors (not included) the top picture on the right shows a shorter-range
Sharp analog Distance sensor with one of these cables.

 These cables have 3-pin JST connectors on one end and are available with pre-crimped male
pins, pre-crimped female pins, and with unterminated wires on the other end.

 Note: This sensor draws current in large, short bursts, and the manufacturer recommends
putting a 10 µF capacitor or larger across power and ground close to the sensor to stabilize
the power supply line

Prepared By: Department of Computer Engineering Page 3


Subject Name: Fundamentals of IoT Unit No: 2 Subject Code: 4360703

Working of Sensor:

 To measure the distance from an object (4~30cm):

 IR Sensors work by using a specific light sensor to detect a select light wavelength in
the Infra-Red (IR) spectrum. By using an LED which produces light at the same
wavelength as what the sensor is looking for, you can look at the intensity of the
received light. When an object is close to the sensor, the light from the LED bounces off
the object and into the light sensor. This results in a large jump in the intensity, which
we already know can be detected using a threshold.

 Since the sensor works by looking for reflected light, it is possible to have a sensor that
can return the value of the reflected light. This type of sensor can then be used to
measure how "bright" the object is. This is useful for tasks like line tracking.

LDR Sensor:

 LDRs are tiny light-sensing devices also known as photoresistors.


 An LDR is a resistor whose resistance changes as the amount of light falling on it
changes. The resistance of the LDR decreases with an increase in light intensity.
 This property allows us to use them for making light sensing circuits. Learn what is
LDR, how does it work, how to interface it with evive and program it in PictoBlox – our
Scratch blocks-based graphical programming platform with advanced hardware
interaction abilities, and finally what exciting DIY projects you can make using the LDR
available in the evive Starter Kit.

Prepared By: Department of Computer Engineering Page 4


Subject Name: Fundamentals of IoT Unit No: 2 Subject Code: 4360703

Working of Sensor:

 LDR is an acronym for Light Dependent Resistor.


 LDRs are tiny light-sensing devices also known as photoresistors.
 An LDR is a resistor whose resistance changes as the amount of light falling on it
changes. The resistance of the LDR decreases with an increase in light intensity, and
vice-versa.
 This property allows us to use them for making light sensing circuits.
 For using an LDR, we always have to make a voltage divider circuit.
 When the value of resistance of LDR increases in comparison to the fixed resistance, the
voltage across it also increases.

Gyro Sensor
 A gyroscope sensor is a device that can measure and maintain the orientation and
angular velocity of an object.
 Gyroscopes are more advanced than accelerometers, as they can measure the tilt and
lateral orientation of an object, whereas an accelerometer can only measure its linear
motion.

Working of Sensor:

Prepared By: Department of Computer Engineering Page 5


Subject Name: Fundamentals of IoT Unit No: 2 Subject Code: 4360703

 Gyroscope sensors are also called "Angular Rate Sensors" or "Angular Velocity Sensors".
Measured in degrees per second, angular velocity is the change in the rotational angle
of the object per unit of time.
 In this example, we will use the gyroscope as an indicator for the direction of the force
that is applied to the board. This will be achieved by swiftly moving the board for an
instant in four directions: forward, backward, to the left and to the right. The results will
be visible through the Serial Monitor.
Ultrasonic Distance Sensor:

An ultrasonic sensor is a device that detects an object and measures the distance to it. It measures
the distance by emitting ultrasound and receiving the wave that the object reflects.

Working of an HC-SR04 Sensor

Ultrasonic sound vibrates at a frequency above the range of human hearing. Transducers are
microphones used to receive and send ultrasonic sounds. HC-SR04 and other ultrasonic sensor
modules use a single transducer to send a pulse and to receive the echo. The sensor determines the
distance to the target by measuring the time lapse between sending and receiving of the ultrasonic
pulses.

Prepared By: Department of Computer Engineering Page 6


Subject Name: Fundamentals of IoT Unit No: 2 Subject Code: 4360703

How to interface an Ultrasonic sensor with evive


The HC-RS04 Ultrasonic sensor module has 4 pins, two pins for the power supply and one pin for
sending out ultrasonic sound waves, and one pin for receiving ultrasonic sound waves.
 VCC
 GND
 TRIG (for sending ultrasonic sound waves)
 ECHO (for receiving ultrasonic sound waves)

DHT Sensor

 DHT stands for Digital Humidity and Temperature.


 he DHT sensor is a low-cost digital sensor for sensing temperature and humidity. This
sensor can be easily interfaced with any micro-controller such as Arduino, Raspberry Pi to
measure humidity and temperature instantaneously.

 A temperature and humidity sensor are low cost-sensitive electronic devices that detects,
measures and reports both dampness and air temperature. The proportion of moisture
noticeable all around to the highest amount of moisture at a specific air temperature.

 It is one of the most important devices that has been widely in consumer, industrial,
biomedical, and environmental etc. applications for measuring and monitoring temperature
and humidity to a specific location especially in a data center or a sever room.

 In most industries, temperature and humidity measurement is important because it played a


role for a safety of all crucial equipment that may affect the whole operation.

Working of Sensor:

 Temperature and humidity sensor work by measuring the capacitance or resistance of air
samples. Most of these sensors utilize capacitive measurement to determine the amount of
dampness in the air.
 This sort of measurement relies on two electrical conductors with a non-conductive polymer
film laying between them to form an electrical field between them.
 Moisture from the air collects on the film and causes changes within the voltage levels
between the two plates. This alter is then converted into a computerize measurement of the
air’s relative humidity after taking the air temperature into account.

Prepared By: Department of Computer Engineering Page 7


Subject Name: Fundamentals of IoT Unit No: 2 Subject Code: 4360703

2.3 Need of ADC Chip while using Analog Sensors

An analog-to-digital converter (ADC) is used to convert an analog signal such as voltage to a


digital form so that it can be read and processed by a microcontroller. Most microcontrollers
nowadays have built-in ADC converters. It is also possible to connect an external ADC converter to
any type of microcontroller.

What is an ADC?
When you need to use analog sensors and communicate with a microcontroller, it is not possible for
the microcontroller to directly understand these analog signals because microcontrollers only
understand digital signals which are formed by 1’s and 0’s. Therefore, this kind of system needs an
intermediate device that could convert the analog signals from these sensors to digital signals in
order for the microcontroller to understand these signals. An ADC (Analog to Digital Converter) is
an electronic integrated circuit which is able to convert these analog signals to digital signals.

Prepared By: Department of Computer Engineering Page 8


Subject Name: Fundamentals of IoT Unit No: 2 Subject Code: 4360703

Normally an ADC would accept a range of voltage inputs and convert those into a form of binary
numbers.

Arduino UNO already has an ADC?

Yes. Arduino already has an ADC with a resolution of 10-bit, which means it is able to identify
2^10 = 1024 discrete analog levels. However, this range is from 0 – 1023. Therefore. If you connect
a sensor to an Arduino UNO and it outputs an analog level of 1023, the microcontroller will
ultimately receive it as a 5V signal after going through the 10-bit ADC.

0 -> 0V
1023 -> 5V

But Why Do We Need an ADC?


Even though most microcontrollers have ADCs built into them, we sometimes need to connect
additional ADC modules in order to get more accurate results from sensors in more advanced
projects. There are different ADCs in the market such as 12-bit, 14-bit, 16-bit, 24-bit. The accuracy
is directly related to the resolution of the ADC. When the resolution is higher, the accuracy
becomes higher.
So, the number of discrete analog levels an ADC identifies can be expressed from the simple
equation below

Number of discrete analog level = 2 ^ resolution of ADC


So, the Range of discrete analog levels in relation to the ADC resolution can be expressed by the
following table.

Resolution Range

24 16,777,216

Prepared By: Department of Computer Engineering Page 9


Subject Name: Fundamentals of IoT Unit No: 2 Subject Code: 4360703

Resolution Range

16 65,536

14 16,384

12 4096

10 1024

Now let’s look at a more general equation to obtain the ADC reading from the microcontroller.

For example, if you get an analog voltage of 4V on a 5V Arduino UNO while using a 16-bit ADC:

2.4 Actuators (working)

2.4.1 Servo Motor

 A Servo Motor is a small device that has an output shaft. This shaft can be positioned to
specific angular positions by sending the servo a coded signal.
 As long as the coded signal exists on the input line, the servo will maintain the angular
position of the shaft.
 If the coded signal changes, the angular position of the shaft changes. In practice, servos are
used in radio-controlled airplanes to position control surfaces like the elevators and rudders.
 They are also used in radio-controlled cars, puppets, and of course, robots.

Prepared By: Department of Computer Engineering Page 10


Subject Name: Fundamentals of IoT Unit No: 2 Subject Code: 4360703

 The motors are small, have built-in control circuitry, and are extremely powerful for their
size.
 A standard servo such as the Futaba S-148 has 42 oz/inches of torque, which is strong for its
size. It also draws power proportional to the mechanical load.
 A lightly loaded servo, therefore, does not consume much energy.
 The guts of a servo motor is shown in the following picture. You can see the control
circuitry, the motor, a set of gears, and the case.
 You can also see the 3 wires that connect to the outside world. One is for power (+5volts),
ground, and the white wire is the control wire.

Working of a Servo Motor


 The servo motor has some control circuits and a potentiometer (a variable resistor, aka pot)
connected to the output shaft. In the picture above, the pot can be seen on the right side of
the circuit board.
 This pot allows the control circuitry to monitor the current angle of the servo motor.
 If the shaft is at the correct angle, then the motor shuts off. If the circuit finds that the angle
is not correct, it will turn the motor until it is at a desired angle.
 The output shaft of the servo is capable of traveling somewhere around 180 degrees.
Usually, it is somewhere in the 210-degree range, however, it varies depending on the
manufacturer.
 A normal servo is used to control an angular motion of 0 to 180 degrees. It is mechanically
not capable of turning any farther due to a mechanical stop built on to the main output gear.
 The power applied to the motor is proportional to the distance it needs to travel. So, if the
shaft needs to turn a large distance, the motor will run at full speed. If it needs to turn only a
small amount, the motor will run at a slower speed. This is called proportional control.

Prepared By: Department of Computer Engineering Page 11


Subject Name: Fundamentals of IoT Unit No: 2 Subject Code: 4360703

2.4.2 Solenoid
Solenoids
 Solenoids are interesting types of actuators that we use in the IoT industry. They are simple
but effective devices for converting electrical energy into linear motion.
 They are a wire coil coiled around a cylindrical core. When an electric current flows
through the coil, a magnetic field is created that interacts with the core.
 This interaction causes the core to move linearly, either attracting or repelling it. Solenoids
can be designed in different configurations, such as push or pull types, depending on their
intended use.

Working of a Solenoid:
 There is a good chance you’ve used multiple solenoids at some point today. They help start
your car, ring your doorbell, and do hundreds of other things for you every day. But, what is
a solenoid and how does a solenoid work?

Prepared By: Department of Computer Engineering Page 12


Subject Name: Fundamentals of IoT Unit No: 2 Subject Code: 4360703

 A solenoid works by producing an electromagnetic field around a movable core, called an


armature. When compelled to move by the electromagnetic field, the motion of that
armature opens and closes valves or switches and turns electrical energy into mechanical
motion and force.
 For being such a large part of our world, solenoids are simple mechanisms that require only
a basic grasp of physics most of us learned in middle school. Understanding them is not
difficult, and you don’t have to know any mathematical formulas to learn their secrets.

2.4.3 Stepper Motor

Stepper Motors
 Stepper motors are special actuators that you should be aware of in the realm of IoT. Let’s
look at what makes them unique.
 Stepper motors are intended for accurate position and rotation control. They can move in
small increments, unlike other types of motors. This enables precise placement and control.
This distinguishes them and makes them perfect for applications requiring precise motions.
 Stepper motors consist of multiple electromagnets arranged in a specific pattern. By
energizing these electromagnets in a specific sequence, the motor rotates in small
increments, moving from one step to the next. This precise control over movement allows
for accurate positioning and synchronization in IoT systems.

Prepared By: Department of Computer Engineering Page 13


Subject Name: Fundamentals of IoT Unit No: 2 Subject Code: 4360703

Working of Stepper Motor:


 As all with electric motors, stepper motors have a stationary part (the stator) and a moving
part (the rotor). On the stator, there are teeth on which coils are wired, while the rotor is
either a permanent magnet or a variable reluctance iron core.
 We will dive deeper into the different rotor structures later. Figure 1 shows a drawing
representing the section of the motor is shown, where the rotor is a variable-reluctance iron
core.

Figure 1: Cross-Section of a Stepper Motor

 The basic working principle of the stepper motor is the following: By energizing one or
more of the stator phases, a magnetic field is generated by the current flowing in the coil
and the rotor aligns with this field.
 By supplying different phases in sequence, the rotor can be rotated by a specific amount to
reach the desired final position.
 Figure 2 shows a representation of the working principle. At the beginning, coil A is
energized and the rotor is aligned with the magnetic field it produces.
 When coil B is energized, the rotor rotates clockwise by 60° to align with the new magnetic
field. The same happens when coil C is energized. In the pictures, the colors of the stator
teeth indicate the direction of the magnetic field generated by the stator winding.

Prepared By: Department of Computer Engineering Page 14


Subject Name: Fundamentals of IoT Unit No: 2 Subject Code: 4360703

Figure 2: Stepper Motor Steps

2.5 Need of Relay while using Actuators

 Relays function by using current from the input source to activate an electromagnet, which
pulls a switch that allows higher currents on the opposite side of the relay to flow.
 Being a fool proof way to control linear actuators even without a microcontroller, relays are
widely used as they are cheap and effective. If a microcontroller is employed, however,
relays become indispensable.
 The reason for this is because a Raspberry Pi or Arduino microcontroller can work only
with a meagre electrical output. To handle a heavy electrical charge a relay is imperative.
 We offer 2-channel, 4-channel and 8-channel relay boards which are used for the same
tasks, however, the difference lies in the power supply each model requires based on how
many channels are used.
 Our relay modules operate at 5V but draws different amounts of current depending on how
many relays were being activated. Each of our individual relay will draw 70 milliamps.

Prepared By: Department of Computer Engineering Page 15


Subject Name: Fundamentals of IoT Unit No: 2 Subject Code: 4360703

 Using 8x relays powered at the same time has a current draw of 0.56A which is too high for
our Arduino, however, activation of 1 actuator at a time will be fine.
 (70mA) x (8 relays) = 560mA
 It is important to make sure the Arduino or control device used for activating the relays can
handle the current draw requirements of the relay coils.

Prepared By: Department of Computer Engineering Page 16

You might also like