Sharp GP2D120 ir sensor range

Discussions around autonomous, semi-automatic and intelligent robots and systems.

Moderators: BeligerAnt, petec, administrator

alasdair
Posts: 563
Joined: Sat Jan 03, 2009 3:52 pm
Location: Marlow, Bucks

Sharp GP2D120 ir sensor range

Post by alasdair »

I am thinking of getting a Sharp GP2D120 ir sensor for a micromouse, but i have a problem.
It has a range of 30cm, and as the tunnels of microuse mazes are 18cm wide, the robot would turn right much before it needed to.
Does anyone suggest anything?

http://www.acroname.com/robotics/parts/ ... 2D120.html

alasdair
Posts: 563
Joined: Sat Jan 03, 2009 3:52 pm
Location: Marlow, Bucks

Post by alasdair »

I am trying to find an equivilent with a short range- basically a photdiode and infrared LED switch with a range of 10cm.

Would this work?
Pololu Carrier with Sharp GP2Y0D810Z0F Digital Distance Sensor 10cm
http://www.active-robots.com/products/s ... sors.shtml (you will have to go down a bit)

Andrew_Hibberd
Posts: 1133
Joined: Tue Jan 20, 2004 12:00 am
Location: London
Contact:

Post by Andrew_Hibberd »

I have never tried making a maze solving robot, but have looked into it.

The first range sensor can be used to detect how far away the wall is, giving an analogue output. You will need to use an analogue input to you controller and calebrate the sensor. Putting an object a known distance away from the sensor you can see what the input is reading then when your robot detects that in the maze you know how far you are from the wall. For instance if the sensor is in the middle of the robot and the wall is in front it will give an output voltage is equivalent to 9cm.

Using more complex algorithms you can also use the sensor output as feedback. However i think most robots use digital signals, is there a wall in front? yes or no. The second sensor (or a threshold on the first) can be used in this way. If you use 3 sensors front left and right to see what is around the robot.

Looking at the active robot web site it is possible to use the small sensors at the top of the page on arms over the top of the wall. You could then look down onto the top edge to detect if there is a wall present. I believe enterprise used this set-up, a now fairly old maze solver.

Both of the sensors you have linked will work, but it all depends on how you plan to navigate the maze. A bit of a rant, hope it helps.
TEAM GEEK!

User avatar
peterwaller
Posts: 3193
Joined: Fri Feb 15, 2002 12:00 am
Location: Aylesbury Bucks
Contact:

Post by peterwaller »

I just use red LEDs and phototransistors matched to the same wavelength.
I pulse the LEDs and measure the return light using Analog to digital converters built into the processor chip.
see circuit diagram:
http://www.antweightwars.co.uk/CheddarSch.pdf

alasdair
Posts: 563
Joined: Sat Jan 03, 2009 3:52 pm
Location: Marlow, Bucks

Post by alasdair »

Thanks Guys.

After some thought, the best option would be to use simple lasers or LED's and photodiodes.

I chose this because my program is bsically as follows:
I have a sensor sticking out the right of my bot, and one facing forwards. The Natural movement without any sensors sensing is turning left-forward. When the right facing sensor senses, the robot goes forwards. If the front facing sensor senses, but not the right, it must mean a left turn, so it turns left. If both sense, it must mean a right turn, so it turns right.
A Photodiode would be better, as i only need to know if i have light input or i dont. This is because i am just subsituting a microswitch.

How would i wire this? I have three wires going to the switch (Pos, Neg, and signal i assume) so how woulkd it be set up?

alasdair
Posts: 563
Joined: Sat Jan 03, 2009 3:52 pm
Location: Marlow, Bucks

Post by alasdair »

How do make sure that the range of thet LED's is not too great, meaning i turn too early? It might be just changing to Watt's to be lower, but i need to be sure...

User avatar
peterwaller
Posts: 3193
Joined: Fri Feb 15, 2002 12:00 am
Location: Aylesbury Bucks
Contact:

Post by peterwaller »

If you are hoping to just replace the switches with leds I dont think it is going to work or at least very difficult to set up. If you have a processor with analog to digital converters you can set the levels roughly by either altering the power to the leds or the load on the receivers and then in software change the level at which you decide a wall is in range.

alasdair
Posts: 563
Joined: Sat Jan 03, 2009 3:52 pm
Location: Marlow, Bucks

Post by alasdair »

I dont have a processor- The bot was a school project origionally and the PCB's are custom made and run with PICAXE chips.

Surely it cant be that hard to replace the switches with light sensors- The Photodiode is the switch (when it receives light it connects the circuit) and the LED is just added in as a reflective source of light. It might be easier just to setup the photodiode in place of the microswitch, and run the LED seperately, as i just need a constant light source. Do you think it would be easier to use infrared photodiode and emitter, so i can use a ready set range?

User avatar
peterwaller
Posts: 3193
Joined: Fri Feb 15, 2002 12:00 am
Location: Aylesbury Bucks
Contact:

Post by peterwaller »

By processor I mean a microprocessor or micro controller I use the Atmel AVR's but I think many of the PICAXE processors have analog to digital converters built in.

alasdair
Posts: 563
Joined: Sat Jan 03, 2009 3:52 pm
Location: Marlow, Bucks

Post by alasdair »

Ok. Is it really nessecary if i have the right range alrady- I just need to get the right wattage LED and photodiode. :-?

Post Reply