Download Print this page

Parallax 29115 Manual

Line follower module

Advertisement

Quick Links

Distributed by:
www.Jameco.com
1-800-831-4242
The content and copyrights of the attached
material are the property of its owner.

Advertisement

loading

Summary of Contents for Parallax 29115

  • Page 1 Distributed by: www.Jameco.com 1-800-831-4242 The content and copyrights of the attached material are the property of its owner.
  • Page 2: Packing List

    Bot. Features The Parallax Line Follower module comes pre-assembled and ready to attach to your BOE-Bot. It uses a multi-sensor array over which you have complete programmatic control. This level of control allows you to develop line following algorithms that are very simple to those that are very advanced. Since the module uses reflective sensors, it contains a threshold adjustment that can tune the sensor array to the ambient light conditions.
  • Page 3 Setting Up Follow these steps to attach the Parallax Line Follower module to the BOE-Bot (see Figure 1): 1. Clear any program currently in the BASIC Stamp of your BOE-Bot. All pins should be made inputs (Dirs = 0). 2. Disconnect the power source from your BOE-Bot.
  • Page 4: How It Works

    How It Works The Parallax Line Follower module is composed of two distinct sections: an IR emitter/detector array and a threshold comparator circuit. A simplified diagram of each emitter/detector is shown in Figure 2. Figure 2: IR Emitter/Detector Circuit The IR LED is activated by making the associated BASIC Stamp output pin low (see Figure 4 for connections).
  • Page 5 The comparator will output will be high (1) or low (0), depending on which of the two input pins has the higher voltage. If the minus input (voltage from IR detector) is higher than the plus input, the comparator output will go low. If the plus input (threshold pot) is higher than the minus input, then the output will go high.
  • Page 6: Testing And Calibration

    (the DEBUG screen should read: “00100”) Repeat the test and recalibration as necessary until all sensors accurately detect the line with no false positives (detection when no line is present). Parallax, Inc. • Parallax Line Follower (#29115) • 12/2001 Page 5...
  • Page 7 The core of the routine uses a FOR...NEXT loop to cycle through all five sensors. The first line of the loop code turns on an LED by setting the corresponding output pin low. Parallax, Inc. • Parallax Line Follower (#29115) • 12/2001 Page 6...
  • Page 8 BIN5 (binary output, five digits) modifier. With the current Line Follower bits displayed, GOTO returns the program to Main and process starts over. Parallax, Inc. • Parallax Line Follower (#29115) • 12/2001 Page 7...
  • Page 9 ------- ", CR DEBUG " | | | | ", CR DEBUG " +-| |-+ ", CR DEBUG " | | | | ", CR DEBUG " ", CR Parallax, Inc. • Parallax Line Follower (#29115) • 12/2001 Page 8...
  • Page 10 = In9 ^ LFmode ' record the sensor reading OutL = OutL | %01111100 ' turn LEDs off NEXT lfBits = lfBits >> 2 ' shift bits to zero index RETURN Notes: Parallax, Inc. • Parallax Line Follower (#29115) • 12/2001 Page 9...
  • Page 11 Refer to Robotics!, Chapter 2, for a complete discussion on BOE-Bot motor control and steering. Refer to The Nuts & Volts of BASIC Stamps, Column #44, for a routine for code timing. Parallax, Inc. • Parallax Line Follower (#29115) • 12/2001 Page 10...
  • Page 12 ' steering control ' -----[ EEPROM Data ]---------------------------------------------------------- ' -----[ Initialization ]------------------------------------------------------- Initialize: OutL = %01111100 ' all LF LEDs off DirL = %01111100 ' make pins outputs Parallax, Inc. • Parallax Line Follower (#29115) • 12/2001 Page 11...
  • Page 13 PULSOUT RMotor, MStop - Speed100 GOTO Save_Last Left: PULSOUT LMotor, MStop + Speed050 ' slow left motor PULSOUT RMotor, MStop - Speed100 ' full speed on right GOTO Save_Last Parallax, Inc. • Parallax Line Follower (#29115) • 12/2001 Page 12...
  • Page 14 Hard_Left: PULSOUT LMotor, MStop ' stop left motor PULSOUT RMotor, MStop - Speed075 GOTO Save_Last Notes: Parallax, Inc. • Parallax Line Follower (#29115) • 12/2001 Page 13...
  • Page 15 BOE-Bot closer to course center, reducing the time to move around the course. You may want to fine tune the steering values to match the code to the particulars of the course to be run. Parallax, Inc. • Parallax Line Follower (#29115) • 12/2001 Page 14...
  • Page 16 ' line follower input bits lastBits Byte ' last LF input steer ' steering control onCourse ' on course flag ' -----[ EEPROM Data ]---------------------------------------------------------- RstValue DATA ' $FF = no run Parallax, Inc. • Parallax Line Follower (#29115) • 12/2001 Page 15...
  • Page 17 = In9 ^ LFmode ' record the sensor reading OutL = OutL | %01111100 ' turn LEDs off NEXT lfBits = lfBits >> 2 ' shift bits to zero index RETURN Parallax, Inc. • Parallax Line Follower (#29115) • 12/2001 Page 16...
  • Page 18 ' full speed on right GOTO Save_Last Hard_Left: PULSOUT LMotor, MStop - Speed100 ' reverse left motor PULSOUT RMotor, MStop - Speed100 ' full speed on right GOTO Save_Last Notes: Parallax, Inc. • Parallax Line Follower (#29115) • 12/2001 Page 17...
  • Page 19: Troubleshooting

    ” (16 mm) wide strip of black construction paper. Wrap the strip around the body of the sensors and secure with cellophane tape. Figure 8: Line Follower With Light Skirt Parallax, Inc. • Parallax Line Follower (#29115) • 12/2001 Page 18...