Page 262 ·
Robotics with the Boe-Bot
SUMMARY
This chapter covered a unique technique for infrared object detection that uses the
infrared LED found in common handheld remotes, and the infrared detector found in
TVs, CD/DVD players, and other appliances that are controlled by these remotes. By
shining infrared into the Boe-Bot’s path and looking for its reflection, object detection
can be accomplished without physically contacting the object. Infrared LED circuits are
used to send a 38.5 kHz signal with the help of a property of the
FREQOUT
command
called a harmonic, which is inherent to digitally synthesized signals.
An infrared detection indicator program was introduced for remote (not connected to the
PC) testing of the IR LED/detector pairs. An infrared interference sniffer program was
also introduced to help detect interference that can be generated by some fluorescent light
fixtures. Since the signals sent by the IR detectors are so similar to the signals sent by the
whiskers, RoamingWithWhiskers.bs2 was adapted to the infrared detectors. A program
that checks the IR detectors between each servo pulse was introduced to demonstrate a
higher performance way of roaming without colliding into objects. This program was
then modified to avoid the edge of an electrical tape delimited area. Since electrical tape
absorbs infrared, framing a large sheet of construction paper emulates the drop-off that is
seen at a table edge without the danger to the actual Boe-Bot.
Questions
1.
What is the frequency of the harmonic sent by
FREQOUT 2, 1, 38500
? What is
the value of the fundamental frequency sent by that command? How long are
these signals sent for? What I/O pin does the IR LED circuit have to be
connected to in order to broadcast this signal?
2.
What command has to immediately follow the
FREQOUT
command in order to
accurately determine whether or not an object has been detected?
3.
What does it mean if the IR detector sends a low signal? What does it mean
when the detector sends a high signal?
4.
What happens if you change the value of a resistor in series with a red LED?
What happens if you change the value of a resistor in series with an infrared
LED?