![]() | ![]() | ![]() |
| | |||||||
| Robotics Chat Specific to discussions about robots and the making of. |
| | Thread Tools | Display Modes |
| | (permalink) |
| Moderator | This afternoon I have been thinking about a wall following sensor to help a robot navigate a maze. They are popular in the robot vacuum cleaners but not so much elsewhere. For the purpose of discussion the robot wil run in a maze with paths up to 10 inches wide. I want to point a narrow beam IR LED at the wall next to the robot. If the robot is parallel to the wall the beam will come back as a uniform cone. Reflected cone size will indicate the distance from the wall. When the robot is crooked the beam will be distorted. This will be detected by a line of photo-transistors ahead of and behind the emitter. I can get about 9 photo-transistors to an inch and more if I stagger them. It is my hope that about 10 on each side of the emitter will be enough. The problem that is bugging me is that I need the uC to control the voltage going to the IR LED in addition to modulating it at 40KHz. Let the computer pick the intensity that works best. The first thing that comes to mind is to PWM the high part of the 40KHz, use a capacitor to smooth out the voltage. Can this work or is it too choppy. A digital pot could be used if one could be found that handled the current (should not be a problem) and the correct resistance range. The smallest resistance pots from microchip are about 0 to 5K. Maybe use a digital pot with an opamp. If it was setup right once could have all the pots steps in a useful range. Suggestions?
__________________ search engine for electronic partsJunebug USB PIC programmer kit. USB Bit Wacker |
| | |
| | (permalink) |
| Experienced Member | Wouldn't it be easier to use a Sharp IR distance sensor? |
| | |
| | (permalink) | |
| Moderator | Quote:
__________________ search engine for electronic partsJunebug USB PIC programmer kit. USB Bit Wacker | |
| | |
| | (permalink) |
| Experienced Member | What about using two of them and comparing the distances returned? That should give both the distance and the angle, assuming the resolution is good enough. I don't know how that compares in terms of final part count and cost, though. Torben |
| | |
| | (permalink) |
| Experienced Member | If you PWM the high side of the 40 KHz, the peak output won't change. This might make PWM less effective than it would initialy seem. I would use a digital pot or just resistor ladder as the control element in a single-transistor current source. When the bot is crooked, you might not get what you expect. The cones of the detectors will point in the same direction as the emitter. Draw some pictures and you'll see what I mean. |
| | |
| | (permalink) |
| Experienced Member | Unless you're using 40 KHz filtered sensors, why are you modulating the LED at 40 KHz? If it's just to save power, remember you only need to light up the LED when you want to take a reading. |
| | |
| | (permalink) | |
| Moderator | Quote:
Maybe the first post was too long and is not getting read. There is a line of photo transistors about 3 inches long with a single IR LED in the center. When the IR beam strikes the wall it bounces back and hits the photo transistors. If the robot is not crooked the same number of detectors on each side of the LED will be illuminated. If the robot is crooked the line of photo transistors nearest the wall will have fewer illuminated. More on the end further from the wall. Even the short version is long.
__________________ search engine for electronic partsJunebug USB PIC programmer kit. USB Bit Wacker | |
| | |
| | (permalink) |
| Experienced Member | 40 KHz alone won't reject stray light. You'll need to do something active to subtract out the ambient. At 40 KHz this will be difficult without active filters (like in the typical 3-wire IR sensor package.) If you measure ambient of all your photo detectors and then measure again with the LED on, the comparison will tell you who is illuminated. I'm expecting that when the bot is crooked the lower intensity on the end further from the wall might reduce the number of photo detectors that detect above their threshold. I'm thinking that a single detector with ambient measurement and multiple LEDs would be easier to perfect. |
| | |
| | (permalink) |
| Experienced Member | Have you considered the cones of the receivers as suggested by mneary, if you think of the receiving diodes as emitters then the overlap of the cones produced will stay the same no matter what angle the wall is. Mike. |
| | |
| | (permalink) | |
| Moderator | Quote:
I did find a non-analog sensor that goes active at 5 cm. Digikey has them GP2Y0D805Z0F for $3.25 each. One could use them as electronic wiskers with one on each side of the robot. If one did a slight S path so that the sensor toggled frequently it could work. It may be hard to aquire the wall to start with.
__________________ search engine for electronic partsJunebug USB PIC programmer kit. USB Bit Wacker | |
| | |
| | (permalink) | ||
| Moderator | Quote:
Quote:
I am thinking of this like a very low resolution digital camera. Each photo-transistor can only sense light that strikes it, It can see everything it its cone/field. The graphic shows what I mean. The light from the LED hits the edge of the right (green) photo-transistors cone but does not hit the transistor itself.
__________________ search engine for electronic partsJunebug USB PIC programmer kit. USB Bit Wacker | ||
| | |
| | (permalink) |
| Experienced Member | 3v0, interesting idea, but, big issue is fighting the ambient light. if you use modulated signal and IR receiver then you will solve the ambient light problem (mostly) but then you cannot measure the intensity of light on each receiver (as all those I saw have digital output). with receivers stacked close to each other, I do not see how you will achieve resolution you need. I still think that sonar approach would be better. The ultrasound transducers are not expensive, the sound is quite slow so you can have pretty good resolution even with 4MHz uC. If you mount send/receive capsules on a motor and swing them around (180 degrees should suffice) you can get pretty good idea on what is the exact position of the wall related to the bot. I'm working on the exactly the same idea at the moment and have it all "work" in theory, but had no time to drive to the shop and get the us capsules so I can actually try the idea out.
__________________ http://www.it4um.com |
| | |
| | (permalink) |
| Experienced Member | one addition to the previous post. I tried out the 6 receivers 2 transmitter circuit. Basic theory is Code: while(1){
both led's off
catch "sense" from all 6 receivers
led1 on, led2 off
catch "sense" from all 6 receivers
led1 on, led2 on
catch "sense" from all 6 receivers
led1 off, led2 on
catch "sense" from all 6 receivers
compare state of all 6 receivers in all 4 stages (00/01/10/11)
output decision
}
__________________ http://www.it4um.com |
| | |
| | (permalink) | |
| Moderator | arhi, Why do you prefer US or IR? I have never used the US. I have not settled on a single approach. I need to teach students how to do this next year and intend to present several methods that work. When class starts I will need several of robots equipped with maze capable sensors so keeping the cost down is an issue. My original idea was to use little SMD PTs (photo-transistors) to form a strip of sensors. They are only about 1/10th inch wide so they can be packed together. The PT's could be mounted in the bottom of a flat black U with the open side facing the wall to reject much of the stray light. I like the idea that this sensor provides an angle but it is starting to look too complex for what it does. Just the same it is interesting. Some of the dsPIC33's have 24 and 32 analog inputs. That and the massive processing power could be fun. --------------Slightly different IR sensor project. ----------------------- I built a PCB with a single IR receiver and 6 IR LEDs. It was not intended for wall following. The idea is to use overlapping IR LEDs to detect objects in an arc ahead of the robot. Each LED overlaps it neighbor by 1/3 so that you end up with about an 120 degree arc with 11 detectable zones. The beam width and placement of the LEDs need tuning but the diagram shows the idea. The arc needs to correspond to the Sharp sensors sensitivity area. I need to do the variable resistor bit you were playing with but have not yet made any provisions for it on the board. I figured I would get the basic detection working first and then experiment to see if I could get the variable power to the IR LED working for range detection. This sensor was not intended for use in a maze but it might work if the power level range detection thing works close in. Quote:
EDIT: Lost attachment. I am not a big fan of the pivoting motor mounted sensor.
__________________ search engine for electronic partsJunebug USB PIC programmer kit. USB Bit Wacker Last edited by 3v0; 15th May 2008 at 10:35 AM. | |
| | |
| | (permalink) | |||
| Experienced Member | Quote:
With sound, it is much easier, at typical speed of ~300m/s the same calculation show that one instruction is 3cm. Now, yes, you should think about round trip, not one way trip, so sound will actually bounce from object 1.5cm away during one instruction, and that is something you can work with, if you look at the light, it is still 15Km distance for one instruction ... huge resolution difference All this in consideration, you have to use different approach for sound and light, for sound, you can actually measure time between your "ping" and the echoed pong and get usefull results. If you integrate some more complex calculation using the temperature sensor to change the speed of sound to "correct value" you can get it really precise, and sound bounces from "most" objects the same way. When light is involved, you have to measure intensity and not "round trip time" as light is too fast. The problem here is that you cannot get any precision as light will bounce differently from different objects, the experiment I made showed that difference between white wall, polished black wood and black cotton is too huge to get any value out of that detector. Now, you can use "audible sound" instead of "ultra sound" for the same purpose, but, using 40KHz modulated sound gives few benefits: - you do not hear the beeps - the receiving transducer is already calibrated to some freq (the ones I use are 40KHz) and it ignores "most" of other sounds so you do not have to worry about background noise. Quote:
- ambient noise - reflective index of surrounding objects It might work with maze, as you can "predefine" the material maze will be made of, but for some "general" use, you cannot count on any resolution with light. Pay attention that placing IR led in alu tube (1-2cm in length) will increase the "focus" of the beam from the led. Quote:
The tests with variable resistor, I was able to get resolution of ~3cm using white paper as "wall" with 500R static + 100K variable resistor in series with the IR LED. IR LED was enclosed in aluminum tube 4cm in length
__________________ http://www.it4um.com | |||
| | |
| Bookmarks |
| Thread Tools | |
| Display Modes | |
| |
| | ||||
| Thread | Thread Starter | Forum | Replies | Latest |
| Adjusting voltage output by a fixed amount - Part 1 | meek13 | General Electronics Chat | 18 | 2nd March 2008 01:01 AM |
| need help... | imisendo_4036 | Micro Controllers | 0 | 20th February 2008 01:14 AM |
| Voltage | ElectroMaster | Electronic Theory | 44 | 8th August 2007 05:35 PM |
| I am not getting ripple voltage at the output | dar2525 | General Electronics Chat | 3 | 14th July 2005 02:20 PM |
| Why does wall transformers output more voltage than printed? | Lac | General Electronics Chat | 4 | 23rd June 2004 12:53 AM |