The MIT Sensor Robot: User's Guide and Technical Reference Fred Martin October 22, 1991
Preface The MIT Sensor Robot is a small, mobile robot designed for educational and experimental use. Its intelligence is based on a Motorola 6811 microprocessor with 32K of battery-backed memory. The Sensor Robot was designed for maximal features while retaining a fundamentally simple design: most of the robot's sensors are soldered directly onto its single circuit board. Thus the robot has minimal connectors and is easy to construct.
Contents 1 User's Guide 1.1 Overview : : : : : : : : : : : : : : : : : : : : 1.1.1 Sensors : : : : : : : : : : : : : : : : : 1.1.2 Other Input and Output : : : : : : : 1.1.3 Motor Control : : : : : : : : : : : : : 1.1.4 Radio Link : : : : : : : : : : : : : : 1.2 Sensors : : : : : : : : : : : : : : : : : : : : : 1.2.1 Photocell Sensors : : : : : : : : : : : 1.2.2 Whisker Sensors : : : : : : : : : : : : 1.2.3 Touch Sensors : : : : : : : : : : : : : 1.2.4 Inclination Sensor : : : : : : : : : : : 1.2.
B.3 Check-o Parts Listing : : : : : : : : B.3.1 Integrated Circuit Sockets : : B.3.2 Resistors : : : : : : : : : : : : B.3.3 Resistor Packs and Trimpots : B.3.4 Capacitors : : : : : : : : : : : B.3.5 Transistors : : : : : : : : : : : B.3.6 Diodes : : : : : : : : : : : : : B.3.7 LEDs : : : : : : : : : : : : : B.3.8 Miscellaneous Components : : B.3.9 Switches : : : : : : : : : : : : B.3.10 Integrated Circuits : : : : : : B.3.11 Sensors : : : : : : : : : : : : : B.3.12 Connectors : : : : : : : : : : B.
Introduction This User's Guide and Technical Reference is organized into two main sections and two appendices. The rst section is the User's Guide. The section introduces the Sensor Robot by rst enumerating the various features of the robot, and then explaining how to use each one. The purpose of the User's Guide is to explain how to use the robot. The second section is the Technical Reference.
1 User's Guide The rst part of this section presents an overview of the Sensor Robot's features. The remainder of the section then discusses each feature in detail. 1.1 Overview Figures 1 and 2 illustrate the Sensor Robot's circuit board, showing positions of sensors and other components. 1.1.1 Sensors Here is a list of the sensors that are used by the Sensor Robot: Photocells.
3 Back of Robot Figure 1: Sensor Robot Board Sensors Layout back right whisker sensor TIL-99 phototransistor pyroelectric sensor Sharp IR receiver MLED71 IR xmitter microphone back photocell MLED71 IR xmitter MLED71 IR xmitter back left whisker sensor Sharp IR receiver tilt sensor MLED71 IR xmitter Sharp IR receiver touch sensor connectors MLED71 IR xmitter floor and shaft IR sensor connectors MLED71 IR xmitter right front whisker sensor right photocell MLED71 IR xmitter Sharp IR recei
Microphone. A single microphone can detect sounds such as particular tones (generated by other robots) or an abrupt noise (such as a hand clap). Shaft Encoders. Shaft encoders monitor the velocity of each of the two drive axles. Floor Re ectance Sensors. Two infrared re ectance sensors determine the re ectivity of the oor underneath the robot. The sensors are mounted in left-front and right-front positions on the robot chassis. Infrared Obstacle Detection Sensors.
5 Charge Rate Switch Battery Recharging Jack Motor Status LEDs Serial Line Jack Frob Adjustment Knob Ming RE-99 Connector 6811 LCD Display System Reset Charge Button Status DIP Configuration LEDs System Switches Power Switch Auxiliary Motor Outputs User Buttons LCD Contrast Knob Ming TX-88 Connector Miniature Speaker Element Low Battery Serial Transmit Serial Receive Infrared Reflectance Infrared Transmit System Status LEDs Front of Robot Back of Robot Figure 2: Sensor Robot Board Connect
Battery Charge Jack. An AC adapter is plugged into the robot to recharge its battery. Battery Charge Rate Switch. A small slide switch selects one of two charging rates: a normal twelve-hour charge and a three-hour \zap" charge. LCD Screen. The robot has a 16 1 character LCD screen for displaying information to the user. LCD Contrast Adjustment Knob. A small knob allows contrast adjustment of the LCD screen. Miniature Speaker.
gear drive, the shaft encoders monitoring the wheel speed are used by a servo routine to implement velocity control. 1.1.4 Radio Link The Sensor Robot has a built-in interface for the adding of a radio transmit and receive board set. This board set, manufactured by Ming Electronics1, provides a four-bit-wide data channel between robots or between robots and a human. 1.2 Sensors This section explains in more detail the capabilities of each sensor and how to use the C library functions associated with it.
The sensors are only a ected by bending in one direction from at (the direction such that the printed side of the sensor is on the outside of the convex curve). Therefore, they are used in pairs, mounted back to back, so that the paired sensor must bend in a direction that it is sensitive to. Four paired whisker sensors are used on the Sensor Robot, in front-left, front-right, back-left, and back-right con gurations.
Depending on the inclination of the sensor, the ball tends to rest on particular contacts. Although the ball has a tendency to bounce around due to the vibrations of the robot, probabilistic methods can be used to deduce which contact the ball is preferring at a given moment. The library function for the inclination sensor returns a oating point number indicating the angle of inclination of the surface the robot is resting on, with respect to a line drawn from the center of the robot out through its nose.
processes the signal stream coming from the microphone for magnitude of devation from average. The larger the value returned by this function, the louder the instantaneous noise received by the microphone. 1.2.7 Floor Re ectance Sensors Two sensors provide information about the re ectivity of the ground underneath the robot. The sensors are mounted in the front of the robot, positioned slightly to the left and to the right of the center. The re ectance sensors have controllable sources of infrared light.
the wheel velocity would then be about 16 turns per second. So, by doubling the readings returned by the library variables you can get a measure in revolutions per second. The library variables reporting wheel velocity are int left wheel velocity; int right wheel velocity; Note that these are references to library variables, not calls to library functions. Calibrating the Shaft Encoders The shaft encoders work by measuring the di erence in re ected light from the black vs.
1.2.9 Infrared Obstacle Detection Sensors 1.2.10 Infrared Transmission Feedback 1.2.11 Battery Level Sensor The function int battery level(); returns an integer from 0 to about 100 indicating the state of charge of the system battery, where 0 is considered \near-empty" and 100 (or greater) is considered full charge. In addition, a red status LED will light when the battery becomes discharged.
normal charge for overnight, but any longer than that is not good for the battery. The other position of the charge rate switch is zap charge. Zap charge will fully charge the battery in about an hour. Do not leave the battery on zap charge for more than two hours, or after the battery begins to get warm. You will notice that the green LED turns o in the zap charge mode, reminding you not to leave the robot in this state for a long time. 1.3.
1.3.4 DIP Con guration Switches The library function int dip switches(); returns an integer from 0 to 15 corresponding to the binary number set on the DIP switches. The left-most switch position (labelled \1" on the switch) is the most signi cant digit of the binary number. The position labelled \Open" is a binary one; the other position is the binary zero. The library function int dip switch(int n); returns the value of DIP switch n, where n is 1, 2, 3, or 4 (corresponding to the markings on the switch).
level. Powers range from 100 (full on in the forward direction) to -100 (full on the the backward direction). The system software actually only controls motors to seven degrees of power, but limits of -100 and +100 are given for ease of use. void fd(int m) m Turns motor on in the forward direction. Example: fd(3); void bk(int m) m Turns motor on in the backward direction. Example: bk(1); void off(int m) m Turns o motor . Example: off(1); void alloff() void ao() Turns o all motors.
void robot right(int power) Makes the robot turn right (left wheel on, right wheel o ) at power level . power void robot left(int power) Makes the robot turn left (right wheel on, left wheel o ) at power level power. void robot spin right(int power) Makes the robot spin in place clockwise (left wheel on forward, right wheel on backward) at power level power.
To do this, use the motor() functions mentioned earlier. When velocity control is enabled, these functions modify only the power level used by the velocity control routine, not the actual on-o state of the motor. To turn the robot's motors o when in velocity control mode, set the left and right velocity setpoints to zero. The function alloff() may also be used to perform this operation.
A C Library Function Handy Reference Version 1.
B Electrical Assembly Guide These assembly instructions assume that you already know how to mount and solder components onto a circuit board. If you do not, please get help from a friend or from detailed beginner's instructions before attempting to assemble the robot board. Read these instructions through from start to nish before beginning to assemble your robot. These instructions do not give you step-by-step directions for each and every little part on the circuit board.
position on the IC. Second, a notch in the outline drawing of the DIP package indicates the orientation of the corresponding notch on the IC. Mount the IC sockets so that the notch on the socket is aligned with the notch drawn on the board. Capacitors. The square metal pad on the board where a capacitor mounts indicates the minus lead. Capacitors themselved are marked in several ways. Sometimes, the minus lead is marked; sometimes the positive lead is marked.
must be folded over before being soldered; some capacitors and sensors fall into this category. You will notice when assembling the board that most resistors and diodes must be mounted upright while others may lay at. The rule: go with the ow. If space has been provided to mount the component at, then do so, and try to keep it as close to the board as possible. If not, then just bend one lead over parallel to the component, and mount the component tightly. See Figures 3 and 4 for clari cation.
1{2 Minor Board Fixes The solder mask|the green material on the board that keeps the solder from owing across connections where it shouldn't|needs to be scraped away for the mounting pads for the bend sensors. Also, two thin traces near each mounting pad need to be removed. See Figure 5 for details. You will probably want to do these xes before mounting any components. 1. cut away these two traces 2. scrape green solder mask off of rectangular pad 3.
components so that their pins go down from this side (e.g., the parts will obscure the printing when they are mounted properly). Don't blow it and mount everything on the wrong side!! This would be an drastic error. 3{2 Integrated Circuit U3 and DIP socket for U2 Mount U3 directly to the circuit board. Observe proper polarity|you will have to desolder if you get it wrong! Be careful not to heat the pins for too long.
9{2 Resistor R20 and Diode D8 Resistor R20 will not be used. Mount diode D8 such that it spans over the holes for resistor R20. The cathode of the diode mounts in the square hole as marked; the anode mounts in the far hole alloted for R20. 10{2 R7 Fix Firstly, note that R7 should be 470 , not 1k as indicated on the board. To do this x, you will need to cut a trace and install a jumper wire. You should use an X-acto knife or razor blade to cut the trace. You should use thin wire-wrap wire as the jumper.
RP4 should be a 47k 4 resistor pack. If you have a resistor pack that is 47k 5, you must clip o the last resistor. Cut o one resistor from the unbanded end before mounting. 13{2 U8 Serial Line Fix Using a short wire jumper, connect pins 1 and 3 of U8 (do this on the underside of the board). 14{2 Resistor R22 and Diodes D3 and D9 These devices are not needed. Do not mount any components in the holes alloted for them.
19{2 Female Socket Header Cut strips of socket header to mount in the Expansion Bus area (a 14long strip and a 9-long strip), the lower motor ports adjacent to U18 (a 6-long strip), and the Batt Out port (a 2-long strip). 20{2 RJ-11 Phone Jack The phone jack mounts on the top of the board; unfortunately, the pinout drilled into the board has a symettry problem. Do not mount the jack from the underside of the board.
Scrape off green solder mask before soldering, top and bottom of board TOP OF BOARD BOTTOM OF BOARD Deform pins so that the end of this sensor touches the other sensor Figure 6: Bend Sensor Mounting Technique Slide-on Heatsink Solder is applied to each pin to piggy-back the two chips.
B.3 Check-o Parts Listing This parts listing may be used as a quick reference when assembling the board. If you wish, use this list to check o each component after it is mounted. Instead of mounting components in order of their numbering, you may be able to save time by selecting a component to be mounted on the board, and then looking up its value here. Note: if there is a discrepancy between the component value printed on the board and the component value listed here, the value listed here are correct.
B.3.3 Resistor Packs and Trimpots All resistor packs are common ground, unless otherwise noted. RP1{47k 9 RP4{47k 5 VR1{100k RP2{47k 9 RP5{1k 5 VR2{100k RP3{47k 7 RP6{22k 5 iso B.3.4 Capacitors C1{330 F C4{0.1 F C7{0.1 F C10{0.1 F C13{4.7 F C16{10 F C19{22 pF C2{1 F C5{0.1 F C8{0.1 F C11{0.1 F C14{4.7 F C17{47 F C20{22 pF C3{0.1 F C6{0.1 F C9{0.1 F C12{2.2 F C15{10 F C18{4700 pF B.3.5 Transistors Q1{MPS2222A Q2{MPS2222A Q3{MPS2222A B.3.
LED7{red LED10{green LED13{green LED16{MLED71 LED19{MLED71 LED22{MLED71 LED8{green LED11{green LED14{yellow LED17{MLED71 LED20{MLED71 LED23{MLED71 LED9{green LED12{green LED15{yellow LED18{MLED71 LED21{MLED71 B.3.8 Miscellaneous Components XTAL{8 Mhz crystal SPKR{miniature speaker element L1{1 H, 1A inductor L2{1 H, 1A inductor B.3.
IR-7{TRW OPB 5447-2 IR-8{TRW OPB 5447-2 VR3{CdS photocell VR4{CdS photocell VR5{CdS photocell VR6{bend sensor VR7{bend sensor VR8{bend sensor VR9{bend sensor VR10{bend sensor VR11{bend sensor VR12{bend sensor VR13{bend sensor D10{TIL-99 phototransistor PYRO{Eltec 447 pyroelectric sensor MIC{electret condensor microphone B.3.12 Connectors J1{DC power jack, 2.
B.
C Mechanical Assembly Guide This guide will tell you how to assemble the Sensor Robot's chassis, wire the touch sensors, and wire and install the motor/gearbox/wheel assembly. Instructions Please read through these instructions from start to nish before building anything!! If something is unclear, you may wish to ask about it before doing it wrong. 1{2 Preparing the Gearbox. Take apart the Red Fox car and remove the gearbox assembly.
FRONT OF ROBOT Touch Sensor Touch Sensor Caster Mounting Holes Circuit Board Mounting Hole Circuit Board Mounting Hole Wiring Hole Battery and Gearbox Mounting Holes ‘‘B’’ holes Circuit Board Mounting Hole Circuit Board Mounting Hole Touch Sensor ‘‘A’’ holes Touch Sensor Figure 8: Robot Chassis with Part Mounting Information, Top View 34
8-32 x 3/8" bolt #8 lock washer #8 nut Figure 9: Caster Mounting Guidelines, Side View 4-40 x 1/2" bolt 4-40 x 3/4" bolt #4 lock washer #4 lock washer Back of Robot Robot Chassis Motor/Battery Bracket 1/4" aluminum spacer 1" aluminum spacer mounting tab on gearbox 1-1/4" aluminum spacer mounting tab on gearbox #4 lock washer #4 lock washer 4-40 x 1/2" bolt Radio Shack Red Fox Motor/Wheel/Gear Assembly 4-40 x 3/4" bolt Figure 10: Gearbox Mounting Guidelines, Side View 35
3{2 Mounting the Caster. Begin your assembly by mounting the caster in the position indicated by Figure 8. Use the 8-32 bolts, lock washers and nuts as indicated by Figure 9. 4{2 Mounting the Gearbox Supports Install the 1" aluminum spacers and 1 14 " + 41 " spacers that will support the gearbox assembly. Do not install the gearbox at this time. The two 1" spacers mount in the holes labelled \A" in Figure 8. The two 1 41 " + 41 " spacer assemblies mount in the holes labelled \B.
6{2 Wiring the Touch Sensors Following the wiring diagram in Figure 12, wire the touch sensors to the Sensor Robot board. Insert the wires from the back of the board, and leave enough wire length so that the PC board can lie at next to the chassis after you are done. 7{2 Installing the Gearbox Referring again to Figure 10, bolt in the gearbox/motor/wheel assembly. Thread the 4-wire cable up through the oval mounting hole.
FRONT OF ROBOT SROSNES HCUOT THGIR TFEL KCAB Run wires from touch sensors up into the bottom of the PC board and solder from the top. Make wires several inches ‘‘too long’’ so that PC board can be easily flipped over to lie next to chassis after being wired.
4-40 x 5/16" bolt #4 nylon washer PC Board #4 nylon washer 3/4" aluminum spacer Chassis #4 lock washer 4-40 x 5/16" bolt Figure 13: PC Board Mounting Guidelines, Side View 10{2 You Are Done For now, at least. Parts that will be mounted later are: frame to support axles and hold battery, IR re ectance sensors, IR shaft encoders, and bend sensors. (You can use a rubber band to hold your battery to the chassis of the 'bot until the support frame is ready.