# Counter clients with PIC16F84

Joined Feb 17, 2012
13
hello friends,
we try to make a small project and need your help,

specifications:

a store owner, gives the responsibility of this site to an employee,
but he wants to oversee the movement of his store on a daily basis, with a counter for counting the number of customers who visited the site,

it should be done with a PIC16F84 and a sensor for detecting the passage,
but we are stuck in front of some problems:
- It there's only one door so we can not distinguish between an incoming or outgoing person, so we decided early to increment the counter each crossing detection, and at the end divide the number by 2
it appears also to other problems, for example, a kid in and out several times so many times the sensor detects it, it will be counted as a client ...

and thank you

#### MrChips

Joined Oct 2, 2009
23,269
You put two sensors on the door, one slightly ahead of the other, and you can tell who's going and coming.

For the kid going in and out several times, you get a camera and do face recognition and you zap him every time he comes in the store.

#### Felo

Joined Feb 20, 2012
91
I think that there will always be some deviation from the real number of visitors, the only thing you can do about it is trying to keep it as less as posible for wich I suggest this approach.

-There will be 2 sensors separated an X distance betwen them so as the costumer visiting the store will have to go trough 2 sensors one should be place in the inmediate access to the store and the other near the counter where the costumer asks for anything.

-The amount of counts of the 1º sensor should be alway higher than the 2º sensor. these 2 numbers could either be substracted or averaged (average suggested), then divided by 2, you could use more than 2 sensors and apply the same logic. which should give you a more accurate number of visitors.

Hope it helps.