View Full Version : Help with motion detector
chantilly_team
11-04-2005, 19:39
We want to use motion detector to sense a particular distance. We have measure the distance between the ground and robot every second, and if that distance is less than a pre-fixed value, we have to trigger an operation.
So how do we go around with motion detectors? Are there any specific available for FRC robot-controller? How can we convert the data we receive from motion detector into distance.
Thanks,
Team 612.
devicenull
12-04-2005, 15:18
We use an IR distance sensor on our robot, which I think is what you want... I'm not sure how well its going to work for you, depending on the color of the carpet, etc.
This, I think is the exact one we use http://www.acroname.com/robotics/parts/R146-GP2D120.html
That should be pretty simple to wire up.. programming it is even simpler, its an analog sensor, get Get_Analog_Value() it :)
Using a distance sensor might be overkill for what you want though.. are you sure theres no way you can do it with some type of switch?
Kevin Sevcik
12-04-2005, 20:33
Depending on the distance you have to measure and the clearances involved, you could do this mechanically using a rod with a ball on the end, a spring, and a linear potentiometer. Less likely to be finicky about carpet color, more likely to dislike bumps and ledges underneath your robot.
chantilly_team
05-05-2005, 19:19
Would using a motion detector really kill the OI of the FRC (the one provided by innovationFirst) ?
We need some kind of sensor to measure the distance.
Would the ultrasonic transducers work there?
Thanks,
Team 612.
Alan Anderson
06-05-2005, 11:55
Would using a motion detector really kill the OI of the FRC (the one provided by innovationFirst) ?
We need some kind of sensor to measure the distance.
Brian's use of the term "overkill" (http://www.m-w.com/cgi-bin/dictionary?book=Dictionary&va=overkill) is a military reference. It means using much more firepower and causing much more damage than is necessary to accomplish an objective, and usually implies nuclear bombs.
If your requirement is to trigger an action when the distance to the ground is less than a specified threshhold, you don't really need to measure the distance. You can use a simple switch mounted so that it activates when a physical "feeler" makes contact with the ground.
chantilly_team
06-05-2005, 13:43
I realised that a lot you guys are advicing us to use a physical / mechanical sensor, but in the project, we need to have an electronic sensor of some kind, to measure distance. If that distance is more than or less a specific value (say 4 feet), then it should trigger something.
So we wanted to place an electronic sensor there. But we are not sure. Ultrasonic transducers (transmitter+receiver pair) is a good option. But we dont know if they work well, or what kind of output do they give(digital/analog).
Thanks,
Team 612.
Alan Anderson
06-05-2005, 15:33
I realised that a lot you guys are advicing us to use a physical / mechanical sensor, but in the project, we need to have an electronic sensor of some kind, to measure distance. If that distance is more than or less a specific value (say 4 feet), then it should trigger something.
Your robot is going to be more than 4 feet from the ground? I'm curious to know what exactly you're trying to build here.
With a threshhold distance on the order of a meter, an ultrasonic rangefinder sounds fine for your application. You can find simple ones that give a digital output pulse proportional in length to the distance, requiring the controller to both initiate and measure that pulse (typically using interrupts), and you can find fancier and more expensive ones that constantly provide a nice analog voltage representing the distance. Search the web for "ultrasonic rangefinder" and you'll find lots to choose from.
chantilly_team
06-05-2005, 23:38
Basically we are trying to make a Community project for someone in our city. (Chantilly). We are building a "robotics walker" for a handicapped baby. One of the safety features is that the walker doesnot bump into walls, or doesnot fall off the stairs. We were thinking of solving this problem by using some distance/range finders, and constantly checking the distance between the robo-walker and the wall, and the distance between walker and the ground. So if the distance between walker and wall is less than say 4 feet, the walker should do some safety feature.
Thats the reason we needed range finders. Also I checked some ultrasonic rangefinders (http://www.hobbyengineering.com/SectionS.html) and I saw that this specific one works on 40 KHz frequency. So if we want two of them, mounted and working together, that might produce an interference. How would we avoid this. We also dont know if this specific one gives output in analog or digital values.
Thanks,
Tem 612.
BradAMiller
07-05-2005, 08:46
The easiest way to measure the short distances that you're looking for is to use an infrared rangefinder. The device mentioned above (GP2D120) is a good choice. it gives you the value directly. With an ultrasonic rangefinder you need to do timing of the return (echo) pulse to measure distance. So now you need timers and interrupts.
With the GP2D120 you get the distance back directly with only an A/D conversion so it's really simple.
One thing that you need to be aware of is that the value that the value that is returned is inversely proportional to distance - the closer the distance the higher the value. But you are probably only looking for fixed distances so that should not be a problem - you an simply look to see if you're less than the range where you want to turn (that is the value is greater than some reference you choose).
The other quirky thing about these components is that if you are less than the minimum sensing range (which in this case is 3cm) then the values start decreasing, remember decreasing values normally means longer distances.
You can get around that problem by mounting the sensor in such a way that it never sees things less than 3cm - for instance mounting it 4cm above the floor as it's looking for stairs.
If you look at the datasheet: http://www.acroname.com/robotics/parts/GP2D120_SS.pdf
you can see a graph of distance vs voltage returned.
Hope this helps.
Brad
chantilly_team
07-05-2005, 11:22
Thanks Brad,
We were at first thinking of using ultrasonic range finders, but they have the problem of interefering of sounds, which cannot be avoided, unless we change the piezo-electric crystal in them. But that becomes too complicated.
Thats why we are shifting towards Infrared rangefinders. We were looking for those, and came across one IR rangefinder. Its name is GP2Y0A02YK . This one is similar to the one mentioned above (GP2D120), except that it has more range. (20 cm to 150 cm) Around 8" to 59". Its data sheet is provided at http://info.hobbyengineering.com/specs/SHARP-GP2Y0A02YK.pdf .
This gives output in the same way - analog output inversely proportional to distance. THe output can be feeded directly to innovationFirst miroprocessor.
If we put two of these sensors, would they interfere with each other ?
Thanks,
Team 612.
BradAMiller
08-05-2005, 05:26
That's a good point - Sharp actually makes a whole set of rangefinders that vary in min/max distance that they detect and fixed distance detection (trips when hit the fixed distance) vs. analog range output.
A good comparison guide for anyone else looking for the right device is here:
http://www.acroname.com/robotics/parts/sharp_guide.pdf
chantilly_team
09-05-2005, 22:27
Yeah, got all the information through the Sparp website. Thanks for that. I was very helpful.
I was also wondering, can we use the QS18VN6D IR sensors for this purpose. These sensors are the digital inputs that sense white and black colors. Is there any way we can use this somehow to measure distance?
Or is there any other use for these sensors except distinquishing from black and white color.
Team 612.
Jimbo5051
31-01-2006, 20:33
We want to use motion detector to sense a particular distance. We have measure the distance between the ground and robot every second, and if that distance is less than a pre-fixed value, we have to trigger an operation.
So how do we go around with motion detectors? Are there any specific available for FRC robot-controller? How can we convert the data we receive from motion detector into distance.
Thanks,
Team 612.
I am not all that particularly sure but I do think you would have a moniter sort of like a heart machine. If it were like that you woud be able to watch it manually and detect change that way.
Jared Russell
31-01-2006, 22:10
I've had success with that line of IR sensors in the past.
vBulletin® v3.6.4, Copyright ©2000-2017, Jelsoft Enterprises Ltd.