I am building a radio control system for an outdoor model railway, a project purely for my own interest. It has two hand-held controllers, each with a PIC and an XBee, and several locomotives, also each with a PIC/XBee pair. My original plan was to use broadcast mode, with addressing handled by the PIC firmware, and relying on CCA to prevent simultaneous RF transmissions. Messages are 7 bytes long, transmitted every 50mS. The 50mS is actually a fixed 43 mS plus a randomly-generated 0-15mS as an extra precaution against the two controllers being in sync. With one controller working everything is fine, but if the second controller is working I get serial comms errors in the data from the XBee to the PIC in the loco. I get enough uncorrupted frames to work OK, but I’m not happy with the setup.
I could give each loco a fixed channel number, and change the controller XBee’s address to suit the loco I want to control, via AT commands. The downside would be a limitation of 12 channels, 0xC to 0x17, and I would have liked more.
Can anyone tell me why CCA is not suppressing the simultaneous RF transmissions?
Can anyone suggest a workable addressing scheme that will allow more than 12 receivers?
I’m very comfortable writing the PIC firmware, but I’m out of my depth when it comes to networking.