3

For a parking management system I am going to create an Arduino network.

An Arduino with an ultrasonic sensor will be placed above each parking space. If car is parked at specific location Arduino will inform master (PC) and also turn RED light ON.

I am not sure how I can make network with minimum wiring. I think RS485 will be suitable for this purpose.

There will be almost 200 Arduinos in a network. I have following questions in mind:

  1. Should I go for RS485 protocol or something else?
  2. Can RS485 support 200 devices as there will be only short communication (i.e device ID and parking status)?
  3. I am planning to lay CAT6 cable. Two pairs will be used for power transmission and two pairs will be available for communication.
Greenonline
  • 3,152
  • 7
  • 36
  • 48
umair
  • 31
  • 1

2 Answers2

3

This sounds, to me, like a job for CAN. It's the current de-facto standard for industrial inter-MCU cabled connections. It's used, not only in automobiles, but also to control elevators and almost all other modern industrial distributed applications.

Note that CAN is designed to only support up to 30 nodes, so you would need to split your network into sections and have groups of nodes amalgamated together into a single sub-network. For 200 nodes you may want 10 subnetworks - that is, 20 nodes connected together to one super-node, which is then connected to the "backbone" CAN bus.

However, CAN can be run at lower baud rates than normal, and that increases the number of nodes you can have on any one network segment. It potentially (bus capacitance permitting) support thousands of nodes.

Another option is to use CAN to connect multiple "master" nodes together into a backbone, and then those "master" nodes connect to a number of sub-nodes using LIN (which is cheaper to implement than CAN).

enter image description here

LIN can support a maximum of 15 nodes (plus one master node) per network, so you can get a theoretical maximum of 29*15 (assuming 1 CAN node is the connection to the PC), or 435 nodes.

You could also use RS-485, but that is also limited to around 30 "unit loads", and the number of nodes you could put on one segment is dependent on the "load" each node imposes. In practical terms it's rare to go over 30-40 nodes on a single segment, and grouping nodes together into sub-networks (as above with CAN/LIN) would be needed. So you may as well use the current standard for this kind of communication, and use CAN/LIN.

Majenko
  • 105,851
  • 5
  • 82
  • 139
0

Regarding your third point, a CAT6 cable may not work as well as you expect for power delivery depending on the topology you choose. The most common variety of CAT6 uses AWG24 wires with a resistance about 0,085 Ohm/m, so a 100 m chunk of such cable will have a resistance of about 17 Ohms. Assuming a current of 100mA, you will lose 1.7V in the cable, so if you supply it with 5V, the load will only see 3.3V.

This is one more reason to split your network into segments. If I were to implement this project, I would power the "backbone" cable with higher voltage (12 - 24V) and install DC-DC converters producing 5V locally in each upper-level node.

It seems from the comments that you're looking into solutions which would allow you to use standard UARTs for communication. You can of course use RS485 (you will still need several segments). Otherwise, I advice you to look at how LIN is implemented: essentially, a 19200 bps UART signal is made open-drain (to combine all TX/RX pairs into a single wire) and amplified to 12V for noise immunity. Software-wise, a master sends a frame including slave's address and waits for a reply, then talks to the next slave and so on. Slaves only respond when they receive a frame with their address in it.

If you don't want to spend extra effort and implement something standard, at least looking into an existing spec while implementing your own solution will save you a lot of trouble.

Dmitry Grigoryev
  • 1,288
  • 11
  • 31