Maker Pro
Maker Pro

Help with an IR sensor connected to a parallel port for object detection

  • Thread starter J. Kevin Deitchman
  • Start date
J

J. Kevin Deitchman

Jan 1, 1970
0
Hi everyone,

I need to track the movement of mice around a cage in a "Here/Not
Here" fashion for a behavioral study. I'd like to use IR transmitters
and detectors (or some other light beams?) across a cage about 12
inches long, and feed the data in through a computer's parallel port.
I'd like to have 6 pairs all together. The problem is my electronic
skills are hazy.

If anyone had some top-notch schematics or advice, I would truly
appreciate it. Also, if there is a simpler way to do this, all the
better. Keep in mind that I need a solution that won't disturb the
mice (ie, no visible light). I have read up on parallel port do's and
don'ts and I have all the software needed to read the port status.

I suppose I would run the emitters from a few batteries. I got some
schematics from the internet that make me believe I would only need a
resistor in series with the emitter for this application. Then on the
other side of the cage, I use another battery to power the detector.
One schematic had a +5 v going to a detector, which is then connected
to an input pin on the parallel port. The detector out is also
connected to a 1k resistor attached to ground. Sound about right?

I've done some experimenting using an IR detector / emitter pair. I
promptly exploded the emitter (guess I needed that resistor...), but
the detector is holding out.

Thank you for any information. You will help to further scientific
progress!

Kevin.
 
R

Robert Monsen

Jan 1, 1970
0
J. Kevin Deitchman said:
Hi everyone,

I need to track the movement of mice around a cage in a "Here/Not
Here" fashion for a behavioral study. I'd like to use IR transmitters
and detectors (or some other light beams?) across a cage about 12
inches long, and feed the data in through a computer's parallel port.
I'd like to have 6 pairs all together. The problem is my electronic
skills are hazy.

The easiest way I know how to do this is to buy some GP2D120 Sharp sensors.
They are infrared proximity detectors that run off of 5V (They actually have
a regulator built in, so it can be sloppy power) and give you a single
voltage signal which indicates distance from the sensor. So, you set it up
without the mice, measure the voltage. If the voltage increases, you have
movement into the field of view of the sensor. When the voltage goes back
down, the mouse is gone.

If you need a definite signal, you can use a comparator chip and a pot to
set the - input. Put the output of the GP12D120 into the comparator, and
when its voltage goes higher than the - input, the comparator output will go
high. Feed that output into the parallel port pin you care to wiggle, and
watch it from the PC.

You can debounce the signal in software on the PC, since it'll be fairly
bouncy when the mouse is getting into view of the sensor.

The sensors aren't really all that cheap (about $8 at Arrow.)

Sensor:
http://www.technologicalarts.com/myfiles/data/gp2d120.pdf

Comparator:
http://www.fairchildsemi.com/ds/LM/LM311.pdf

Potentiometer:
(100k pot)

Regards,
Bob Monsen
 
Top