You are on page 1of 52

Introduction to Mechatronics

CHAPTER FOUR

SENSOR COMMUNICATION DESIGN


Introduction
• In virtually every engineering application there is the need to measure
some physical quantities, such as displacements, speeds, forces,
pressures, temperatures, stresses, flows, and so on.

• These measurements are performed using physical devices called


sensors, which are capable of converting a physical quantity to a more
readily manipulated electrical quantity.

• Most sensors work by converting some physical parameter such as


temperature or position into an electrical signal
Introduction
Sensor is a device that when exposed to a physical phenomenon (temperature,
displacement, force, etc.) produces a proportional output signal (electrical,
mechanical, magnetic, etc.).

Physical Measurement
phenomenon Output

The term transducer is often used synonymously with sensors. However,


ideally, a sensor is a device that responds to a change in the physical
phenomenon.
Introduction

• On the other hand, a transducer is a device that converts one form of


energy into another form of energy. Sensors are transducers when they
sense one form of energy input and output in a different form of
energy. For example, a thermocouple responds to a temperature
change (thermal energy) and outputs a proportional change in
electromotive force (electrical energy). Therefore, a thermocouple can
be called a sensor and or transducer.
Sensor selection criteria
•Range—Difference between the maximum and minimum value of the
sensed parameter
•Resolution—The smallest change the sensor can differentiate
•Accuracy—Difference between the measured value and the true value
•Precision—Ability to reproduce repeatedly with a given accuracy
•Sensitivity—Ratio of change in output to a unit change of the input
•Zero offset—A nonzero value output for no input
Response time—The time lag between the input and output
Sensor selection criteria
• Bandwidth: The frequency range between the lower and upper cutoff
frequencies.
• Transfer Function: The relationship between physical input signal and
electrical output signal
• Operating temperature—The range in which the sensor performs as specified
• Deadband—The range of input for which there is no output
• Noise: random fluctuation in the value of input that causes random fluctuation
in the output value
Types of Sensor
1. Acceleration Sensors
Measurement of acceleration is important for systems subject to shock and
vibration. Although acceleration can be derived from the time history data
obtainable from linear or rotary sensors, the accelerometers whose output is
directly proportional to the acceleration is preferred. Two common types
include the seismic mass type and the piezoelectric accelerometer.
Types of Sensor
The seismic mass type accelerometer is based on the relative motion
between a mass and the supporting structure. The natural frequency of the
seismic mass limits its use to low to medium frequency applications. The
piezoelectric accelerometer is compact and more suitable for high
frequency applications.
Types of Sensor
2. Pressure Sensors
Pressure is defined as the force per unit area that one material exerts on
another. pressure is exerted on the side walls of the container as well as
the bottom. Pressure sensors usually consist of two parts: The first
convert’s pressure to a force or displacement, and the second converts the
force or displacement to an electrical signal. Pressure measurements are
made only for gases and liquids. The simplest pressure measurement
yields a gauge pressure, which is the difference between the measured
pressure and ambient pressure. At sea level, ambient pressure is equal to
atmospheric pressure and is assumed to be 101.3 kilo Pascals (kPa).
Types of Sensor
TYPES OF PRESSURE SENSOR

Pressure sensors can be classified in terms of pressure ranges they measure,


temperature ranges of operation, and most importantly the type of pressure
they measure. Pressure sensors are variously named according to their
purpose, but the same technology may be used under different names
Types of Sensor

1. Absolute pressure sensor– A sensor that measures input pressure in


relation to a zero pressure. For the Absolute Pressure Sensor it is obvious
that the pressure range needs to be greater than 115 kPa in order to exceed
the Zero Pressure Level of anywhere.
Use the absolute pressure sensor to calculate altitude.
The equation for converting pressure to altitude is:

 Pr essure 
Altitude = −26,216  ln  
 Zero Pr essureLevel 
Types of Sensor

MPX4115 Absolute Pressure Sensor


