0% found this document useful (0 votes)
12 views74 pages

IoT and Its Applications - Unit 3

The document provides an overview of various sensors and actuators used in the Internet of Things (IoT), detailing their types, working principles, applications, and comparisons. Key sensors discussed include temperature sensors (DHT11, DHT22, LM35, TMP36), humidity sensors, water level sensors (YL-83, FC-28, JSN-SR04T, Grove), and gas sensors (MQ2). Each sensor is analyzed for its purpose, output, advantages, and drawbacks, highlighting their roles in applications such as environmental monitoring, home automation, and safety systems.

Uploaded by

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

IoT and Its Applications - Unit 3

The document provides an overview of various sensors and actuators used in the Internet of Things (IoT), detailing their types, working principles, applications, and comparisons. Key sensors discussed include temperature sensors (DHT11, DHT22, LM35, TMP36), humidity sensors, water level sensors (YL-83, FC-28, JSN-SR04T, Grove), and gas sensors (MQ2). Each sensor is analyzed for its purpose, output, advantages, and drawbacks, highlighting their roles in applications such as environmental monitoring, home automation, and safety systems.

Uploaded by

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

U21ECG04

Internet of Things and it’s Applications


U21ECG04
Internet of Things and it’s Applications
Unit 3
Interfacing Sensors and Actuators

1. Sensors
A) Temperature Sensor (e.g., TMP36, DS18B20):
Purpose: Measures the ambient temperature.

Working Principle: These sensors can either be analog or digital. Analog sensors like TMP36 provide an
analog voltage output proportional to the temperature, while digital sensors like DS18B20 communicate
over a digital protocol and give temperature readings directly in Celsius.

Application: Used in weather stations, thermostats, and environmental monitoring systems.


Unit 3
Interfacing Sensors and Actuators

1. Sensors
B) Humidity Sensor (e.g., DHT11, DHT22):
Purpose: Measures the relative humidity in the air.

Working Principle: Humidity sensors like DHT11 and DHT22 use a capacitive humidity sensor to
determine the moisture in the air. The sensor provides digital output directly in percentage format.

Application: Commonly used in weather stations, greenhouses, and indoor air quality monitoring.
Unit 3
Interfacing Sensors and Actuators

1. Sensors
C) Water Level Sensor (e.g., YL-83):
Purpose: Detects the presence of water and measures the water level.

Working Principle: The YL-83 uses conductive strips that act as probes. When water makes contact with
the probes, it changes the sensor's output. The more water there is, the higher the analog output voltage,
allowing the sensor to measure different water levels.

Application: Commonly used in water tank level monitoring, flood detection systems, and automatic
irrigation systems.
Unit 3
Interfacing Sensors and Actuators

1. Sensors
D) MQ2 Gas Sensor:
Purpose: Detects gases like smoke, LPG, carbon monoxide (CO), and methane.

Working Principle: The MQ2 sensor uses a heated tin dioxide (SnO₂) sensor to detect gas
concentrations. When gas is present, the sensor’s resistance changes, providing an analog output
proportional to the concentration of gas.

Application: Frequently used in gas leak detection systems, smoke alarms, and air quality monitoring.
Unit 3
Interfacing Sensors and Actuators

1. Sensors
E) PIR Sensor (Passive Infrared Sensor):
Purpose: Detects motion by sensing changes in infrared radiation.

Working Principle: PIR sensors detect infrared radiation from objects like humans and animals. When a
warm body enters the sensor’s field of view, it detects the change in infrared radiation and sends a digital
signal.

Application: Used in motion-activated lights, security systems, and automatic doors.


Unit 3
Interfacing Sensors and Actuators

1. Sensors
F) Ultrasonic Sensor (e.g., HC-SR04):
Purpose: Measures distance to an object using ultrasonic sound waves.

Working Principle: The HC-SR04 ultrasonic sensor emits an ultrasonic sound wave that bounces off an
object and returns to the sensor. The time taken for the echo to return is used to calculate the distance to
the object.

Application: Widely used in obstacle detection, distance measurement, robotic navigation, and parking
assistance systems.
Unit 3
Interfacing Sensors and Actuators

