Shop OBEX P1 Docs P2 Docs Learn Events
Please help. — Parallax Forums

Please help.

azwillnjazwillnj Posts: 3
edited 2005-01-27 21:09 in BASIC Stamp
I need to make a robot from a BS2 stamp kit, the one that they sell at radio shack. It has the same requirments as the micromouse compitetion, pretty much it needs to navigate a maze the fastest. What I am thinking is a robot that has 3 optical sensors one faceing forward, one left and one right. Then go full speed into the maze, when it detects a wall infront of it it will slow down and when it gets close enough to the wall it will stop rotate 90 degrees and check for a wall in front, if there is no wall it will continue, if there is a wall, it will to turn until it finds a passageway. I also want it to stay centered in the passageway. The problem is though, I am not that experienced with the programming language at all, so if there is someone out there that can help me with programming it. Or atleast give me some ideas I can prob figure it out on my own.

Thanks.
Alex.

Comments

  • allanlane5allanlane5 Posts: 3,815
    edited 2005-01-27 03:30
    Parallax sells a very nice SSIR unit (I think that's its acronym) which gives you an IR unit with adjustable range, so you can tell when a wall gets into a certain range of your 'bot. That sounds perfect for your application.

    The hard part you may run into is interfacing the motors. Parallax also sells the excellent BOEBot, which I believe comes with two of these sensors, and excellent lab books for using it. Add a 24LC640 eeprom for storing the maze, and you have a very good base for building a micro-mouse.

    Note the BS2 has 2K of EEPROM you can use for both your program and data storage, and 26 bytes of RAM. So if you want to store a 16x16 maze, you should probably use an external EEPROM. The BS2 has SHIFTIN/SHIFTOUT for interfacing with an SPI eeprom, so all you need is the 8-pin DIP, the BS2, and three or four wires (GND, DOut, DIn, Clk. And you can share DOut and DIn sometimes)
  • azwillnjazwillnj Posts: 3
    edited 2005-01-27 03:34
    That would be great, but I am doing this for a school project, and all I have to work with is the kit.
  • allanlane5allanlane5 Posts: 3,815
    edited 2005-01-27 04:00
    You keep saying "The Kit" -- but Radio Shack sells a couple of BS2 kits. One is the BOEBot kit -- is that the one you have? If you're talking Micro-Mouse, that's the only Radio Shack kit I know of that builds a robot. Is that what you're talking about? If so, it's called a "BOEBot", or Board of Education Bot.

    Radio Shack does sell a 'Homework Board', but you can't put motors on that thing, very easily.
  • azwillnjazwillnj Posts: 3
    edited 2005-01-27 04:09
    Yes, its the Boe Bot, the one with the chassis.
  • allanlane5allanlane5 Posts: 3,815
    edited 2005-01-27 15:16
    YAY! You have all you need then. The BOEBot comes with a manual, which tells you EXACTLY how to calibrate the 'bot for the parts that come with it, to make an IR-based distance detector.

    I believe it has enough parts to make two IR 'whiskers' -- one left and one right. As I recall, it also has mechanical whiskers, which are allowed in MicroMouse. The parts to make one more "forward" IR-sensor (a resistor, an IR-LED, and an IR-Detector) can probably be purchased at Radio Shack for another $3.00 if you really want three. I think it's a good idea, actually.

    So the short answer is to go through the book and build and calibrate the sensors and servo's as indicated. I don't think you can really hire anyone to do this for you -- nor should you, as even if you are going to be the 'high-level designer', you probably need to understand what the hardware can do.

    One thing I would add -- you can build a small 8 x 2 cell maze of the MicroMouse dimensions to practice with. The full maze is 10' x 10', which is quite large (for my house, anyway). Create a simple 'race-course' in the 8x2, do the labs with it, until your 'bot can move smoothly through it. Then you can get more creative.

    Note also the BS2 uses 'PBasic', which is a simple and good Basic variant, very easy to learn.
  • GadgetmanGadgetman Posts: 2,436
    edited 2005-01-27 21:09
    I'm not certain that algorithm of yours will work very well.

    You may end up with a robot going back and forth in the same corridor.
    The most common algorithm is the 'wallhugger' where the robot always follows eiher the right or the left wal.

    One way to 'optimize' this one is to use the front and side(Say right for follow the right wall version) for basic navigation, but also record a map of squares, and using a left-side sensor to map branches to the left.
    Then, when the robot finds itself facing a dead-end, it can backtrack at high speed(no need to read the sensors as you know where you must go) to the first lefthand exit.

    Another way is the 'go straight' but record both left and righthand exits, then backtrack to the first exit on one side when it hits a dead-end.

    How the mapping should be done, though, is more difficult to say.
    (If the start is known, this may be easier)
Sign In or Register to comment.