Using IR Chapters 7 & 8 of Robotics with the Boe-Bot.

12
Using IR Chapters 7 & 8 of Robotics with the Boe-Bot

Transcript of Using IR Chapters 7 & 8 of Robotics with the Boe-Bot.

Page 1: Using IR Chapters 7 & 8 of Robotics with the Boe-Bot.

Using IR

Chapters 7 & 8 of Robotics with the Boe-Bot

Page 2: Using IR Chapters 7 & 8 of Robotics with the Boe-Bot.

Wireless Communication

Wireless communication: Personal organizers beam data into desktop

computers wireless remotes let us channel surf.

Many remote controls and PDA’s use signals in the infrared frequency range to communicate, below the visible light spectrum.

With a few inexpensive and widely available parts, the BASIC Stamp can also receive and transmit infrared light signals

Page 3: Using IR Chapters 7 & 8 of Robotics with the Boe-Bot.

Visible Light Waves

Page 4: Using IR Chapters 7 & 8 of Robotics with the Boe-Bot.

Infrared

Page 5: Using IR Chapters 7 & 8 of Robotics with the Boe-Bot.

The IR Detector

The IR detector is only looking for infrared that’s flashing on and off 38,500 times per second. It has built-in optical filters that allow very little

light except the 980 nm infrared. It also has an electronic filter that only allows

signals around 38.5 kHz to pass through.

This prevents IR interference from common sources such as sunlight and indoor lighting.

Page 6: Using IR Chapters 7 & 8 of Robotics with the Boe-Bot.

Schematics

Page 7: Using IR Chapters 7 & 8 of Robotics with the Boe-Bot.

Detecting IR

The key to making each IR LED/detector pair work is to send 1 ms of 38.5 kHz FREQOUT, and then, immediately store the IR detector’s output in a variable.

FREQOUT 8, 1, 38500irDetectLeft = IN9

The IR detector’s output state when it sees no IR signal is high. When the IR detector sees the 38500 Hz harmonic reflected by an object, its output is low.

The IR detector’s output only stays low for a fraction of a millisecond after the FREQOUT command is done sending the signal, so it’s essential to store the IR detector’s output in a variable immediately after sending the FREQOUT command.

Page 8: Using IR Chapters 7 & 8 of Robotics with the Boe-Bot.

Simple Display Program

Page 9: Using IR Chapters 7 & 8 of Robotics with the Boe-Bot.

IR Detection Range

Less series resistance will make an LED glow more brightly.

Brighter IR LEDs can make it possible to detect objects that are further away.

Page 10: Using IR Chapters 7 & 8 of Robotics with the Boe-Bot.

OBJECT DETECTION AND AVOIDANCE

Page 11: Using IR Chapters 7 & 8 of Robotics with the Boe-Bot.

OBJECT DETECTION AND AVOIDANCE

Page 12: Using IR Chapters 7 & 8 of Robotics with the Boe-Bot.

Other Tricks

Drop off detectionSimulating a drop-off with electrical

tape Distance detection Following a stripe Communication