1. Sensors - Comparison
Sensor Type Purpose Working Principle Typical Applications
Temperature Sensor Analog voltage (TMP36, LM35)
Analog/ Measures ambient Thermostats, weather stations,
(e.g., TMP36, LM35 or digital signal (DS18B20)
Digital temperature environment control
DS18B20) proportional to temperature
Humidity Sensor Measures relative Capacitive sensing with digital Indoor air quality monitoring,
Digital
(e.g., DHT22) humidity output greenhouses, weather stations
Conductive strips detect water
Water Level Sensor Detects water Water tank monitoring, flood
Analog contact, generating an analog
(e.g., YL-83) presence and level detection
signal
Detects gases like Changes in resistance of tin
Gas leak detectors, smoke
MQ2 Gas Sensor Analog smoke, LPG, CO, dioxide based on gas
alarms, air quality monitoring
methane concentration
Senses infrared radiation Motion-activated lights,
PIR Sensor Digital Detects motion
changes from moving objects security systems
Emits ultrasonic sound waves
Ultrasonic Sensor Measures distance to Obstacle detection, distance
Digital and measures time taken for
(e.g., HC-SR04) objects measurement, robotics
echo to return
Unit 3
Interfacing Sensors and Actuators

2. Temperature Sensors
A). DHT11 / DHT22
Type: Digital
Measurement: Temperature and Humidity
Temperature Range: DHT11: 0°C to 50°C DHT22: -40°C to +80°C
Accuracy: DHT11: ±2°C DHT22: ±0.5°C
Output: Digital signal (one-wire protocol)
Advantages: Simple to use Humidity measurement included
Drawbacks: Slower response time, DHT11 has a smaller range and lower accuracy compared to DHT22.
Use Case: Ideal for home automation, weather stations, and indoor temperature monitoring.
Unit 3
Interfacing Sensors and Actuators

2. Temperature Sensors

DHT 11 DHT 22
Unit 3
Interfacing Sensors and Actuators

2. Temperature Sensors
A). DHT11 – Working Principle
• The DHT11 sensor uses a capacitive humidity sensor and a thermistor to measure humidity and
temperature, respectively.
• The capacitive humidity sensor works by measuring changes in capacitance as the relative humidity
changes. A dielectric material absorbs moisture from the air, causing a change in capacitance, which is
then converted into a humidity reading.
• The thermistor measures temperature based on the change in resistance with temperature variations.
• The sensor has a small internal microcontroller that processes the data and outputs it as a digital signal
using a single-wire protocol (one-wire communication).
Unit 3
Interfacing Sensors and Actuators

2. Temperature Sensors
A). DHT22 – Working Principle
• The DHT22 works similarly to the DHT11 but with higher precision and a broader range.
• Like the DHT11, it uses a capacitive humidity sensor and a thermistor to measure humidity and
temperature.
• The main difference is in the precision and range. The DHT22 can measure humidity from 0% to 100%
with higher accuracy (±2%) and temperature from -40°C to +80°C with higher precision (±0.5°C).
• The DHT22 also processes the data internally and outputs it in a digital format using the same single-
wire protocol.
Unit 3
Interfacing Sensors and Actuators

2. Temperature Sensors
B). LM35
Type: Analog
Measurement: Temperature only
Temperature Range: -55°C to +150°C
Accuracy: ±0.5°C at room temperature
Output: Analog voltage proportional to temperature (10mV per °C)
Advantages: No calibration required, accurate and cost-effective
Drawbacks: Requires analog input and additional calculations.
Use Case: Ideal for simple temperature measurement in HVAC systems or industrial applications.
Unit 3
Interfacing Sensors and Actuators

2. Temperature Sensors
B). LM35
Unit 3
Interfacing Sensors and Actuators

2. Temperature Sensors B). LM35 – Working Principle


• The LM35 is a precision analog temperature sensor that directly converts temperature into an analog
voltage.It operates based on the linear relationship between temperature and voltage.
• For every 1°C increase in temperature, the LM35 produces a voltage increment of 10 mV. For example,
at 25°C, the output voltage would be 250 mV.
• The sensor contains an internal circuit that generates an output voltage proportional to the ambient
temperature. Unlike thermistors, which require resistance conversion, the LM35 provides a direct
analog voltage output, simplifying the process.
• The LM35 does not need any external calibration or trimming to maintain its accuracy, and it has a low
self-heating effect, meaning it does not significantly affect the temperature it's measuring.
Unit 3
Interfacing Sensors and Actuators

