Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

Person counter for doorway

Status
Not open for further replies.

Mosaic

Well-Known Member
Hi all:
I am designing a counter to track the total number of people in a room with one 3' wide by 7' hi entry. I am considering a pair of these receivers https://www.newark.com/vishay-semic...eiver-45m-through-hole/dp/02P9885?ost=02p9885

driven by a single IR transmitter.
https://www.newark.com/vishay-semiconductor/tsal6100/ir-emitter-940nm-t-1-3-4-through/dp/33C1732

I hope to drive the transmitter with a 39.2 Khz PWM signal (8Mhz clock) with a 16F886 PIC. Use an interrupt to PCM modulate it and analyze the received signals (same 16F886) to determine the direction of person movement through the door.

I'd like some advice on transmitter/ receiver placemant and signal interpretation to minimize errors.

thx
 
How are you going to know if what the sensor sees is one person or two people walking close together?
 
Or one person entering when another person is leaving at the same time?
 
It's to track access to a display so the entry/ exit will be relatively orderly / managed.
 
What you use for sensors really doesn't matter they can be IR, photo electric, or any number of other sensors out there. This is a common school project and a Google of "People Counter Circuit" will bring up dozens of hits with designs ranging from discreet components to using micro-controllers. It comes down to using two sensors spaced so as a person enters they trip sensor A for example before Sensor B, so A leads B and on exit they trigger B before A so B leads A. That will increment a counter either Up (add a person) or Down (subtract a person. All of this only works assuming as you mention a managed orderly entry and exit. If you want to go IR then generally two IR pairs are used and not a single IR Xmtr with two Rcvrs. The sensor placement will depend on the other hardware used and in the case of a uC how your code is written.

Ron
 
I've done something similar, you'll need to put a tube over the rx end, the infra red scatters and reflects and sometimes gets around the item in the way.
Also you need on most dectectors to tone burst the 40kc, a continuous 40kc transmission doesnt work.
 
Would it be best to use opposing TX & RX rather than Tx & Rx in the same housing coupled with an opposing reflector?
 
2 opposed devices will work better, you would save some wiring if you did it refective however.
Ididnt mean that in my first reply, I was saying that a standard led probably isnt directional enough and will throw light all over making it difficult to block i t and operate the detector.
 
The Tx has a 10 degree arc, but I will have to counter sink the Rx to diminish reflection scatter.
 
Or one person entering when another person is leaving at the same time?
He said the door opening is 3' x 7' so the chances of two people walking thru together is pretty difficult if not impossible unless they rub butts sideways! The sensors should be waist high or higher to not trigger twice from a person's two legs passing by them.
 
I wanted to use a 4" tall , 2 digit 7 segment display for outdoor use. Or something similar in size, but I can't find one bright enough.
 
He said the door opening is 3' x 7' so the chances of two people walking thru together is pretty difficult if not impossible unless they rub butts sideways! The sensors should be waist high or higher to not trigger twice from a person's two legs passing by them.
I know that some people are HUGE and cannot pass through a 3' doorway. The doorways in my home are 2'-4" and two of us can pass without any problem.
Some stores pile stuff in their walkways and people pass each other (without groping) all the time.
 
Two alternatives you could also think upon:

1/You could use a laser and photo-resistor pair. On-Off-On signal will be given out and you need to judge whether a person has walked through on basis on each of these edge and level duration.
Laser since its directional .
2/If its a managed crowd , you could have a manual switch itself, which is to be pressed by each person who enters. A beep response (and the display) you have could be used as an acknowledgement.
3/ The IR-pair on opposite sides too is good but you will require additional circuitry for tx, which is not required if you use 1/

Regards,
SAV
 
You could make a 7 seg display that size with fluorescent tubes, you'd need quick starters.
 
LEDs with a very narrow beam of only 15 degrees will make 3 dots on a segment. Even 30 degrees is too narrow.
My cheap Chinese solar garden lights have 5mm LEDs with a 120 degrees angle and many surface-mount or high power LEDs are the same.

You should not use a 22 ohm current-limiting resistor because you []b]do not know[/b] the actual LED forward voltage and the datasheet does not even say the minimum voltage.
What is the current if the actual forward voltage is 2.8V each? The total will be 8.4V and if the supply is 10.1V then the current is (10.1V - 8.4V)/22 ohms= 77.3mA and the LEDs will quickly burn out.

You should calculate the value of the current-limiting resistor if the LEDs are 2.8V, 3.2V and 4.0V. Then you will see that maybe a 12.0V or 15V power supply should be used.
 
The spec sheet says the typical Vf is 3.2V. That calcs to a 22 ohm resistor for a 10.1V supply and a 9.6Vf with 3 series LEDS. I can add some diffusing and see if its still bright enough.
 
NOBODY is going to test hundreds of LEDs to possibly find some "typical" ones for you. Maybe the latest production run did not produce any "typical" ones.
The LEDs you buy might all have a forward voltage of 2.8V or less. Then they quickly burn out if you use a current-limiting resistor with a value as low as 22 ohms.
 
Ok, I understand now. There isn't a min. spec to use for the Vf. How about driving each 'typical' 9.6V, 3 LED segment with this:
LED_Driver.png
Varying the supply voltage or Vf by a couple volts has little effect on the current. I am running at 30mA as the display is a 2 digit and will share the driver time with a 50% duty. I am planning on using a 74HC595 shift register to drive the segments via this cct.
Dissipation on the mmbt3904 shouldn't exceed 150mW.

EDIT: Are there constant current shift register LED drivers like the CAT4008 for >9V voltages?
 
Last edited:
Perfect. Use a constant current driver circuit for the LEDs. But R2 should be 1.4k or less because the datasheet for the 2N3904 driver and most other little transistors show that for it to saturate its base current needs to be 1/10th its collector current.
 
Status
Not open for further replies.

Latest threads

Back
Top