0% found this document useful (0 votes)
33 views66 pages

Unit4 Arduino

The document discusses Arduino and sensors including temperature and ultrasonic sensors. It provides information on Arduino projects and coding for LED blinking. It describes how temperature and ultrasonic sensors work and their applications.

Uploaded by

rupesh3655
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)
33 views66 pages

Unit4 Arduino

The document discusses Arduino and sensors including temperature and ultrasonic sensors. It provides information on Arduino projects and coding for LED blinking. It describes how temperature and ultrasonic sensors work and their applications.

Uploaded by

rupesh3655
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/ 66

ECE249: BASIC ELECTRICAL AND ELECTRONICS ENGINEERING

Introduction to ARDUINO and Sensors

UNIT-4
Lecture Prepared by Dr. Krishan Kumar
INFORMATION (CA2 and CA3)
•CA-2(Assignment) based on Porteous Software,
assignment, last date 8th November to upload
solution/snapshot only on UMS

•CA-3(Project)-Try to Use ARDUINO in your project,


Form group of 4 students, submit your project title
in first week of October---Already Done
Submit Project/PRESENTATION with in 15th
November to 20th November
CA-3 Project Report

FRONT PAGE- TITLE and GROUP DETAIL

-INTRODUCTION
-CIRCUIT DIAGRAM/Flowchart/Alogorithm
-WORKING PRINCIPAL
-APPLICATIONS
-ADVENTAGE/DISADVENTAGES
-CONCLUSION
Note-Submit report- each project group during project
presentation in month of November(15th November to 20th
November)
Arduino UNO is a low-cost, flexible, and easy-to-use
programmable open-source microcontroller board that can
be integrated into a variety of electronic projects.
This board can be interfaced with other Arduino boards,
Arduino shields, Raspberry Pi boards and can control
relays, LEDs, servos, and motors as an output.
HOW TO WRITE THE CODE FOR LED BLINKING

void setup() {
// put your setup code here, to run once:
pinMode(LED_BUILTIN, OUTPUT);
}

void loop() {
// put your main code here, to run repeatedly:
digitalWrite(LED_BUILTIN, HIGH); // turn the LED on (HIGH is the voltage level)
delay(500); // wait for a second
digitalWrite(LED_BUILTIN, LOW); // turn the LED off by making the voltage LOW
delay(1000);
}
Ultrasonic Sensors
• Ultrasonic sensors emit short, high-frequency sound pulses at regular intervals. These
propagate in the air at the velocity of sound. If they strike an object, then they are
reflected back as echo signals to the sensor, which itself computes the distance to the
target based on the time-span between emitting the signal and receiving the echo.
• In industrial applications, an ultrasonic detection used to detect hidden tracks,
discontinuities in metals, composites, plastics, ceramics, and for water level detection.
For this purpose, the laws of physics which are indicating the propagation of sound
waves through solid materials have been used since ultrasonic sensors using sound
instead of light for detection.

An above image shows the HC-SR-04 ultrasonic sensor which has a


transmitter, receiver. The pin configuration is,
VCC - +5 V supply
TRIG – Trigger input of the sensor. Microcontroller applies 10 us trigger pulse
to the HC-SR04 ultrasonic module.
ECHO–Echo output of the sensor. Microcontroller reads/monitors this pin to
detect the obstacle or to find the distance.
GND – Ground
Sound is a mechanical wave travelling through the mediums, which may be a
solid, or liquid or gas. Sound waves can travel through the mediums with
specific velocity depends on the medium of propagation. The sound waves
which are having high frequency reflect from boundaries and produce
distinctive echo patterns.
Features of an Ultrasonic Sensor
• Supply voltage: 5V (DC).
• Supply current: 15mA.
• Modulation frequency: 40Hz.
• Output: 0 – 5V (Output high when
obstacle detected in range).
• Beam Angle: Max 15 degrees.
• Distance: 2 cm – 400 cm.
• Accuracy: 0.3cm.
• Communication: Positive TTL pulse.
Ultrasonic Sensor Working Principle
• Ultrasonic sensors emit short, high-frequency sound pulses at regular intervals.
These propagate in the air at the velocity of sound. If they strike an object, then they
reflected back as an echo signal to the sensor, which itself computes the distance to the
target based on the time-span between emitting the signal and receiving the echo.

• Ultrasonic sensors are excellent at suppressing background interference. Virtually all


