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

Sensor Design: Analog and Digital Sensors

Sensors are transducers that measure some feature of the world and convert it into an electrical signal. There are two main types: analog sensors produce a continuously varying output, while digital sensors have only two states, on and off. Tactile sensors like microswitches and touch bumpers detect physical contact. A mercury tilt switch uses mercury to close a circuit and detect inclination. A potentiometer can measure rotation or position by varying its resistance.

Uploaded by

Bot Stefan
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
116 views

Sensor Design: Analog and Digital Sensors

Sensors are transducers that measure some feature of the world and convert it into an electrical signal. There are two main types: analog sensors produce a continuously varying output, while digital sensors have only two states, on and off. Tactile sensors like microswitches and touch bumpers detect physical contact. A mercury tilt switch uses mercury to close a circuit and detect inclination. A potentiometer can measure rotation or position by varying its resistance.

Uploaded by

Bot Stefan
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
You are on page 1/ 4

Sensor Design1

Without sensors, a robot is just a machine. Robots need sensors to deduce what is happening in
their world and to be able to react to changing situations. This chapter introduces a variety of
robotic sensors and explains their electrical use and practical application.
Sensors as Transducers
The basic function of an electronic sensor is to measure some feature of the world, such as light,
sound, or pressure and convert that measurement into an electrical signal, usually voltage or
current. Typical sensors respond to stimuli by changing their resistance (photocells), changing
their current flow (phototransistors), or changing their voltage output (the Sharp IR sensor).
Analog and Digital Sensors
There are two basic types of sensors: analog and digital. The two are quite different in function,
in application, and in how they are used with the RoboBoard. An analog sensor produces a
continuously varying output value over its range of measurement. For example, a particular
photocell might have a resistance of 1ohm in bright light and a resistance of 300 ohm in complete
darkness. Any value between these two is possible depending on the particular light level. Digital
sensors, on the other hand, have only two states, often called "on" and "off." Perhaps the simplest
example of a digital sensor is the touch switch. A typical touch switch is an open circuit when it is
not pressed, and a short circuit when it is depressed.
Tactile Sensors
The primary sensors in the ELEC 201 kit used to detect tactile contact are simple push-button or
lever-actuated switches. Microswitch is the brand name of a switch that is so widely used that the
brand name has become the generic term for this type of switch. A microswitch is housed in a
rectangular body and has a very small button (the "switch nub") which is the external switching
point. A lever arm on the switch reduces the force needed to actuate the switch (see Figure 9.4).
Microswitches are an especially good type of switch to use for making touch sensors.
Figure 9.4: A Typical Microswitch

Often, the switch is simply mounted on a robot so that when the robot runs into something, the
switch is depressed, and the microprocessor can detect that the robot has made contact with some
object and take appropriate action. However, creative mechanical design of the bumper-switch
mechanism is required so that contact with various objects (a wall, a robot, etc.) will be detected.
A very sensitive touch bumper can be made by connecting a mechanism as an extension of the
microswitch's lever arm, as illustrated in Figure 9.5.
Figure 9.5: Robotic Platform Employing Bumper Coupled to Touch Sensor

Limit Switch
1
Young, James (1998). Sensor Design. URL: http://www.owlnet.rice.edu/~elec201/Book/sensors.html. [15.04.2010]
2

Touch sensors can also serve as limit switches to determine when some movable part of the robot
has reached the desired position. For example, if a robot arm is driven by a motor, touch switches
could detect when the arm reached the limit of travel in each direction.
Switch Circuitry
Figure 9.6 shows how a switch is wired to a sensor input port. When the switch is open (as it is
shown in the diagram), the sensor input is connected to the 5 Volt supply by the resistor. When
the switch is closed, the input is connected directly to ground, generating a 0 Volt signal (and
causing current to flow through the resistor and switch).
Figure 9.6: Touch Switch Circuit

