Appendix G: Tuning Ir Distance Detection - Parallax Boe-Bot Student Manual

Hide thumbs Also See for Boe-Bot:
Table of Contents

Advertisement

Appendix G: Tuning IR Distance Detection

Finding the Right Frequency Sweep Values
Fine tuning the Boe-Bot's distance detection involves determining which frequency is
most reliable for each zone for each IR pair.
Note: This appendix features a method of determining the best frequencies for determining
given distances using spreadsheets. This activity takes time and patience, and is only
recommended if your distance sensing is severely out of calibration. It involves collecting
frequency sweep data and using it to determine the most reliable values for detecting
particular distances.
Point both the IR LEDs and detectors straight forward.
Place the Boe-Bot in front of a wall with a white sheet of paper as the IR target.
Place the Boe-Bot so that its IR LEDs are 2.5 cm away from the paper target.
Make sure the front of the Boe-Bot is facing the paper target. Both IR LEDs and
detectors should be pointed directly at the paper.
IR Fine Tuning Program
FrequencySweep.bs2 performs a frequency sweep on the IR detector and displays the
data. Although the techniques used are similar to other programs, it has one unique
feature. The BASIC Stamp is programmed to wait for you to press the Enter key.
Enter and run FrequencySweep.bs2, but do not disconnect the Boe-Bot from the
serial cable.
' -----[ Title ]--------------------------------------------------------------
' Robotics with the Boe-Bot - FrequencySweep.bs2
' Test IR LED/detector response to frequency sweep.
' {$STAMP BS2}
' {$PBASIC 2.5}
' -----[ Variables ]----------------------------------------------------------
crsrPosRow
VAR
irFrequency
VAR
irDetect
VAR
distance
VAR
dummy
VAR
Appendix G: Tuning IR Distance Detection · Page 329
Byte
Word
Bit
Nib
crsrPosRow
' Stamp directive.
' PBASIC directive.

Advertisement

Table of Contents
loading

Table of Contents