Hi, I'm a Arduino Beginner try to develop a project.
It's a parking lot unoccupied parking space counter. Basicly each parking space will have an arduino with a ultrasonic sensor.
My question is, how to get the information from each arduino and send to a main computer? The parking lot has about 300 spaces.
Should I use LoRa or wired communication to send data?
Does each arduino must send their data directly to the computer or the data must send from one arduino to the next one and then to the next one until arrive at the computer?(Serie communication)?
Just trying to figure out the best way before start my researches thanks
Start with one Arduino and one parking space, communicating with one PC. Once that is working to your satisfaction, then starting thinking of expanding the project.
This is a popular classroom assignment, so you will find many posts on this forum discussing it.
consider ESP32 + ultrasonic transducer using ESP-MESH for communication
at some point in the mesh you would require access to local WiFi or similar to communicate results to the main computer
how will you power the microcontrollers?
EDIT: a single microcontroller could probably control several transducers
horace, thanks for answering. I'll research about Esp Mesh, I understand one microcontroller can control several transducers, but I would like to use one microcontroller for each parking space the way to reduce wiring, I want to create something plugNplay, easy to install.
I'll have an AC DC adapter on each spot for powering the microcontrollers
300 weather-protected AC outlets? You must be doing a classroom exercise. Try running that past any infrastructure engineer in this country, and you'd be looking for a new job. You'll have to do some aggregating of sensor inputs at some point. Might as well plan for it now.
camsysca , parking lots are huge areas, to use a single microcontroller to control 10 Ultrasonic sensor for instance means to run meters and meters of low voltage (3v3- 5v) wires, this would result voltage drop, and data loss.
Run a power cable all across the parking its not complicated, and makes the system easier to install.
Do you need to know that there are unoccupied spaces or do you need to know what unoccupied spaces there are?
If it's a controlled parking lot, and the former, then just detecting and counting cars as they enter and leave should do, for a very basic system, no?
Coordinating 300 ultrasonic sensors is a mighty tall task for a self-described beginner, just a heads-up.
@edumaster182
Split them into 12 groups of 25 or by the number of floors, or whatever
Connect the 25 via an RS485 bus.
Then connect the 12 groups (or floors) via Ethernet with a router to a main computer.
300 Arduino UNO’s is not a beginners project !
As said you should try with one , then worry about moving on .
Why are you wanting do this ?? The installation and powering of such a system is a major undertaking .
You are not working on a parking lot, you are working on a "proof of concept" for a class project.
This simulation by @Koepel could be 32 "parking spaces" shown as switches. Use any DPDT (must be HIGH or LOW, not ON or OFF) as a means of parking sensor... then scale it up tenfold.
Unless, of course, the method of detection has been mandated by someone else. It still smells like a classroom exercise (in futility).
Besides, we still don't have an answer about whether it's enough to simply know entries/exits, or if we have to have a map showing which spots are empty, or what.
Camsysca let me be clearer.
No, it's not a classroom exercise.
I actually want to install a system that shows how many unoccupied parking spaces there are on parking lot, and where.
I know there is a system for that on market, but too expensive.
Then I thought, would be possible do it using Arduino?
I'm actually beginner on Arduino, but I have some knowledge on electronics, and I'm graduated as information systems, I'm able to code some languages like Java, cpp, etc.
I did this project in a model, using a single Arduino and some ultrasonic sensors. And now trying in real size and using a lot of Arduinos.
My doubt is.
Is it possible do it wireless communication?
If not , how to do it wired? How to make data run that distances on a wired connection or wireless connection? I don't have much knowledge about communication between microcontrollers.
the leads on the Waterproof JSN-SR04T Ultrasonic sensors (use 3.3volt sensors) are 2meters in length therefore one ESP32 could probably monitor three parking spaces- reduces the number of ESP32s and hence wiring/power supplies by two thirds
think you need to do some prototyping and experimentation
For an outdoor installation the cheapest would be a vision system mounted on a light pole as one device could cover 50+ parking spots. Paint a distinctive shape in the middle of each space. If the camera can see it then the spot is empty.
Where can you get a COTS, 300 space, wireless, parking sensor system?
Why? You need power, so you need wires.
Wouldn't you want to know how microcontrollers communicate if you are building a project where microcontrollers communicate?
Thank you, @edumaster182 , for providing much of the context missing from your first post. As you may be gathering, to have a concise yet information-heavy first post is essential to focus the discussion of the many helpers here. But, forgive me, I have more questions.
- is this a one-off, or are you trying to develop a system that will be flexible for future similar requirements? I ask, because some effective answers for a specific use case may be useless for another.
- can we think of this as a rectangular single level parking lot, 15x20, or must we contend with large gaps in the spacing, scattered around the perimeter of a building, etc? Or, is it a 6-level parking garage, with 5 rows of 10 vehicles?
- What is the surrounding environment? Is the parking space surrounded by multi-story apartment buildings, or wide open fields?
- A vision system might make a lot of sense, if you can mount cameras on a light post and see large portions of the parking space in each view(particularly relevant in the 15 x 20 option).
Feel free to ignore this, if you feel you have already given enough information.
See post #8
You need to be clearer still. Indoor concrete or outdoor? Will you be attempting to wirelessly communicate through fire resistive, steel reinforced concrete walls and floors? What is the usage? Residential apartment type or commercial type like a mall parking underground?
Why do you need to know what spots are free?
What sort of maintenance schedule do you anticipate for this system?
And so on...
There's a lot of questions that need answered before giving this Arduino-parking system and dues. This is no small budget project as described and based on the "plan" scarcely detailed by OP, is unlikely to work and may be dangerous.
For example:
Um, no you won't. You can't just go sticking electrical branch lines off the current system wherever you want and batteries are out of the question.
If OP is planning on using AC/DC wall type adapters to retrofitted electrical outlets, what's to stop 10% of the lot's capacity from plugging in portable EV chargers into the same socket, pulling at least 960 or so watts each as EVs become more popular?
Not for a beginner, with a 300 node network.