materials which reflect sound can be detected, regardless of their colour. Even transparent
materials or thin foils represent no problem for an ultrasonic sensor.
Microsonic ultrasonic sensors are suitable for target distances from 20 mm to
10 m and as they measure the time of flight they can ascertain a
measurement with pinpoint accuracy. Some of our sensors can even resolve
the signal to an accuracy of 0.025 mm. Ultrasonic sensors can see through
dust-laden air and ink mists. Even thin deposits on the sensor membrane do
not impair its function.
Applications of an Ultrasonic Sensor

• It Uses to avoid and detect obstacles with robots like


biped robot, obstacle avoider robot, pathfinding
robot etc.
• Used to measure the distance within a wide range of
2cm to 400cm.
• Used to map the objects surrounding the sensor by
rotating it.
• Depth of certain places like wells, pits etc can be
measured since the waves can penetrate through the
water.
Temperature Sensors
Temperature sensors are devices that detect and measure coldness and heat and convert it
into an electrical signal. Temperature sensors are utilized in our daily lives, be it in the form
of domestic water heaters, thermometers, refrigerators, or microwaves. There is a wide
range of applications of temperature sensors, including the geotechnical monitoring field.

• A temperature sensor can also be defined as a


simple instrument that measures the degree of
coldness or hotness and then converts it into a
readable unit. There are specialized temperature
sensors used to measure the temperature of the
boreholes, soil, huge concrete dams, or buildings.
• There are different types of temperature sensors,
including thermocouples, thermistors, RTDs, etc.
Each temperature sensor has its own unique
characteristics, which makes it suitable in specific
types of applications.
• Temperature sensors are devices designed for measuring the
degree of coolness and hotness in an object.

Uses of Temperature Sensors

There are many different types of


temperature sensors, but the most
common way that is used in their
categorization is based on the mode of
connection that includes contact and
non-contact temperature sensors.

Examples of contact sensors include


thermistors and thermocouples because
their contact with the objects they
measure is direct, whereas non-contact
type temperature sensors measure the
heat source’s radiation.
Temperature Sensors physical Types
A temperature sensor consists of two main physical kinds: Contact and
Non-contact Temperature sensors.

Contact Temperature Sensor Types


These types of temperature sensors are needed to be in direct contact
with the target being sensed and utilize conduction to control
temperature variations. They can be employed to identify liquids, gases,
or solids over a wide level of temperatures.

Non-contact Temperature Sensor Types


These types of temperature sensors utilize radiation and convection
methods to control variations of temperature. They can be employed to
identify liquids and gases that release radiant energy as heat increases in
convection streams.
Contact Type Sensor Work
• Thermocouples:
Due to the wide temperature operating range, reliability, accuracy, simplicity,
and sensitivity thermocouples are considered as one of the most common
temperature sensors.
A thermocouple is made up of two dissimilar metals, such as copper and
constantan. One of these junctions, known as the Cold junction, and another
junction is called Hot junction. A cold junction is always kept at a specific
(constant) temperature, while the other end, the hot junction, is the measuring
junction. A voltage drop is developed across the junction on being subjected to
temperature

• Thermistors:
Thermistors are extremely small devices. It consists of a sensing element that
can be glass or epoxy coated, as well as two wires that link to an electric circuit.
Temperature is determined by measuring the change in resistance of an electric
current.
Non-Contact Type Temperature Sensors
Pyrometer
A pyrometer, often known as a radiation thermometer, is a non-contact device.
The main purpose of a pyrometer is to determine an item’s surface
temperature by measuring the temperature of electromagnetic radiation
emitted by the object. As a result, this non-conductive device can be used to
measure thermal radiation. We may use this to determine the temperature of the
object’s surface. There are two types of pyrometers available on the market.
They are
Infrared Temperature Sensor
Optical pyrometers
Infrared (IR) Temperature Sensors
IR temperature sensor is used to detect the temperature of a moving object. We
cannot use a contact-based temperature sensor on a moving object. IR sensors
are used to detect the temperature of moving objects such as tires, brakes, etc.
Optical Pyrometer
It is a temperature measurement sensor used to detect the temperature of
molten metals, furnaces, and in some cases liquids too. It is a prime example of
• Temperature meters are mostly used in hazardous environments such
as thermal power plants or nuclear power plants.

• Temperature sensors are used to measure the hydration heat in mass


concrete structures, in the field of geotechnical monitoring. They can
also be utilized to monitor the migration of seepage or groundwater.

