Report4 - Wayne State University

advertisement
Week of October 11, 2004
This week's main focus was on the variest types of sensors. (to calculate
raw values= {1023*resis./10000+resis.}) f.y.i. the RCX will scale raw values to a
different range, suitable for that particular kind of sensor(i.e. reading from touch sensor is
1 to 0 for on or off, temp is C to F, and for light is percentage...etc.).
Note: passive sensor are that who operate as simple resistances and require no power from the
RCX. they utilize resistors that are sensitive to force (bending, touch, gravity), temperature, or
visible light.
active sensor (known as powered sensors) require power from the RCX and involve slightly
more sophisticated eletronics.
Passive sensors:
Touch: the touch sensor = the simpliest of all the sensors. when the button
is press the circuit is complete and electricity flows. the most common useage for this
sensor is the bumper effect. this was already demostrated when the teams built bumpbot.
the touch sensor was also experimented with bugbot. this sensor is used to detect
obstacles, i.e. walls. the touch sensor can be used when being either pressed or released.
touch sensors have have an incredible range of other appreications (rotating heads,
calibrating readings, learning the behavior of the robot...etc.). you can even count clicks
with the touch sensor by using the command counter = counter + 1.
Temperature: the temp. sensor is use to detect if something is too warm or
too cold (i.e. your drink). "there are no movable parts, just a small aluminium cylinder
that protudes from the body of the sensor". the temperature varies between degree F or
degree C depending on how you have it programed. it can detect temperatures in a range
of -20 C to 70 C (-4 F to 158 F). unfortunately it is very slow from changing from one
value to the other( because of this it is unsuitable for booolean use with slope parameter).
inorder to convert the raw value of this sensor into temperature, the following equations
are used.
C = (785-raw value)/8
F = C * 9/5 +32
Bend: this sensor can be used to glide a robot along a wall or place it on a
glove and you could control a robot that contain the ability to move like a spider. the
mercury, bend and photocell sensor all have the same command: (sensor_1, type_none);
(snesor_1, mode_raw). when experimenting with this sensor, the raw value equal 604
when floating(not bent). when bent 90 degrees to the left, the raw value equal 510 and in
the right equal 872.so, the obivous trend here was that as you bend the sensor to the left
the raw value decreases and as it bends to the right the raw value increases.
PhotoCell: this Cds light sensor work similar to that of the lego light sensor
but at a much slower pace. when it enter an area where it is dark the raw value increases
and in an area where it is light the raw value decreases.
Mercury: this sensor depends on it's position. at 270 degrees the raw value
equals that of 1023. when at 0 degrees the raw value equals 0.
Active Sensors:
Rotation: "the rotation sensor returns four possible values that correspond to
four states, let's call them A,B,C and D. for every complete turn, it passes through the
four states four times__that is waywe get 16 counts per turn." the purpose of this sensor
is to obivously detect rotation. by rotating in one direction the counts increases and in the
other direction the counts decreases. these counts are relative to the starting position of
the sensor. by counting rotations we are then able to measure distance and speed by the
following equation:
distance = speed * time
when placing the sensor between the motor and a wheel, the proper ratio is needed! the
sensor will share the same ratio as the wheel for it is on the same axle(i.e. 1:3 ratio). the
example ratio means that every three turns the rotation sensor makes the wheel turns
exactly once. in order to figure out how many increments the sensor has performed,
times 3 by 16 to equal 48 increments(times the number of turns by 16 because the sensor
counts 16 units). inorder to calculate the distance, we need to know the circumference of
the tire. most diameter are marked onto the tire(2piR or Dpi). "at this point you have all
the elements". follow the equation to solve for the distance travel. T =S * C/I (where T
= distance, S=sensor reading, C=circumference, and I=increments).
controlling the wheels which the rotation sensor gives rise to another way to detect
obstacles(indirectly). you can connect the sensor to an idle wheel and when the robot has
run into an obstacle this would cause the idle wheel to stop hence making the sensor stop
rotating, indicating that the motor has stalled. in order to prevent missing of counts, a
certain range of speeds is needed. this range is 50-300rpm(the safe range). grey area
where the firmware could miss counts is 12-50 and 300-1400. anything under 12 or
above 1400 will SURELY miss counts! the RCX will reliably measure rotation at speeds
up to 1250 rpm(when uploaded = 350 rpm).
Light: the purpose of this sensor is to detect light and measure it's intensity.
the values depend on the light intensity and are reported in the form of percentages 0-100.
the more light, the higher the percentage. you could use this as a driving mechanism for
a robot and control it with a flash light. this sensor not only detects light but also transmit
it as well. the LED red light can shoot a constant ray of light to detect the intensity of the
reflected light. when measuring reflected light, precautions must be taken into account
because the light sensor is very sensitive(i.e. to IR light) and made have interference from
other sources. the light reflected back depends on it's color, texture and/or distance from
the sensor(black reflects less then white, far distance relfects less than close distance).
the following equation describes the percentage reading:
percentage = 146- raw value/ 7
reading colors are the most common usage for the light sensor. reading a line allows the
robot to follow a line/path with out worry of being detour from it due to the reflection of
the color of the line.
the light sensor is also similar to that of radar for it detects objects before the robot hits
them.
**Concurrent to learning about the sensors, more commands surfaced. Set_sensor allowed us to
set a sensor type and reverted to the default mode. But by using set_sensor_type and
set_sensor_mode, we are able to control the behavior of the sensor more precisely.
Download