2. Temperature Sensors
C). TMP36
Type: Analog
Measurement: Temperature only
Temperature Range: -40°C to +125°CAccuracy: ±2°C
Output: Analog voltage (linear, 10mV/°C)
Advantages: Easy to use with Arduino’s analog inputs, No external components needed
Drawbacks: Lower accuracy compared to digital sensors.
Use Case: Great for general-purpose temperature monitoring in embedded projects and IoT applications.
Unit 3
Interfacing Sensors and Actuators

2. Temperature Sensors
C). TMP36 – Working Principle
• The TMP36 is an analog temperature sensor that outputs a voltage linearly proportional to the
temperature in Celsius.
• The sensor produces a 0.5V output at 0°C, and for every 1°C increase, the voltage rises by 10 mV. For
example, at 25°C, the output voltage would be 0.75V (0.5V + 250 mV).The TMP36 uses an internal
bandgap voltage reference and other circuitry to ensure accurate and linear temperature-to-voltage
conversion over a wide temperature range.
• The linear relationship between voltage and temperature simplifies calculations, as the output voltage
can be directly converted to the corresponding temperature without complex equations.
Unit 3
Interfacing Sensors and Actuators

2. Temperature Sensors - Comparison


Temperature
Sensor Type Accuracy Output Advantages Drawbacks Use Case
Range
Measures both Lower Indoor
DHT11 Digital 0°C to 50°C ±2°C Digital temperature & accuracy, temp/humidity
(1-Wire) humidity limited range monitoring
Weather stations,
Digital Higher accuracy, wider Slower
DHT22 Digital -40°C to +80°C ±0.5°C environmental
(1-Wire) range response time
monitoring
Requires
HVAC systems,
Analog Accurate, no analog input,
LM35 Analog -55°C to +150°C ±0.5°C industrial
(10mV/°C) calibration needed more
applications
calculations
Lower General-purpose
Analog Easy to use, no
TMP36 Analog -40°C to +125°C ±2°C accuracy than temperature
(10mV/°C) external components
digital sensors measurement
Unit 3
Interfacing Sensors and Actuators

3. Water Sensors
A) YL-83 Water Level Sensor
Type: Analog
Measurement: Water presence and level
Water Detection Range: Depends on the height and placement of the sensor
Accuracy: General-purpose, not highly precise
Output: Analog signal proportional to water level
Advantages: Simple to use, Cost-effective for basic water detection
Drawbacks: Limited accuracy, Requires analog input pin
Use Case: Ideal for water tank level monitoring, flood detection, and basic water presence sensing.
Unit 3
Interfacing Sensors and Actuators

3. Water Sensors
A) YL-83 Water Level Sensor
Unit 3
Interfacing Sensors and Actuators
3. Water Sensors - A) YL-83 Water Level Sensor – Working Principle
• The YL-83 water level sensor works by detecting water contact using multiple conductive strips
(probes) on its sensor board.
• When water touches these conductive strips, the sensor measures the conductivity or resistance
between the strips. As the water level increases, more of the strips come into contact with water,
changing the resistance.
• This change in resistance is converted into an analog voltage output, where higher water levels produce
a higher voltage.
• The output is an analog signal that can be read by an Arduino or other microcontroller through an
analog input pin. The value from the sensor corresponds to the water level, and by calibrating the
sensor, you can map the voltage to actual water levels.
Unit 3
Interfacing Sensors and Actuators

3. Water Sensors
B) FC-28 Soil Moisture Sensor
Type: Analog (can also be digital with some models)
Measurement: Moisture level in soil (can also detect water presence)
Water Detection Range: Measures water content or moisture in soil
Accuracy: Moderate, varies with calibration
Output: Analog voltage proportional to moisture content (digital option also available)
Advantages: Low-cost solution, Useful for monitoring moisture levels in soil
Drawbacks: Prone to corrosion over time, Not highly accurate for precise water level detection
Use Case: Primarily used in automatic irrigation systems, plant soil moisture monitoring, and can be
adapted for water presence detection.
Unit 3
Interfacing Sensors and Actuators

3. Water Sensors
B) FC-28 Soil Moisture Sensor
Unit 3
Interfacing Sensors and Actuators