• One area where they are commonly used is in curing concrete since
the concrete has to be relatively warm to properly set and cure.
• The variations of seasons causes expansion or contraction of
structures, bringing an overall change to their volume.
Temperature Sensor Components
There are three types of components in temperature sensors.

• There are essential components of a temperature sensor including


thermocouple or extension cables and wires, as well as the sensing
elements.

Examples of components which complete the sensor:

• insulating beads, connectors, connecting heads, and protecting tubes.

• There are also associated components that are necessary in the use of
sensors like converters and controllers.
Applications of Temperature Sensors

• Industrial Applications
Temperature sensors are utilized to monitor various environments and machinery, power
plants, and manufacturing. Temperature sensors are used to measure water temperatures
in reservoirs and boreholes. They can also be used to interpret temperature-related stress
and changes in volume in dams. Temperature sensors are also utilized in the study of the
temperature effect on other installed instruments.
• Scientific and Laboratory applications
Temperature sensors are utilized in science and biotech monitoring.
• Medical Applications
Temperature sensors are utilized in the monitoring of patients, in medical devices, in
thermodilution, in humidifiers, gas analysis, cardiac catheters, ventilator flow tubes, and
dialysis fluid temperature.
• Uses in Motorsports
Temperature sensors are used for measuring inlet air temperature, exhaust gas, engine
temperature, and oil temperature.
• Domestic Appliances
Temperature sensors are used in kitchen appliances (ovens, kettles, etc.) and also in white
goods.
Benefits of Temperature Sensors

• Temperature sensors are precise, extremely reliable, and have a low


cost.
• Temperature sensors are suitable for both embedded and surface
applications.
• They provide low thermal mass resulting in a fast response time.
• The vibrating wire temperature sensor is completely interchangeable;
all sensors can be read by one indicator.
• Temperature sensors are available with indicators for direct display of
temperature.
• Temperature probes exhibit excellent hysteresis and linearity.
• The technology of the vibrating wire ensures long term stability, easy
and quick readout.
• Temperature sensors perfectly suit remote scanning, reading, and data
logging.
How to Choose the Right Temperature Sensor

There are some factors that must be considered when selecting a temperature sensor for a certain
application. The following are factors that must be considered when opting for a temperature sensor:
Temperature Range
Different types of temperature sensors are capable of measuring different ranges and might be more
accurate within a certain range
Accuracy and Stability
An application may require a certain degree of accuracy; be aware that the variance of thermocouples in
long term stability is higher than that of thermistors and RTDs.
Size and Package
The type of temperature sensor selected is determined by the space available within the application. If
there is limited space, a smaller device is required. How the temperature sensor will be connected to the
application and how the temperature is going to be measured is determined by package style; therefore,
package style is an important consideration.
Environmental Conditions
A critical factor in the placement and choice of a temperature sensor is the conditions where it will be
used. Humidity, vibrations, and other environmental factors radically affect the stability and accuracy of a
temperature sensor. In addition, electrical noise affects its readings especially if the temperature changes
are minute and small. Attention to the noise level where a temperature sensor is used ensures accurate
measurements.
IR Technology

• IR technology is used in a wide range of wireless applications which


includes remote controls and sensing.
• The infrared part in the electromagnetic spectrum can be separated
into three main regions: near IR, mid-IR & far IR.
• The wavelengths of these three regions vary based on the application.
For the near IR region, the wavelength ranges from 700 nm- 1400 nm,
the wavelength of the mid-IR region ranges from 1400 nm – 3000 nm &
finally for the far IR region, the wavelength ranges from 3000 nm – 1
mm.
• The near IR region is used on fiber optic & IR sensors, the mid-IR
region is used for heat sensing and the far IR region is used in thermal
imaging.
• The range of frequency for IR is maximum as compared to microwave
and minimum than visible light.
IR Sensor

The IR sensor or infrared sensor is used to detect specific


characteristics in its surroundings through emitting or detecting
IR radiation. These sensors can also be used to detect or measure
the heat of a target and its motion or to detect obstacles.

The sensor which simply measures IR radiation instead of


emitting is called PIR or passive infrared.

In this sensor, an IR LED is used as an emitter whereas


the photodiode is used as a detector. Once an
infrared light drops on the photodiode, the output
voltage & resistance will be changed in proportion to
the received IR light magnitude.
IR Sensor Working Principle

