PDA

View Full Version : How to use IR sensors to map rooms?



nofearsot
05-21-2005, 02:39 PM
How to use IR sensors to map rooms? http://forums.parallax.com/images/smilies/sad.gif

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
www.geocities.com/cdrombot

Loopy Byteloose
05-21-2005, 03:09 PM
IR sensors don't seem to see black. Ultrasound sensors get a bit confused by reflections. Radar is a bit of overkill. Video requires a lot of processing.

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

nofearsot
05-21-2005, 05:49 PM
IR DET: PNA4602 - 38 Khz IR Detector
IR led: QED233

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
www.geocities.com/cdrombot

Loopy Byteloose
05-22-2005, 02:42 PM
I guess you want to get the above components operable.
[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

nofearsot
05-22-2005, 08:18 PM
Hello. I have a problem with my ir leds. They are continuously burned. Ι use this IR leds: QED233. Do anyone know how how to build a scanning head?

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
www.geocities.com/cdrombot

Jonathan
05-22-2005, 08:50 PM
Hi,

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 (http://www.madlabs.info) - Home of the Hydrogen Fuel Cell Robot

nofearsot
05-22-2005, 08:58 PM
thank you jonathan. Where I must connect the resistors and if i program the robot freqout 1,1,38500 is the same with this freqout 1,1,48500

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
www.geocities.com/cdrombot

Jonathan
05-22-2005, 09:30 PM
The resistors need to be in series with either lead of the LED. Are you running directly from a Stamp pin? If so, I would use a transistor so you can drive the LED harder. In any case, do not drive it directly from a Stamp pin without the resistor, you can damage the Stamp pin.

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 (http://www.madlabs.info) - Home of the Hydrogen Fuel Cell Robot

nofearsot
05-22-2005, 11:08 PM
Can I build a scanning head with dc motors?

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
www.geocities.com/cdrombot

Jonathan
05-23-2005, 02:33 AM
Yes, you can use DC motors but...

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 (http://www.madlabs.info) - Home of the Hydrogen Fuel Cell Robot