Jump to content
43oh

IR proximity detection


Recommended Posts

I would like to set up a proximity detector with a range of around 5'. All I want is a simple trigger....high for someone is there, and low if there isn't. Looking online, I've found I can do it actively with an illumination diode and an IR receiver, or I can do it passively with a PIR detector.

 

It seems like the active sensor is the simplest, but I'm concerned that I won't get the 5' of range and that the signal will be really noisy and prone to a lot of false alarms. However, it also seems like the PIR detectors are more geared towards motion sensing, and I need to monitor a persistent presence. I would also rather deal with a binary type output than having to process a PWM signal.

 

Anyone have experience or recommendations? For what it's worth, I'm attempting to build a bi-directional detector that can detect when a person is to the left, right or directly in front of the sensor.

Link to post
Share on other sites

PIR will only sense heat moving. IR at night might work at least some of the time. A person wearing IR absorbing clothes would be difficult to detect, a person wearing reflectors would be much easier. You'd probably need a pretty juicy IR LED and a good detector.

Ultrasonic would be the easy way, but for directional stuff it would either need to scan, or you'd need two or three sensors.

You could use visible light and have the pumpkin strobe people for tracking, less spooky and more WHAT THE HELL IS THAT PUMPKIN DOING!?, but that might not be a bad thing.

Link to post
Share on other sites

I can't believe this is that complicated. I've seen cheap toys that do this sort of thing with what looks like photo diodes. I wonder if I could use a visible light diode with a band pass type filter to smooth out lf background illumination changes and hf noise. as long as the background is brighter than the foreground, it should sense shadows, and I could crudely adjust sensitivity with gain and threshold settings.

Link to post
Share on other sites

I would go with a real proximity detector if the object might not be moving, which is a requirement of all motion detectors.

 

The Sharp GP2Y0A21YK and similar proximity detector are easy to interface and you can set the range you want to detect.

 

They are available on ebay at a pretty reasonable price.

 

A couple of PDF spec sheets to get you going: GP2Y0A21YK and GP20A02YK.

 

Peter

Link to post
Share on other sites

Built a couple this evening. One using visible light that has decent (multi-foot) range in dim conditions and maybe a foot in fairly bright conditions (forget direct sun), and one using IR that has a range in darkness of about 1.5 feet. In any meaningful light the IR phototransistor triggers and the sense pulse gets drowned out. I need a better sensor.

Link to post
Share on other sites

For the visible light one....I'm assuming its passive? How bright was your "dimly lit" room? Did you apply any filtering?

 

I was planning on taking a short time average to decrease noise, and setting my threshold based on a running, multi-second average to handle gradual changes in background

Link to post
Share on other sites

How are these sensors too large? What are the size requirements you are trying to stay within? For distance detection on the cheap you really aren't going to do better than those IR sensors linked above. Any homebrew solution with IR LED and IR receiver is going to be quite a bit more inaccurate and prone to noise.

Link to post
Share on other sites

I pulsed a LED and checked light level before pulsing and during pulsing. A 15ms pulse was enough for the sensor to register a dramatic change, enough to be sensed anyway.

Given the right setting it'd be creepy :D

Or you could put the LEDs above the area you're looking to sense presence in, that'd work too.

I found a 50nF cap was needed noise wise.

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...