3. Water Sensors
B) FC-28 Soil Moisture Sensor – Working Principle
• The FC-28 soil moisture sensor measures the amount of moisture in the soil or water content by using
two probes that are inserted into the soil or liquid.
• The sensor operates by detecting changes in the conductivity between the two probes. When soil or
water is present, it changes the resistance between the probes, which affects the sensor's output.
• The sensor has a capacitive sensing element that provides a more reliable measurement compared to
resistive sensors. This capacitance-based measurement is less affected by corrosion and provides a
stable output.
• The output of the FC-28 is an analog voltage that varies with the moisture level. Higher moisture levels
decrease resistance, resulting in a higher voltage output.
Unit 3
Interfacing Sensors and Actuators

3. Water Sensors
C) Ultrasonic Sensor (JSN-SR04T)
Type: Digital
Measurement: Water level (distance to water surface)
Water Detection Range: Up to 4-5 meters, depending on sensor type
Accuracy: High precision for level measurement
Output: Digital pulse (time-based)
Advantages: Non-contact measurement, High accuracy for water level detection
Drawbacks Requires calibration and proper setup
Use Case: Ideal for water tank monitoring, reservoirs, and flood level detection without physical contact
with the liquid.
Unit 3
Interfacing Sensors and Actuators

3. Water Sensors
C) Ultrasonic Sensor (JSN-SR04T)
Unit 3
Interfacing Sensors and Actuators

3. Water Sensors
C) Ultrasonic Sensor (JSN-SR04T) – Working Principle
• The JSN-SR04T is an ultrasonic sensor designed for measuring distance to an object, which can be
adapted to measure water levels.The sensor emits ultrasonic sound waves from its transmitter.
• These sound waves travel through the air and reflect off the water surface or an object.
• The sensor has a built-in receiver that detects the reflected sound waves (echo).
• By measuring the time it takes for the sound waves to travel to the water surface and back, the sensor
calculates the distance to the surface.
• The distance is proportional to the time taken for the echo to return. This measurement is converted
into a digital signal and can be read by a microcontroller like Arduino.
Unit 3
Interfacing Sensors and Actuators

3. Water Sensors
D) Grove Water Level Sensor:
Type: Analog
Measurement: Water level detection
Water Detection Range: 10% to 100% water level (depending on the sensor's placement and length of
probes)
Accuracy: Moderate (provides an estimate of the water level based on the height of water contact)
Output: Analog signal proportional to the water level
Advantages: Easy to use and integrate with Arduino, Simple design for measuring water levels in tanks or
reservoirs, Cost-effective and efficient for basic water level monitoring
Unit 3
Interfacing Sensors and Actuators

3. Water Sensors
D) Grove Water Level Sensor:
Drawbacks: Susceptible to corrosion if used in harsh or long-term wet environmentsLimited precision for
highly accurate level measurements
Use Case: Ideal for water tank level monitoring, rainwater collection systems, and basic liquid level
detection in various applications where precision is not a primary concern.
Unit 3
Interfacing Sensors and Actuators

3. Water Sensors
D) Grove Water Sensor
Unit 3
Interfacing Sensors and Actuators

3. Water Sensors
D) Grove Water Level Sensor – Working Principle
• The Grove Water Level Sensor is designed to detect the level of water in a tank or other container.
• It operates by using conductive strips or probes that are mounted on the sensor's surface. These probes
are exposed to water and are spaced at specific intervals.
• As the water level rises, it comes into contact with more of the conductive strips.
• The contact between the water and the probes creates a change in electrical resistance or capacitance.
• This change is translated into an analog voltage output.
• The sensor generates a voltage that varies with the water level, where higher water levels result in a
higher output voltage.
Unit 3
Interfacing Sensors and Actuators

3. Water Sensors - Comparison


Sensor Type Measurement Range Accuracy Typical Applications
Water
YL-83 Water Varies with sensor General-purpose, not Water tank monitoring,
Analog presence and
Level Sensor length highly precise flood detection
level
Analog
FC-28 Soil Soil moisture Varies with Moderate, dependent Agricultural applications,
(can be
Moisture Sensor level calibration on calibration irrigation systems
digital)

JSN-SR04T Water level High precision for Water level


Ultrasonic Sensor Digital (distance to Up to 4-5 meters distance measurement in tanks,
surface) reservoirs

Grove Water Depends on probe Moderate, general- Water level monitoring