Features
•Pressure Range From 0 to 115 kPa
•1.5% Maximum Error over 0 to 85 C
•Ideally suited for Microprocessor or Microcontroller-Based
Systems
•Temperature Compensated Over – 40 to +125 C
•Maximum Power Rating of 50 mW
•High Sensitivity of 46 mv/kPa
Types of Sensor
2. Differential pressure sensor – A sensor that is designed to accept
simultaneously two independent pressure sources. the output is proportional
to the difference between the two sources. we will use the differential
pressure sensor to calculate indicated airspeed.
From pressure difference we can calculate air speed: The equation for
converting the pressure difference to airspeed is:

2  Dynamic Pr essure
Velocity = 2.237 
Density
Types of Sensor
MPX5050D Differential Pressure Sensor
Features
•Pressure Range From 0 to 50 kPa
•2.5% Maximum Error over 0 to 85 C
•Ideally suited for Microprocessor or Microcontroller-Based Systems
•Temperature Compensated Over – 40 to +125 C
•Maximum Power Rating of 50 mW
•High Sensitivity of 90 mv/kPa that would be able to measure
velocity from 0-640 MPH
Types of Sensor

Measuring principle of pressure sensor

Bourdon Tubes:
A Bourdon tube is a short bent tube, closed at
one end. When the tube is pressurized, it tends
to straighten out. This motion is proportional to
the applied pressure.
Electrical circuit and Components

Piezoresistive
Uses the piezoresistive effect of bonded or formed strain gauge to detect
strain due to applied pressure, resistance increasing as pressure deforms the
material. The piezoresistive element converts pressure directly into
resistance, and resistance can be converted into voltage.
This is the most commonly employed sensing technology for general
purpose pressure measurement
Types of Sensor
Types of Sensor
Force collector type
These types of electronic pressure sensors generally use a force collector
(such a diaphragm, piston, bourdon tube, or bellows) to measure strain
(or deflection) due to applied force over an area (pressure).
Types of Sensor
3. Temperature sensor
Temperature sensors give an output proportional to temperature. Most
temperature sensors have a positive temperature coefficient (desirable),
which means that the sensor output goes up as the temperature goes up,
but some sensors have a negative temperature coefficient, which means
that the output goes down as the temperature goes up. Many control
systems require temperature sensors, if only to know how much to
compensate other sensors that are temperature-dependent.
Types of Sensor
Bimetallic Temperature Sensors
The bimetallic temperature sensor consists of a bimetallic strip wound into a
spiral.
The bimetallic strip is a laminate of two metals with different coefficients of
thermal expansion. As the temperature rises, the metal on the inside expands
more than the metal on the outside and the spiral tends to straighten out.
These sensors are typically used for on-off control.
One distinct advantage of Bimetallic Temperature Sensors is that the output
from the switch can be used directly without further signal conditioning.
Types of Sensor
➢Thermocouples
The thermocouple was developed over 100 years ago and still enjoys wide
use, particularly in high-temperature situations. Thermocouples are the
most versatile, inexpensive, and have a wide range (up to 1200 ˚C typical).
A thermocouple simply consists of two dissimilar metal wires joined at the
ends to create the sensing junction. When used in conjunction with a
reference junction, the temperature difference between the reference
junction and the actual temperature shows up as a voltage potential
Types of Sensor
Types of Sensor

Measuring junction is heated, small DC voltage (millivolts) generated in


thermocouple wires.
Thermocouple converts thermal energy into electrical energy
Note: thermocouple only generates a millivoltage signal when there is
temperature difference between “hot” and “cold” junctions
“cold” junction usually set to 32oF(0oC)
Types of Sensor

Advantages of thermocouple Disadvantages of thermocouple


➢Simple ➢least repeatable
➢High temperature operation ➢Low sensitivity to small
➢Low cost temperature changes
➢Point temperature sensing ➢Wire may pick up radiated
electrical noise if not shielded
➢Fastest response to
temperature changes ➢Lowest accuracy
Electrical circuit and Components

Thermistors
Thermistors are semiconductor devices whose resistance changes as
the temperature changes. They are good for very high sensitivity
measurements in a limited range of up to 100 ̊C. The relationship
between the temperature and the resistance is nonlinear

Resistance
(Ohms)

Temperature (oC)
Electrical circuit and Components
Advantages of thermistors Disadvantages of thermistors

• High sensitivity to small • Limited temperature


temperature changes range
• Temperature • Some initial accuracy
measurements become “drift”
more stable with use • Decalibration if used
• Copper or nickel beyond the sensor’s
extension wires can be temperature ratings
used
Electrical circuit and Components

