Shop OBEX P1 Docs P2 Docs Learn Events
Sharp GP2D02 to Basic Stamp II — Parallax Forums

Sharp GP2D02 to Basic Stamp II

ltmhallltmhall Posts: 102
edited 2007-01-07 01:31 in BASIC Stamp
I'm building a mobile robot and want to design a collision avoidance circuit. I've been researching the Sharp GP2D02 and I think it's a good idea to go this route. Does anyone think this is a good idea. Has anyone had any sucess interfacing one to a Basic Stamp II. Any input would be helpful.

Note:I've already been to www.acroname.com/robotics/.html

Thats where I got the idea from.

Post Edited (ltmhall) : 1/5/2007 12:56:45 AM GMT

Comments

  • FranklinFranklin Posts: 4,747
    edited 2007-01-05 04:02
    www.acroname.com/robotics/info/examples/GP2D02-4/GP2D02-4.html but they no longer carry this so it might be on it's way out and have been replaced by newer devices. Unledd you already have one I'd do some research first.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    - Stephen
  • Special_KSpecial_K Posts: 162
    edited 2007-01-05 04:24
    I have done a lot of work with them. i can tell you they are a little slow in returning their distance values.(takes around 74 microseconds for the sensor to cycle once.. got that fact from user Larry) but no A to D needed. but the numbers they give can be strange did some work converting them to Centimeters..
    see
    http://forums.parallax.com/showthread.php?p=601475
    this is the code that Acroname gives
    www.acroname.com/robotics/info/examples/GP2D02-4/GP2D02-4.bs2
    and see this code I used.
    http://forums.parallax.com/showthread.php?p=575175
    let me know if t his helps.
    I have tweaked my GP2D02 to centimeter code I can send it to you if you like.
  • Bruce BatesBruce Bates Posts: 3,045
    edited 2007-01-05 09:16
    ltmhall·-

    Which Sharp sensor is best, really depends on your specific needs. Here is a (somewhat dated) list (attached) of all the various Sharp distance sensors of that general type. Nearly all of them have been used successfully with a PBASIC Stamp.

    Regards,

    Bruce Bates
  • ltmhallltmhall Posts: 102
    edited 2007-01-05 10:43
    I haven't got one, just curious about getting one.Well the robot just needs to be able to avoid walls and objects in its way. Which sharp sensor is the eaisest to do this

    Post Edited (ltmhall) : 1/5/2007 10:47:36 AM GMT
  • Bruce BatesBruce Bates Posts: 3,045
    edited 2007-01-05 15:56
    ltmhall -

    Just as a matter of information, and to be honest, you don't NEED such a sensor when you build your first or first few robots IMHO. "Whiskers" can do a fine job and will teach you many things about both circuity and programming that a Sharp-type sensoer won't do.

    On the other hand, here is a step-by-step procedure to choose the proper Sharp Distance Sensor for your needs, You need to ask yourself the following questions, since there is no ... easier or harder Sharp sensor necessarily. If you don't have the answers to any or many of these following questions, then may I suggest you need to go back to the planning stage. In my experience there is no such thing as too much design planning for a robot, no matter how large or small.

    1. Are you constrained in some way by using just an analog or just a digital distance sensor? If so, eliminate those which do not meet your needs by looking in the "Output" column in the Sharp Guide.

    A PBASIC Stamp has no such direct constraints, although as a general matter digital sensors are generally easier to implement than analog ones. "Easy" should not be the most important criteria, since it's a L-O-N-G way between easy and HARD! Some are just not AS easy, but that DOESN'T make theimplementation overly difficult even for a novice or first timer.

    2. How far out in front of the robot, and how near to it·do you need to look? This question can generally be answered by knowing about how fast your robot will be traveling.

    Reference the pictures at the bottom of the Sharp Guide I provided earlier to determine which of the sensors fits your needs. There may well be more than one which fits, so mark them all down on a separate piece of paper.

    3. Are there any power (current or amperage) constraints?

    If so, eliminate those which draw too much current for your application. Refer to the "On Current" and "Off Current" columns in the Sharp Guide to make this determination.

    4. Last, keep in mind what Special_K wrote, about the speed of data aquisition, if this is important to your robot. it may or may not be - only you can be the judge of that.

    I would view the Sharp "fixed range" distance sensors as a special issue, and not worthy of consideration at present, but just keep them in mind·for possible, future reference.

    Hopefully this is more helpful than confusing.

    Regards,

    Bruce Bates
  • Steve JoblinSteve Joblin Posts: 784
    edited 2007-01-05 17:09
    The best, easiest, and least expensive·IR sensor is to buy the parts from Parallax and use the text from the robotics Stamps In Class...

    You need·two IR Emitters:
    http://www.parallax.com/detail.asp?product_id=350-00017

    You need two IR Receivers:
    http://www.parallax.com/detail.asp?product_id=350-00014

    You need two resistors:
    http://www.parallax.com/detail.asp?product_id=150-02210

    Follow the instructions in the document
    http://www.parallax.com/dl/docs/books/edu/RoboticsV2_2.pdf·(start on page 235)
  • ltmhallltmhall Posts: 102
    edited 2007-01-05 19:09
    Does Radio Shack sell a simillar emitter/detector pair that parallax sells.
  • Steve JoblinSteve Joblin Posts: 784
    edited 2007-01-05 19:47
    IR Emitter (it is a LED that emits infrared light, not visible light)... yes (http://www.radioshack.com/product/index.jsp?productId=2062565&cp=&origkw=led&kw=led&parentPage=search)
    IR Detector... no
    Resistors... yes

    Theses are pretty common components that are sold at most on-line electronic "stores" (like jameco, digi-key, allelectronics, etc.), but I suggest you buy from Parallax for two key reasons: 1. Support for this great company; and 2. ensures you get the exact correct components!
  • Special_KSpecial_K Posts: 162
    edited 2007-01-07 00:14
    Steve...
    I think this is the IR Detector.
    Radioshack part number 276-0640 or 276-640
    it is called an IR Receiver Module
    in blue letters it says 38kHZ
    it has 3 pins but remember they are not in the same order as the one Parallax sells.
    www.radioshack.com/product/index.jsp?productId=2049727&cp
    I have one but have yet to use it.
  • Steve JoblinSteve Joblin Posts: 784
    edited 2007-01-07 01:31
    could be Special_K, could be... I have heard of some folks having problems with some of the different IR detectors... I think there are a lot of other characteristics than frequency that determine how good it works...
Sign In or Register to comment.