10 Sensör 2
10 Sensör 2
Measurement (2/2)
Yrd. Doç. Dr. Aytaç Gören
ELK 2018 - Contents
W01 Basic Concepts in Electronics
W02 AC to DC Conversion
W03 Analysis of DC Circuits (self and condenser)
W04 Transistors and Applications (H-Bridge)
W05 Op Amps and Applications
W06 Midterm
W07 Sensors and Measurement (1/2)
W08 Sensors and Measurement (2/2)
W09 Basic Concepts in Digital Electronics (Boolean Algebra, Decimal to binary, gates)
W10 Digital Logic Circuits (Gates and Flip Flops)
W11 PLC’s
W12 Microprocessors
W13 Data Acquisition, D/A and A/D Converters.
2
Yrd. Doç. Dr. Aytaç Gören
ELK 2018 – W08 Contents
1. Photoelectric Sensors
2. Thermal, Heat, Temperature Sensors
3. GPS
4. Flow, Fluid Velocity Sensors
5. Weather, Moisture, Humidity Sensors
6. Electric Current, Electric Potential
7. Magnetic Sensors
• 3
Yrd. Doç. Dr. Aytaç Gören
Connecting Sensors to Microcontrollers
sensor µC keypad
signal timing
sensor memory display
Analog
many microcontrollers have a built-in A/D
8-bit to 12-bit common
many have multi-channel A/D inputs
Digital
serial I/O
use serial I/O port, store in memory to analyze
synchronous (with clock)
must match byte format, stop/start bits, parity check,
etc.
*references 9 asynchronous (no clock): more common for comm. than
data
must match baud rate and bit width, transmission
protocol, etc.
frequency encoded
use timing port, measure pulse width or pulse frequency
Digital Sensors
As its name implies, Digital Sensors produce a discrete output
signal or voltage that is a digital representation of the quantity
being measured. Digital sensors produce a Binary output signal
in the form of a logic "1" or a logic "0", ("ON" or "OFF"). This
means then that a digital signal only produces discrete (non-
continuous) values which may be outputted as a single "bit",
(serial transmission) or by combining the bits to produce a single
"byte" output (parallel transmission).
Compared to analogue signals, digital signals or quantities have very
high accuracies and can be both measured and "sampled" at a very
high clock speed. The accuracy of the digital signal is proportional to
the number of bits used to represent the measured quantity. For
example, using a processor of 8 bits, will produce an accuracy of
0.195% (1 part in 512). While using a processor of 16 bits gives an
accuracy of 0.0015%, (1 part in 65,536) or 130 times more accurate.
This accuracy can be maintained as digital quantities are manipulated
and processed very rapidly, millions of times faster than analogue
signals.
Connecting Smart Sensors to PC/Network
“Smart sensor” = sensor with built-in signal processing & communication
Data Acquisition Cards (DAQ)
PC card with analog and digital I/O
interface through LabVIEW or user-generated code
Communication Links Common for Sensors
asynchronous serial comm.
universal asynchronous receive and transmit (UART)
1 receive line + 1 transmit line. nodes must match baud rate & protocol
RS232 Serial Port on PCs uses UART format (but at +/- 12V)
can buy a chip to convert from UART to RS232
synchronous serial comm.
serial peripheral interface (SPI)
*references 9 1 clock + 1 bidirectional data + 1 chip select/enable
I2C = Inter Integrated Circuit bus
designed by Philips for comm. inside TVs, used in several commercial
sensor systems
IEEE P1451: Sensor Comm. Standard
several different sensor comm. protocols for different applications
Sensor Calibration
Sensors can exhibit non-ideal effects
– offset: nominal output ≠ nominal parameter value
– nonlinearity: output not linear with parameter changes
– cross parameter sensitivity: secondary output variation with, e.g.,
temperature
Frequency (MHz)
1001
• T = a + bV +cV2, 4.000
1010
T2 1001
T= temperature; V=sensor voltage; 1101
offset
3.000
1110
a,b,c = calibration coefficients 1111
2.000
Compensation T3
*references 9 1.000
• Photo-emissive Cells - These are photodevices which release free electrons from
a light sensitive material such as caesium when struck by a photon of sufficient
energy. The amount of energy the photons have depends on the frequency of the
light and the higher the frequency, the more energy the photons have converting
light energy into electrical energy.
In this basic dark sensing circuit, the light dependent resistor LDR1 and the potentiometer
VR1 form one adjustable arm of a simple resistance bridge network, also known commomly
as a Wheatstone bridge, while the two fixed resistors R1 and R2 form the other arm. Both
sides of the bridge form potential divider networks across the supply voltage whose outputs
V1 and V2 are connected to the non-inverting and inverting voltage inputs respectively of
the operational amplifier.
The operational amplifier is configured as a Differential Amplifier also known as a voltage
comparator with feedback whose output voltage condition is determined by the difference
between the two input signals or voltages, V1 and V2. The resistor combination R1 and R2
form a fixed voltage reference at input V2, set by the ratio of the two resistors. The LDR -
VR1 combination provides a variable voltage input V1 proportional to the light level being
detected by the photoresistor.
Yrd. Doç. Dr. Aytaç Gören
LDR
Photoelectric Sensors
As with the previous circuit the output from the operational amplifier is used to control a
relay, which is protected by a free wheel diode, D1. When the light level sensed by the LDR
and its output voltage falls below the reference voltage set at V2 the output from the op-
amp changes state activating the relay and switching the connected load. Likewise as the
light level increases the output will switch back turning "OFF" the relay. The hysteresis of
the two switching points is set by the feedback resistor Rf can be chosen to give any
suitable voltage gain of the amplifier.
The operation of this type of light sensor circuit can also be reversed to switch the relay
"ON" when the light level exceeds the reference voltage level and vice versa by reversing
the positions of the light sensor LDR and the potentiometer VR1. The potentiometer can be
used to "pre-set" the switching point of the differential amplifier to any particular light level
making it ideal as a simple light sensor project circuit.
Yrd. Doç. Dr. Aytaç Gören
opto-switch
Photoelectric Sensors
• Opto-switches
– consist of a light source and a light sensor within a single
unit. Two common forms are the reflective and slotted types
A reflective opto-switch
A slotted opto-switch
Opto-switch sensor
In example above, the speed of the rotating shaft is measured by using a digital LED/Opto-
detector sensor. The disc which is fixed to a rotating shaft (for example, from a motor or
wheels), has a number of transparent slots within its design. As the disc rotates with the
speed of the shaft, each slot passes by the sensor inturn producing an output pulse
representing a logic level "1". These pulses are sent to a register of counter and finally to an
output display to show the speed or revolutions of the shaft. By increasing the number of
slots or "windows" within the disc more output pulses can be produced giving a greater
resolution and accuracy as fractions of a revolution can be detected. Then this type of sensor
arrangement could be used for positional control.
*references 10
Photodiodes are very versatile light sensors that can turn its current flow both
"ON" and "OFF" in nanoseconds and are commonly used in cameras, light meters,
CD and DVD-ROM drives, TV remote controls, scanners, fax machines and copiers
etc, and when integrated into operational amplifier circuits as infrared spectrum
detectors for fibre optic communications, burglar alarm motion detection circuits
and numerous imaging, laser scanning and positioning systems etc.
*references 6
Photodiode
• light I
Phototransistor:
1 mA @ 1000 lux
Photodarlingtons
up to 100x this
sensitivity.
Phototransistors consist mainly of a bipolar NPN Transistor with its large base
region electrically unconnected, although some phototransistors allow a base
connection to control the sensitivity, and which uses photons of light to
generate a base current which inturn causes a collector to emitter current to
flow. Most phototransistors are NPN types whose outer casing is either
transparent or has a clear lens to focus the light onto the base junction for
increased sensitivity.
CMOS cameras are very compact and inexpensive, but haven’t matched
CCDs in most performance dimensions.
Start from $20(!)
Custom CMOS cameras
integrate image processing
right on the camera.
Allow special functions like
motion detection, recognition.
At 25oC
At 100oC
by changing the fixed resistor value of R2 (in our example 1kΩ) to a potentiometer or
preset, a voltage output can be obtained at a predetermined temperature set point for
example, 5v output at 60oC and by varying the potentiometer a particular output voltage
level can be obtained over a wider temperature range.
RTD
Resistive temperature detectors have positive temperature coefficients (PTC) but
unlike the thermistor their output is extremely linear producing very accurate
measurements of temperature. However, they have poor sensitivity, that is a change
in temperature only produces a very small output change for example, 1Ω/oC. The
more common types of RTD's are made from platinum and are called Platinum
Resistance Thermometer or PRT's with the most commonly available of them all the
Pt100 sensor, which has a standard resistance value of 100Ω at 0oC. However,
Platinum is expensive and one of the main disadvantages of this type of device is its
cost.
These
These elements work with Elements
temperatures to 660 °C. works with
temperatures
to 300 °C.
Coiled elements
The principle of operation is that the junction of the two dissimilar metals such as copper
and constantan, produces a "thermo-electric" effect that produces a constant potential
difference of only a few millivolts (mV) between them. The voltage difference between the
two junctions is called the "Seebeck effect" as a temperature gradient is generated along
the conducting wires producing an emf. Then the output voltage from a thermocouple is a
function of the temperature changes. If both the junctions are at the same temperature the
potential difference across the two junctions is zero in other words, no voltage output as
V1 = V2. However, when the junctions are connected within a circuit and are both at
different temperatures a voltage output will be detected relative to the difference in
temperature between the two junctions, V1 - V2. This difference in voltage will increase with
temperature until the junctions peak voltage level is reached and this is determined by the
characteristics of the two dissimilar metals used.
http://www.omega.com/prodinfo/flowmeters.html
• Turbine
• Differential Pressure
• Coriolis Mass
• Ultrasonic
• Electromagnetic
• Thermal
http://www.omega.com/prodinfo/flowmeters.html
or in terms of pseudoranges, , as
http://www.epluse.com/en/products/humidity-instruments/humidity-sensor/hct01/
http://www.sensirion.com/en/01_humidity_sensors/00_humidity_sensors.htm
http://www.epluse.com/en/products/humidity-instruments/humidity-sensor/hct01/
http://www.sensirion.com/en/01_humidity_sensors/00_humidity_sensors.htm
Lower electrode
Types
Absolute pressure sensor
This sensor measures the pressure relative to perfect vacuum.
Gauge pressure sensor
This sensor measures the pressure relative to atmospheric pressure. A tire
pressure gauge is an example of gauge pressure measurement; when it
indicates zero, then the pressure it is measuring is the same as the ambient
pressure.
Altitude sensing
This is useful in aircraft, rockets, satellites, weather balloons, and many other applications.
All these applications make use of the relationship between changes in pressure relative to
the altitude. p = 101325 (1 - 2.25577 10-5 h)5.25588 ; p[Pa], h[m]
Flow sensing
This is the use of pressure sensors in conjunction with the venturi effect to measure flow.
Differential pressure is measured between two segments of a venturi tube that have a
different aperture. The pressure difference between the two segments is directly
proportional to the flow rate through the venturi tube. A low pressure sensor is almost
always required as the pressure difference is relatively small.
P = pressure, ρ = density of the fluid, g = standard gravity,
Level / depth sensing h = height of fluid column above pressure sensor
A pressure sensor may also be used to calculate the level of a fluid. This technique is
commonly employed to measure the depth of a submerged body (such as a diver or
submarine), or level of contents in a tank (such as in a water tower). For most practical
purposes, fluid level is directly proportional to pressure
where:
is the output voltage of the transducer.
is the actual measured pressure.
is the nominal transducer scale factor (given an ideal transducer supply
voltage) in units of voltage per pressure.
is the actual transducer supply voltage.
is the ideal transducer supply voltage.
Correcting measurements from transducers exhibiting this behavior requires
measuring the actual transducer supply voltage as well as the output voltage and
applying the inverse transform of this behavior to the output signal:
Resolution: The magnetic sensors feature very low noise floors for their
size. Typical resolution ranges from 27 to 120 microgauss (for HMC).
*reference 15