Pages: [1]   Go Down
Author Topic: Distance Sensor(plz help)  (Read 934 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 39
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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
Logged

Global Moderator
UK
Offline Offline
Brattain Member
*****
Karma: 291
Posts: 25898
I don't think you connected the grounds, Dave.
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged

"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.

Offline Offline
Newbie
*
Karma: 0
Posts: 39
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged

Global Moderator
UK
Offline Offline
Brattain Member
*****
Karma: 291
Posts: 25898
I don't think you connected the grounds, Dave.
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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

"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.

Offline Offline
Newbie
*
Karma: 0
Posts: 39
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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?
Logged

Global Moderator
UK
Offline Offline
Brattain Member
*****
Karma: 291
Posts: 25898
I don't think you connected the grounds, Dave.
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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)
« Last Edit: July 20, 2011, 03:11:52 pm by AWOL » Logged

"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.

Offline Offline
Jr. Member
**
Karma: 0
Posts: 72
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

well, with the appropriate Sharp IR sensor you can indeed realize a distance mapper. Have a look at this link here:

http://luckylarry.co.uk/arduino-projects/arduino-processing-make-a-radar-screen-part-3-visualising-the-data-from-sharp-infrared-range-finder/

You might also find this thread here http://arduino.cc/forum/index.php/topic,63433.msg461345.html#msg461345 useful.
Logged

Dubuque, Iowa, USA
Offline Offline
Edison Member
*
Karma: 45
Posts: 2474
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 39
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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)
Logged

Dallas, Texas
Offline Offline
God Member
*****
Karma: 0
Posts: 861
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 39
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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 !!
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 39
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Thank you very much, I think I have to order a new one. smiley-cry smiley-cry smiley-cry smiley-cry smiley-cry
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.
Logged

Pages: [1]   Go Up
Jump to: