Low cost person counter for small businesses

Looking for some project guidance with this school project I'm working on. Here's the general idea.

With many states limiting the capacity of small businesses because of the virus, the owner has to be able to maintain control of the amount of people inside of a building. This device would make it cheap for businesses to maintain that safe number of people. To accomplish this, a box is placed above the door with sensors that measure distance. Using two sensors you can establish which direction the person is going and the Arduino uses this information to display a count.

Because I have no experience with Arduino, I'm not sure if I can wire both of the sensors and the display, to the board I want. It seems feasible but being unsure has made me hesitant to purchase everything.

Here are my current plans and ideas, maybe you guys can let me know if there are any compatibility issues.

I was thinking about using the Arduino nano mounted on a mini breadboard connected to two VL53L0X laser sensors and an .96" OLED display , powered by a 9volt battery.

Here are the amazon links to what I'm thinking about buying:
VL53L0X sensor
Arduino Nano kit
(the clock kit just happens to have most of the things I need)

Last thing:
I found a youtube video of a guy who implements the exact same sensors but on a UNO and not a NANO. This video has been really good in terms of helping me understanding the general wiring layout and code.

Thanks in advance for any help or beginner tips.

but on a UNO and not a NANO

Same processor, different form factor.

Set up two turnstiles, one for in and one for out.
Lock the inbound until enough folks leave.
These are pretty inexpensive

These might be a little more user friendly

Same processor, different form factor.

Ok so then I can use the nano, but I'm not sure that the screen can be added because for example both of the sensors have SCL and SDA connections but so does the OLED screen. So does everything go to those pins on the board or do the sensors need separate pins from the screen

SDA and SCL refer to the I2C bus - as long as the devices all have different addresses, you can attach as many as you like (up to 127 devices - I've never tried that many!)

Set up two turnstiles, one for in and one for out.
Lock the inbound until enough folks leave.

Problem is that because the project is tackling corona virus, we want to reduce contact points while also making it really cheap to implement. The whole sensor system is contactless and shouldn't be more that 30$ to make. Other solutions already exist like the turnstiles that you sent but those solutions are kinda expensive for a small shop to purchase.

SDA and SCL refer to the I2C bus - as long as the devices all have different addresses, you can attach as many as you like (up to 127 devices - I've never tried that many!)

Perfect, I should be good connecting everything to the board then. Thanks!

I2C does have electrical limits. You will need 4.7K pullup resistors at the end of the chain of parts.
Some parts may be 3.3V, some 5V. Wire.h is used for I2C - if you have 3.3V devices, you will want to turn off the Nano's internal pullups to 5V that are turned on ( I've read that could be as simple as adding digitalWrite ( SCL, LOW); and digitalWrite (SDA, LOW); after calling Wire.begin(); ) and pullup to 3.3V instead (2.7K or 3.3K probably better in that case.

If connecting a lot of things, keep the wiring neat and short; each device can only pull the SCL & SDA lines low - the pullup resistor is what brings them high. Low wire capacitance and the pullup resistor are integral to maintaining a good signal.

Well I've had a lot of success measuring the rpm of an electric motor with the tracker sensor TCRT5000. You can buy 10 of them from amazon for $13. It sort of combines everything you need- the sensor and the internal counting and resistors where all you all you've got to connect is a ground, 5V, and one digital pin to receive the data. Then all you've got to do is modify the code posted below so it doesn't count too fast or too slow and bam, there's your counter.

The only think you might have to worry about is if someone wears a super reflective cap, I think...because for my motor the idea was that the sensor would get tripped every time the laser was reflected back at itself (i.e when the reflective part of the motor turned its way) so you would have to reverse this in the code so the sensor gets tripped when it's not getting reflected back at itself which would probably constitute the need for a reflective sheet on the floor..which would get dirty as people walk on it... YOU KNOW WHAT it's just an idea in case your other idea doesn't pan out.

<float value=0;
float rev=0;
int rpm;
int oldtime=0;
int time;

void isr()

void setup()

void loop()



Variables shared with interrupt context should be qualified "volatile", and accesses to such multi-byte variables should be protected by disabling interrupts.

Revolutions are an integer value, are they now?
Why make things difficult with a float value?

It's a good thing that pins default to input, isn't it?

Please remember to us code tags when posting code.

Jack has a 7 day holiday.

Keep it civil prople.....Xmas and all that (or lay off the booze)

The question arises, will the system somehow react to the excess of the number of logged in, when tracking? I have not noticed any signaling components ... Correct me if I am inattentive.

Having used ST's ToF sensors for counting purposes before, I would say my personal opinion is to consider another way. Pointing them in the general direction of a window, or at a surface illuminated by the sun (ex. through a window) renders them almost unusable.

Artificial lighting is no problem though, so if you are sure of the environment that the device is gonna operate in they could work okay.

If you want a project guider you with low cost you need to search in online platforms where you can get the one you want. This guider will be working in big business.

This topic was automatically closed 120 days after the last reply. New replies are no longer allowed.