Author Topic: SHARP GP2D120 urgent help  (Read 5358 times)

0 Members and 1 Guest are viewing this topic.

Offline aruna1Topic starter

  • Supreme Robot
  • *****
  • Posts: 381
  • Helpful? 4
  • I'm an Ordinary guy
SHARP GP2D120 urgent help
« on: February 14, 2009, 08:06:02 PM »
I have 2 SHARP GP2D120 sensors.can some one tel me how to use these two sensors as obstecle detectors? (without rotating sensors-thatis fixed position sensors).i read tutorial about SHARP range finder techniques that says about cross beam system.but I'm not sure whether it will cover whole front face of robot.
can someone please help me.
thanks

p.s. no distance measuring required.i just want to detect obstecle at safe range and avoid it
« Last Edit: February 14, 2009, 08:09:31 PM by aruna1 »
I'm Me

Offline superchiku

  • Supreme Robot
  • *****
  • Posts: 952
  • Helpful? 5
  • cooll
Re: SHARP GP2D120 urgent help
« Reply #1 on: February 14, 2009, 10:14:21 PM »
use a servo to scan the area using the sharp ir,..it will work out
JAYDEEP ...

IT AND ROBOTICS ENGINEER

"IN THE END IT DOESNT EVEN MATTER"

Offline Soeren

  • Supreme Robot
  • *****
  • Posts: 4,672
  • Helpful? 227
  • Mind Reading: 0.0
Re: SHARP GP2D120 urgent help
« Reply #2 on: February 14, 2009, 10:44:23 PM »
Hi,

[...] (without rotating sensors-thatis fixed position sensors).i read tutorial about SHARP range finder techniques that says about cross beam system.but I'm not sure whether it will cover whole front face of robot.
[...] p.s. no distance measuring required.i just want to detect obstecle at safe range and avoid it
If you don't wanna scan it, you'd be better of with either US (mounted a bit high) or a row of IR tx/rx detectors on the front bumper.
But what do you define as "safe range"? (It will obviously depend on velocity, detection speed and braking/turning time).
Regards,
Søren

A rather fast and fairly heavy robot with quite large wheels needs what? A lot of power?
Please remember...
Engineering is based on numbers - not adjectives

Offline Tomas

  • Full Member
  • ***
  • Posts: 111
  • Helpful? 0
Re: SHARP GP2D120 urgent help
« Reply #3 on: February 15, 2009, 03:48:19 AM »
So are you looking for obstacle avoidance code or just the placement for the sensors?

If you are wondering about the placement, perhaps you should use the "bumper switch" mechanism described in this document: http://www.societyofrobots.com/sensors_sharpirrange.shtml

Or you could just place the sensors at each side scanning left and right, but I dont think two sensors will be optimal. They wont see forward then right? But the bumper switch will just say if there is anything in the way, they will not say the distance. You should just try the bumper switch, and make the robot turn randomly until its free again perhaps? :)

Offline aruna1Topic starter

  • Supreme Robot
  • *****
  • Posts: 381
  • Helpful? 4
  • I'm an Ordinary guy
Re: SHARP GP2D120 urgent help
« Reply #4 on: February 15, 2009, 04:15:42 AM »
I'm looking for obstecle avoidence code using two sharp sensors without rotating sensors
I'm Me

Offline Admin

  • Administrator
  • Supreme Robot
  • *****
  • Posts: 11,704
  • Helpful? 173
    • Society of Robots
Re: SHARP GP2D120 urgent help
« Reply #5 on: February 17, 2009, 12:03:52 PM »
I'm looking for obstecle avoidence code using two sharp sensors without rotating sensors
For which microcontroller?

pseudocode:

if(sensor_detected_something())
   rotate();

Offline aruna1Topic starter

  • Supreme Robot
  • *****
  • Posts: 381
  • Helpful? 4
  • I'm an Ordinary guy
Re: SHARP GP2D120 urgent help
« Reply #6 on: February 17, 2009, 11:51:02 PM »
I'm looking for obstecle avoidence code using two sharp sensors without rotating sensors
For which microcontroller?

pseudocode:

if(sensor_detected_something())
   rotate();

i'm using PIC 16F877A

how to do this with interrupts.when detects an obstecle it interrupts and rotate?
I'm Me

Offline Admin

  • Administrator
  • Supreme Robot
  • *****
  • Posts: 11,704
  • Helpful? 173
    • Society of Robots
Re: SHARP GP2D120 urgent help
« Reply #7 on: February 17, 2009, 11:58:23 PM »
Look at my 16F877 code and try to study the comments, etc.

Try to program it, and if it doesn't work, post your code here. I'd like to help you more, but its unfair for you to ask us to write it for you . . . :P

Offline aruna1Topic starter

  • Supreme Robot
  • *****
  • Posts: 381
  • Helpful? 4
  • I'm an Ordinary guy
Re: SHARP GP2D120 urgent help
« Reply #8 on: February 17, 2009, 11:59:51 PM »
Look at my 16F877 code and try to study the comments, etc.

Try to program it, and if it doesn't work, post your code here. I'd like to help you more, but its unfair for you to ask us to write it for you . . . :P

where can i get your code?
I'm Me

Offline Admin

  • Administrator
  • Supreme Robot
  • *****
  • Posts: 11,704
  • Helpful? 173
    • Society of Robots
Re: SHARP GP2D120 urgent help
« Reply #9 on: February 18, 2009, 12:07:15 AM »
ummmm by searching the forum for '16F877 code' of course! :P

 

SMF spam blocked by CleanTalk