Ok now I'm not going to start from ground zero and work up. This is a basic discussion of IR and how it is frequently used in robotics. IR is infrared light or light that is outside the visible light spectrum, in other words the naked eye cannot see it. IR light does not obey all the same properties as visible light. IR can pass through certain types/colors of plastic and some other materials, it is VERY easily reflected off most objects, and it is very prevalent in today's electronics. For instance, the remote for your TV/VCR probably uses IR control. The remote flashes an Infrared Light Emitting Diode at a certain rate a certain number of times and an Infrared receiver detects this and takes appropriate actions based on the transmission. Most IR applications, including TV remotes, operate at 40 KHz. That is to say, the IR LED is turned on and off 40,000 times per second. This is the frequency that the device operates at. Now if we turn this 40 KHz signal off and on we have essentially made a digital device. Much like a computer we are sending either a 1 or a 0 (1=high/on 0=low/off). Now we can transmit data by modulating (turning on and off) that 40 KHz signal.
Why use 40 KHz? Why not just on and off? Ambient light contains some IR and the sun outputs a lot of IR so we need a way to 'code' our signal to make sure it doesn't get lost in all the other IR light bouncing around out there. For the same reason we have different radio channels, it would be pretty hard to understand even one channel if we had to listen to them all at once. The only reason I have ever found as to why we use 40 KHz is because the first Ultrasonic TV remotes used that same frequency, IR just adopted it to keep things consistent I guess.
So what is the simplest task we could accomplish with IR on our robot? We can use this information to create object detection and avoidance for out bots. The great thing about IR is the bot can detect an object without touching it. We create a 40 KHz circuit using a 555 timer circuit and connect it's output to an infrared LED. On the receiver side we go and buy an IR receiver module for about $3 from Radio Shack or similar store. The receiver module automatically filters the 40 KHz and leaves us with either high output (5v) or low (Gnd). To make sure the receiver doesn't 'float' we tie a 10k ohm resistor from Gnd to the output of the receiver, this is just to make the signal clear. Now we hook up the output into our Basic Stamp or PIC or whatever is controlling our robot and we now have object detection ( object ahead=reflection=high output from receiver). Point the LED to face the ground and we now have drop off detection ( drop off=no reflection=low output from receiver).
What happens if we take two of these circuits, one for object detection and one for drop off detection and put them on one bot?? Won't the transmitted signals bounce around and fool both receiver modules?? Yes, here's how you get around it. Instead of just turning our 40 KHz 555 timers on and leaving them on, turn on one and then monitor the value of the corresponding receiver then turn it off. Do this for each TX/RX pair you have, the microcontroller should be fast enough to get at least 5 or more samples per second. Not too shabby.
A basic IR object detection circuit can be built for under $7 and from only 8 parts - 555 timer, 3 resistors, 1 capacitor, 1 IR LED, and 1 IR receiver module. The 555 uses 2 resistors and the capacitor to make the 40 KHz signal and then outputs to the IR LED ( I use a resistor in line with the IR LED to limit current draw, the resistor size will vary with IR LED, use ohms law to determine max current draw). The receiver then has it's output tied to ground with the last resistor and Viola, your finished. You can also use a 74HCT14 to produce the 40 KHz, it uses less parts and it is more stable too. These circuits will appear on the schematics page soon.
Now own to IR remote controls. Your garden variety IR remote for TV, VCR, Cable box, etc. uses the same 40 KHz modulation we have talked about already. Here is how the actual signal breaks down (for Sony type remotes).
There are really only three different ways that manufacturers choose to code these signals. This coding is usually based on varying the length of pulses, varying the length of spaces between pulses or altering the order between spaces or pulses.
This coding holds information such as the address to the machine that is using the remote and the command that the machine must follow. The address is very important because without it the signal would be processed by another IR receiver in the area.
When a button on a remote is pushed it sends a string of signals. The first piece of information in the string is called the Header. The Header usually contains a burst of highs that alerts all the IR receivers in the area to the string of data being sent. Following the burst of highs is the address to the specific machine to receive the next piece of data, the command. As long as the button is held down (depressed) the command will continue to repeat over and over. When the button is released a string of code called the stop is transmitted. As you may have guessed it the stop tells the machine to stop its executing the command.
Performance The Sony remote control is based on the Pulse-Coded signal coding scheme. It is a 12-bit signal sent on a 40 kHz IR wave. The signal is started by a header which is a pulse for 4T and then spacing for T where T is 550 us. Following the header is the address and the command which consists of logical zeros and logical ones. Logical ones are represented by a 2T pulse followed by a T space. Logical zeros are represented by a T pulse followed by a T space. The space between transmissions is 25 ms. As long as the but
0 comments:
Post a Comment
Send me comment for make strong to this blog....