Login
You're viewing the code4lib.social public feed.
  • Nov 24, 2026, 9:37 PM

    Polling the Fediverse electronics hive mind. I'm looking for an unusual bus!

    (1/2)

    I want to have a few dozen modules with a microcontroller inside & with slots for patch cables. Eg 3.5mm jack and max 4 wires in each cable.

    Each module has a few input knobs to set values.

    The cables can connect the modules in any arbitrary topology.

    I need the blocks to be able to report who they're connected to and what their parameters are - so the system can be reproduced as a node graph on a computer.

    💬 2🔄 1⭐ 0

Replies

  • Nov 24, 2026, 9:43 PM

    (2/2) What would be a suitable bus & protocol to use?

    There is no single wire pair because the topology can be random.

    Best if the cables can also power the MCUs.

    I guess they need to discover their neighbors, and broadcast their current parameters, and deal with collisions, and there can't be an obvious terminator at the end of the line...

    Oh and because I need a few dozens it should stay cheap-ish?

    💬 4🔄 0⭐ 0
  • 💬 0🔄 0⭐ 0
  • Nov 24, 2026, 10:01 PM

    @twilliability is there a "direction" to the links between modules? Is there some constraints to topology (e.g. all modules are connected to some root module)?

    In case of the latter, I'd avoid any shared bus, and just have the modules talk through a single half-duplex TLL-level serial line. Using audio cables, that only needs 3 pins and should work up to a meter or so since audio cables are shielded.

    💬 1🔄 0⭐ 0
  • Nov 24, 2026, 10:02 PM

    @twilliability you'd have the "root" module ask its neighbors for who they are, after which each neighbor asks each of its neighbors who they are and forwards the responses to the root node. You need some mechanism to break cycles, for instance by the root pinning some timestamp to its enumeration request and every module only responding to one request on one port once.

    💬 1🔄 0⭐ 0
  • Nov 25, 2026, 7:31 AM

    @jaseg this is excellent! yes, the idea is to have a special module, which is the one relaying the current network info to the computer.

    propagating out from there and asking neighbors in turn, following a depth-first walk, sounds perfect.

    thank you!

    💬 0🔄 0⭐ 0
  • Nov 24, 2026, 10:13 PM

    @twilliability I'm wondering if USB-C might work, it has symmetrical cables and can run power. Have several small microcontrollers implementing a USB to serial and then a main MCU talking to each of them and your other inputs.

    💬 0🔄 0⭐ 0
  • Nov 25, 2026, 7:31 AM

    @twilliability The nanoleaf aurora panels have to save the same problem. They use a 4 pin connector: two for power supply, one for a half-duplex serial, shared between all panels and then an individually controllable "select" pin, used for discovering the topology.

    There is a description of the protocol at kronoshacker.blogspot.com/2018 , a teardown/discussion of the panel hardware is at eevblog.com/forum/projects/nan .

    However, they have a module implementing a dedicated root role.

    💬 1🔄 0⭐ 0
  • 💬 0🔄 0⭐ 0
  • 💬 0🔄 0⭐ 0