|
User's Guide Appendix Datasheets PDXBot RoboMaxx Robothon Buy Robots! View Cart Shipping Privacy About Contact |
TestingWhen testing the operation of the Mark III, a Digital Multi-Meter is useful to have, but not required. A DMM will allow you to check connectivity of wires and measure voltages at points in the circuit. The DB-9 serial connector is grounded and makes a useful ground clip or ground reference for measurement with a meter or an oscilloscope.Apply power, look for lightThe first step in testing is to apply power to the Mark III. Make sure the power switch is turned off (positioned toward the terminal block) then feed the battery strap wires into the terminal block. The center position of the terminal block is ground, the rear position (nearest the corner of the board where the terminal block is connected) is the motor power, and the front position (nearest the center of the board) is the electronics power. At this point, you should only connect up the electronics. The electronics is normally powered with a 9V battery connected to the battery strap.When the 9V battery is connected, move the power switch to the on position. The green LED should light; if it doesn't, check to make sure your 9V battery is good, check to make sure that the 1N4148 diode is inserted in the proper direction, check to make sure the MAX667 is inserted in the proper direction, check to make sure the LED is inserted in the proper direction. If the red LED is on, your 9V battery is low and isn't providing enough voltage for the Mark III to run. Replace your battery. Note that the LEDs indicate the state of the 9V battery only - they tell you nothing about the 4AA batteries mounted underneath the robot. Terminal program, communicate with PICUse a standard serial cable to connect your computer's serial port to the DB-9 serial connector on the Mark III. If you don't have a serial cable, you can buy one at any store that carries computer equipment. The required pinout can be found at http://www.junun.org/MarkIII/Info.jsp?item=22. The cable must be a straight-through serial extension cable. Pin 1 of one end connected to pin 1 of the other end, pin 2 to pin 2, pin 3 to pin 3, etc. A common problem is using a serial cable which has one pin 3 connected to the other pin 2 and pin 2 connected to the other pin 3 - this will not work on the Mark III.Connect with HyperTerminal (Windows) or MacTerminal (Macintosh) or xxx (Linux/Unix). (Note: Newer Macs don't have a serial port so they need a USB to serial adapter.) HyperTerminal comes pre-installed on most versions of Windows - it can be found in the "Start" Menu under "Programs/Accessories/Communications". If you don't have HyperTerminal installed for some reason, you can download it from http://www.hilgraeve.com/htpe/index.html. Terminal settings are 38400 baud, 8 bits, no parity, 1 stop bit. Be sure that you have flow control turned OFF. You cannot communicate with the Mark III board if hardware or software flow control is in use. When you have HyperTerminal running and the serial cable connected, press the white reset button on the Mark III. This will restart the Mark III and should print the following information in your HyperTerminal window:
8K PICLOADER v1.1
Copyright Rick Farmer 1999
No user code loaded
Press ? for help
PIC>
If you fail to see this message, possible causes are
Self test program which prints values of all sensorsDownload the .hex file containing the self-test program. (These programs and .hex files can be downloaded from Mark Gross' web site at http://thegnar.org/mIII/markIIICode.htm.) The same procedure you will follow here is used to download programs you write yourself. First open your terminal program and get to the PICLoader prompt.
8K PICLOADER v1.1
Copyright Rick Farmer 1999
No user code loaded
Press ? for help
PIC>
Then, select the "U" option to upload a program.
PICLoader will ask:
Are you sure (Y/N)?
Select "Y". At this point,
PICLoader will respond
Erasing
and will clear out the memory, displaying a hash mark ("#") for
every 256 bytes it clears. The PIC16F877 used by the Mark III has
6KB of memory available for user programs, so you should see 24 hash
marks. While this is happening, you should open up the
.hex file using any text editor (e.g. Notepad) and select the entire
contents. (Make sure you select all the contents, including
the trailing line terminators.) When PICLoader responds with:
Ready
paste the contents
of the .hex file into the PICLoader window. PICLoader will again
display a hash mark, this time one for each line of the .hex file it loads
(except for the last line, which is the end-of-file record).
Finally, you will be prompted:
Enter a rev string>
This is your opportunity to store a short, descriptive text
string to indicate the nature of the program you have just downloaded.
You'll find this useful when you need to figure out what program
is loaded into your robot!
When finished, you will be back to the PICLoader prompt. Typing "Q" at this point will quit the PICLoader and start running the self-test program. Results of the self-test will be displayed in your terminal window. Line sensorsThe line sensors emit infrared light, so it can be difficult to tell if they are working properly. One trick when dealing with infrared is to use a digital camera, videocamera, or web camera to view the sensors. Digital cameras use a CCD chip to image light; these CCD chips are sensitive to a wider spectrum of light than the human eye. In particular they can "see" infrared, so infrared light sources will appear in the resulting image. For best results, turn off all the lights in the room before trying to image the infrared output of the line sensors because CCD's have only a small response to the emitted infrared.GP2D12 sensorsYou can use the digital camera method mentioned in the previous section to make sure your proximity sensors are putting out infrared light, but an easier way to tell is simply to look into the lens of the sensor while the power is on. These sensors emit a small amount of visible red light, so the lens will be illuminated if it is emitting. The beam of light from these sensors is very narrow, so your eye has to be positioned in just the right place in front of the lens in order to see the glow.
If your GP2D12 proximity sensors are not emitting infrared, the
most likely cause is a mis-wired cable. See the Assembly Instructions
and check to make sure you have made your cable correctly. You can
use a DMM to check that power and ground is connected to these sensors.
(explain).
Note the pins on the 40-pin and 6-pin header are numbered in a zig-zag manner: 1 2 3 4 5 6 7 8 9 10 11 12 : : 35 36 37 38 39 40So, pins 39 and 37 are only .1" apart and you can use a shorting jumper to connect them. Other TestsCheck to make sure that R2 has the correct value (1Mohm, brown black green). If this is wrong, the oscillator won't work so the PIC won't run.You can check that the reset button works by getting an LED and holding it so that the long lead is in pin 1 of the PIC socket and the short lead is connected to ground. The LED should light up. When you press the reset button, the LED should turn off (this doesn't require any soldering, just bend the leads of the LED so that you can touch them to the right places.) Visually inspect the soldering on the board to make sure that everything that should be soldered is, and nothing that shouldn't be soldered is soldered. Spend a lot of time looking. The power regulator, RS232 circuit, the oscillator circuit, and reset circuit are the only things on the board that can cause the PIC to be silent. If all these can be verified to be working, you might have damaged your PIC itself with static electricity, but that is the least common cause of trouble. |
| webmaster@junun.org | |