Sunteți pe pagina 1din 48

Robotic Sensors

Engr. Roselito E. Tolentino


SENSOR
• A physical change in some characteristic that
changes in response to some excitation, for
example heat or force and covert that into an
electrical signal.
Movement Sensor
• Proximity
• Optical Proximity Sensor
• Ultrasonic Proximity
• Capacitive Proximity
• Inductive Proximity
• Position
• Potentiometer
• Encoders
• Ultrasonic (Radar and Sonar)
Ultrasonic and Optical Sensor
• The working principle of an ultrasound sensor is
quite the same like of the Infrared Reflection
Sensor.
• A sound pulse is sent in the area of about 40 kHz
for ultrasonic while optical sent light wave with
speed of light.
Ultrasonic and Optical Sensor
• Wave is sent out and the signal energy of the
received signal is measured.
• Changes in the received energy indicate the
occupation of an object in the sensing area.
Capacitive Proximity Sensor
• Measure a change in the dielectric constant by
measuring a change in capacitance. In usual
applications a capacitor is formed between two
metal plates. Usually the free space between both
plates is filled by air

• If a human enters the sensing area, it changes the


capacitance between two plates because the
human body can be seen as a dielectric put
between both plates of a capacitor.
Capacitive Proximity Sensor
Inductive Proximity Sensors.
• Operate under the electrical principle of Faraday's
Law of inductance.
• The sensor consists of a coil and a circuitry that
senses changes in the magnetic flux, e.g. by a
passing by the sensor.
• Inductive measurements are of less importance in
daily life because the permeability of most objects
is to less to measure a change therefore can only
be used to detect metallic object.
Inductive Proximity Sensors

When a ferromagnetic material is placed within the eddy current field


generated around the inductive sensor, such as a ferromagnetic metal plate or
metal screw, the inductance of the coil changes significantly. The proximity
sensors detection circuit detects this change producing an output voltage.
Proximity Sensors Operational Modes
• Through Beam:
• Long range (20m)
• Alignment is critical

• Retro-reflective
• Range 1-3m–
• Popular and cheap

• Diffuse-reflective
• Range 12-300mm
• Cheap and easy to use
POSITION SENSORS
• Positional in nature which means that they are
referenced either to or from some fixed point or
position.
• As their name implies, these types of sensors
provide a "position" feedback.
POSITION SENSORS
• Method of determining a position, is to use either
"distance", which could be the distance between
two points such as the distance travelled or moved
away from some fixed point, or by "rotation"
(angular movement).
• Position Sensors can detect the movement of an
object in a
1. straight line using Linear Sensors or
2. by its angular movement using Rotational Sensors.
What is a Potentiometer?
• A potentiometer is one example of Variable
Resistor.
• If all three terminals are used, it can act as a
variable voltage divider.
• Approximately 270 degrees of rotation.
• Its shortcoming is that of corrosion or wearing of
the sliding contact, especially if it is kept in one
position.
Connected to Ground
Wiper – Runs across the Strip
of Resistive material
Connected to Power source

Steel shaft (Spindle)


Potentiometer
• Potentiometer is consist of a resistance track with
connections at both ends and a wiper which moves
along the track as you turn the spindle.

The track may be made from carbon, cermet (ceramic


and metal mixture) or a coil of wire (for low
resistances). The track is usually rotary but straight
track versions, usually called sliders, are also
available.
Potentiometer
• Potentiometer can be used as a potential divider
(or voltage divider) to obtain a manually adjustable
output voltage at the slider (wiper) from a fixed
input voltage applied across the two ends of the
pot.

• The voltage across RL is determined by the


formula:
Analog to Digital Conversion
Analog to Digital Conversion
• Sampling – Conversion of a continuous time signal
into a discrete-time continuous valued signal by
taking samples of the continuous signal.
• Quantization – Conversion of a discrete-time
continuous – valued signal to discrete -time
discrete-valued signal (digital)
• Coding – Conversion of a discrete – valued signal
to binary sequence. Excess digits as signing each
sample to the quantization level below it.
Sampling
• Conversion of a continuous time signal into a
discrete-time continuous valued signal by taking
samples of the continuous signal.
Quantization
• the process of mapping input values from a large
set (often a continuous set) to output values in a
(countable) smaller set.
• Conversion of a discrete-time continuous – valued
signal to discrete -time discrete-valued signal
(digital)
Coding
• Conversion of a discrete – valued signal to binary
sequence.
• Each Quantization level is assigned a binary code.
• The number of bits b required to encode the levels,
or the number of bits per sample as it is commonly
referred to, is obtained as follows:
b = log2 L
Arduino Code
• val = analogRead(pin); perform ADC
• val = map(val, 0, 1023, 0, 179); scale values

• Note: the number of the analog input pin to read


