Dear all,
I know the question has been around a million times and there is lots on it in the forum. Exactly because of this, I would be thankful for some educated pointers on what to look for and where to start.
I need to set up a network of environmental and some other sensor nodes that would contain a picaxe each controlling its own sensor. Then, it would have to relay the data to a wired master picaxe up to 20m away. I'm thinking two + power would suffice, but actually this is not a case where this is a major limitation. Some units would also work like remote switches, so they would have to be able to listen to the "bus" and figure out if that was actually a command from the master for them and do something about it. I cannot think of any current or possible future node that would require the "bus" to be fast - updates once a second would probably be plenty and for most data even that is too often. On the other hand, there is no reason to make it slower than it has to be. Data packets could range from a single byte to quite many (GPS data would be some 6-8 bytes at least, I think).
There is CANbus and its derivative NMEA for marine world, but from the glimpse I had at the documentation, it seems an over-complication for what I need.
Some high level thinking I have done so far is the most difficult part is managing conflicts of the devices trying to talk on the bus at the same time. I would imagine each device broadcasting whatever it has to say and master trying to listen to everybody while in listening mode. Each packet of data would be preceded by a header, so the master knows if it is wind speed or compass direction or whatever it is receiving. When the master wants to say something, it acts like a remote node for a while and broadcasts the message until it receives acknowledge from the remote node. The fact some of the devices did not get to send their stuff in the meantime or any other time is not a problem - they should time out and try again. Reasonable? How can I handle "the bus is busy" situation?
Thank you for your inputs,
Edmunds
I know the question has been around a million times and there is lots on it in the forum. Exactly because of this, I would be thankful for some educated pointers on what to look for and where to start.
I need to set up a network of environmental and some other sensor nodes that would contain a picaxe each controlling its own sensor. Then, it would have to relay the data to a wired master picaxe up to 20m away. I'm thinking two + power would suffice, but actually this is not a case where this is a major limitation. Some units would also work like remote switches, so they would have to be able to listen to the "bus" and figure out if that was actually a command from the master for them and do something about it. I cannot think of any current or possible future node that would require the "bus" to be fast - updates once a second would probably be plenty and for most data even that is too often. On the other hand, there is no reason to make it slower than it has to be. Data packets could range from a single byte to quite many (GPS data would be some 6-8 bytes at least, I think).
There is CANbus and its derivative NMEA for marine world, but from the glimpse I had at the documentation, it seems an over-complication for what I need.
Some high level thinking I have done so far is the most difficult part is managing conflicts of the devices trying to talk on the bus at the same time. I would imagine each device broadcasting whatever it has to say and master trying to listen to everybody while in listening mode. Each packet of data would be preceded by a header, so the master knows if it is wind speed or compass direction or whatever it is receiving. When the master wants to say something, it acts like a remote node for a while and broadcasts the message until it receives acknowledge from the remote node. The fact some of the devices did not get to send their stuff in the meantime or any other time is not a problem - they should time out and try again. Reasonable? How can I handle "the bus is busy" situation?
Thank you for your inputs,
Edmunds