Resistance Temperature Detectors (RTDs)


Use the phenomenon that the resistance of a metal changes with
temperature. Wire wound and thin film devices and nearly linear over a
wide range of temperatures.

Resistance
(Ohms)

Temperature (oC)
Electrical circuit and Components

Advantages RTD Disadvantages RTD


• Most stable over time • High cost
• Most accurate • Slowest response time
• Most repeatable • Low sensitivity to small temperature
temperature measurement changes
• Very resistant to • Sensitive to vibration (strains the
contamination/ platinum element wire)
• Decalibration if used beyond
sensor’s temperature ratings
Electrical circuit and Components

Infrared type sensors


Infrared type sensors use the radiation heat to sense the temperature from
a distance. These noncontact sensors can also be used to sense a field of
vision to generate a thermal map of a surface
Electrical circuit and Components
Advantages of Infrared sensor Disadvantages Infrared sensor
• No contact with the product • High initial cost
required • More complex - support electronics
• Response times as fast or required
faster than thermocouples • Measuring accuracy affected by dust,
• No corrosion or oxidation to smoke, background
affect sensor accuracy • radiation, etc.
• Good stability over time
• High repeatability
Electrical circuit and Components
4. LOAD SENSORS
Load sensors measure mechanical force. The forces can be large or small for
example, weighing heavy objects or detecting low-force tactile pressures. In
most cases, it is the slight deformation caused by the force that the sensor
measures, not the force directly. Typically, this deformation is quite small.
Once the amount of tension (stretching) or compression (squeezing)
displacement has been measured, the force that must have caused it can be
calculated using the mechanical parameters of the system.
Electrical circuit and Components
The ratio of the force to deformation is a constant for each material, as
defined by Hooke’s law. F= KX
where
K= spring constant of the material
F= applied force
X= extension or compression as result of force
Electrical circuit and Components
5. FLOW SENSORS
Flow sensors measure the quantity of fluid material passing by a point in a
certain time. Usually, the material is a gas or a liquid and is flowing in a pipe
or open channel. The flowing of solid material, such as gravel traveling on a
conveyer belt, will not be considered here. The best type of flow sensor is
pressure type flow sensor. This type of flow sensor is based on the fact that
pressure in a moving fluid is proportional to the flow. The pressure is
detected with a pressure sensor; based on the physical dimensions of the
system, the flow can be calculated.
Other Components in Electrical circuit

The simplest flow sensor is called the orifice plate, and is simply a restriction in
the pipe that causes a pressure drop in the flow, much like a resistor that causes a
drop in voltage in a circuit. This sensor requires two pressure ports, one
upstream and one downstream of the restriction. The flow is proportional to the
pressure difference between these ports .
Other Components in Electrical circuit
Other Components in Electrical circuit
Example

Solution
Other Components in Electrical circuit
5. LIQUID-LEVEL SENSORS
Liquid-level sensors, which measure the height of a liquid in a container,
have two classifications: discrete and continuous. Discrete-level detectors
can only detect whether the liquid is at a certain level. The continuous-level
detector provides an analog signal that is proportional to the liquid level.
Discrete-Level Detectors

Discrete-level detectors determine when


a liquid has reached a certain level.
Other Components in Electrical circuit
Other Components in Electrical circuit
• Continuous-Level Detectors
Continuous-level detectors provide a signal that is proportional to the liquid
level. There are a number of ways in which this can be done. One of the
most direct methods(used in the gas tank of your car) is a float connected to
a position sensor.
Other Components in Electrical circuit
Proximity Sensors
They are used to sense the proximity of an object relative to another object.
They usually provide a on or off signal indicating the presence or absence of
an object.
Measures the closeness of the auto body to obstacles (both animate and
inanimate) that may not be visible to the driver or that the driver may yet
not have realized. Types of proximity sensor:
Ultrasonic: trajectory of object Microwave: point of impact
Measure physical property using Microprocessor
ARDUINO
The Arduino Uno is a microprocessor, a microcontroller board based on the
ATmega328. It has 14 digital input/output a USB connection, a power jack
and a reset button.
It contains everything needed to support the microcontroller; simply connect
it to a computer with a USB cable or power it with an AC-to-DC adapter or
battery.
Measure physical property using Microprocessor
To get started you have your ARDUINO UNO board in front of you, a
computer and a standard USB cable (A plug to B plug): the kind you would
connect to a USB printer.
The open-source Arduino environment makes it easy to write code and
upload it to the I/O board. It runs on Windows, Mac OS X and Linux. The
environment is written in Java and based on Processing, and other open
source software
Measure physical property using Microprocessor

