0% found this document useful (0 votes)
5 views

Lecture 12 (Sensor Interfacing - Microcontroller)

A microcontroller is a compact, cost-effective microcomputer designed for specific tasks in embedded systems, comprising components like processors and memory. Microcontrollers are categorized by bit configuration (8-bit, 16-bit, 32-bit) and memory type (external, embedded), while sensors convert physical parameters into electrical signals, with types including digital and analog sensors. Various sensors, such as temperature, proximity, and ultrasonic sensors, have specific applications and working principles, including the use of infrared and ultrasonic waves for detection.
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)
5 views

Lecture 12 (Sensor Interfacing - Microcontroller)

A microcontroller is a compact, cost-effective microcomputer designed for specific tasks in embedded systems, comprising components like processors and memory. Microcontrollers are categorized by bit configuration (8-bit, 16-bit, 32-bit) and memory type (external, embedded), while sensors convert physical parameters into electrical signals, with types including digital and analog sensors. Various sensors, such as temperature, proximity, and ultrasonic sensors, have specific applications and working principles, including the use of infrared and ultrasonic waves for detection.
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/ 30

Microcontroller

A microcontroller is a small and low-cost microcomputer, which is designed


to perform the specific tasks of embedded systems like displaying
microwave’s information, receiving remote signals, etc.
The general microcontroller consists of the processor, the memory (RAM,
ROM, EPROM), Serial ports, peripherals (timers, counters), etc.
Microcontroller vs Microprocessor
Types of Microcontrollers
Bit: Based on bit configuration, the microcontroller is further divided into
three categories.
• 8-bit microcontroller − This type of microcontroller is used to execute
arithmetic and logical operations like addition, subtraction, multiplication
division, etc. For example, Intel 8031 and 8051 are 8 bits microcontroller.
• 16-bit microcontroller − This type of microcontroller is used to perform
arithmetic and logical operations where higher accuracy and performance
is required. For example, Intel 8096 is a 16-bit microcontroller.
• 32-bit microcontroller − This type of microcontroller is generally used in
automatically controlled appliances like automatic operational machines,
medical appliances, etc.
Types of Microcontrollers
Memory:
• External memory microcontroller − This type of microcontroller is
designed in such a way that they do not have a program memory on the
chip. Hence, it is named as external memory microcontroller. For example:
Intel 8031 microcontroller.
• Embedded memory microcontroller − This type of microcontroller is
designed in such a way that the microcontroller has all programs and data
memory, counters and timers, interrupts, I/O ports are embedded on the
chip. For example: Intel 8051 microcontroller.
Types of Microcontrollers
• Instruction Set
• CISC − CISC stands for complex instruction set computer. It allows the user
to insert a single instruction as an alternative to many simple instructions.
• RISC − RISC stands for Reduced Instruction Set Computers. It reduces the
operational time by shortening the clock cycle per instruction.
Sensor
A sensor converts the physical parameter into a signal which can be
measured electrically.
Sensor is called primary measuring element. It may be embedded in a
transducer to perform its function.
Transducer= Sensor + Signal Conditioning Circuit
Transducer- A transducer is an electronic device that converts energy from
one form to another. Common examples include microphones, loudspeakers,
thermometers, position and pressure sensors, and antenna.
Signal Conditioning Circuit- Signal conditioning is an electronic circuit that
manipulates a signal in a way that prepares it for the next stage of
processing.
Important Characteristics for sensor
Block Diagram Of a System
Sensor Types
Digital Sensor:
Digital sensors are the kind of electrochemical or electrical sensors where
the information is converted to digital form and then transmitted. The
output of a digital sensor is the distinct digital signal of the quantity which is
being measured. And the measured quantities might be of conductivity, pH
value, redox potentials, and many others. The output is in the form of 1’s
and 0’s where ‘1’ represents ON condition and ‘0’ represents OFF condition.
This corresponds that a digital signal generates distinct (non-continuous)
values and the output is considered either as a single “bit”, (serial
transmission) or the combination of multiple bits called “byte” and is called
(parallel transmission).
Sensor Types
• Analog Sensors:
Analog Sensors measure the external parameters and give an analog voltage
as an output. They produce a continuous output signal or voltage which is
proportional to the quantity being measured. The output voltage may be
from the range of 0 to 5V. Low logic 0 (0V-3.5V) and High logic (3.5V-5V).
Sensor Types (Based on working principles)
Resistive Type:
A sensor whose resistance changes with the input signal i.e. based on the
variation of resistance of the sensor element the physical parameter is
detected.
Capacitive type:
Physical parameter is detected based on the variation of capacitance
Inductive type:
Physical parameter is detected based on the variation of inductance
Sensor Characteristics
Sensor Characteristics
Sensitivity: The rate of change in output due to change in input.
Offset: Over the range for which sensor remains useful. The lowest output
may have a large positive constant added (y=m3x+c) . This has to be
subtracted in the amplifier interface to bring the output back into the
required range.
Linearity: A perfect straight line so that the output is proportional to input.
Reference Level: If the sensitivity is specified we still need to know a pair of
reference value to place the characteristics.
Transfer function: The ratio between output and input of a sensor.
Error
Resolution: Degree of precision in the measurement.
IC Sensors
Various Sensor
Different sensor IC has been developed for different purposes. We are
going to look at some of the sensor.
Temperature Sensor: 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.
Temperature Sensor
Temperature sensor are basically classified into two types
• Non Contact Temperature Sensors: These temperature sensors use
convection & radiation to monitor temperature
• Contact Temperature Sensors: Contact temperature sensors are then
further sub divided into three type
• Electro-Mechanical(Thermocouples).
• Resistive Resistance Temperature Detectors (RTD).
• Semiconductor based. (LM35, DS1820 etc).
LM35 Sensor
LM35 is an integrated analog temperature sensor whose electrical
output is proportional to Degree Centigrade. LM35 Sensor does not
require any external calibration or trimming to provide typical
accuracies.
LM35 Sensor
How Does LM35 Sensor Work?
Main advantage of LM35 is that it is linear i.e. 10mv/°C which means for every
degree rise in temperature the output of LM35 will rise by 10mv. So if the output of
LM35 is 220mv/0.22V the temperature will be 22°C. So if room temperature is 32°C
then the output of LM35 will be 320mv i.e. 0.32V.
LM35 Interfacing:
As such no extra components required to interface LM35 to ADC as the output of
LM35 is linear with 10mv/degree scale. It can be directly interfaced to any 10 or 12
bit ADC. But if you are using an 8-bit ADC like ADC0808 or ADC0804 an amplifier
section will be needed if you require to measure 1°C change. LM35 can also be
directly connected to Arduino. The output of LM35 temperature can also be given
to comparator circuit and can be used for over temperature indication or by using a
simple relay can be used as a temperature controller.
Proximity Sensor
A proximity sensor is a sensor used to detect the presence of nearby
objects in a non-contact nature. These sensors then convert the
information about presence or movement of an object into an
electrical signal.
The two main types of proximity sensors are Inductive and Capacitive.
There are other types of conventionally and commercially used
proximity sensors as well, that may use magnets, reed switches,
ultrasonic, photoelectric sensing, etc.
IR Proximity Sensor
IR sensor is an electronic device, that emits the light in order to sense some
object of the surroundings. An IR sensor can measure the heat of an object
as well as detects the motion. Usually, in the infrared spectrum, all the
objects radiate some form of thermal radiation. These types of radiations are
invisible to our eyes, but infrared sensor can detect these radiations.
Types of IR Sensor

