Shop OBEX P1 Docs P2 Docs Learn Events
Help needed for Indoor Location Position system — Parallax Forums

Help needed for Indoor Location Position system

ShinXIIIShinXIII Posts: 8
edited 2010-01-01 18:56 in BASIC Stamp
Hello All,

I'm new to Basic stamps and I have a school project that require me to set up a indoor localization system using Basic stamp to get the location of a toy tricycle and hope can control it to go to the assigned location automatically.

The components i have at this moment is eb500 (for bluetooth communication between host computer and tricycle) and CMPS03 (compass to get the direction of tricycle is heading), and an encoder. I wish to set up a real time system to know the x-y coordinate value of the tricycle, but have no clue on how to do it. Could anyone enlight me a bit?

I believe compass CMPS03 could give me the direction of tricycle, but i have no idea how to get the x and y coordiantes from the tricycle to the host computer. Thanks alot for your help and Marry Xmas in advance to everyone [noparse]:)[/noparse]

Comments

  • SRLMSRLM Posts: 5,045
    edited 2009-12-23 08:12
    Assuming that you don't plan on installing some sort of transmitter system like GPS or airplane guidance radar...

    Using the encoders (one for each wheel), you can figure out what direction and how far you are moving. If you know your start location (usually (0,0)) then you can then calculate your path and current position. You wouldn't even need a compass, although you could use that for initial heading calibration to perhaps to correct for accumulated errors in the encoder measurement. But to start you'll want to look up dead reckoning.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Powered by enthusiasm
  • P!-RoP!-Ro Posts: 1,189
    edited 2009-12-23 09:12
    If you're just trying to get to certain rooms and don't care about specific locations you can place ir emitters in every room and just have a compass on the robot to get place to place. If you're looking for better numbers than that triangulation and trig would work, but good luck doing that with the basic stamp.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    PG
  • ShinXIIIShinXIII Posts: 8
    edited 2009-12-23 15:15
    Thanks alot for the replies from SRLM & Pi Guy.

    I think i would try encoders methods. GPS and emitters seems more difficult, and previous student who worked on my project failed to use bluetooth as emitters to find the location of tricycle. So i suppose encoders would be a better way for me. Even though might have measurement errors and later have difficult to adjust back the error in distance.

    SRLM, may i know do you have any encoder to recommend? Would Boe-Bot Digital Encoder Kit be a good one to use?
    Thanks alot [noparse]:)[/noparse]
  • SRLMSRLM Posts: 5,045
    edited 2009-12-26 02:49
    It depends on your setup. The most accurate information could be had by connecting an encoder directly to the motor shaft, which would give you several thousand positions. However, there is no way that a BS2 could handle that, so you would need an external processor of some sort. The alternative would be to put markings on the wheel, and use the wheel as an encoder. This would involve cover the wheel in a colored disk (either black or white) and having alternating color stripes on there. In that case a QTI sensor (from parallax or elsewhere) would make a good choice to read the contrasting colors.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Powered by enthusiasm
  • ercoerco Posts: 20,256
    edited 2009-12-26 05:21
    If you are using a traditional tricycle with one steered and driven front wheel and two trailing wheels, you have an advantageous opportunity to put encoders on your two non-driven trailing wheels. There is always a chance of wheel slip (introducing odometry errors) on a driven wheel, much less so on trailing wheels. Treat the two wheels like a differential drive robot and monitor your position as presented in PhiPi's fine work presented with the Boe-Bot Digital Encoders.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    ·"If you build it, they will come."
  • ShinXIIIShinXIII Posts: 8
    edited 2009-12-28 16:15
    Hi, thanks for the replies from SRLM and erco.
    Think i do have a rough idea now.
    Thanks alot for the help and with you all happy new year in advance [noparse]:)[/noparse]
  • RogerNRogerN Posts: 19
    edited 2010-01-01 15:08
    Since the Basic Stamp works well with ultrasonic sensors, I wonder if there would be a way to pulse 3 different transmitters at 3 different locations, and measure the time each pulse arrived, calculate the distance from each transmitter to determine location? Maybe transmit a ping every so many milliseconds apart from each transmit location in order, and the variation would show position relative to each transmitter. For example if each pulse was transmitted 10 mS apart (or a value > maximum time in flight of ping for range you're working in), and you received 3 pulses 10 mS apart, you know you would be equal distance from the 3 transmitters. It would take some of the math geniuses here to figure it out but perhaps the concept could work. Maybe something like ping out transmitter 1; pause 10 ping out transmitter 2, pause 10; ping out transmitter 3; pause 20, that way you would would be able to sync to the correct transmitter.
  • Mike GreenMike Green Posts: 23,101
    edited 2010-01-01 15:30
    RogerN,
    How do you tell which transmitter is transmitting? How do you know precisely when the transmitter has transmitted so you can measure the time to the reception of the pulse? Remember that the Stamp has only limited timing capabilities and has no built-in real-time-clock.
  • RogerNRogerN Posts: 19
    edited 2010-01-01 18:56
    My 10mS between pulses probably wouldn't work because with sound traveling some 1100fps that would only be a little over a 10ft range, might work for a maze or something. I was thinking of measuring the pulse between pings, if they are supposed to be 100mS apart but are only 90mS apart you know you're 11' closer to the 2nd than the first. Them maybe the time from the next two pulses might be 105mS, you would know you're 5.5' feet further from the last than the previous. Then perhaps the the next pulse is 185mS, that would be from the transmitter with a nominal 200mS delay, so you know your some 16' closer to it than you were to the previous one. Knowing the positions of each transmitter, the time between transmissions, and the time the pulses were received, someone smarter than me may be able to trig the position. The pauses between transmissions would be long enough to be out of range if exceeded, the pauses would be short, short, 2Xshort to identify the transmitter, or perhaps the duration of the ping would identify? I guess the basic idea would be that the time between pings would be 100mS between 1 and 2, 100mS between 2 and 3, and 200mS between 3 and 1, if you measured these times than you would be equal distance between the 3 transmitters.

    If you measured 100mS between 1 and 2, 110mS between 2 and 3, then you should measure 210mS between 3 and 1... I think.

    RogerN
Sign In or Register to comment.