Analog Water level
Level Sensor length purpose in tanks and containers
Unit 3
Interfacing Sensors and Actuators
4. MQ2 - Gas Sensors
Type: Analog / Digital
Measurement: Gas concentration (LPG, methane, smoke, propane, hydrogen)
Detection Range: 200 to 10,000 ppm (parts per million)
Accuracy: Moderate, dependent on calibration and gas type
Output: Analog voltage or digital signal (threshold-based)
Advantages: Can detect multiple gases (LPG, methane, propane, smoke, hydrogen), Inexpensive and
widely available, Useful for general gas leak detection
Drawbacks: Requires preheating before accurate readings, Sensitive to environmental factors like
temperature and humidity
Unit 3
Interfacing Sensors and Actuators
4. MQ2 - Gas Sensors
Use Case: Ideal for gas leak detection in homes, industries, and offices. Also used in smoke alarms, air
quality monitoring systems, and safety devices for hazardous gas detection.
Unit 3
Interfacing Sensors and Actuators
4. MQ2 - Gas Sensors
Working Principle:
• The MQ-2 sensor uses a sensing element made of tin dioxide (SnO2), which has low conductivity in
clean air.

• When gases are present, the gas molecules interact with the surface of the sensor, causing a chemical
reaction that reduces the resistance of the sensor.

• As the gas concentration increases, the resistance decreases, producing a corresponding increase in the
output voltage.

• The sensor provides an analog output proportional to the gas concentration and can trigger a digital
output when the gas concentration exceeds a predefined threshold, adjustable via an onboard
potentiometer.

• The sensor must be preheated for a certain period to stabilize and provide accurate readings.
Unit 3
Interfacing Sensors and Actuators
4.1 Other Gas Sensors
Sensor Type Measurement Detection Range Accuracy Use Case
Moderate,
Gas concentration dependent on Gas leak detection,
MQ-2 Analog / Digital (LPG, methane, smoke, 200 to 10,000 ppm calibration and gas smoke alarms, air
propane, hydrogen) type quality monitoring

Moderate,
dependent on Breathalyzers, alcohol
Alcohol (Ethanol) vapor
MQ-3 Analog / Digital 0.05 to 10 mg/L calibration and detection in vehicles,
concentration
alcohol safety equipment
concentration
Moderate, Carbon monoxide
MQ-7 Analog / Digital Carbon monoxide (CO) 20 to 2000 ppm dependent on detectors, fire alarms,
calibration safety systems
Unit 3
Interfacing Sensors and Actuators
4.1 Other Gas Sensors
Sensor Type Measurement Detection Range Accuracy Use Case
CO and combustible 10 to 1000 ppm (CO), Moderate,
MQ-9 Analog / Digital gases (methane, 100 to 10,000 ppm dependent on Gas leak detectors,
propane, LPG) (combustible gases) calibration safety alarms

