Author Topic: Open Distributed Device Modules  (Read 923 times)

0 Members and 1 Guest are viewing this topic.

Offline tomgatTopic starter

  • Regular Contributor
  • *
  • Posts: 54
  • Country: us
Open Distributed Device Modules
« on: February 10, 2023, 09:21:24 pm »
So I need to design a stackable module design for a industrial sector project, and was thinking if I was going down this path, why not make it an open design.  At a top level what I need is what commercial offerings (AB,B&R, Siemens, etc) already do in that you plug in a collection of IO modules (Inputs/Outputs/ADCs/DAC/Encoders/etc) with different purposes in a chain, and then a master microcontroller automatically detects each module and their location.  I cant seem to find any of the commercial offerings that are open, and was curious if anyone has seen anything like this.  If not, do you think something like this should exist?  (example: SparkFun has Qwiic which is horribly deficient for several reasons, and Mikroe has MikroBus isnt chainable)

As a first thought.. On the hardware side, I was thinking of each module having a cheap, small, and fast microcontroller (RP2040?) that are preprogrammed and whose only purpose is to identify each module and then relay the other modules communications back to the master controller.  Any thoughts or ideas would be appreciated.
 

Offline redkitedesign

  • Regular Contributor
  • *
  • Posts: 111
  • Country: nl
    • Red Kite Design
Re: Open Distributed Device Modules
« Reply #1 on: February 13, 2023, 11:41:33 am »
Start with some design limitations.
- How many devices on the bus
- How much communications (bandwith and latency)
- Hot pluggable or not
- Powered independently or centrally?

There are some simple basics. RS422 only requires 2 wires, and is reasonably robust against broken/unpowered devices on the bus
CAN has tons of support from automotive but is less robust
Both can do discovery with the appropriate software.

If you need to discover the physical order of the bus you'll probably want some ring-like bus, where each device passes a message to the next (and thus can add its name to the discovery order). However, those are hard to protect against a single broken device in the chain. You can add some resilience by making the chain a bi-directional ring (so all devices behind the broken one can be reached form the other side)


If you will only have about 10 devices, you might want to use a simple 4-bit addressing scheme. Do some clever bit swaps/inversions in each module, and each module sees 0b0001 when addressed.

You can combine methods: A RS422 bus for communications, and a single bit neighbour-to neighbour interface that can be controlled through RS422 to discover the order.
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf

 

- - -
-->