Electronic – Cheap effective proximity sensors for detecting people

infraredledproximity-sensorsensor

I'm building a small device that will be mounted on the ceiling (along with many other identical ones), facing downwards. I'd like to detect when someone walks underneath it. Due to the constraints of my system, the sensor needs to be:

  • Cheap – the whole device needs to cost about $5, so I'd rather not spend more than about $1 on the sensor.
  • Compact – the whole device is about 3cm diameter, so the sensor needs to be significantly smaller than that.
  • Reasonable range – when someone is standing under the device, their head may be 50cm – 1 meter away.

The sensor doesn't need to be fast – a few checks a second ought to be sufficient.

Cheap pretty much rules out 'passive IR' pyrometers, and compact and cheap rule out ultrasonic transponders. I tried an eletrostatic detector, but while it does a great job of detecting charged plastic objects, it doesn't respond to a person standing on a wooden floor at all.

Thus far, the best option seems to be an IR LED as a photodiode (I tried an actual phototransistor, but weirdly got a poorer signal than the LED). Using a setup with one LED emitting IR, and another reverse biased LED connected to an Arduino's analog in, I'm able to discern a useful return reflecting off my hand at anything up to half a meter. While this is usable, it's right at the edge of the range, and I'm concerned it may not work in the finished system. It does have the major advantage that I can put just one LED on each board, and use one board in sensing mode while another provides the illumination.

Can anyone suggest a better option for proximity detection, or a refinement to the active IR option to extend its range?

Best Answer

From your explanation and other question, it seems you are connecting your IR LED directly to the ADC input. I don't think this will work too well at a distance, the ADC input will probably have quite a low impedance that will attenuate your signal. Photodiodes have a very large impedance so you need a transimpedance amplifier to convert the current to voltage.
I would use something that is designed for sensing rather than emitting, like a photodiode or your IR phototransistor (if it didin't work then you are probably not using it correctly), and feed this into an opamp, then into the ADC.
In the app note you link to, there are plenty of example circuits, all of which involve a transistor or opamp to amplify/buffer the signal. Try one of these and see how it performs.