Adjustments and Tests
rwp-test.lis (page 8)
After the p-code has been downloaded, type load rwp-test.lis. The various tests can be accessed by pressing the reset button. They are described below, in the order in which they appear. The page from the assembly guide on which they appear is also given.

Introduction
>>>>
Photo L114 R50
This is an approximate representation of the photocell test LCD display screen. The arrows indicate that the right photocell is exposed to more light. L114 and R50 report the current analog values associated with each photocell. Lower numbers mean more light. Use tape on this side - see below.
Watch the circuit board as you point the robot toward light of varying intensity. The first line of the display contains arrows that point toward the photocell detecting the brighter light. The more arrows, the brighter the light. The second line identifies the test with the word "Photo" and reports numbers related to the intensity of the light falling on each cell.
The photocells are part of a voltage divider. The voltage across each photocell is converted to a digital value. RWP's microprocessor compared input voltages with the 5.0 volt reference of the power supply and converts analog values to 8-bit digital values. Thus, voltages in the range 0.0 to 5.0 volts are represented as numbers from 0 to 255.
The resistance of a photocell decreases as it receives more light and increases when it receives less. In the voltage divider circuit for RWP this means that less light produces higher numbers and more light produces lower numbers. The numbers following L and R will independently change as the robot is pointed in different directions or as one photocell is covered with your hand or other obstacle.
Tests
Photocells do not have the same sensitivity. The following is a procedure to match the photocells.
Introduction
<<<<<= = = =>>>>>
IR Test
The IR test shows whether the reflection of either, both, or neither emitter is sensed by the IR detector. In the example above (from the LCD display) obstacles have been detected on both sides of the robot.
The IR detector is very sensitive - sometimes even the faint infrared light scattered from the side and back of an emitter will be detected. If this occurs, the IR test will indicate that an obstacle has been detected even when no obstacles are nearby.
The IR detector, U10, is designed to respond to modulated IR light. The output of the detector, normally high, goes low a few cycles after it is exposed to IR of sufficient intensity. The output returns to high a few cycles after exposure ceases.
The emitter circuit is composed of two IR LEDs and a Schmitt trigger oscillator whose frequency can be adjusted. The IR LEDs are incorporated into a logical AND circuit. When a control signal, PD2 or PD3, from the microprocessor is high, the associated IR LED turns on and off at a rate controlled by the oscillator. When the control signal is low, the IR LED is always off.
Tests
of the display should be blank.
arrows should appear on the LCD pointing toward the emitter nearer the object.
A microphone is connected to the LM386 amplifier chip. The gain of this type of amplifier is set to 200 by capacitor C13. With no sound input, the output of the amplifier is steady at about 2.5 volts, half the supply voltage. With sound present, the output of the amplifier increases and follows the input, swinging above and below the 2.5-volt value. The output passes through a low pass filter composed of R1 and C22. The filter removes high-frequency electrical noise induced by other components on the circuit board.
Finally, the output of the amplifier is sampled by the microprocessor using one of its analog to digital converter channels. The microprocessor can determine the level of sound by comparing the difference between the voltage measured and 2.5 volts. The greater the difference, the louder the sound.
Introduction
The three bump switches are connected through an analog voltage adder circuit to a single analog input of the microprocessor. The numbers displayed on the second line of the LCD (see below) is the result of analog-to-digital conversion. Based on the value of this number, the microprocessor decides which switches or combinations of switches are closed.
Tests
Download the rwp-test.list file and press the RESET button until the Bumper Test appears.
Bumper Test 62
Left Right ~
The Bumper Test shows which of the three bump switches are closed. In the above example, the left and right switches have been pressed.
Press each bump switch in turn. The LCD screen should indicate Right, Left, or Back depending on the switch pressed. Press the switches in pairs. The correct pair should be indicated on the display as well. Finally, press all three switches. "Left Right Back" should be displayed on the LCD.
Periodically check to ensure that they are not broken.
Introduction
A shaft encoder (circular piece of paper with alternating white and black patterns) is affixed to the inside of each wheel. An ir emmitter shines light and the reflection is determined in order to calculate distance. Because the shaft encoders use only one channel per motor, the direction of rotation cannot be measured directly. This is why velocity numbers are always positive.
Tests
Encoders Test
L* 83 R. 106~
The encoders test displays the state and number of clicks for each shaft encoder. "L" and "R" identify the left and right encoders, respectively. the "*" next to the letter indicates the encoder detects a white stripe; a "." indicates a black stripe. The numbers tell how many encoder clicks have been counted since the test began.
Download the rwp-test.list file and press the RESET button until the encoders test appears.
Perform the encoder test in subdued light as the photoreflector can mistake a bright external light source for its local emitter. Turn each wheel by hand and observe the encoder state and number of clicks (see above). Make sure that both encoders detect every stripe.
If some stripes are missed, reposition the shaft encoder board until a reliable result is achieved.
Caster Ball
The caster ball is used for stability.
Tests
Ensure that it is not touching either the battery compartment or the skirt. If so, inform the instructor and he will check/adjust.
Skirt
The three bump switches are mounted on the skirt.
Tests
Check to ensure that nothing is hitting - the caster ball is usually the culprit.
Wheels
RWP has two independently controlled wheels.
Tests
Periodically check to ensure that the wheels are free to rotate. Common problems involve lint being wrapped around the wheels and the wheels hitting the skirt.
Instructor will clear if necessary.