|You are here: RoboFlag Main Page > Course Resources > Technical Information > Visible Flag Beacon|
Visible Flag Beacon
The flag beacon is a critical component of the RoboFlag project and is one of the most important aspects of the competition. This document details the use of a flag beacon detector that is easily interfaced to a PIC microcontroller.
This document is broken down into the following sections:
Introduction and Design Objectives
Along with detecting other robots, one of the most challenging aspects of the RoboFlag project is detecting the two flags used in the games of capture the flag.
The flag must advertise its presence, otherwise how would robots find and grab onto it? The flag must work differently from the infrared robot beacon so robots can detect other robots AND the flag at the same time. Each flag must emit a signal, and each robot needs to be able to detect the signals from each flag.
The design objectives are as follows:
Lighting Problems and LEDs
Because our flags must be detectable from more than 4 feet, the intensity of light emitted from the flag must be significant. This visible light needs to be much brighter than the ambient light in the room.
We have two separate flags: one for each team. Robots must be able to detect these flags at the same time, so each flag must have a slightly different beacon. We will therefore operate the two flag beacons at different frequencies.
Another problem lies with the turn-on and turn-off time of the flashing beacon: using a conventional light would make detection harder as the time required to turn the bulb on and off would be excessive.
The solution is ultra-bright (and directional) LEDs that can be driven with very high currents; they can be pulsed very quickly (we use them for IR at 38kHz, so 20-30Hz won't be a problem!). We will use orange-red LEDs in the 615-640nm range due to the high millicandela rating of these diodes. Specifically, our emitters have a wavelength of 635nm.
As mentioned, the flag beacons will flash at 20.01Hz and 29.80Hz, essentially 20 and 30Hz, with a 50% duty cycle.
Detecting the Flag Beacon
Detecting the flag beacon is a challenging task: you must examine multiple angles around the robot and look for the 20 or 30Hz signals. This problem is simplified with a good detector, but the problem is still quite complex.
An excellent detector is a photodiode with built-in amplifier, tuned to the correct wavelength of the LEDs. This photodiode needs to be fairly resistant to higher frequency infrared (from the robot beacon, the IR distance sensors, etc), sensitive to a flashing point source, and insensitive to the ambient light.
The Burr-Brown (a division of Texas Instruments) OPT101P is an excellent selection. The datasheet is here. This device is available from DigiKey as part number OPT101P-ND. You will need multiple detectors, each corresponding to a different direction of detection, connected to a PIC that will perform the sampling and filtering required to make sense of the detector's output.
Rami suggests connecting the OPT101P as follows:
There are a number of operating considerations as follows:
The following graph shows the range of output voltages of the OPT101
and the general response vs. distance. It is not a calibration graph or a
specification curve for the OPT101.
Even though the detector gives a well-formed response to the flashing LEDs, the detection process is far from complete. You will need to sample and analyse the outputs from each detector mounted on your robot.
One of the best ways to do this is with a small microcontroller - the MicroChip PIC is an excellent start, and some technical information is available here. Regardless of the microprocessor you decide to use, your algorithm will be quite complicated.
Your microcontroller algorithm must:
There's a FAQ question about this topic here.