Connecting the board


The Arduino Uno automatically draws power from either the USB connection of a computer
or an external power supply. Connect the Arduino board to your computer using the USB
cable. The green power LED (labelled PWR) should turn on.
Measure physical property using Microprocessor
Installing software
Before you connect your Arduino board to the computer, make sure you have
installed the Software and drivers needed to run with the board.
You can download the latest release of the Arduino integrated development
environment (IDE)software by going to http://arduino.cc and click the
“Download” link in the top menu.
Download and run the latest version of the Arduino IDE
Measure physical property using Microprocessor
Install drivers
If you used the zip-file or unchecked the “install driver” part during the
installation, you might have to manually install the drivers to connect the
Arduino board. Installing drivers for the Arduino Uno with Windows 7/8,
Vista or XP.
• Plug in your board and wait for Windows to begin its driver installation
process. On some computers the drivers will install automatically. If not,
follow the steps below.
Measure physical property using Microprocessor
Click on the Start Menu, and open the Control Panel. While in the Control
Panel, navigate to System and Security.
Next, open the Device Manager which you will find under System. Look
under Ports (COM & LPT). You should see an open port named "Arduino
UNO (COMxx)“.
In some cases you won’t find “Arduino Uno”, instead you will find “Unknown
device” at the top.
Measure physical property using Microprocessor
Right click on the "Arduino UNO (COMxx)" port and choose the "Update
Driver Software“ option. Next, choose the "Browse my computer for Driver
software" option. Finally, navigate to and select the Arduino Uno's driver file,
named "ArduinoUNO.inf", located in the "Drivers" folder of the Arduino
Software download (not the "FTDI USB Drivers "subdirectory).
Windows will finish up the driver installation from here. Cases you won’t find
“Arduino Uno”, instead you will find “Unknown device” at the top.Windows
will finish up the driver installation from here.
Measure physical property using Microprocessor
Select your board

You’ll need to select the entry in the Tools → Board menu that corresponds to your

Arduino. Otherwise you won’t be able to communicate with the Arduino Uno board.

Select your serial port

Select the serial device of the Arduino board from the Tools → Serial Port menu. You will probably

have several COM-ports available. The Arduino will most likely be the highest COM-port number. To

make sure, you can disconnect your Arduino board and re-open the menu; the entry that disappears

should be the Arduino board. Reconnect the board and select the correct serial port After all code the

program then upload to the Arduino.


Measure physical property using Microprocessor
Measuring temperature by using microprocessor( Arduino Uno) &
Temperature sensor
There are two voids in the program
Void setup: the microcontroller execute once
void loop: Microcontroller execute many times depend on the number of
data.
Measure physical property using Microprocessor
void setup()
Temperature sensor(LM35) with Arduino Uno {
pinMode(A0, INPUT);
Code Serial.begin(9600);
}
void loop()
{
unsigned long startTime;
startTime = millis();
int Temperature = analogRead(A0);
float new_Temperature = (5*Temperature*100)/1023;
Serial.print(startTime/1000);
Serial.print(" ");
Serial.print("TEMPERATURE: ");
Serial.print(Temperature);
Serial.print("˚c");
Serial.println();
delay(1000);
}
Measure physical property using Microprocessor
void setup()
Pressure sensor (MPX4115A ) with Arduino Uno {
pinMode(A0, INPUT);
Code Serial.begin(9600);
}
void loop()
{
unsigned long startTime;
startTime = millis();
int pressure = analogRead(A1);
float new_pressure = ((pressure/1024)+0.095)/0.0009;
Serial.print(startTime/1000);
Serial.print(" ");
Serial.print("PRESSURE: ");
Serial.print(pressure);
Serial.print("millibar");
Serial.println();
delay(1000);
}
End of chapter four

Thanks in advance!

You might also like