# counting objects without microcontroller?

#### Layan_AK

Joined Mar 28, 2017
78
hi all ,

i need to count the persons entering the room and go out the room and display the total person inside the room on 7 segments display.

how can i do that without using microcontroller .

regards

#### Layan_AK

Joined Mar 28, 2017
78
thanks alot.

Last edited:

Joined Jan 15, 2015
4,573
hi all ,

i need to count the persons entering the room and go out the room and display the total person inside the room on 7 segments display.

how can i do that without using microcontroller .

regards
You can do it using discrete components. This is often referred to as a people counter and is a popular school project. People entering a room increment the count up and people leaving the room decrements the count down. The idea now becomes figuring out if people are coming or going, their direction of travel. The sensors are normally a pair of photo diodes spaced about 6" apart and the circuit using discreet components will look a little like this:

Keep in mind, using a single 7 segment display you can only count up 0 through 9 and count down 9 through 0 people.I suggest you Google the data sheets for the chips used and understand exactly what is going on with the circuit. Again, this sounds like a basic schoolwork project.

Ron

#### Layan_AK

Joined Mar 28, 2017
78
You can do it using discrete components. This is often referred to as a people counter and is a popular school project. People entering a room increment the count up and people leaving the room decrements the count down. The idea now becomes figuring out if people are coming or going, their direction of travel. The sensors are normally a pair of photo diodes spaced about 6" apart and the circuit using discreet components will look a little like this:

View attachment 148633

Keep in mind, using a single 7 segment display you can only count up 0 through 9 and count down 9 through 0 people.I suggest you Google the data sheets for the chips used and understand exactly what is going on with the circuit. Again, this sounds like a basic schoolwork project.

Ron

Thank you

This will work if the people enter and leave the room from the same door ?

#### AnalogKid

Joined Aug 1, 2013
8,137
The up-down counter part is relatively simple; there are generations of counter IC's starting in the 60's that will do the work. The problem is the people sensor, the thing that generates an up clock and a down clock. If you are talking about one door that people pass through in both directions, this can be very difficult to sense accurately. Rather than keep us guessing, how about some more information about the physical conditions of the system, more detailed requirements about accuracy, portability, maximum body count, etc?

ak

Joined Jan 15, 2015
4,573
Thank you

This will work if the people enter and leave the room from the same door ?
Yes, which is why I suggested it.

The up-down counter part is relatively simple; there are generations of counter IC's starting in the 60's that will do the work. The problem is the people sensor, the thing that generates an up clock and a down clock. If you are talking about one door that people pass through in both directions, this can be very difficult to sense accurately. Rather than keep us guessing, how about some more information about the physical conditions of the system, more detailed requirements about accuracy, portability, maximum body count, etc?

ak
Note the above quote and describe exactly what you are trying to do? Additionally if this is schoolwork it should have been posted under schoolwork. I suggested you lookup the data sheets for the circuit I posted and understand how it works.

Ron

#### Layan_AK

Joined Mar 28, 2017
78
Thank you for your appreciated effort..

Bt how to place the sensors to count the people enter or leave the same door .

It's not a school work.

Regards

Joined Jan 15, 2015
4,573
Thank you for your appreciated effort..

Bt how to place the sensors to count the people enter or leave the same door .

It's not a school work.

Regards
I mentioned that earlier, you place the sensors about 6" (152mm) apart. I suggested you read the data sheets and understand the logic and how the circuit actually works. I also asked if this is schoolwork?

Ron

#### Danko

Joined Nov 22, 2017
817
Text below is from https://www.trafsys.com/people-counting/
And there are free eBooks about people-counting technique.
===========================
"If you have an open entrance, horizontal counting can generally be less accurate because multiple people can block each other from being counted by the horizontal door counter. Also, horizontal counting requires that the door only swings out, since in-swinging doors will block the beam from detection.
The wider the entrance, or the more group traffic you have, the less accurate horizontal counting will be. What is your ceiling height and ceiling construction? If you are looking at horizontal counting sensors, they will work at up to about 15 feet of entrance width — and are only recommended at this width if you don’t have much group traffic. If you are considering an overhead sensor, you will need one sensor for every 11 feet of entrance width, depending on your ceiling height. And, with overhead door sensors, you will need network connections to the sensor in the ceiling at the entrance.
If you need traffic counts in the per-hour range, consider using one of the bi-directional sensors (which includes all of the overhead sensors and the horizontal OmniCounter). Since the sensor captures ins and outs, your hourly traffic counting results will match up closer to the actual traffic trends throughout the day."

#### MisterBill2

Joined Jan 23, 2018
3,983
The two IC counters that can do it for you without much external circuitry are the CD4510 and the CD4516. an added benefit is that they can easily cascade to gain a much higher count capacity. The 4510 is a BCD counter while the 4516 counts in straight binary, thus two of them will provide an 8-bit readout. That is about as simple as I can come up with. the sensors have quite a few options, what I like is a small laser and a phototransistor detector.

#### AnalogKid

Joined Aug 1, 2013
8,137
the sensors have quite a few options, what I like is a small laser and a phototransistor detector.
You would need two beams separated enough to determine the direction of travel, plus some logic to turn that into clock pulses. Very similar to a quadrature encoder circuit.

ak