SHARP IR sensors behind glass?


I just have a quick question for anyone who has one of those popular infrared sensors used for proximity sensing. Usually for robots.

part numbers:

GP2Y0Axxxx... GP2Y0Dxxxx... GP2Dxxxxx...


How does such a sensor perform behind transparant glass?

or more specifically:

Does it work at all?

What happens if it is flush with the glass surface?

What happens if it is 10 cm behind the glass surface?

Thanks for anyone who took the time to read this and post an answer!


How does such a sensor perform behind transparant glass?

To be honest I don't know but I can take a guess. Glass while it is transparent to visible light is opaque to IR. At these IR frequencies however you might get some through. The main problem will be reflection off the glass surface.

Take a digital photo as that will see the IR, so you can assess what is happening. My guess is it won't work very well.

As Grumpy_Mike suggested, a simple digital camera may be helpful in evaluating the IR transmission characteristics of your glass material.

This will of course depend on the quality and features of the camera; some cameras include an IR filter, some don't. Some are selectable. Point a remote at your camera, press a button while taking a picture of the LED. If you see a white light in the picture where the LED is, then it is passing IR. If not, it has a filter. See if you can de-select the filtering. Otherwise your option is to use another camera, or hack your camera to remove the filter.

I have a Sharp GP2Y0A21YKOF.

Tried operating it through the walls of a drinking glass.... worked... sort of.

The resolution of distance wasn't as good as with no glass, but it certainly did "see" things outside the glass to some extent.

"Saw" things close to the glass... 8cm... "quite well"... 20cm: Still clearly "seeing" presence/ absense of my hand.

If you want to check for motion, check out the Parallax X-Band Motion Detector. It will detect movement thru a brick wall! It won't give you distance and it covers around 300 degrees...

Alright thanks guys for all the comments.

So from what I gather, how well the sensor will work depends greatly on the type of glass I'll be using. As someone else is manufacturing the housing for this proximity sensor at a later stage I can't really be sure of how it will work I guess.

I think I'll just have to experiment with as many different types as I can.

I'll give a brief overview on the project in case anyone has any other thoughts or suggestions.

There exist a number of rectangular panels, formed with steel and a glass surface on one side: 1.2m x 1.2m x 20cm. They will be used to build a wall. Inside each of the panels I will be placing a grid of high power LEDs. The people in charge of the project would like subsections of the panels (mini LED grids) to light up as someone walks past that section of the wall.

The problem is that I'm not to place anything on the exterior surface of the wall, or to cut out any sectons of glass, etc. So the sensing has to be done within the panel, through the glass.

And of course, the budget for such a project is minimal. At most I'll get about US$700 for 500 LEDs and all the electronics, including power supply. Right now I'm working on making 36 sensing areas within the wall.

I don't need any accurate distance measurement, just a "presence" of someone close to the wall. 1m outside the wall would be ideal, but if people need to brush past, basically touching, the wall then that will have to do.

I've been playing around with my own configurations of IR emitter and detector pairs, but the various levels of daylight aren't making for a stable output.

I know the SHARP sensors have some subsidiary electronics which help negate the effects of ambient light, which is why I'm thinking of using them.

There does exist a cheap SHARP presence sensor which claims to work up to 400mm - GP2Y0D340K @ $6.50 which just might work for me.

I guess I'll just have to play around with a few to see what I can get with different types of glass.


The other problem that springs to mind is that if you have high powered LED lighting up behind the glass that too will cause interference with the sensors.

Crap that does sound like it could be a problem. Thanks for bringing it up. May have to get a reading with the sensor, disable the sensor, switch the LEDs on for a specific time, then switch them off and re-enable the sensor. Or something like that. Nothing a few gates and a 555 timer can't handle ;)

I can also sit the sensor flush with the glass. The LEDs will be a few cm behind the glass. they are being mounted on a thin polystyrene sheet - just pushing the legs through. This might help.

The wall forms part of a temporary structure which is to be placed in an open public space, most likely outdoors.

Well I managed to get hold of a GP2Y0D810Z which detects the presence of something within 10cm (the 40cm version is not in stock).

The circuit's on breadboard and hooked up to a lab power supply and I don't have any batteries around right now, so unfortunately I can't really stick it up to any windows. Tomorrow I will bring some glass samples and test it out.

It did work perfectly behind the glass from an old flatbed scanner. It "saw" through the glass and detected anything 10cm or closer, with the sensor various distances behind the glass surface.

So yay that's quite good results to begin with. I would like to test more types of glass, as well as obtain the 40cm version of the sensor. I doubt the technology changes drastically between the two versions.

Here's hoping!