• An infrared sensor includes two parts namely the emitter & the receiver
(transmitter & receiver), so this is jointly called an optocoupler or a
photo-coupler. Here, IR LED is used as an emitter whereas the IR
photodiode is used as a receiver.
• The photodiode used in this is very sensitive to the infrared light
generated through an infrared LED. The resistance of photodiode & output
voltage can be changed in proportion to the infrared light obtained. This is
the fundamental IR sensor working principle.
• The type of incident that occurred is the direct otherwise indirect type
where indirect type, the arrangement of an infrared LED can be done
ahead of a photodiode without obstacle. In indirect type, both the diodes
are arranged side by side through a solid object ahead of the sensor. The
generated light from the infrared LED strikes the solid surface & returns
back toward the photodiode.
IR Sensor Module

The IR sensor module includes five essential parts like IR Tx, Rx, Operational amplifier,
trimmer pot (variable resistor) & output LED. The pin configuration of the IR sensor module
is discussed below.
he main specifications and features of the
IR sensor module include the following.

The operating voltage is 5VDC


I/O pins – 3.3V & 5V
Mounting hole
The range is up to 20 centimeters
The supply current is 20mA
The range of sensing is adjustable
Fixed ambient light sensor
VCC Pin is power supply input
GND Pin is power supply ground
OUT is an active-high o/p
Types of IR Sensor

Active IR Sensor

This type of sensor includes both the emitter & the receiver which are also known as
transmitter & receiver. In most situations, a laser diode or LED is used as a source. The
working of an infrared sensor can be done through radiating energy, detected and received
through the detector. Further, it is processed through a signal processor to fetch the required
data. The best examples of active infrared sensors are reflectance & break beam sensors.

Passive Infrared Sensor

Passive Infrared Sensor (PIR) includes detectors only and this kind of sensor uses targets
like infrared transmitters or sources. Here, the object will radiate the energy & detects it
through infrared receivers. After that, a signal processor is used to understand the signal to
obtain the required data.

The best examples of PIR sensors are bolometer, Pyro-Electric Detector, Thermocouple-
Thermopile, etc.
PIR sensors are available in two types
like thermal IR sensor and quantum IR sensor.

• Thermal Infrared Sensor

These types of sensors are independent of wavelength and they utilize


heat-like energy sources. These are slow along with the response time as
well as detection time.

• Quantum Infrared Sensor

These types of sensors depend on wavelengths and the response time


and detection time they have are high. These kinds of infrared sensors
need repeated cooling for exact measurement.
LDR (Light Dependent Resistor)

LDR (Light Dependent Resistor) as the name states is a special type of


resistor that works on the photoconductivity principle means that
resistance changes according to the intensity of light. Its resistance
decreases with an increase in the intensity of light.

It is often used as a light sensor, light meter, Automatic street light, and in
areas where we need to have light sensitivity. LDR is also known as a
Light Sensor. LDR are usually available in 5mm, 8mm, 12mm, and
25mm dimensions.
LDR Working Principle

• It works on the principle of photoconductivity whenever the light falls on


its photoconductive material, it absorbs its energy and the electrons of
that photoconductive material in the valence band get excited and go to
the conduction band and thus increasing the conductivity as per the
increase in light intensity.

• Also, the energy in incident light should be greater than the bandgap gap
energy so that the electrons from the valence band got excited and go to
the conduction band.

• The LDR has the highest resistance in dark around 1012 Ohm and this
resistance decreases with the increase in Light.
Difference Between Photodiode and LDR

• Photodiodes give quick responses and are used where needed to detect
quick responses on and off like in optical communication, and opto
isolators. The photodiodes are semiconductor devices and work on PN
junctions.

• The photodiode works on the principle of converting the light energy into
electric energy while the LDR is resistance and its resistance decreases
with the increase in light intensity. They are generally used in automatic
security lights.

• Whereas the LDR, Photocell, a photoelectric, photovoltaic effect, or


photoconductivity is used to generate a current or a voltage when
exposed to light or other electromagnetic radiation. They are generally
used in burglar alarms.
Types of LDR or Photoresistors

1. Intrinsic Photoresistor
This type of photoresistor is made with pure semiconductors without any
doping. This kind of photoresistor uses pure semiconductors like silicon and
germanium. when the incident light with an adequate amount of energy falls
on this, electrons gain that energy and get excited, and a few of them go to
the conduction band.
2. Extrinsic Photoresistor
This type of photoresistor uses a doped semiconductor; this means some
impurities are mixed with the semiconductor such as phosphorus to make
this photoresistor.
Extrinsic light-dependent resistors are generally designed for longer
wavelengths of light, with a tendency towards infrared (IR).
Any Queries

You might also like