Maker Pro
Maker Pro

Count Up/Down ? ?

Z

Zucker

Jan 1, 1970
0
I would like to be able to count the number of people entering (count up)
and leaving (count down) a room. I was thinking about using two photocells
driven by two small lasers, spaced 6" to 12" apart, to detect if a person is
entering or leaving. If photocell A was tripped before photocell B, the
counter would count up. If photocell B was tripped before photocell A, the
counter would count down. My problem is that I'm trying to come up with a
circuit that can detect the AB or BA pattern. May be a circuit that can
detect the lag between the two photocell voltages? I don't know.

If anyone has a suggestion for this circuit or any other ideas, I would
appreciate it.

Thanks,
Steve
 
E

Eugene Rosenzweig

Jan 1, 1970
0
Zucker said:
I would like to be able to count the number of people entering (count up)
and leaving (count down) a room. I was thinking about using two photocells
driven by two small lasers, spaced 6" to 12" apart, to detect if a person is
entering or leaving. If photocell A was tripped before photocell B, the
counter would count up. If photocell B was tripped before photocell A, the
counter would count down. My problem is that I'm trying to come up with a
circuit that can detect the AB or BA pattern. May be a circuit that can
detect the lag between the two photocell voltages? I don't know.

If anyone has a suggestion for this circuit or any other ideas, I would
appreciate it.

Thanks,
Steve

Spacing the sensors out would make the setup more susceptible to counting
errors, especially when there is heavy traffic, as there would be easy for a
person to trip the first sensor while the second one is still tripped. Since
you think of using small lasers, which give a very focused beam, you can
place the sensors very closely, say as close as a centimeter apart. That
would give you a 3ms trip delay between 2 sensors for a person at 7km/s
which is a very brisk pace I think - very detectable electronically.

Half an hour later... I thought about it a little bit and actually made a
little cct I attach to the mail. 4bit binary up/down counter clocked when
both beams are broken, inverter used to produce positive edge at that point.
A d flip-flop remembers which way the person is going and an XOR gate is
used to produce a latching clock to the flip-flop only when the inputs are
in differing states, not same.

You can chain the 4516s for 8bit, 12bit, etc... There is also 4512 (11?)
which is decade if you want to go to 7seg displays. I hope the circuit is
basically right.

Nowadays I would use a PIC for something like that though, reduces the IC
count to 1. I am sure that the direction logic can be implemented with
analogue electronics too.

Eugene.
 
Top