Most push-button-style switches are "normally open," meaning that the switch contacts are in the
open-circuit position when the switch has not been pressed. Microswitches often have both
normally open and normally closed contacts along with a common contact. When wiring a
microswitch, it is customary to use the normally open contacts. However, you can wire the switch
differently to perform some special function. In particular, several switches can be wired in series
or parallel and connected to a single digital input port. For example, a touch bumper might have
two switches, and the robot only needs to know if either of them (#1 OR #2) are closed. It takes
less time to check just one digital port and to use parallel switch wiring to implement the logic
OR function in hardware.
Mercury Tilt Switch
As the name suggests, a mercury tilt switch contains a small amount of mercury inside a glass
bulb. The operation of the switch is based on the unique properties of mercury: it is both a
conductor and a liquid. When the switch tilts, mercury flows to the bottom of the bulb closing the
circuit between two metal pins.
Applications
The mercury tilt switch can be used in any application to sense inclination. For example, the tilt
switch could be used to adjust the position of an arm or ramp. Most thermostats contain a
mercury tilt switch mounted on a temperature sensitive spring. Changes in temperature tilt the
switch, turning the furnace or air conditioner on or off.
Potentiometer
A potentiometer (or "pot," for short) is a manually-adjustable, variable resistor. It is commonly
used for volume and tone controls in stereo equipment.
In robotics, a potentiometer can be used as a position sensor. A rotary potentiometer (the most
common type) can be used to measure the rotation of a shaft. Gears can be used to connect the
rotation of the shaft being measured to the potentiometer shaft. It is easiest to use if the shaft
being measured does not need to rotate continuously (like the second hand on a clock), but rather
rotates back and forth. Most potentiometers rotate only about 270 degrees; some can be rotated
continuously, but the values are the same on each rotation.
A potentiometer connected to a shaft and a lever can also be used to determine the distance to a
wall and to make the robot follow a path parallel to the wall. The lever, perhaps with a small
wheel on the end, would extend from the side of the robot and contact the wall; a rubber band
would provide a restoring force. If the robot moved closer to the wall, the lever would pivot,
turning the shaft and the potentiometer. The control program would read the resulting voltage and
adjust the robot steering to keep the voltage constant.
3

Questions:
What is the basic function of sensors?
What is the difference between analog and digital sensors?
How do tactile sensors work? Provide examples of such sensors.
What is a mercury tilt switch; how does it work and how can it be used?
What is a potentiometer; how does it work and how can it be used

Light Sensors
Measurement of light provides very valuable information about the environment.
A variety of light sensors are provided in the ELEC 201 kit:
Photocell. This device is a light-dependent resistor. It is most sensitive to visible light.
Infrared Reflectance Sensor. This device combines an infrared LED light source and a
phototransistor light detector into a single package. The LED and the detector point out of the
package, almost parallel to each other. The detector will measure the light scattered or
reflected by a surface. The package also contains an optical filter (colored plastic) that
transmits primarily only the infrared light from the LED; this reduces, but does not eliminate,
the sensitivity to ambient light.
Infrared Slotted Optical Switch. This device is similar to the IR reflectance sensor, in that it
contains both an infrared source and a phototransistor detector. However, the two are mounted
exactly opposite each other with a small, open gap between them. The sensor is designed to
detect the presence of an object in the gap that blocks the light.
Modulated Infrared Light Detector. This device senses the presence of infrared light that has
been modulated (e.g., blinks on and off) at a particular frequency. These devices are typically
used to decode the signals of TV remote controls, but are used in the ELEC 201 application to
detect the infrared beacon of the opponent robot.
Photocell
Photocells are made from a compound called cadmium sulfide (CdS) that changes in resistance
when exposed to varying degrees of light. Cadmium sulfide photocells are most sensitive to
visible red light, with some sensitivity to other wavelengths.
Photocells have a relatively slow response to changes in light. The characteristic blinking of
fluorescent lamps, which turn on and off at the 60 Hertz line frequency, is not detected by
photocells. This is in contrast to phototransistors, which have frequency responses easily reaching
above 10,000 Hertz and more. Therefore, if both sensors were used to measure the same
fluorescent lamp, the photocell would show the light to be always on and the photo-transistor
would show the light to be blinking on and off.
Infrared Reflectance Sensor
The infrared reflectance sensor is a small rectangular device that contains a phototransistor
(sensitive to infrared light) and an infrared emitter. The amount of light reflected from the emitter
into the phototransistor yields a measurement of a surface's reflectance, for example, to determine
whether the surface is black or white. The phototransistor has peak sensitivity at the wavelength
of the emitter (a near-visible infrared), but is also sensitive to visible light and infrared light
emitted by visible light sources. For this reason, the device should be shielded from ambient
lighting as much as possible in order to obtain reliable results.
Infrared Slotted Optical Switch
4

The infrared slotted optical switch is similar to the infrared reflectance sensor except that the
emitter is pointed directly at the phototransistor across a small gap. As the name implies, the
slotted optical switch is a digital sensor, designed to provide only two output states. The output of
the switch changes if something opaque enters the gap and blocks the light path. The slotted
optical switch is commonly used to build shaft encoders, which count the revolution of a shaft. A
gear or other type of wheel with holes or slots is placed in the gap between the emitter and
detector. The light pulses created by the turning wheel can be detected and counted with special
software to yield rotation or distance data.
Modulated Infrared Light Detector
The modulated infrared light detector is a device that combines an infrared phototransistor with
specialized signal processing circuitry to detect only light that is pulsing at a particular rate. The
ELEC 201 kit includes the Sharp GP1U52 sensor, which detects the presence of infrared light
modulated (pulsed) at 40,000 Hz. Normal room light, which is not modulated, does not effect the
sensor, a big advantage. This type of sensor is used for the remote control function on televisions.
In ELEC 201 this sensor is used to detect the specially modulated infrared light emitted by the
beacon on the opponent robot. The software can distinguish different pulse patterns in order to
distinguish between the beacons on the two robots. (In a television remote, different pulse
patterns would correspond to different functions, such a changing the channel up or down.)
Magnetic Field Sensors
The ELEC 201 kit contains both an analog sensor that provides information about the strength of
the magnetic field and a digital sensor, a magnetic switch.
A device called a Hall effect sensor can be used to detect the presence and strength of magnetic
fields. The Hall effect sensors have an output voltage even when no magnetic field is present, and
the output changes when a magnetic field is present, the direction of change depending on the
polarity of the field.
The digital magnetic sensors are simple switches that are open or closed. Internally the switches
have an arm made of magnetic material that is attracted to a magnet. These switches are
commonly used as door and window position sensors in home security systems.
Magnetic switches are used in much the same way as a touch switch, except the switch closes
when it is near a magnet, instead of when it contacts something. The digital nature of the switch
makes it easier to use than the Hall effect sensors, but it may be less sensitive.

Questions:
What are light sensors?
What is a photocell; how does it work and how can it be used?
What is an infrared reflectance sensor; how does it work and how can it be used?
What is an infrared slotted optical switch; how does it work and how can it be used?
What is a modulated infrared light detector; how does it work and how can it be used?
What are magnetic field sensors; how do they work and how can they be used?

You might also like