Although this week's assignment was to work on our end-effector, having already built my Sharpie end effector last week, I put some thought into communications.
By communication, I mean how messages go back and forth between a controller and all parts of the machine - wether thy control the motion or the end effector. As a reference machine, I'm thinknig about Dan Chen's infinite long robot since it provides the most challenges I can think about.
Requirements for communications:
- Two way communication.
- Support arbitrary number of nodes.
- Modularity. allow for adding, removing and replacing nodes on the fly.
- No need for a physical handshake beyond the physical connection. (no button pressing)
Inspired by my own Binarizer, I suggest using a dasy chaining method (codename: Daisy).
Example Illustration (from my whiteboard):
- Separation between communication nodes (aka daisy nodes) and action nodes. This frees up the action nodes from being interrupted with communications.
- Daisy nodes have 3 communication channels : left and right for chaining and action for communicating with the action nodes.
- Daisy nodes act as two-way relay nodes.
- Address is physical and relative - example: two steps right.
A message contains:
- Routing Information
- steps travelled
- steps left to travel (can be null for broadcasting messages)
- type of action
- value for action
Each daisy node that receives a message will either forward it if there are more steps to be taken, while adjusting the routing information, or send it to it's action node if it is the final address.
Action nodes are expected to broadcast status messages whenever there is a change in their status so that any connected controller is aware of the system's state.
Communications channels: RS-232. This might be a bit challenging for cheap microcontrollers.
Messages: 5 byte packets, 1 for steps traveled, 1 for steps left, 1 for action type and 2 for value of action. Messages will be prefixed with a 3 byte synchronization signal.
I've started working on a reference implementation. It will be ready in the near future.