Help on multi Arduinos project

Hello,

The description of the project as follows:

I want to count the number of people in a building as well as in every room.
Let's assume that the building is empty at the beginning, and the building has 4 entrances, and 50 rooms, each room has 1 door.

My idea is to design a unit that consist of arduino board, ultrasonic sensor and wireless module. and put this unit on each door so it will count locally whoever enters or exits the building and the rooms. and then send this information to the master. On master software will process all information and display the results.

What is the best way to achieve this ? what are the suggested boards, sensor and wireless module and its communication protocol ?

My idea is to design a unit that consist of arduino board, ultrasonic sensor

That is the very hard part. It is almost impossible to count people in and out of a door without making them go through a turnstile. Try making one before you consider a large number. I have never seen anything that will do that.

Do a search on this forum as people counting has been a repeating subject, and you will find lots of discussions on how you could possibly do it, and the many pitfalls (like two people entering closely together, people of different height, people turning around within the door opening, etc).

and you will find lots of discussions on how you could possibly do it,

But note that nobody actually has done it.

Thank you for your reply.

first, I’ll try to make one unit to test it. Then, if it works I’ll make the rest.

But for the communication problem, What is the best way to send the information from several arduinos to the PC ?

Perhaps logging each 'count' (or piece of data) to a database?

Or perhaps setting up a MQTT broker/server (using a RaspberryPi or something)

Limitless91:
But for the communication problem, What is the best way to send the information from several arduinos to the PC ?

Depends on distance, environment, budget, data volume... Common options include TTL/USB Serial, RS232, RS485 for wired connections, and Bluetooth, WiFi, LoRa/LoRaWAN, IR, GPRS/3G/4G/5G mobile, and others for wireless connections.

wvmarle:
Depends on distance, environment, budget, data volume... Common options include TTL/USB Serial, RS232, RS485 for wired connections, and Bluetooth, WiFi, LoRa/LoRaWAN, IR, GPRS/3G/4G/5G mobile, and others for wireless connections.

Lets say that I have 50 units to cover 100 m distance. What is the best wireless connections for this purpose? and it can work indoor and outdoor.

Any obstacles between them? If so, what? What communication do you expect (all communicate to all, or transmit data to a central node, data volume)? 100 meters is the distance of the longest link?

In most case there are no obstacles between them.

I want to transmit date to a central node. and the volume data are small just 3 or 4 float numbers from each unit.

and yes 100 m is the longest distance between them.

Thank you.

Bluetooth is out, it doesn't have the range. Mobile data is too expensive for this short range and little data.

100m may be too much for WiFi connections, though line of sight could work if you use an external antenna (some ESP8266 modules support this, much better range than the PCB antenna).

nrf24l01 modules are peer to peer (don't know if they can handle multiple peers) but likely don't have sufficient range.

LoRa and LoRaWAN will for sure work, even with simple spring antennas.

There are various other radio modules out there such as the RFM69. Cheaper than LoRa, less range, 100m is probably OK for them as they work at 433 or 900 MHz.

Also look at the RadioHead library, lots of wireless options are covered. I don't know all of them, you may run into something that's even cheaper and still does the job for your application.