Number of persons inside the house

Hello. I need to know if is there any way get the number of persons inside a room with only one entry using arduino and two ir sensors and eventually screen . I can’t figure any idea of how to do it if there is only one entry .

Google how rotary encoders with IR sensors determine an object’s direction of travel, as well as the count of each… Then using the same principle with your two IR sensors, you can determine which direction a person is moving across the entrance (in or out) and assuming starting from a fixed beginning (generally 0) you can keep count of such entries and exits and thus determine the number of rats… er… people… in your little maze :rat: :stuck_out_tongue:


@Gunner :smile: :smile: :smile: when reading your comment bro !

@Denis_Pupaza: I think the advice from @Gunner should be for a very precise system but I suppose if you have only one door in and out the same one then I suggest you just need 1 ultrasonic sensor like this one HC-SR04 should be enough. For the code yes I copy the idea from @Gunner the sensor detects and counts one person in / out by the distance increase / decrease. For this way 1 single Node MCU will fit for the story … hope this could help man … ahhhhh I will make one to measure the leafs of the neighbor’s falling / flying to my house this season … too tired to sweep them … claim him back a bottle of brandy at the year-end hahahaha

1 Like