Electronic – Simple Phototransistor Motion Detector

motionphototransistorsensor

I am trying to make a simple motion detector for objects within a few feet in a very small footprint with minimal parts. I don't need to know much info about the motion just simply if there was motion and the rate of the motion. I do not need to know the absolute level of light.

So far I have had pretty good luck doing this using a basic photo-transistor circuit and a micro-controller ADC with integrated gain.

The issue arises when I change light levels from a dark room to light room to cloudy day, the photo-transistor can easily saturate depending on overall light level.

A way to avoid this would obviously be to use a variable resistor type circuit, like a digital potentiometer or a voltage controlled JFET. These circuits are a little more complicated then I was hoping and would require constant checking and adjusting of the resistance.

My question is, since I do not need to know the absolute light level, is there any circuit that can automatically control the photo-transistor so that It remains out of saturation in any light level?

(I'm not too experienced in electronics, but is there a way to provide feedback with some hysteresis to a jfet or other resistance like device that would keep the photo-transistor between VCC and GND while allowing some high frequency fluctuations? (movement)

basic phototransistor circuit

Best Answer

Ambient light levels are always a problem. One possible solution is to use I(nfra) R(ed) at high frequency. It just happens that TV zapper technology is available at very reasonable cost. The detector IC does the work for you. A simple 38kHz IR oscillator made from the ubiquitous 555 (astable) with IR led will generate the signal.

enter image description here

A second 555 (wired as a re-triggerable monostable) is connected to a 38kHz IR sensor IC. This will keep the output high until it fails to detect the 38kHz signal.