LON… a new one to check, thanks 
About CAN, I just had a quick overlook really and I guess it would fit the bill, I just need to add a hardware additional module to each slave, and I was hoping to do it all with only a single small microcontroller per slave. On the other hand, if I use most of the slave’s microcontroller IO, I’ll need another one to talk to the outside world, so a CAN module might be not a bad idea after all 
Also I might need a G80 as a master instead of the G30 I was contemplating to benefit from its CAN integration. This increase the bill quite a lot. But I could live with a more expensive master, I just need the slaves to be dirt cheap!
Ok, I’ll tell you more about the network. I cannot say about what it will do (very fun commercial project intended for consumers, still confidential for a while), but I can explain what it would need.
There’s a master, typically a .NET micro framework based microcontroller. I want that because I’m a NET Windows programmer by trade, and it’s so f… easy to program!
I have a Panda II and I enjoyed immensely tinkering with it a few years ago.
More than one master might be possible, but I would happily keep a constraint that make them behave as slaves to the master they are connected to, and as single master for their own connected slaves.
There’s slaves, possibly quite a lot. I could reasonably limit to 255 max if the identifier need to be a byte. Each slave have it’s own microcontroller, more or less powerful depending of what it do. Minimum a Arduino pro mini. There are present on the network when it is powered on, and one or more can be added to or removed from the network at any time. So they need to identify themselves proactively to the master. They can have their own unique ID recorded in their EEPROM.
Some slaves will be connected closely to the master, typically with a flat ribbon cable. Others will be at a distance connected in the wild with the cheapest cable possible (10 to 100 meters ideally). The external connection cable need to be readily available; plain home electric cable would be great, or RJ11 phone cable.
Some other slaves would be connected wireless, I’m not sure how right now. I guess with one of those cheap serial/WIFI module.
Some slaves will do about nothing, a simple button or a led, others will do a lot. Their cost and what they have as a microcontroller and I/O will vary greatly. But the simplest ones, like buttons, really need to have a very low cost. They all need to report their status to the master, and possibly receive commands to activate “things” connected to them.
There could be a mix of protocols, say a fast CAN or custom bit banging for the close slave modules connected by ribbon cable, one slower like 1wire for external modules, and serial for wireless ones. Of course having a single protocol to talk to them all would be even better!
The network can be completely proprietary, as well as the command format exchanged between master and slaves. I don’t really need to answer to any given existing protocol.
I don’t need any kind of “safety” for the transmission, checksum error check would be more than enough. Hacking into the signals might be part of the “fun” for users 
Due to environment constraints, all modules, master and slaves will be potted in resin, making them hard impact resistant bricks. So I better pick the right hardware from the start
I plan to keep accessible the USB connection to upgrade the master’s software, but the slaves will loose any possibility of upgrade when manufactured. So the protocol they answer to, if it is not custom, must be reliable and stays compatible reasonably with future protocol versions.
I’m trying to grasp all that is currently done, but it’s so vast I could use some advices, about what to look at and consider.
- I am hesitating so far between:
-
Use a “standard” one or 2 wire protocol, but speed exchange and slave implementation for microcontrollers seem to be always an issue.
-
bit banging my own parallel protocol internally on a flat ribbon cable, and use serial and a flavor of single or double wire protocol for external exchange.
-
use a network protocol like CAN for all, even if it increase the bill.
-
maybe I missed something?