TRIWG Review June 1998 - Portland State University
Download
Report
Transcript TRIWG Review June 1998 - Portland State University
Ultra Sonic Rangers tell the robot
how far away objects are.
Light sensors measure
light intensity.
And
Part 1.
Sensors for a
robot
Heat Sensors which
measure temperature.
Resistive Sensors
gyroscopes tell the robot which
direction is up.
Touch sensors tell the
robot when it bumps
into something.
1. Resistive
2. Infra-red
3. Light
4. Sonar
5. Other
Based on
book by Fred
Martin
The simplest possible use of sensors
The diagram serves to illustrate the general case of
sensing a specific phenomenon. In this case it is the
presence or absence of light.
The sensor in this case is a photo-resistor.
When sufficient light strikes it, its internal resistance is reduced
to several hundred Ohms.
When no light strikes it its resistance is typically several million
Ohms.
light
Remember
Breitenberg’s
Vehicles?
What Is a Sensor?
Anything that detects the state of the environment.
For instance, we already used sensors in the
Braitenberg vehicles.
Are the following, sensors?
Positioning devices
Encoders
Vision
Mine detectors (detector vs. sensor)
The material presented in our textbook and here relates to
HandyBoard, but the same principles are true for Robix,
Lynxmotion, Lego, etc. Read the manuals.
What can a robot do without sensing?
Simple Sensors
Can be used without much processing
Still require electronics (and connectors)
The basic electronics laws to know:
Ohm's law
combining resistance
dividing voltage
Review from ECE 201
What you (and the robot)
can do without sensors?
Close your eyes. Plug your ears. Hold your nose. Tie your
hands behind your back.
Shut your mouth. Tie your shoelaces together. Spin yourself
around a few times.
Now walk. How does it feel? That's exactly what your robot
feels: nothing - without sensors.
You have been given many types of sensors that can be used in
a variety of ways to give your robot information about the
world around it.
We will explain each of the sensors you can find in the lab, how
it works, what it's good for, and how to build it.
Biological Analogs
All of the sensors we describe in this and
next parts exist in biological systems
Touch/contact sensors with much more
precision and complexity in all species
(spiders?)
Polarized light sensors in insects and birds
Bend/resistance receptors in muscles
and many more...
You have to understand sensors
Before we can teach you what sensors do, we need to make one
point very clear:
Sensors are not magical boxes.
All information you get from sensors must be decoded by you, the
human builder and programmer.
Sensors convert information about the environment into a form
that can be used by the computer.
The sensors that are on the robot can be related to sensors found in
humans.
Touch sensors embedded in your skin, visual sensors in your retina,
and hair cells in your ears convert information about the
environment into neural code that your brain can understand.
Your brain needs to understand the neural code before you can react.
Since you will be programming the robot, you will need to understand
the output of the sensors before you can program your robot to react
to different stimuli.
Learn about sensors in animals and think how to use this knowledge in your
projects.
Some types of Sensors:
Ladar (laser distance and ranging)
Time of flight
Phase shift
Sonar
Radar
Infra-red
Light sensing
Heat sensing
Touch sensing
Sensors and their use
Topics to be
discussed:
What are sensors?
I’m Mr. Sensitivity. . .
Types of sensors (many
examples)
Sensor complexity
Signals -> symbols
Levels of processing
Poor and good design
of perception
Biological perception
and lessons
Sensor fusion
Not every
quarter
Gas Sensor
Gyro
Accelerometer
Pendulum Resistive
Tilt Sensors
Metal Detector
Piezo Bend Sensor
Gieger-Muller
Radiation Sensor
Pyroelectric Detector
UV Detector
Resistive Bend Sensors
Digital Infrared Ranging
CDS Cell
Resistive Light Sensor
Pressure Switch
Miniature Polaroid Sensor
Limit Switch
Touch Switch
Mechanical Tilt Sensors
IR Pin
Diode
IR Sensor w/lens
Thyristor
Magnetic Sensor
IR Reflection
Sensor
Magnetic Reed Switch
IR Amplifier Sensor
Hall Effect
Magnetic Field
Sensors
Polaroid Sensor Board
IRDA Transceiver
Lite-On IR
Remote Receiver
Radio Shack
Remote Receiver
IR Modulator
Receiver
Solar Cell
Compass
Compass
Piezo Ultrasonic Transducers
What are the types of Sensors?
Active
send signal into environment and measure interaction of signal
w/ environment
e.g. radar, sonar
Passive
record signals already present in environment
e.g. video cameras
GPS
We will discuss sensing using the
following
Touch
Active Light
Passive Light
There are many more ways
(sound, heat, magnetic field, smell...)
In our lab we used
infrared, light
(photodiodes,
phototransistors),
compass, volt and
amperometers, ions,
pH, magnetic,
temperature, voice,
sound, camera,
sonars and of course
all resistance based
micro-switches and
pads..
Passive versus Active Sensors
All of the sensors that will be presented in this part are
passive in that the stimulus, i.e., the physical property, they
were measuring, comes from the environment.
In contrast, active sensors provide their own signal/stimulus
(and thus typically require extra energy), and use its interaction
with the environment as the property to be measured.
Active sensors include:
reflectance and break-beam infra-red (IR) sensors,
ultrasound sensors,
laser range finders,
and others.
They will be presented in next parts.
How to Choose a Sensor?
There are four main factors to consider in choosing a sensor.
Cost:
Environment:
there are many sensors that work well and predictably inside, but that choke and die
outdoors.
Range:
sensors can be expensive
you can buy cheap sensors but often without good documentation
knowing main principles and experimentation is useful when you purchase such sensors
(usually military old sensors)
Most sensors work best over a certain range of distances.
If something comes too close, they bottom out, and if something is too far, they cannot
detect it.
Choose a sensor that will detect obstacles in the range you need.
Field of View:
depending upon what you are doing, you may want sensors that have a wider cone of
detection.
A wider “field of view” will cause more objects to be detected per sensor
But it also will gives less information about where exactly an object is when one is
detected.
Tell our stories about sensors in lab as examples
Types of Sensors according to
their purpose in a robot
Exteroceptive: deal with external world
No experience yet
where is something ?
how does is look ? (camera, laser range-finder)
Proprioceptive: deal with self
where are my hands ? (encoders, stretch
receptors)
am I balanced ? (gyroscopes)
Interoceptive
what is my thirst level ? (biochemical)
what is my battery charge ? (voltmeter)
Try to understand sensors practically
Take time to play with each of the sensors you find in the lab,
especially in Lego, Lynxmotion and Robix kits.
Figure out how they work.
Look at the range of values they return.
Check under what conditions they give those values.
Look to code of previous students related to sensors.
The time you spend here will greatly ease your integration of
hardware and software later.
The better you understand your sensors, the easier it will be for
you to write intelligible control software that will make your
robot appear intelligent.
So as you read about the sensors, you should assemble a
bunch of sensors as shown in Webpages of previous classes.
There can be no feedback without
sensors! Remember this!!
Sensors provide feedback to your program about the
environment.
Feedback is important in any controlled situation.
So far, we were discussing mostly open-loop, or timed
programs that simply follow a pattern
but have no real knowledge of the world.
Sensors can provide the feedback necessary to let a robot
make decisions about how to act in its environment.
They will make these programs smarter.
The feedback mechanism is very important in an environment
that is continually changing.
There can be no feedback
without sensors
During the rounds of the contest, the objects on the playing field will be
changing their location (i.e., the other robot moves, the drawbridge closes,
or you bump into a block). Robot soccer, robot theatre
We strongly encourage you to use closed-loop feedback design when
planning and implementing your strategy.
There will be a smaller chance of random errors completely messing up your
game if you use sensors wisely.
Read Chapter 6 of Martin about sensors.
Read Chapter 8 of Martin for more information on the control problems you
may encounter.
Electric
Sensors:
digital
Example of Sensor Interfacing
Handy Board’s Sensor Input Banks
Each sensor ports provides three signals to
the sensor:
• +5v power - middle row
Handy Board has two banks for sensors:
• Ground - lower row
• Digital inputs, numbered 15 to 7 on the
left
• Sensor signal line - upper row
• Analog inputs, numbered 6 to 0 on the
right
Not all sensors require +5v power, e.g.,
switches and photocells may be wired
between sensor signal and ground lines
Location of Digital and Analog Ports
on the HandyBoard
The digital ports on the main board are labeled from
0-7.
There are also four analog ports on the main board,
but when you use the expansion board, the analog
ports get remapped to the connectors on the right
side of the expansion board.
The ports are all arranged in the same format.
The innermost row of pins are the signals, followed by
a space, then microprocessor power, and finally on the
outer side is the ground.
Analog versus Digital
Sensors
In all our robotics kits the sensors are digital or analog.
For instance, in HandyBoard, analog sensors can be plugged
into the analog sensor ports, which return values between 0
and 255.
Digital sensors can be plugged into either the digital ports or
the analog ports, but will always return either 0 or 1.
ANALOG 0 =< x =< 255
DIGITAL 0 or 1
Each type of sensor has its own unique uses.
Think about new uses, not shown in these slides and tell me
your ideas. May be we will use them.
Figure 5.1: Generic Digital
Sensor Schematics.
Digital Sensors
Digital inputs all have pull-up resistors connected to them as
shown in Figure 5.1.
Digital switches are wired such that the sensor is wired
across the signal pin and ground.
This means that when the digital sensors is closed, the signal is
grounded or LOW.
When the switch is open, the signal pin outputs +5V, or HIGH.
This value is INVERTED by software, so reading the digital port
with the switch open returns 0, while reading the digital port
with the switch closed returns 1.
With nothing plugged in, the value of a digital port should be
0.
Digital sensors can be used in the analog ports on the
Controller board (such as 6.270 board) as well, relieving any
restrictions the small number of digital inputs may cause.
Digital Sensors used in Analog
Parts of the HandyBoard
In this board, for instance, the typical analog values for digital sensors
are somewhat above 250 for an open switch, and less than 20 for a
closed switch.
When using the IC command, digital(port) {where port is an
analog port number (i.e., greater than 7)} :
the sensor value is compared to a threshold value,
and the command returns:
a 0 if the analog value is above the threshold
or a 1 if the analog value is below it (remember the inversion of the actual
signal that digital does?).
This threshold's default value is 127, but it can be changed
(See the section on IC commands for information on this).
Digital Sensors used in Analog
Ports
A good way to get digital information from an analog
sensor is to plug the analog sensor into a analog port
and call it with the digital(port) command.
For example, a reflectance sensor would return a 0 for black
or a 1 for white if read with the digital command - provided
the threshold is properly set.
This can reduce some of the programming complexity
by abstracting away the thresholding.
You should however experiment with the sensors
to determine the range of thresholds you get and
under what conditions these thresholds are valid.
Analog sensors in digital ports?
It is not recommended to plug analog sensors
into digital ports, however, because the digital
ports threshold to conventional logic levels
which cannot be adjusted to suit each analog
sensor.
The valid analog readings may fall into the
invalid range for digital logic.
Read in book about some mountings and uses
for some digital sensors in the 6.270 kit.
Switch Sensors
Switches are perhaps the simplest sensors of all.
They work without processing, at the electronics
(circuit) level.
Their general underlying principle is that of an open
vs. closed circuit.
If a switch is open, no current can flow; if it is closed,
current can flow and be detected.
This simple principle can (and is) used in a wide
variety of ways.
Think about all possible uses of
switch sensors in robot arms, mobile
robots and robot-animals of various
kinds
Switch Sensors
Switch sensors can be used in a
variety of ways - recall which were
already discussed and shown in lab.
You have seen many kinds of
switches already;
button switches,
mouse switches,
key board keys,
phone keys, etc.
One dollar switch
Go to Shops (like Wacky Willy
or Tek Country) and you will
find plenty of cheap industrial
switches useful for your robot
project
Various Switches
What are the ways that Switch Sensors can be used?
• Contact (touch) Sensing
Various Switches
–detect when the sensor has made physical contact with
another object
– triggers when a robot grabs an object;
– contact of whiskers
– a robot’s body runs into a wall,
– a robot’s gripper closes around a cube
• Limit Sensing:
– triggers when a gripper is as open as it can be
– a limit sensor detects when a mechanism has moved to
the end of its range of travel, signaling that the motor
should be turned off
• Shaft Encoding:
– an axle may be fitted with a contact switch that clicks
once per revolution.
–Software counts the clicks and determines the amount
and speed of the axle’s rotation.
–e.g., triggers for each turn, allowing for counting rotations
1. Bumpers
2. Limit in robot
arms
3. Shaft encoders
Use of Dip Switches on Robots
There are four dip switches on the Expansion Board
6.270.
They can be used to select user program options
during testing.
One dip switch will be used in the starting code for the
contest to determine the side your robot starts on and
at which frequencies it transmits and receives the
modulated IR.
They can also be useful for outside control of program
parameters, like enabling certain functions or
selecting programs to run.
While these switches are connected to the analog
port, they are really digital switches.
Analog Sensors and Thresholding
Analog sensors, such as photo-resistors, can tell you
how far the sensor has bent, or how much light is
hitting the sensor.
They answer questions with more detail.
Analog sensors, however can be converted to digital sensors
using thresholding.
Instead of asking the question “How much is the
sensor bent?” you can ask the question: “Is the
sensor bent more than half way?”
The threshold can be determined by playing around
with the specific sensor.
How to interface a Digital
Sensor to Handy Board?
Digital Inputs
• Nine digital sensor ports connect to
circuitry on the HB that interprets each
sensor’s Vsens voltage as a digital
true/false
Vsens > 2.5 v, signal is logic one
Vsens < 2.5 v, signal is logic zero
• To connect switch to digital input
circuit:
– Wire between the sensor signal
line and ground
Similar to Robix
Vsens
Sensor Interfacing to Digital
Inputs
• “normally open” switch
– Switch is released: it is open, so there is no
connection between the Vsens sensor line and
ground. The 47KW pull-up resistor on the HB
then provides the default value of +5v or
logic one to the sensor input circuitry.
– Switch is pressed: it connects the Vsens
sensor line to ground, the zero volt level.
Then the sensor input circuitry detects a logic
zero reading.
• Switch reading is inverted in software: digital()
Touch
sensors
Mostly using micro-switches
Double Pull Micro-Switches
The two micro switches are double pull, which
means they can be wired so that they return a one or
a zero when not depressed.
The only major difference is how you think about the
device in your code.
Reading a sensor can be thought of as asking a question.
Here, the question could be, “Are you open?" or “Are you
closed?"
If you wire the switch normally open, the answers are
yes and no, respectively,
where they would be no and yes for a switch wired normally
closed,
all for the same situation where the switch is not depressed.
Normally open and Normally
closed switch
Depending on how you wire a switch, it can be
normally open or normally closed.
This would of course depend on your robot's
electronics, mechanics, and its task.
The simplest yet extremely useful sensor for a robot is
a "bump switch"
it tells when it's bumped into something, so robot can back
up and turn away.
You'll find that even for such a simple idea, there are
many different ways of implementation.
Normally closed
Figure 5.2: Microswitch Assemblies
Normally open
Switch Sensor Construction
Pushbutton Switch Wiring Diagram
Microswitch Normally Open
Configuration
Microswitch Normally Closed
Configuration
Possible arrangements for touch switches
Touch switches should be wired in a normally open configuration,
so that the signal line is brought to ground only when the switch
is depressed.
In some cases, a slight advantage may result from one of these
arrangements, because there may be a difference between the
position where the open side makes contact and the closed side
breaks contact.
When this is the case, the choice of normally open or normally
closed will affect how sensitive the switch is to outside forces.
This can allow you to make a very touchy sensing device or help
block out noise.
The small black switches with the white lever arm respond to a
shorter arm movement when wired normally open and require a
little more movement to cause a transition in the normally closed
configuration.
Switch Sensors
Switch Sensor Applications
These are not standard
touch sensors in Lego. You
can add them inexpensively
buying in standard
hardware store rather than
through Lego.
Left- and Right-Hand Switch Construction
Design for a Simple Touch Bumper
Micro-Switches as object detectors
The standard kit includes three types of small
switches, two micro switches and a small push
button.
These make great object detectors, so long
as you are only interested in answering the
question, Am I touching something right now?
with a yes or no.
This is often enough for responding to contact
with a wall or the other robot or for actuator
position sensing.
Using a switch for actuator position sensing (called a
“limit" switch) can be a good way to protect drive
mechanisms which self destruct when over driven.
Other uses of MicroSwitches in our robots
Actuator position sensing.
This could be handy for limiting the motion of
hinged joints or linear actuators by requiring that a
switch be open (or closed, depending upon the
situation) before running the motor and monitoring
it while things are moving.
They could also be used for extended user
interface for testing and development
purposes.
Bouncing and Debouncing of
microswitches
Bouncing is a problem found in many switches. At the point
where the switch goes from open to close or vice versa, the
output from the switch is very glitchy.
The switch may output several transitions.
Bounciness occurs especially when the switch is used in a
sensitive mode.
One way to debounce the switch is to add a delay between
samples of the digital input.
If the sampling is sparse enough, the bouncing section of the
data will not be collected.
Discuss debouncing using NAND latches
and recall asynchronous state machines
from ECE 271
Touch Sensors other than
microswitches
Whiskers, bumpers etc.
mechanical contact leads to
closing/opening of a switch
change in resistance of some element
change in capacitance of some element
change in spring tension
...
What are three types of
sensing with touch?
Normally done to avoid collisions
Avoiding is a lot better than Detecting
There are basically 3 forms
Bumper Switch
Whisker
Pressure Pad
Bumper Switch
Mounted on the chassis of the robot
When plunger depressed collision is about to occur
Characteristics
small surface area
low cost = low sensitivity
Use of Touch Sensor as Bumper
Bumper Example 1
Another Bumper Design Examples
Example 2
Design for Bi-Directional Touch Bumper
Bumper Design
• rotational and sliding pivot points allow
the bumper to react to pressure from any
forward direction
• can detect pressure from front or behind
• movement in either direction pushes levered arm away from
contact sensor
• rubber bands pull arm back onto switch when pressure is
released
Touch Sensors: bumper skirt
• When the robot runs into a wall the bumper skirt hits a micro
switch
•which lets the robot controller know that the robot is up
against a wall.
Extends sensing like a
cat extends its sensing
through its whiskers
Care should be taken in
determining things like
Whiskers
length
weight
shape
•Cat whiskers measure space. If a whisker touches
the cat knows that it will not be able to go through
an opening as the whiskers define the size of
entrance it is capable of moving through.
Things like suspended ceiling
wire, coffee sticks or tooth picks
can all act as whiskers. They
should no interfere with the actual
sensing element.
Analog
Sensors
Ohm's Law
Ohm's law; explains the relationship between voltage
(V), current (I), and resistance (R):
V=IR
Simply put: the voltage between two points in an
electronic circuit is equal to the product of the amount
of current flowing through them and the amount of
resistance between them.
Voltage is measured in Volts (V), current in Amperes
(A), and resistance in Ohms (Omega).
Combining resistances
It's not hard to figure out how much resistance one resistor gives (since they are
labeled!).
But what happens if you put one resistor R1 after another R2, i.e., connected them in
series?
The current I flowing through any number of resistors has to be equal, since it has
only one route to flow on, as it goes from one resistor to the next.
What happens to the voltage V?
Recall Ohm's law: V = I R
= I (R1 + R2)
Practical use of your
undergraduate electronics
= I R1 + I R2
Suppose we measure the voltage across R1, i.e., the voltage between the input point
V and the connection between R1 and R2, would would it be?
It would be I R1 Volts. Similarly, if we measure the voltage across R2, i.e., the voltage
between the connection between R1 and R2 and ground, what will it be? It will be I R2.
The total voltage in an electronic circuit has to add up; therefore, the input voltage V
has to equal the output voltage, after the drop across the two resistors, R1 and R2.
Therefore, since voltages in a series add, so do resistances in a series.
Dividing voltage
Suppose we take the voltage out at the point between R1 and R2, what will
the amount of that voltage Vout be?
Use Ohm's law again: V = I R => I = V / R
= V / (R1 + R2)
Then the voltage drop across R2, is the product of the above current I and
R2:
Vout = V R2 / (R1 + R2)
What if R1 = R2?
= V R2 / 2 R2
=V/2
This is a voltage divider. To summarize: voltage can be divided by using two
equal-value resistors in series.
You will learn in the lab how to bridge the gap between this type of laws of
electronics to physical sensors all the way to robot behavior.
Analog Sensors
The analog ports all have a pull up resistor which is a 47K
resistor between +5 volts and the signal input.
The analog readings are generated by measuring the amount
of current flow through the pull up resistor.
If no current flows through the resistor, the voltage at the
signal input will be +5 volts and the analog value will be 255.
The voltage at the signal pin can be simply calculated by:
V sig = 5
check if one sensor fell out: write a piece of code that checks
the values of the analog ports that you have sensors plugged
into.
If that value is above 250 or so, have it tell you to check the
sensor.
Figure 5.4: Analog Sensors
Schematics
Resistive Sensors
The resistance of resistive analog sensors, like
the bend sensors or potentiometers, change
with changes in the environment, either an
increase in light, or a physical deformation.
The change in resistance causes a change in
the voltage at the signal input by the voltage
divider relation.
Transitive Analog Sensor
Transitive analog sensors, like the photo transistors and
reflectance sensors, work like a water faucet.
Providing more of what the sensor is looking for opens the
setting of the valve, allowing more current to flow.
This makes the voltage the voltage at the signal decrease.
A photo transistor reads around 10 in bright light and 240 in
the dark.
One problem that may occur with transitive sensors is that the
voltage drop across the resistor may not be large enough when
the transistor is open.
Some transitive devices only allow a small amount of current to flow
through the transistor.
Transitive Analog Sensor
A larger range for the sensor can be accomplished by
putting a larger pull-up resistor.
By having a larger resistor, the voltage drop across the
pull-up resistor will be proportional to the resistance.
We will give example uses and mountings for each
type of sensor.
Keep in mind that these are only simple examples and
are not the only possible uses for them. It's up to you
to make creative use of the sensors you have.
Sensor Interfacing to Analog
Inputs
•Vsens voltage at the center tap of the two resistors
is proportional to the ratio of the two resistances.
Rphoto = 47KW, Vsens = 2.5 v (exactly)
Rphoto << 47KW, Vsens ~= gnd
Rphoto >> 47KW, Vsens ~= +5 v
Two resistors form voltage divider circuit
Also possible to connect circuits that generate a voltage
photocell
element
Sensor Interfacing to Analog
Inputs
0 to 5 volts are converted into
8–bit numbers 0 to 255 (decimal)
(A/D conversion)
–When the photocell resistance is small
(brightly illuminated), the Vsens ~= 0v
– When the photocell resistance is large
(dark), Vsens ~= +5 v
Resistive
Position
Sensors
Potentiometers. Glowes. Pads. Bend
Sensors. Other….?
Pressure Pad
You can purchase such
pad for Nintendo games
Pressure Pad
LM339 is a quad comparator circuit:
Output will be +6V
Another approach is to use ohm meter to
detect the resistance change which would
be proportional to amount of pressure
applied.
Potentiometer: the main ideas
Potentiometers are very common for manual tuning; you
know them from some controls (such as volume and tone on
stereos).
Typically called pots, they allow the user to manually adjust
the resistance.
The general idea is that the device consists of a movable tap
along two fixed ends.
As the tap is moved, the resistance changes.
As you can imagine, the resistance between the two ends is
fixed, but the resistance between the movable part and either
end varies as the part is moved.
In robotics, pots are commonly used to sense and tune
position for sliding and rotating mechanisms.
Potentiometers versus resistance sensors
• Fixed Rotation Sensors
• Easy to find, easy to mount
Potentiometer
Light Sensor
• Good for detecting direction/presence of light
• Non-linear resistance
• Slow response
Look to catalogs:
Cadmium Sulfide Cell
HANDYBOARD: Gleason Research. http://www.gleasonresearch.com/
http://handyboard.com
DISTRIBUTOR OF AGE BEND SENSOR: Images Company:
http://www.imagesco.com
PITSCO LEGO DACTA, JAMECO, ETC - see the book and my webpage.
Potentiometers
• Manually-controlled variable resistor, commonly used as
volume/tone controls of stereos
• Mechanical varieties:
– Linear and rotational styles - make position sensors for
both sliding mechanisms and rotating shafts
– Resistance between the end taps is fixed, but the
resistance between either end tap and the center swipe
varies based on the position of the swipe
• Electrical varieties:
– Linear taper - linear relationship between position and
resistance. Turn the pot 1/4 way, the resistance between the
nearer end and the center is 1/4 of end-to-end resistance
– Audio taper - logarithmic relationship between position
and resistance. At one end, 1/4 turn would swipe over a
small bit of total resistance range, while at the other end,
1/4 turn would be most of the range
Figure 5.5:
Potentiometer
Assemblies
Kits contain several sizes
of potentiometers, also
known as variable
resistors.
There are rotary and linear
pots.
Potentiometers should be
wired with Vcc and ground
on the two outside pins,
and the signal wire on the
center tap.
This will, in effect, place
the resistance of the
potentiometer in parallel
with the 47K pull-up on
the expansion board and is
more stable than just
using one side and the
center tab to make a plain
variable resistor
Potentiometers as Resistive Position
Sensors
works best when the
potentiometer resistance is
small enough such that a 47K
resistance in parallel with the
pot’s resistance has only a
small effect
3-terminal
potentiometer
2–terminal potentiometer
works best when the
pot’s value is large
2-terminal
potentiometer
Various uses of
Potentiometers
Potentiometers have a variety of uses.
In the past, they have been used for menuing programs
and angle measurement for various rotating limbs or
scanning beacons.
They can be used with a motor to mimic servos, but
that's a difficult task.
It is important to notice that the pots are not designed to
turn more than about 270 degrees.
Forcing them farther is likely to break them.
Tell about current project of animation inverse kinematics
robot with many pots and A/D board.
Various uses of Potentiometers
A potentiometer can be attached to a LEGO
beam such that it can be used in place of a
bend sensor.
The rotation of the beam will produce a
rotation in the potentiometer.
See if you can come up with an assembly that
can be used in place of a bend sensor.
The advantage to such a sensor is that it is
much sturdier than the bend sensor.
The disadvantage is that it is bulkier.
Linear Potentiometers and
their use in HandyBoard
A linear potentiometer can be used to measure precise linear
motion, such as a gate closing, or a cocking mechanism for ring
balls or blocks.
Frob-knob
The frob knob is the small white dial on the lower left corner of
the Expansion Board.
It returns values between 0 and 255 and provides a handy user
input for adjusting parameters on the y or for menuing routines
to select different programs.
You may find it useful to glue a small LEGO piece to the frob
knob to make turning it easier.
Homework Assignment
Try to find in your storage any kind of
sensors that you do not use and bring
them to the robotics labs.
The ECE 271 and the high school
students will possibly use it for projects if
you will not.
Look around the lab and try to identify
sensors and devices that we talked about.
Resistive
(Analog)
Position
Sensors
Resistive Position Sensors:
bending
We said earlier that a photocell is a resistive device,
i.e., it senses resistance in response to the light.
We can also sense resistance in response to other
physical properties, such as bending.
The resistance of the device increases with the
amount it is bent.
These bend sensors were originally developed for
video game control (for example, Nintendo
Powerglove), and are generally quite useful.
Video game accessories are in general useful for robotics and virtual reality
and very cheap.
Resistive Bend Sensors
• Resistance = 10k to 35k
• Force to produce 90deg = 5 grams
• www.jameco.com = 10$
Bend Sensors
You can remove it
from Nintendo gloves
• Useful for contact sensing and wall-tracking
• The bend sensor is a simple resistance
– As the plastic strip is bent (with the silver rectangles facing
outward), the resistance increases
Resistive Position Sensors
Mechanically, the bend sensor is not terribly robust, and
requires strong protection at its base, near the electrical
contacts.
Unless the sensor is well-protected from direct forces, it will
fail over time.
Notice that even in a good arrangement, repeated bending will
wear out the sensor.
Remember: a bend sensor is much less robust than light
sensors,
although they use the same underlying resistive principle.
Applications of Resistive Analog Sensors
Sensor
Measure bend of a joint
Sensors
Wall Following/Collision
Detection
Sensor
Weight Sensor
Inputs for Resistive Sensors
V1
Voltage divider:
You have two resisters, one
is fixed and the other varies,
as well as a constant voltage
R1
V
Analog to Digital
(pull down)
R2
V2
V1 – V2 * (R2/R1+R2) = V
Known unknown
micro
measure
micro
Single Pin
Resistance
Measurement
+
-
Binary
Threshold
Comparator: if
voltage at + is greater
than at -, high value out
Sensor Assembly
You should have read the section on the
chapter of Martin’s book on the types of
connectors used with the 6.270 board.
This is an important concept to understand
before building your sensors.
When building your sensors, do not make
your wires too long.
Excess wiring has a tendency to get caught
in gears and other mechanisms.
Sensor Assembly Homework
Start out with sensor wires no longer than 1 foot long and
when your finally decide on your robot configuration, you can
modify to length.
Just build a few of each type so you can play with them.
Start out with building simple sensors like one or two switches.
The more complicated ones will be the analog sensors that use
IR.
Go to lab and familiarize yourself with Lego kit sensors and how
to use them.
I purchased many good sensors from Wacky Willy, Tek Country
Store and Radio Shack. In Goodwill you can buy old toys like
Nintendo gloves or jumping pads that can be used. They are in
the lab and you can use them. You have to notify me or lab
assistant.
Sources
A. Ferworn
Saúl J. Vega
Daisy A. Ortiz
Raúl E. Torres
Maja Mataric
Ali Emre Turgut
Dr. Linda Bushnell
Web Site:
http://www.ee.washington.edu/class/462/aut00/
Robotic Explorations: A Hands-on Introduction
to Engineering, Fred Martin, Prentice Hall,
2001.