Sharp IR distance sensor improvement

Sharp IR distance sensors are very often used in robotics. But I always found it annoying, that they do not recognize very small objects, chair legs or even walls if the Sharp IR is set to an unfavorable angle to the wall. Here is the idea I came up:

 

Sharp_IR_hack1.jpg

The internal IR LED is disconnected from the Sharp IR distance sensor LED driver:

sharpIRhack2.jpg

The LED driver triggers now a PNP transistor and this transistor triggers again a couple of IR LEDs which are placed around the Sharp sensor as close as possible to the original LED, because the CCD seems to be anisotropic. Reflection from the oposite direction of the original LED are ignored:

SharpIR.jpg

What it actually does is that:

 

On my prototype are four 3mm IR LEDs placed around the Sharp (the 2 LEDs on the left do not have any influence on the measuring, which I found out later). The sensor is now able to detect a 3mm diameter steel rod at 25 cm distance.

Further developements could include:

  • LADAR (using an IR Laser instead of the IR LEDs)
  • Object tracker (switching LEDs on/off before measurement)
  • Increasing/decreasing max. distance reading by controlling the driver transistor

*** Update 2011.6.19 ***

Just a small rendering how a costum PCB for the Sharp could look like. The IR laser diode sitting on the place of the original IR LED. A driver for the IR laser diode is then necessary:

Sharp_LED-Laser.jpg

 

*** Update 2011.6.25 ***

Sharp Ladar prototype finished. The IR Laser has 30mW. The laser has three wires, red, black, and yellow. By setting the yellow wire high or low you can enable/disable the laser. This is a great feature for control. The laser has an adjustable focus as well.

Ladar1.jpg

Ladar2.jpg

LADAR mounted on RoverX:

RoverX-LADAR.jpg

Original voltage/distance graph vs voltage/distance graph with laser instead of built in IR LED (new graph not scaled):

New_Graph.jpg

Hi OB,The readings are

Hi OB,

The readings are different. First of all you don’t have a “zero” reading anymore if the object is very close (5mm). Then I found out the LEDs should be placed as close as possible to the original LED. LEDs placed a few centimeter away, do not affect the measurement, at least not my small 3mm LEDs. The CCD array seems to be anisotropic. Reflection from the oposite direction of the original LED are ignored:

SharpIR.jpg

 

It is sort of like you gave

It is sort of like you gave the Sharp sensor a pair of glasses… or maybe binoculars. Very cool idea.

It will be interesting to hear more about your testing. Have there been any problems with your hack? False triggering, issues from multiple bounce signals, etc?

If your tests prove out, this could be a very popular hack.

Hi IG!

First good thing, you don’t have any “zero” reading anymore when the object is close to the CCD. Second thing I learned, the CCD seems to be be anisotropic, see post below, so it is better to place all IR LEDs as close as possible nearby the orginial one, not on the opposite side of the CCD like I have done it at my prototype (2 LEDs). Third thing, you can have any range, depending only on the output power of the IR LEDs. Therefore I want to use a IR laser. Ordered one already and will report:)

Brilliant lateral thinking.
Excellent, can’t wait to see what the outcome is.
What about going further and replacing the receiver with an array of receivers and differencing them with an op-amp…or to hell with the sharp hardware and just build a better detector altogether…man I love this site so much…hmmm…just thinking out loud by the way, might be something I give a try. :slight_smile:

With a laser do you risk the

With a laser do you risk the beam being so narrow that you miss an object that a wider beamwidth LED would catch?

I wonder if you could do a mix of 2 LEDs and an IR laser? Then you’d get the best of both worlds.

Yes, I thougt about this.

Yes, I thougt about this. You could do hybrid, first switch on the LED’s for closer object detection, then the Laser for objects at greater distance. The laser should be place above the original IR LED.

This is interesting. I am

This is interesting. I am really curious if a Laser-IR Sharp sensor is a better alternative to a Wii-LIDAR. We know that Sharp sensors need 39ms between measurements and even after that we need to average 5 measurements to get reliable distance. That takes a lot of time if we try to do SLAM. WiiDAR does not have this problem, but it is more expensive and harder to build/code. 

After you’re done with a successful laser implementation, I suggest to use that 360 degree mod using a stereo jack or a phone cable untangler and mount the sensor on a fast rotating stepper. Then let it rotate continuously as fast as it can, taking measurements every 39ms at whatever angle the stepper is at. This will take only a few measurements in a complete rotation. Adjust the speed of the stepper so every time a complete rotation is finished, the measurements advance a degree. After a few complete rotations, all 360 degrees can be measured.

All this seems nice in theory, but we need more resolution than one degree for long distance scanning, because the distance between 2 one degree rays increases with distance, so we can miss thin objects like chair legs. Depending on the needed range, a 0.1 degree resolution might be needed, then that LIDAR unit from a Neato vacuum cleaner is worth the money. 

In my opinion, a robot should have 4 types of sensors to detect objects:
- proximity sensors, to detect close proximity around the robot, like a personal shield zone, especially around the wheeled base or the feet, can also be used to detect cliffs
- mapping sensors, that offer a complete 360 degree distances around the robot for mapping purposes
- 3D distance sensors (read pan/tilt), to actually measure distance to the objects of interest
- a camera sensor, to detect shape, color and type (as in human versus furniture) of objects

So this sensor falls in the mapping type. Can’t wait to see how it performs!

Hi RBX,

It could do mapping and act as a proximity sensor (via the 2 LEDs on the side).

Yes, that’s true. But if you

Yes, that’s true. But if you look at OddBot’s robots, they have lots of proximity sensors besides the IR Eye. I think it’s a good and simple idea and these sensors can be digital to save on the analog pins.

typo in update 2011.6.19

typo in update 2011.6.19 ‘costume’ instead of custom

Thanks, fixed that

Thanks, fixed that

Just stumbled over your post

Just stumbled over your post again, RBX. I do not think it is easy to program, because the graphs of Sharp analog distance sensors are quite complex. In a certain field of the graph you need to measure the distance twice (before you do the second measurement you must move the robot forward or backward and see if the value is rising or falling to see on which side of the maximum of the function you are). Then you need to approximate the function V(d) to get the distance at a certain voltage (Taylor’s theorem etc). If you have determinated on which side of the maximum you are, you can probably approximate the graph by use of two exponential functions:

Graph2.jpg

Graph3.jpg

I see what you mean. I guess

I see what you mean. I guess the WiiDAR is still a better option for SLAM.