tuning IR distance
I am working with my boebot and I was following the directions in the manual for finding the estimated ranges of different frequencies, but I can't seem to find much of a pattern. Well in reality there seems to be 2 patterns a near and a far, but at around 8 inches they all see the white piece of paper. I am not sure where to go from here. is IR only good from 8 to 20 inches or am I doing something wrong?
--- Jeremy
--- Jeremy
Comments
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
- Stephen
The IR distance measurements introduced in Robotics with the Boe-Bot are good enough for following an object without bumping into it and also for following a wide swath of electrical tape viewed from a distance. Your measurement range of 8 to 20 inches is pretty good for IR. In some cases, the distance measurement window is pretty narrow, only detecting variations between 8 and 10 inches, for example.
As Stephen pointed out, the Ping))) sensor can take much more precise measurements. Every sensor has its caveats though. Even the Ping))) sensor tends to miss flat surfaces that are turned away beyond a certain angle. It also has trouble with stuffed animals, and other things that tend to muffle sound instead of reflect it.
The IR distance applications were added to the book because they used parts that are inexpensive and already in the kit for object detection and avoidance. So even though the IR distance measurements are pretty crude, they make it possible to do some interesting things that we might not otherwise have been able to include while keeping the price of the Boe-Bot robot kit low. It's also kind of cool to be able to get any sense of distance at all out of the LED in an IR TV remote and the receiver that's typically used to demodulate the signals from the remote.
Andy
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Andy Lindsay
Education Department
Parallax, Inc.
Ok no problem. The issue I am/was having is that the some of the frequencies would work great for short distances 1-6 inches. Then magically at 8 inches they'd see everything fine till 12 inches.
I did some testing last night and I foud a frequency that seems to work well for 6 inches or less and one that seems to work well for 12 inches or less. I am going to mess with that a bit.
When I did the first IR roaming program, then one where you basically swap out the whiskers for the IR sensors, the boe bot wouldn't get too far in my little apartment since it was detecting things 18-24 inches away.
Anyway I my question arose from the fact that the text made me think I should be able to find 5-6 distinct "zones" and I thought I was doing something wrong.
The Ping))) is next on the list of things to buy and mess with. I have yet to really write any programs of my own so I will probably mess with that for a bit. See if I can't work with what I got and make my bot "smarter". I also have my eye on building a Sumo Bot too.
Thanks for the help guys!
-- Jeremy
As long as you're just playing around, you might try different size, color, and material targets. Light colors reflect better, dark colors are almost invisible; fabric tends to absorb light... The measurements you describe will vary significantly with different target materials and shapes. Also, try changing the value of the resistor limiting the LED output (try 100 ohms fixed in series with a 1K pot) as sometimes too much (or too little) IR is the culprit. I think you are on the right track: pick a sensor and explore carefully what it does well, not so well, and not at all. Then, choose another sensor and experiment with it until you have an understanding of its strengths and weaknesses as well. I guarantee PING, like IR, is not perfect, and a good understanding of both is essential to the best results.
. In rereading you post I'd add another comment. When using the BOE-bot manual zone IR code, the idea is to check for detection first farthest away, then nearer and nearer. If one frequency (A) detects out to 24" and the next lower frequency (B) detects out to 18", then if the object is detected by A but not B, it must be more than 18" away and less than 24" away. BOTH A and B will detect the object at less than 18".
A..................|
B..........| Y
C...| X
From the diagram above:
Zone Y is defined as A NOT B
Zone X is defined as A AND B NOT C
In other words, it's the first frequency that doesn't detect that defines the zone--NOT the ones that do detect!
Maybe you knew this... just trying to be helpful, clear, and complete.
Better Boe-Bot IR Distance Measurements (Circuit + Programs)
This is one of several posts on this page that you may find useful in Stamps in Class "Mini Projects".
The symptoms you described make me wonder about the resistors in series with the IR LEDs. 220 ohm resistors make the Boe-Bot too far sighted, and when the reflection of the object drops off, you may be seeing the reflection of the floor. I recommend 1 or 2 k resistors in series with the IR LEDs. Also, are you using the BASIC Stamp 2?
The size of the resistor in series with the IR LED should reduce or extend the effective range. You may find that it's a more reliable way to detune your detectors than a frequency that's off from the receiver’s center frequency.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Andy Lindsay
Education Department
Parallax, Inc.
The 2k resistor helped make the bot more "near sighted" thanks! I plan to mess with it more tonight.
-- Jeremy