Go Down

Topic: Distance Sensor(plz help) (Read 1 time) previous topic - next topic

Hi everyone,

I'm going to do a project that can draw a map according to the distance measured by a distance sensor. The distance sensor will be connect to an arduino and controlled by the computer through the xbees.
This is the distance sensor I found : http://ie.farnell.com/sharp/gp20d02yk0f/sensor-distance-digital-o-p/dp/9707905

My question is: it seems there are two types of distance sensor, the digital and the analog . Which may be more suitable for my project?
Also how can I connect the distance sensor to my arduino?(Physically)

I have to order it today, so please help~~

Thank you very much

AWOL

My understanding is that the digital versions have a fixed sensing distance - the object is either in-range or it isn't.
Unless the platform is moving, and has an accurate position reference, this doesn't seem too useful for mapping purposes.
"Pete, it's a fool looks for logic in the chambers of the human heart." Ulysses Everett McGill.
Do not send technical questions via personal messaging - they will be ignored.


My understanding is that the digital versions have a fixed sensing distance - the object is either in-range or it isn't.
Unless the platform is moving, and has an accurate position reference, this doesn't seem too useful for mapping purposes.


Thanks, but I am still confused, will a analog sensor be better? the distance sensor will be embedded on a mobile robot, the robot  and the sensor can both move.

AWOL

Only you can answer the question "which would be more suitable", based on the requirements you have, which you didn't share.
"Pete, it's a fool looks for logic in the chambers of the human heart." Ulysses Everett McGill.
Do not send technical questions via personal messaging - they will be ignored.


Only you can answer the question "which would be more suitable", based on the requirements you have, which you didn't share.


It's my first time to do this so I'm not clear about it, I have to record the distance and draw a map according to the distance, yep, maybe digital is better as it can record the numbers, right?

AWOL

#5
Jul 20, 2011, 06:38 pm Last Edit: Jul 20, 2011, 10:11 pm by AWOL Reason: 1
Quote
maybe digital is better as it can record the numbers, right?

Maybe it isn't better.
Imagine being ordered to measure a room with a stick you have been told is 800mm long (though it may be as short as 700mm or as long as 900mm).
You can only measure things as being "more than a stick" or "less-than-or-equal-to a stick".

Do you think you'll be able to achieve that with your robot? (which you still haven't told us any more about)
"Pete, it's a fool looks for logic in the chambers of the human heart." Ulysses Everett McGill.
Do not send technical questions via personal messaging - they will be ignored.


Chagrin


My understanding is that the digital versions have a fixed sensing distance - the object is either in-range or it isn't.


The datasheet is horrid, but this sensor appears to output a pulsed signal of varying time based on the distance. 

Needless to say an analog sensor would be easier to interface with; your code would just need an analogRead() and a bit of extra code to map the distances to the returned voltages.

Sorry I didn't check the forum these days, I know a analog one will be better now, and nearly every example online is about analog.
But unfortunately, I have ordered the digital one and it has come to me.(My tutor ordered it for me and the day I post this topic is the day I have to decide which to buy) I am a newbie and this is the first time to do the hardware things, I feel sad to get the wrong one but seems have no time to change, do you know how to get the distance number of this digital sensor? http://ie.farnell.com/sharp/gp20d02yk0f/sensor-distance-digital-o-p/dp/9707905


Quote
maybe digital is better as it can record the numbers, right?

Maybe it isn't better.
Imagine being ordered to measure a room with a stick you have been told is 800mm long (though it may be as short as 700mm or as long as 900mm).
You can only measure things as being "more than a stick" or "less-than-or-equal-to a stick".

Do you think you'll be able to achieve that with your robot? (which you still haven't told us any more about)

EmilyJane

I think you're in trouble. From what I can tell from the data sheet, that sensor is designed to tell when something comes within 800mm. It has a digital output, either one or zero depending on whether or not an object is within its detection range. From your previous comments I don't think that is what you want at all. I don't see any option but to order a different sensor.

Thank you everyone for the links and helps, does someone know if a digital distance sensor can measure the distance between the sensor and the obstacle?
If not, I must to order a new one quickly, I'm quite anxious about this as time is limited, please help me !!

Thank you very much, I think I have to order a new one. =( =( =( =( =(

I think you're in trouble. From what I can tell from the data sheet, that sensor is designed to tell when something comes within 800mm. It has a digital output, either one or zero depending on whether or not an object is within its detection range. From your previous comments I don't think that is what you want at all. I don't see any option but to order a different sensor.

Go Up