So first a disclaimer: I'm comfortable enough using Arduinos for hardware stuff, but have very limited networking experience. I say this so that you hopefully understand the entry-level I need in terms of development.
Here's the scenario: I'm going to have 5-10 devices with a vibrating motor and a radio. I want the devices to be able to talk to each other, and be addressable. For example, if I had the devices lined up on a table, I could tell devices 4-5-6-7 to vibrate in sequence (hopefully ramping up and down) when they receive a signal (which will be published via a ROS topic). Ideally, I just turn on this devices and they sync up together (though I want to be able to control how they sync in order to create groupings or pairings of devices).
I also then want to have the ability to remove devices 6 and 7, then have devices 8 and 9 take their place (though this replacement will not be linear in the real world). The packets I'll be sending between devices will be small, only a few kilobytes, though I assume I need low latency, so that if I made devices 4-5-6-7 pulse in order, it could seem like one "wave" passing through the devices, rather than a 4-delay-5-delay-6-delay-7 scenario.
My constraints are:
Easy to program (hopefully I can use the Arduino IDE) and upload to (so USB or FTDI)
Easy to connect the devices together
Low latency
Self-healing network
4-10 IO pins (for vibrating motor and maybe a few switches)
I've done searches and found things related to wifi, XBees, Z-wave, Thread, etc etc, and its a bit over my head.
I know this is a tall ask. Any help and advice would be greatly appreciated, as this forum has always been a great source of help.
ttkoshi:
The packets I'll be sending between devices will be small, only a few kilobytes,
This is the first thing that caught my eye. In the Arduino world a kilobyte is enormous. The packet size for an nRF24L01+ transceiver is 64 32 BYTES (Thanks to @Whandall's sharp eyes and good memory)
Kilobyte packets are for for PCs and RaspberryPIs
Having said that I can't pretend to understand what you are trying to achieve. Maybe you can provide some examples of the data you are thinking of sending and an explanation of what one device should do when it receives it.
Robin2:
Having said that I can't pretend to understand what you are trying to achieve. Maybe you can provide some examples of the data you are thinking of sending and an explanation of what one device should do when it receives it.
Good point, maybe I inflated the value. To be honest, each node will basically just receive a short string indicating a buzzing strength and perhaps a buzzing pattern (I was looking to pack this into one or two bytes with pre-canned patterns). I was adding kilobytes thinking it would require overhead by the transmission protocols, but I think that's wrong. I'm currently using an ESP8266 (ESP-03) to test this, and it seems to work well if I'm just sending a 0 or 1 (for vibrate on / off ), but the ESP-03's are surface mount and a pain to program / debug. So, I'm not worried about form factor (maybe getting everything into a cigarette-pack sized container), just ease of programming / networking.
One implementation of these nodes is to move particles by having the motors go off in series, similar to how a Gauss cannon uses magnets to propel a slug, though at a slower rate.
Using WiFi to communicate is certainly an option if you know how to do that.
There is an nRF24 mesh library that may be of interest but I have never used it myself. My understanding is that it is built on top of the basic nRF24 library and the extra overhead slows down the rate at which packets can traverse the system.
Is it really necessary for your application that devices can be removed or switched around? Having that capability seems like it would add a great deal of complexity.
If the devices are working in harmony to propel something why not just use a wired connection? Maybe the master could just send a message using Serial that is received by every slave.