0
\$\begingroup\$

Currently I am working on a project where I need to install several peripheral devices in the network along with a master. This total system have some industrial application. I need to have the network expandable as there might be device addition or subtraction from the network. The device might gets faulty so will need to replace. All the peripheral devices are fairly big and will cover around 2ft X 3ft area, leaving behind the minimum communication port to port distance at least of 3 ft. Now, I have thought of SPI, I2C, CAN Bus, LAN networking. I have some doubts in my mind to select between them. Please consider me newbie in the field of communication and help me to select the best one.

SPI: I have already rejected the protocol as my requirement is off-board / inter-device communication. Also I need 2 way communication, which might flood the master device with bunch of CS/SS wiring and make it messy in every aspect.

I2C: It seems promising to me, but if you consider the length of the network I doubt It will work proficiently. The speed of the network is not the big criteria till it drops bellow 100 kBPS.

CAN Bus: Totally confused and didn't have found much of documentation w.r.t. AVR MCUs. I seek your help on this seriously.

Wired LAN: Good option, can be implemented where the systems are closely maintained. but when it comes to a scenario where you don't have any control over the number of devices, that makes difficult to provide service. Mainly maintaining the IP records when you replace the device will be the headache to the operator.

I have already have implemented WiFi communication between industrial devices for my last project, but that have problem of random disconnection due to hardware limits.

I am expecting here some guidance for selecting the protocol.

BTW: The heart of all of my peripherals is ATmega32U4 MCU and the Master device will be a PC.

\$\endgroup\$
  • \$\begingroup\$ Ohhh.... Almost have forgotten MODBUS RTU.... Let me think over that too \$\endgroup\$ – Aaditya Dengle Apr 14 '18 at 18:13
0
\$\begingroup\$

You are mixing few layers of the networking stack.

  • Physical layer - I2C, SPI, Ethernet PHY Physical implementation details (Bus length, impedance)
  • Media access layer - I2C frame format, SPI Chip select pins, Ethernet MAC layer
  • Network management - Clients connecting and disconnecting, DHCP etc.

Those protocols vary from a very simple to the very complex and the choice really depend on your requirements and constraints.

The concept of layers allows you to choose an optimal solution for each part of the network stack. You can, theoretically, run a DHCP like service over an I2C link.

\$\endgroup\$
  • \$\begingroup\$ Thanks @Lior Billia, I think I have clearly distinguished the stacks by Physical layers, and have stated some of the drawbacks of applying them in my system. I agree with you about DHCP over I2C, as you can make the address setting by means of hard IO pins. For now I am going to work with I2C and will post the results here soon. Mean while other comments are also welcome. \$\endgroup\$ – Aaditya Dengle Apr 14 '18 at 16:45

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.