Infrared sensor interfacing


Thread Starter


hi everyone. I have this problem. i need to interface an infrared receiver with the computer so that when the signal is disrupted, this information will be passed immediately to the computer which will in turn make a camera connected to it capture an image automatically. for like when a person passes in front of the sensor. but i want the sensor to sense very small object. the images are then procesed in the computer which i can do. so if anybody can help with ideas please. i'm fluent in C++.

Michael Griffin

If the infra-red sensor gives a digital output, you could interface it to signal handshake lines in the computer's parallel or serial port and then
poll the interface for changes. Simple PC UPS systems often use the serial port for handshaking to the PC without doing any actual serial communications.

We had a discussion on *setting* and then checking the handshake lines earlier this year under the topic "ENGR: Help with Serial Com (Original in QBASIC)" where I posted an example in 'C'. Reading the serial lines should be similar.

If your OS is Linux, then basically you would open the serial port as a file (using "open"), and then use "ioctl" to read the pin status. Other operating systems likely have similar capabilities, although they may be more difficult
to use.

Curt Wuollet

I have this prototyped on Linux using a pxc200 card and Rubini's driver. I am using a fiber optic prox. and commodity board cam to read addresses on envelopes passing by. But there's no reason the same setup wouldn't work with a passive IR sensor. Here's a link. It's also possible to use the camera as the sensor if the object is the only thing moving or you can constrain the field.