Simple Arduino Wireless Mesh
This is a wireless mesh with a range of up to 1km between nodes. There are 16 nodes in each mesh, and all nodes use the same frequency. Each node can sample two analog voltages and shares these with the mesh. The mesh is tolerant of faults with individual nodes, and data takes multiple paths to get to the destination. Nodes can also interface to the internet, and to other meshes that that been set up for a different frequency. Individual nodes may only be able to talk to a few nearby nodes.
One problem with building meshes is complexity. This mesh simplifies things by using a synchronised clock, and much of the mesh protocol revolves around getting the clock working. Each node exchanges the time with nearby nodes. If a node receives time data from a nearby node it notes the number of the node, and the number of the last node it received a time from, and takes the lower of the two. If node zero is in the mesh, then all the nodes ultimately synchronise to node zero’s time. If node zero is shut down, then node 1 will take over this function.
Nodes flash a led in time with their clock, and within a minute or so, all the nodes will be flashing in synch. Once this is working, each node transmits only during its allocated time slot. This avoids data clashes and minimises errors.
Each node collects its own data and adds a time stamp to this. When a node transmits, it transmits the data for the entire mesh, including the time stamps. Any node that hears this data looks at the list, looks at its own list, and replaces any old data with newer data.
This way, new data propagates through the mesh.
There are 16 nodes and each node has two analog values, making a total of 32 integer values to share through the mesh. The number of nodes and the number of analog values per node is limited by the time needed to cycle through the entire network. Each node has 4096ms to transmit all its data (9600 baud), and so it takes 65 seconds for all the nodes to transmit in turn and for new data to move through the mesh.
Read world data that can be shared are temperatures, tank levels, stock trough levels, rainfall, humidity, dam levels, local battery data if a node is solar powered, and other data that needs to be shared over a large distance and where time is not so critical.