Skip to content

Step 4: Node Addresses

The LCOS Layout Control Mesh Network (LCMN) is a routed mesh network for nRF24L01+ radios.

Topology is generally hub-and-spoke, using a MASTER node as the top hub uniting all the branches beneath it. The MASTER can have up to 5 children, as can each child. The depth of the topology can be up to 5 levels (including the MASTER), which results in up to 781 addressable nodes on one radio channel. Really large networks can be achieved by running multiple parallel networks on different channels.

Structure and Addresses #

The address of an LCOS Node is a number in OCTAL format that describes the route from the MASTER to reach the node.

The MASTER Node is always 00.

The Master Node can have up to 5 children. The address of each child node is 1 through 5 with a leading 0 — 01, 02, 03 , 04 and 05. These are referred to as Level 1 addresses.

Each node can have 5 children of its own, whose addresses are Level 2. The address of each child is 01 through 05 preceding the address of its parent. So, the five children of node 01 are 011, 021, 031, 041 and 051 respectively. The entire tree can have up to 4 levels below the Master. This can be illustrated as follows:

rRF24L01 Mesh Network Topology and Addressing

The last possible valid network address is 05555. LCOS uses addresses outside of the 00 – 05555 range to represent connections to objects outside the radio network.

Small and Medium Sized Layout Examples #

4 x 8 HO Layout

The small layout example above uses a single Client Node. It can have any address from 01 to 05. We recommend that you stick with 01 in a simple situation like this.

10 x 16 HO Layout

This mid-sized example is also straight forward. With 5 clients, we can give them addresses 01 through 05. The order doesn’t matter so long as it makes sense to you.

Even Bigger Railroad Empires #

You can probably see that with the example above, we’ve reached the limit of level 1 addresses (01 – 05). But don’t worry, because level two has 25 more addresses, enough for a layout substantially bigger than the example. And levels 3 and 4 are still available too.

In a larger layout, one consideration should be foremost in assigning addresses: the distances between nodes and from each client to the Master.

Lets look at an example of a large, complex basement-sized layout in the form of a block diagram:

Many room/basement sized layouts are arranged around the wall with peninsulas.

This layout requires at least 10 LCOS Client Nodes, which means we have to use both level one and level 2 addresses. A node address describes the route from the MASTER to a Node. So, for example, node 021 means “from master go to node 01, then to its child 02. In a layout of this size, node-to node distances can be an issue, so it is important to pay attention to distances and message pathways.

In the example, I’ve assigned level 1 addresses to the 5 nodes closest to the main panel where Node 00 will be located. More distant nodes are assigned level 2 addresses, making them children of the closest level 1 node. The resulting messaging pathways are shown as green arrows.

I’ve intentionally chosen a non-optimal node structure to help illustrate how dependencies work. The astute reader will notice that I could have legitimately chosen a slightly different structure — changing 021’s address to 012, and changing 031 to 015., making them the children of 02 and 05 respectively. What is the advantage? Right now if node 01 goes down, it takes 3 other nodes offline. Spreading the dependencies out improves fault tolerance.

Powered by BetterDocs