from 0 to 5 on most boards, 0 to 7 on the Mini and
Nano, 0 to 15 on the Mega
: value is between 0 and 1023
Example 1
• What will be the output voltage of the
potentiometer connected as voltage divider with
supply voltage of 5 volts if it is rotated to 50
degrees (consider 0V for 0 degrees)?
Example 2
• What will be the binary output data in problem
number 1?
Infrared and Ultrasonic Sensors
• An infrared sensor is an electronic
instrument which is used to sense
certain characteristics of its
surroundings by either emitting and/or
detecting infrared radiation. Infrared
sensors are also capable of measuring
the heat being emitted by an object
and detecting motion.
• Ultrasonic Sensors are self-contained
solid-state devices designed for non-
contact sensing of solid and liquid
objects.
2 Ways of Measuring Distance
• Amount of Energy reflected
• Time of Return
Amount of Energy Reflected
• Wave is sent out and the signal energy of the
received signal is measured. The amount of
received signal energy is proportional to distance.
Arduino Code
• val = analogRead(pin); perform ADC
• val = map(val, 0, 1023, 0, 179); scale values

• Note: the number of the analog input pin to read


from 0 to 5 on most boards, 0 to 7 on the Mini and
Nano, 0 to 15 on the Mega
: value is between 0 and 1023
Time of Return
• Active sensors generate high frequency waves and
evaluate the echo which is received back by the
sensor, measuring the time interval between
sending the signal and receiving the echo to
determine the distance to an object.
Arduino Codes
• #include <NewPing.h>
• NewPing sonar(TRIGGER_PIN, ECHO_PIN,
MAX_DISTANCE);
• dist=sonar.ping_cm();
Factors Affecting the Measurement
Radar and Sonar
• Evaluate attributes of a target by interpreting the
echoes from radio or sound waves respectively.
• Additionally the frequency of the received signal
can be measured. If a object is moving towards the
sensor, the received frequency is higher than the
transmitted frequency due to the doppler effect.
• Speed towards the sensor can be measured.
Radar and Sonar
• The Doppler effect (or the Doppler shift) is the
change in frequency or wavelength of a wave for an
observer who is moving relative to the wave
source.

where
f is the observed frequency
fo is the emitted frequency
c is the velocity of waves in the medium;
vr is the velocity of the receiver relative to the medium; positive if the receiver is moving
towards the source (and negative in the other direction);
vs is the velocity of the source relative to the medium; positive if the source is moving away
from the receiver (and negative in the other direction).
Example
• How long is the distance of the object to the sensor
if it takes 0.4 ms for the wave to return?
Example
• If a fix radar system has an emitted frequency of 1
Mhz, what is the speed of an approaching object if
the measured reflected frequency is 1.00012 Mhz?
Encoders
• Resemble potentiometers mentioned earlier but
are non-contact optical devices used for converting
the angular position of a rotating shaft into an
analogue or digital data code. In other words,
• Convert mechanical movement into an electrical
signal (preferably digital).
• Two basic types of rotary optical encoders
• Incremental Encoders
• Absolute Position Encoders.
Incremental Encoder
• Their output is a series of square wave pulses
generated by a photocell arrangement as the
coded disk, with evenly spaced transparent and
dark lines called segments on its surface, moves or
rotates past the light source.
• The encoder produces a stream of square wave
pulses which, when counted, indicates the angular
position of the rotating shaft.
Incremental Encoder
Incremental Encoder
• Incremental encoder with only one pulse can not
detect the direction of movement
• Solution: Use quadrature encoders
• Incremental quadrature encoders have two
separate outputs called "quadrature outputs".
• These two outputs are displaced at 90o out of
phase from each other with the direction of
rotation of the shaft being determined from the
output sequence.
Incremental Encoder
Incremental Encoder
• The direction of rotation is determined by noting
the sequence of pulse
Disadvantage of incremental
encoders
• Require external counters to determine the
absolute angle of the shaft within a given rotation.
• If the power is momentarily shut off, or if the
encoder misses a pulse due to noise or a dirty disc,
the resulting angular information will produce an
error.

• Solution : Use absolute position encoders.


Absolute Position Encoder
• More complex than quadrature encoders.
• They provide a unique output code for every single
position of rotation indicating both position and
direction.
• Their coded disk consists of multiple concentric
"tracks" of light and dark segments.
• One main advantage of an absolute encoder is its non-
volatile memory which retains the exact position of
the encoder without the need to return to a "home"
position if the power fails. Most rotary encoders are
defined as "single-turn" devices, but absolute multi-
turn devices are available, which obtain feedback over
several revolutions by adding extra code disks.
Absolute Position Encoder
Absolute Position Encoder

Each track is independent with its own photo detector to simultaneously read a unique
coded position value for each angle of movement.
The number of tracks on the disk corresponds to the binary "bit"-resolution of the encoder so a 12-bit
absolute encoder would have 12 tracks and the same coded value only appears once per revolution.
Example
• How many angle does an 8 bits binary rotary
encoder moves if it started 01001011 and ended
with 10110101?
Example
• A system with motor is using an absolute position
encoder with the last reading of 10011011.

S-ar putea să vă placă și