I have made a simple object counter which gets triggered by the output of the PIR. The count is shown on the LCD display. I have used Grove LCD for my project
This can be applied to numerous places like a Discotheque, where its important to keep a count of people entering to maintain balance, or a wedding/ family gathering, or any other places where count of people is important like airport, theater, stadium, etc
Step 1: PIR
HC-SR501 is the PIR sensor I have used in this project is callibrated to generate a High output in the presence of body heat in its view and low otherwise.
This PIR has a field of view of 120 degrees so you have to be very skeptical about the placement of the sensor.
I suggest placing it in the side of the door do as to narrow its field and thus we do not get double readings
Step 2: Connections
Connect Vin or pir to 3V3, Gnd to Gnd, and Out to pin 3.
Also connect the grove Lcd on the board.
Step 3: Code
Thus the count only increases by 1 even If the person stands next to PIR and doesnt move.
Step 4: Output
The output will look like this, you can even change the color og the display to red and green to direct the person to move and not move.