28.01.2013 Views

Build Your Own Combat Robot

Build Your Own Combat Robot

Build Your Own Combat Robot

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Chapter 11: Autonomous <strong>Robot</strong>s 255<br />

trols the 40-kHz modulation frequency. Using a 10-turn potentiometer will give you<br />

the best sensitivity control. To adjust this circuit, you first adjust R2 to 550 Hz,<br />

700 Hz, 850 Hz, or 1000 Hz. You will need an oscilloscope or a multimeter that can<br />

measure frequencies. You will measure the carrier frequency from pin number 5.<br />

After the carrier frequency is set, then temporarily ground pin number 6 and adjust<br />

R6 until you get 40 kHz. You will monitor the 40-kHz frequency from pin 9. When<br />

you are done, remove the temporary ground from pin number 6.<br />

For those of you who are mathematically inclined, the frequency carrier frequency<br />

is shown in equation 5, and the modulation frequency (the 40-kHz frequency) is<br />

shown in equation 6.<br />

To set up an autonomous system on your robot, you will have to build a circuit<br />

to decode the infrared signals your receiver unit detects from the beacons. You can<br />

use either hardware or software to decode the signals. With either method, you<br />

will need a microcontroller to interpret the results and plan the attack. A software<br />

method would measure the pulse length out of the receiver unit. Total pulse length<br />

is calculated from the modulation frequency, as shown in equation 7. The<br />

microcontroller will look for one-half the total pulse length, either the positive or<br />

negative portion.<br />

A simple logic statement for detecting a 700-Hz signal might look like this:<br />

IF [(Pulse_Width is greater than 650 microseconds)<br />

and (Pulse_Width is less than 750 microseconds)]<br />

THEN Beacon_Frequency is 700 Hz<br />

With a Basic Stamp, to measure the pulse width can easily be accomplished using<br />

the Pulsin command. Using software to analyze the infrared frequencies can<br />

simplify the number of components that go into the robot controller and can give<br />

you more options in configuring your robot to attack. Programs can be changed<br />

between matches to account for conditions not originally accounted for. But software<br />

solutions are sometimes complicated to implement, depending on your programming<br />

skills.<br />

A hardware solution can be simple. Figure 11-9 shows a schematic drawing of a<br />

circuit that uses the 567-tone decoder to interpret the carrier frequency from the<br />

infrared beacon. Potentiometer R1 is used to adjust the frequency this circuit will<br />

detect. A 10-turn potentiometer will give you the greatest sensitivity control in adjusting<br />

the desired frequency. To adjust this circuit, place the test infrared beacon<br />

in front of the receiver module and measure the voltage from pin number 8. Adjust<br />

11.5<br />

11.6<br />

11.7

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!