go away spammer

Author Topic: sharp ir rangefinder  (Read 4734 times)

0 Members and 1 Guest are viewing this topic.

Offline nckspecTopic starter

  • Jr. Member
  • **
  • Posts: 22
  • Helpful? 0
sharp ir rangefinder
« on: March 24, 2008, 11:00:39 PM »
I was just wondering. How does your microcontroller know when your sensor is facing forward.

Offline bulkhead

  • Full Member
  • ***
  • Posts: 102
  • Helpful? 0
Re: sharp ir rangefinder
« Reply #1 on: March 25, 2008, 02:48:03 AM »
Why wouldn't your sensor be facing forwards?  If you have it on some panning mechanism, say, controlled by a servo, which is probably the easiest way to do pan it, you would probably set delays in the program after telling the servo to go to a specific angle to ensure that it is at that angle when you take a measurement.  In this case you are making the safe assumption that nothing will physically prevent the panning servo from pointing the IR rangefinder in the direction you want (given a reasonable amount of time).

Offline shimniok

  • Jr. Member
  • **
  • Posts: 11
  • Helpful? 0
    • Bot Thoughts
Re: sharp ir rangefinder
« Reply #2 on: March 25, 2008, 07:09:36 AM »
My firefighting bot Pokey uses a pair of Sharp IR sensors at 90* angles on an array rotated by servo.

The position of the servo is determined by the MCU -- basically pulse width determines orientation.  And servos are rated in terms of miliseconds to cross 60* so you can calculate roughly how many msec to traverse a given angle (about 300-400 to sweep 180* in my case).  So in other words, you can tell it at what angle to point and wait the appropriate time until the servo is done moving.

Hope this helps

Michael
Michael Shimniok
http://bot-thoughts.com/

Offline nckspecTopic starter

  • Jr. Member
  • **
  • Posts: 22
  • Helpful? 0
Re: sharp ir rangefinder
« Reply #3 on: March 25, 2008, 08:36:38 PM »
thank you, thats kinda of what i assumed but i wanted to make sure there wasn't a more competent way
I can't wait to do this project. It will be interesting how my dog will react to a robot following it.

Offline JesseWelling

  • Expert Roboticist
  • Supreme Robot
  • *****
  • Posts: 707
  • Helpful? 0
  • Only You Can Build A Robot!
Re: sharp ir rangefinder
« Reply #4 on: March 26, 2008, 06:40:27 AM »
You could use an encoder if you wanted less of a timer based solution and more of an Interrupt based solution.

Offline superchiku

  • Supreme Robot
  • *****
  • Posts: 952
  • Helpful? 5
  • cooll
Re: sharp ir rangefinder
« Reply #5 on: March 26, 2008, 06:49:02 AM »
and what do u mean by that???
JAYDEEP ...

IT AND ROBOTICS ENGINEER

"IN THE END IT DOESNT EVEN MATTER"

Offline Admin

  • Administrator
  • Supreme Robot
  • *****
  • Posts: 11,703
  • Helpful? 173
    • Society of Robots
Re: sharp ir rangefinder
« Reply #6 on: March 30, 2008, 10:51:18 AM »
Quote
and what do u mean by that???
http://www.societyofrobots.com/sensors_encoder.shtml

If your robot isn't doing highly accurate mapping, you can have your robot guess the angle. Thats what I did for my Stampy robot. It knows the angle within ~20 degrees, and that was good enough.

For more accurate mapping, this is what I did on my iRobot Create:
http://www.societyofrobots.com/robot_iRobot_Create_mod.shtml

And another option would be to use a stepper motor
http://www.societyofrobots.com/actuators_steppers.shtml

Offline superchiku

  • Supreme Robot
  • *****
  • Posts: 952
  • Helpful? 5
  • cooll
Re: sharp ir rangefinder
« Reply #7 on: March 31, 2008, 01:18:35 PM »
AND HOW DO U MAKE UR ROBOT GUESS THE ANGLE

IS IT JUST MAKING THE ROBOT GO TO A POSITION HAVING THE BEST PROBABILITY OF FINDING UR OBJECT???
JAYDEEP ...

IT AND ROBOTICS ENGINEER

"IN THE END IT DOESNT EVEN MATTER"

Offline nckspecTopic starter

  • Jr. Member
  • **
  • Posts: 22
  • Helpful? 0
Re: sharp ir rangefinder
« Reply #8 on: April 01, 2008, 01:58:24 AM »
i read through the stampy code and the code has a sensor_angle variable and when is greater or less than some set numbers it determines where to turn. It pretty much keeps a record of how much it turns to guess the angle

Offline superchiku

  • Supreme Robot
  • *****
  • Posts: 952
  • Helpful? 5
  • cooll
Re: sharp ir rangefinder
« Reply #9 on: April 03, 2008, 08:15:39 AM »
sharp ir's can only tell the distance but not the angle i suppose, then how does the robot realise if it has to turn left or right in order to track the object
JAYDEEP ...

IT AND ROBOTICS ENGINEER

"IN THE END IT DOESNT EVEN MATTER"

Offline Admin

  • Administrator
  • Supreme Robot
  • *****
  • Posts: 11,703
  • Helpful? 173
    • Society of Robots
Re: sharp ir rangefinder
« Reply #10 on: April 06, 2008, 11:45:33 AM »
superchiku, its in the tutorial:
http://www.societyofrobots.com/robot_sumo.shtml

Offline superchiku

  • Supreme Robot
  • *****
  • Posts: 952
  • Helpful? 5
  • cooll
Re: sharp ir rangefinder
« Reply #11 on: April 06, 2008, 11:49:16 AM »
ya i readt that  :P posted this a long time ago
JAYDEEP ...

IT AND ROBOTICS ENGINEER

"IN THE END IT DOESNT EVEN MATTER"

Offline Rebelgium

  • Supreme Robot
  • *****
  • Posts: 637
  • Helpful? 0
  • It's called the future ... We like it here
    • orgcrime.net
Re: sharp ir rangefinder
« Reply #12 on: April 07, 2008, 12:09:10 PM »
ya i readt that  :P posted this a long time ago
4 days ago ... ?
To relax after some hard work on robotics: A very fun free online text based MMORPG
orgcrime.net

Offline superchiku

  • Supreme Robot
  • *****
  • Posts: 952
  • Helpful? 5
  • cooll
Re: sharp ir rangefinder
« Reply #13 on: April 07, 2008, 12:13:55 PM »
lol long time for me  ;) coz time is valuable  ;D
JAYDEEP ...

IT AND ROBOTICS ENGINEER

"IN THE END IT DOESNT EVEN MATTER"

 


Get Your Ad Here

data_list