Air quality
Air quality (CO2, Moderate, monitoring,
MQ-135 Analog / Digital ammonia, alcohol, 10 to 1000 ppm for dependent on environmental
benzene, smoke) various gases calibration sensors, pollution
detection
Gas leak detection,
Moderate, safety alarms in
MQ-6 Analog / Digital LPG 200 to 10,000 ppm dependent on kitchens and
calibration industries
Unit 3
Interfacing Sensors and Actuators
5. PIR (Passive InfraRed) Sensors
Type: Digital
Measurement: Motion detection based on infrared radiation
Detection Range: Typically up to 7 meters (varies with sensor model)
Accuracy: High for detecting motion within its field of view
Output: Digital signal (high/low)
Advantages: Sensitive to changes in infrared radiation, making it effective for motion detection, Low power
consumption and simple to integrate into various projects, Cost-effective and widely available
Drawbacks: Limited to detecting motion; cannot identify the type of object or its exact distance,
Performance can be affected by environmental factors like temperature and lighting conditions
Use Case: Ideal for security systems, automatic lighting systems, and motion-activated devices
Unit 3
Interfacing Sensors and Actuators
5. PIR (Passive InfraRed) Sensors
Unit 3
Interfacing Sensors and Actuators
5. PIR (Passive InfraRed) Sensors
Working Principle:
• The PIR sensor detects infrared radiation emitted by objects based on their temperature, such as humans
or animals.
• The sensor consists of a pyroelectric element that generates a voltage when exposed to infrared
radiation.
• When a warm object (like a human) moves across the sensor's field of view, the amount of infrared
radiation detected changes.
• This change triggers the sensor to produce a digital output signal indicating motion detection.
• The sensor is designed to detect motion based on changes in infrared levels, not continuous infrared
levels.
Unit 3
Interfacing Sensors and Actuators
5. PIR (Passive InfraRed) Sensors
• Note: PIR sensors are passive, meaning they detect infrared radiation emitted by objects without actively
emitting any radiation themselves.
• Trigger modes: We have two trigger modes in the PIR sensor one is non-repeat mode and repeat mode
trigger. These two modes can be obtained by changing the jumper position given in the corner of the
module.
• Non-repeat Mode: When we use PIR in this mode, the output will go HIGH for the stipulated time and
then turn LOW. For example, If Output turns HIGH for 10 seconds, it will turn LOW after this time
period.
• Repeat Trigger Mode: In this mode when motion is detected the output will remain HIGH till it is
observing motion, whether the motion is by single person or multiple person.
Unit 3
Interfacing Sensors and Actuators
5. PIR (Passive InfraRed) Sensors
• Block Time: Block time is a period when the PIR sensor does not detect any motion. It is nearby
for 3 seconds. After this block time, the PIR is ready to work again.
• Delay Time Adjustment : There is a potentiometer to adjust the output to remain HIGH after
detecting the motion. We can adjust the time period from 5 seconds to 5 minutes.
• Sensitivity Adjustment: A potentiometer is given to adjust the sensitivity. We can vary it from 3
meters to 7 meters perpendicular to the sensor. The sensitivity reduces as we move either side of
the sensor. The angle of the detection area of PIR is around 110 degrees conic section.
Unit 3
Interfacing Sensors and Actuators
5. Ultrasonic Sensor (e.g., HC-SR04)
Type: Digital
Measurement: Distance to an object using ultrasonic sound waves
Detection Range: Typically 2 cm to 4 meters
Accuracy: High precision for distance measurement within its range
Output: Digital pulse (time-based)
Advantages: Non-contact measurement, making it ideal for detecting objects at a distance, High accuracy
and versatility for various applications, Widely used and cost-effective
Drawbacks: Performance can be affected by environmental factors such as temperature, humidity, and the
surface of the object being detected, Requires a clear line of sight to the object and may have limitations in
detecting objects with irregular shapes
Unit 3
Interfacing Sensors and Actuators

5. Ultrasonic Sensor (e.g., HC-SR04)


Use Case: Ideal for obstacle detection in robotics, distance measurement, parking assistance systems, and
water level monitoring
Unit 3
Interfacing Sensors and Actuators

5. Ultrasonic Sensor (e.g., HC-SR04)


Working Principle:
• The HC-SR04 ultrasonic sensor emits an ultrasonic sound wave from its transmitter.
• The sound wave travels through the air and reflects off an object back to the sensor.
• The sensor’s receiver detects the reflected sound wave (echo) and measures the time it took for the
echo to return.
• The distance to the object is calculated based on the time taken for the sound wave to travel to the
object and back, using the speed of sound in air.
• The sensor converts this distance measurement into a digital pulse signal that can be read by a
microcontroller like Arduino.
Unit 3
Interfacing Sensors and Actuators

6. Comparison - Sensors
Sensor Type Measurement Detection Range Accuracy Use Case

Temperature Varies by sensor HVAC systems, weather


Analog / High, varies by
Sensor (e.g., Temperature (e.g., -55°C to +150°C monitoring, industrial
Digital sensor
LM35, TMP36) for LM35) temperature control

Varies by sensor Home automation,


Humidity Sensor
Humidity and Moderate, varies weather stations,
(e.g., DHT11, Digital
Temperature (e.g., 20% to 80% RH by sensor indoor climate
DHT22) for DHT22) monitoring

Water Sensor Varies by sensor Water tank monitoring,


Analog / Water level or Moderate, varies
(e.g., FC-28, YL- (e.g., 0 to 5 meters flood detection, water
Digital presence by sensor
83) for FC-28) level sensing
Unit 3
Interfacing Sensors and Actuators

6. Comparison - Sensors
Sensor Type Measurement Detection Range Accuracy Use Case
Gas concentration Moderate,
Gas leak detection,
Analog / (LPG, methane, 200 to 10,000 dependent on
MQ2 Gas Sensor smoke alarms, air
Digital smoke, propane, ppm calibration and
quality monitoring
hydrogen) gas type

Security systems,
Motion detection
Typically High for motion automatic lighting,
PIR Sensor Digital based on infrared
up to 7 meters detection motion-activated
radiation
devices

Distance Obstacle detection,