There are two types of IR sensors are available and they are,

Active Infrared Sensor


Passive Infrared Sensor
IR Proximity Sensor
IR Sensor Working Principle: There are different types of infrared
transmitters depending on their wavelengths, output power and response
time. An IR sensor consists of an IR LED and an IR Photodiode, together they
are called as Photocoupler or Optocoupler.
IR Transmitter or IR LED: Infrared Transmitter is a light emitting diode (LED)
which emits infrared radiations called as IR LED’s. Even though an IR LED
looks like a normal LED, the radiation emitted by it is invisible to the human
eye.
IR Receiver or Photodiode: Infrared receivers or infrared sensors detect the
radiation from an IR transmitter. IR receivers come in the form of
photodiodes and phototransistors. Infrared Photodiodes are different from
normal photo diodes as they detect only infrared radiation.
IR Proximity Sensor
The emitter is an IR LED and the detector is an IR photodiode. The IR
photodiode is sensitive to the IR light emitted by an IR LED. The
photo-diode’s resistance and output voltage change in proportion to
the IR light received. This is the underlying working principle of the IR
sensor.
When the IR transmitter emits radiation, it reaches the object and
some of the radiation reflects back to the IR receiver. Based on the
intensity of the reception by the IR receiver, the output of the sensor
defines.
IR Proximity Sensor
Passive IR Sensor
A Passive Infrared (PIR) sensor is an electronic device that detects
infrared (IR) radiation emitted by objects in its field of view. Unlike
other motion sensors that rely on active detection methods, such as
ultrasonic or microwave sensors, PIR sensors detect changes in IR
radiation without emitting any signals themselves. This “passive”
nature makes PIR sensors highly efficient and suitable for a wide range
of applications.
Passive IR Sensor
Passive IR Sensor
The passive infrared (PIR) sensor itself has two slots in it, each slot is
made of a special material that is sensitive to IR. The lens used here is
not really doing much and so we see that the two slots can 'see' out
past some distance (basically the sensitivity of the sensor). When the
sensor is idle, both slots detect the same amount of IR, the ambient
amount radiated from the room or walls or outdoors. When a warm
body like a human or animal passes by, it first intercepts one half of the
PIR sensor, which causes a positive differential change between the
two halves. When the warm body leaves the sensing area, the reverse
happens, whereby the sensor generates a negative differential change.
These change pulses are what is detected.
Ultrasonic Sensor
As the name indicates, ultrasonic sensors measure distance by using
ultrasonic waves. The sensor head emits an ultrasonic wave and receives the
wave reflected back from the target. Ultrasonic Sensors measure the
distance to the target by measuring the time between the emission and
reception.
In order to calculate the distance between the sensor and the object, the
sensor measures the time it takes between the emission of the sound by the
transmitter to its contact with the receiver. The formula for this calculation is
D = ½ T x C (where D is the distance, T is the time, and C is the speed of
sound ~ 343 meters/second). For example, if a scientist set up an ultrasonic
sensor aimed at a box and it took 0.025 seconds for the sound to bounce
back, the distance between the ultrasonic sensor and the box would be:
D = 0.5 x 0.025 x 343
Ultrasonic Sensor
HC04 Sensor
The HC-SR04 ultrasonic sensor uses sonar to determine the distance to
an object.
HC04 Sensor
How Does it Work?
The 7ultrasonic sensor uses sonar to determine the distance to an
object. Here’s what happens:
1. The ultrasound transmitter (trig pin) emits a high-frequency sound
(40 kHz).
2. The sound travels through the air. If it finds an object, it bounces
back to the module.
3. The ultrasound receiver (echo pin) receives the reflected sound
(echo).

You might also like