How to use IR sensors to map rooms?
nofearsot
Posts: 25
How to use IR sensors to map rooms?
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
www.geocities.com/cdrombot
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
www.geocities.com/cdrombot
Comments
I would love to map rooms, but it seems that you really have a more complicated set of tasks.
First I would use IR to establish that the robot is not going to walk off a table or a curb.
Second I would use IR, ultrasound, and bumpers to avoid immediate collisions.
Now the robot can wander and gather data.
Herein lies the challenge. You have to determine what sensors and how much data are useful. Your map may be entirely different from anyone elses.
In fact, you may be the next Thomas Edison or Bill Gates if you get the whole thing right. Good luck.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
G. Herzog in Taiwan
IR led: QED233
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
www.geocities.com/cdrombot
[noparse][[/noparse]Try not to be so cryptic, please.]
Try reading the specification sheets for the product to get your wiring right. Then, take a look at the appropriate Nuts and Volts reprints in the Parallax documents. That should give you an idea about the programing and interface to a BasicStamp.
Nevertheless, after you get all this working you will find that some colors are seen and others are not.
Also, as long as the color remains constant, there are some options to identfy distance by varing frequency {the Toddler robot manual has a chapter on it}.
You can easily build a good line follower, but as discussed above mapping is a more complex task.
Eventually, you have to consider multiple perimeters to serve different purposes and multiple levels with different types of sensors.
Parallax used to sell a color sensor, that may be useful too. I am not sure if it is still available.
The new Ping sensor is a narrow beam ultrasound that may be more appropriate for mapping. The older wider beam are more suitable for sensing room security.
Still each has short comings that requires it to interact with other sensors to confirm barriers. Without confirmation, you see bounces from ultrasound as objects and you don't see dark objects in front of IR.
Obvously, bumpers remain the most successful confirmation of an object and having the robot go and touch it is useful for maping. This is similar to you hearing, but not seeing or vise-versa. Animals and People really integrate quite a bit of sensory information inorder to function safely and have several tests for validity. Once safety is overcome, then there is time to map for the sake of other needs or convience.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
G. Herzog in Taiwan
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
www.geocities.com/cdrombot
Do you have resistors in series with your LEDs, say about 220 ohms? Especially if you are running them directly from a Stamp pin. If you are switching them on with a transistor, you can get away with a much lower resistor, say 10 ohms, as long as you keep the duty cycle low. This is what TV remote controls do.
As to a sensor head, I guess you mean a pan/tilt type array. You can see one I made at:
http://madlabs.info/h2fcrp/h2fcrp_sensors.shtml
HTH,
Jonathan
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
www.madlabs.info - Home of the Hydrogen Fuel Cell Robot
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
www.geocities.com/cdrombot
The Stamp can't really produce a clean 38kHz. They way it works is that you can generate enough harmonics at 38kHz to make a sensor work. There will be a differnece between the two freqout commands, but if you are looking for 48.5kHz, it may or may not produce enough harmonics. I know the 38kHz works, as that is what the Parallax Sumobot uses.
Jonathan
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
www.madlabs.info - Home of the Hydrogen Fuel Cell Robot
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
www.geocities.com/cdrombot
The nice thing about servos or stepper motors is that it is easy to set them to a certain location. You can easily and accurately place the sensor in the same spot and know where the sensor is pointed. With DC motors, you are going to have to come up with ways to know where the sensor is pointed. One way to do so would be with a rotary encoder. However, I would suggest you start with servos, they are cheap and easy to use. With DC motors you will also need an H-bridge to run them, wheras you can run a servo with no additional hardware.
Jonathan
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
www.madlabs.info - Home of the Hydrogen Fuel Cell Robot