Ultrasonic Sensor measurement Typically High precision distance measurement,
Digital
(e.g., HC-SR04) using ultrasonic 2 cm to 4 meters within its range parking assistance,
sound waves water level monitoring
Unit 3
Interfacing Sensors and Actuators

7. Magnetic relay switches


• A magnetic relay uses an electromagnet to
control larger electrical currents.
• When a small current flows through a coil, it
magnetizes an iron core, which attracts a
movable contact to close the circuit.
• Removing the current stops the magnetic field,
allowing a spring to open the circuit again,
thereby controlling the flow of electricity.
Unit 3
Interfacing Sensors and Actuators

7. Magnetic relay switches


• It consists of several key components:
• Coil: This is a wire wound into a spiral shape around a
core.
• Iron Core: The core enhances the magnetic field created
by the coil when electrical current flows through it.
• Contacts: These are metal pieces that allow or stop
current flow when moved.
• Hinge and Spring: The movable contact is attached to a
hinge and held in place by a spring.
Unit 3
Interfacing Sensors and Actuators

7. Magnetic relay switches - Working Principle:


• Electromagnet: The core component of a magnetic relay is an
electromagnet. When a small current flows through the control coil
(electromagnet), it generates a magnetic field.
• Attracting the Armature: This magnetic field pulls a movable armature,
causing it to move.
• Contact Switching: The movement of the armature either opens or closes
the electrical contacts, switching the connected circuit on or off.
• Spring Mechanism: Once the electromagnet is de-energized, a spring
returns the armature to its original position, resetting the contacts.
Unit 3
Interfacing Sensors and Actuators

7. Magnetic relay switches – Applications:


• Isolation: Provides electrical isolation between the control and power circuits, making it safe for
controlling high-voltage loads with low-voltage signals.
• Multiple Contacts: Relays can have single or multiple sets of contacts (normally open or
normally closed) to control different circuits.
• Current/Voltage Rating: They are rated based on the voltage and current they can safely switch.
• Response Time: Relays have a slower response time compared to solid-state devices, but they can
handle higher power loads.
Unit 3
Interfacing Sensors and Actuators

8. Actuators
• Actuators are devices that convert energy (usually electrical) into mechanical motion. They are
essential components in automation systems, robotics, industrial machinery, and consumer
electronics, enabling systems to move or control physical objects.
• Example: Automatic door opening, central door locking and window open / close in car.

Types of Actuators:
Electrical Actuators: Use electrical energy to produce motion.
Examples: Motors (DC/AC motors, stepper motors), Solenoids.
Unit 3
Interfacing Sensors and Actuators

8. Actuators - Types of Actuators:


Pneumatic Actuators: Use compressed air to create mechanical movement.
Common in industrial systems due to fast response times.
Example: Pneumatic cylinders.
Unit 3
Interfacing Sensors and Actuators

8. Actuators - Types of Actuators:


Hydraulic Actuators: Use fluid pressure to generate force.
Known for their ability to produce very large forces.
Example: Hydraulic pistons.
Unit 3
Interfacing Sensors and Actuators

8. Actuators - Types of Actuators:


Thermal or Magnetic Actuators: Use thermal or magnetic energy to produce movement.
Examples: Bimetallic strips (thermal), Magnetic relays (magnetic).
Unit 3
Interfacing Sensors and Actuators

8. Actuators
Working Principle:
• The basic function of an actuator is to take a control signal (e.g., from a microcontroller or sensor)
and produce physical movement, which can be linear or rotational depending on the type of
actuator.
• Electrical to mechanical: An electric signal causes the actuator to move a mechanical part (like
turning a shaft or pushing a piston).
• Energy conversion: Depending on the actuator type, energy is transformed (e.g., electrical to
magnetic in a motor, or fluid pressure to force in a hydraulic actuator)..
Unit 3
Interfacing Sensors and Actuators

8. Actuators
Common Applications:
• Robotics: To move arms, legs, or wheels.
• Automobiles: Power windows, door locks, throttle controls.
• Home Appliances: Opening/closing of valves in washing machines, microwave turntables.
• Industrial Automation: Conveyors, mechanical arms in manufacturing.
Unit 3
Interfacing Sensors and Actuators

8. Actuators
Key Characteristics:
• Speed: How quickly the actuator moves.
• Force: The amount of mechanical power the actuator can generate.
• Precision: How accurately the actuator can position an object.
• Control Method: Some actuators are controlled by digital signals, others by analog signals.
Unit 3
Interfacing Sensors and Actuators

