Shop OBEX P1 Docs P2 Docs Learn Events
Using Infrared to do the parallel parking. — Parallax Forums

Using Infrared to do the parallel parking.

SolEmoSolEmo Posts: 15
edited 2013-07-14 21:57 in Accessories
Pls help me!! I really needed your help on this. Cos i try to figure it out for a long time but i could not find the solutions to it. Pls help me!! I have to done it within 2 weeks.

Comments

  • PublisonPublison Posts: 12,366
    edited 2013-07-10 10:25
    SolEmo wrote: »
    Pls help me!! I really needed your help on this. Cos i try to figure it out for a long time but i could not find the solutions to it. Pls help me!! I have to done it within 2 weeks.

    Welcome to the forums.

    A couple of questions:
    What IR Sensor are you using?
    What microprocessor are you using?

    This would probably better done with ultrasonic sensors. They would have to be waterproof if it is a vehicle application.
  • laser-vectorlaser-vector Posts: 118
    edited 2013-07-10 12:04
    Publison wrote: »
    This would probably better done with ultrasonic sensors. They would have to be waterproof if it is a vehicle application.

    I second the use of ultrasonic. possibly even laser range finder, but could be bad if the objects you are ranging are reflective...

    as an alternative for prototyping you could use an XBox kinect and the freenect drivers with python/java. this would require a laptop to be present at all times, but those are some awesome sensors!!
  • ercoerco Posts: 20,256
    edited 2013-07-12 21:06
    Can't wait to see your solution, SolEmo!
  • John BoardJohn Board Posts: 371
    edited 2013-07-12 21:16
    Kind of reminds me of something done by the TV show Prototype This! (Google it, great series). It's in the third episode, named Traffic Busting Truck. Perhaps you might watch the episode sometime, you might get a few ideas.

    For the record, the show's host, Joe Grant is actually a member on the Parallax Forums, and has designed several products that Parallax sells, such as speech synthisis, the new laser rangefinder, RFID module, etc.

    Hope this helps!

    -John
  • SolEmoSolEmo Posts: 15
    edited 2013-07-14 18:13
    I am using the normal Infrared Sensor that is inside the box. My teacher asked me to solve it by using the original component to do so.
  • prof_brainoprof_braino Posts: 4,313
    edited 2013-07-14 18:22
    We need to be able to see the data sheet to the part, as this could be any of many infared sensors. Do you mean 350-00014, 28034, 28995, 910-28027, or something else?
  • SolEmoSolEmo Posts: 15
    edited 2013-07-14 18:22
    Pls provide me some help on the coding cos my teacher does not know anything about it and expected me to do it out for him. I does not have much here and there so I could only get from you all. :frown:
  • SolEmoSolEmo Posts: 15
    edited 2013-07-14 18:24
    It is the 350-00014 infrared receiver.
  • Duane DegnDuane Degn Posts: 10,588
    edited 2013-07-14 20:29
    What microcontroller are you using? What code do you have so far?

    Do you have a schematic and/or picture of your circuit/setup?

    When you post your code, use code tags to preserve the formatting. Here's a link to a tutorial on how to use code tags.

    attachment.php?attachmentid=78421&d=1297987572
  • SolEmoSolEmo Posts: 15
    edited 2013-07-14 20:38
    I haven't write any code yet. I also don't know what is the microcontroller that I am using.
  • ercoerco Posts: 20,256
    edited 2013-07-14 20:39
    A little detail might help. Are you programming a BoeBot to parallel park?
  • SolEmoSolEmo Posts: 15
    edited 2013-07-14 20:41
    No. Sumobot to do the parallel park.
  • ercoerco Posts: 20,256
    edited 2013-07-14 21:20
    Close enough. That's the first mention of a robot in your thread. I'm sure several people thought you were making an automobile parking aid.
  • John BoardJohn Board Posts: 371
    edited 2013-07-14 21:57
    G'day,

    Okay, I'm just going to give you some friendly advice to start off with (I learnt it the same way you are), whenever asking for help, try and provide the people with as much information as possible, this information might include:

    1) Robot Base
    2) Theory of operation
    3) Possible schematics, or good explination of electronics
    4) Code (using the "code" tags, or using pastebin.com/github (or equivalent) link)
    5) Any other information you have
    6) A good context always help us understand where you're coming from
    7) List of parts in use (kind of comes under the header of 3)

    But, anyway, on to the code!

    I'll be honest, I don't know much about the SumoBot, nor have I read it's manual, but that's where I'd start, take a flip through, make good use of the index and the contents, look for stuff to do with IR manuvering. If you want some more specific stuff, you can look in the BoeBot handbook:

    http://www.parallax.com/Portals/0/Downloads/docs/books/edu/Roboticsv3_0.pdf

    Y
    ou'll probably find what you are after in chapter 7 (page 221). I'd take a read through of that, understand how to control IR sensors. A good excersize to test your knowledge could be trying to set up a small demo of where it gets the Infrared readings, and then dumps it to serial, and see if it works right.

    After you understand that, then you can move onto coding the parallel parking, I don't quite know what's involved in that, but let's assume the layout of the cars/robots are somewhat like what's demonstrated on this webpage:

    http://www.wikihow.com/Parallel-Park

    So, for this, I'd have a sensor facing to the right of the robot, at the back, and the same thing, at the front, so you have 2 right facing sensors, one at the front, one at the back. Then I would have another 2 sensors, one facing forwards, and one facing backwards. Then to park I would have some logic simiar to this:

    10 Go forwards until the back right sensor detects a Car
    20 Keep going forwards till it no longer detects the car //At this point, the robot should have passed the first car, located in the upper right hand side of the picture on that webpage
    30 Drive forwards a little more, until the front right sensor detects another car
    40 Then move backwards in such a way as to move into the car space...

    I know these instructions are somewhat sparce, but it's up to you to figure out the rest. Although I've provided the above information, it's by no means the most efficient way of doing it.

    If you don't have the paper copy of the SumoBot manual, it can be found here:

    http://www.parallax.com/Portals/0/Downloads/docs/prod/sic/AppliedSumo-v1.0.pdf

    O
    n a finishing note, on forums like this, and places like stack overflow, it's generally accepted that we don't "do the code for you", I'm not sure if you were asking to do that or not, but ultimatly, it's an assignment given to you by your teachers, so it's up to you to solve it. We can give a helping hand, and nudge you in the right direction, but we can't solve your problems for you. Lastly, often it's a good idea to do some work on something first, and then come to the forums after you've nutted over it for ours. If you come on before you've even tried, not that I'm saying you have, and ask for a solution, then you may get looked down upon. If you've done a fair bit of work, but you aren't getting anywhere, then it's time for you to come on the forums, present what you've done, say what you've tried, what's worked, what's not, and then let people help you.

    Anyway, all in all I hope this helps you!

    -John
Sign In or Register to comment.