9. Servo Motor
• Servos are motors that allow you to precisely
control physical movement because they generally
move to a position rather than continuously
rotating.
• They are simple to connect and control because
the motor driver is built right into them.
• Servos contain a small DC motor connected to the
output shaft through gears.
• The output shaft drives a servo horn and is also
linked to a potentiometer (pot).
Unit 3
Interfacing Sensors and Actuators

9. Servo Motor
• The potentiometer provides position feedback to
the error amplifier in the control unit, which
compares the current position of the motor to the
target position.
• In response to the error, the control unit adjusts the
motor’s current position so that it matches the
desired position.
• In control engineering, this mechanism is known as a servomechanism, or servo for short. It is a
closed-loop control system that uses negative feedback to adjust the motor’s speed and direction
to achieve the desired result.
Unit 3
Interfacing Sensors and Actuators

9. Servo Motor - Working


PWM Control:
• A servo motor is controlled by a PWM
signal, where the length of the pulse
determines the angle of the motor shaft.
• For example, a 1 ms pulse might move
the motor to 0 degrees, a 1.5 ms pulse to
90 degrees, and a 2 ms pulse to 180
degrees.
Unit 3
Interfacing Sensors and Actuators

9. Servo Motor
• Pulses ranging from 1ms to 2ms will rotate the servo to a position proportional to the pulse width.
The animation below will help you understand the relationship between pulses and position.

Feedback:
• The feedback sensor constantly monitors the position of the motor shaft and adjusts it to match the
input signal. If the position differs from the commanded position, the motor corrects it by rotating
in the appropriate direction.
Unit 3
Interfacing Sensors and Actuators

9. Servo Motor - Note:


• It is important to note that there is no standard
for the exact relationship between pulses and
position, so you may need to tweak your
sketch to adjust for the range of your servo.
• Also, the pulse duration can vary between
brands; for example, it might be 2.5ms for 180
degrees and 0.5ms for 0 degrees.

Servo Motor Pinout


Unit 3
Interfacing Sensors and Actuators

9. Servo Motor - to Arduino UNO


• SG90 Micro Servo Motor operates on 4.8-6V DC (5V typical) and can rotate 180 degrees (90 in
each direction).
• It draws about 10mA when idle and 100mA to 250mA when moving, so it can be powered with the
Arduino’s 5-volt output.
• If your servo consumes more than 250mA, consider using a separate power supply for it.
• Connect the red wire to the Arduino’s 5V and the black/brown wire to ground. Finally, attach the
Orange/Yellow wire to PWM enabled pin.
Unit 3
Interfacing Sensors and Actuators

9. Servo Motor - to Arduino UNO


Unit 3
Interfacing Sensors and Actuators

9. Servo Motor - to Arduino UNO


Unit 3
Interfacing Sensors and Actuators

9. Servo Motor - to Arduino UNO


Unit 3
Interfacing Sensors and Actuators

9. Servo Motor - to Arduino UNO


Unit 3
Interfacing Sensors and Actuators

9. Servo Motor - to Arduino UNO


Unit 3
Interfacing Sensors and Actuators

9. Servo Motor - to Arduino UNO


Unit 3
Interfacing Sensors and Actuators

10. Stepper Motor


• A stepper motor is a type of electric motor designed to
move in discrete steps.
• It rotates in small, precise increments (steps), making
it ideal for applications requiring precise positioning
and control.
• Unlike a DC motor, which spins continuously, a
stepper motor moves incrementally when instructed,
offering excellent control over both speed and
position.
Unit 3
Interfacing Sensors and Actuators

10. Stepper Motor


• The working principle of a stepper motor is based on
magnetic fields. It has two main components, a stator
and a rotor. The rotor is usually a permanent magnet and
it’s surrounded by some coils on the stator.
• When we energize or let current flow through the coils,
particular magnetic fields are generated in the stator that
either attract or repel the rotor. By activating the coils,
step by step, one after another in a particular order, we
can achieve continues motion of rotor, but also, we can
make it stop at any position.
Unit 3
Interfacing Sensors and Actuators

10. Stepper Motor


• So, that’s why these motors are called stepper motors, they move in discrete steps.

• By increasing the number of magnetic poles on the rotor, we can increase the number of possible
stopping positions, thus increase the resolution or the precision of the motor.

You might also like