View Full Version : Creating a unique RF link
01-28-2010, 01:46 AM
I was wondering if anyone has had any experience with using the BS2 and either the Parallax Tx Rx RF modules, or any one of the XBee modules to create a unique RF link. Say for instance I want to build a garage door opener with a remote but I don't want that remote to open every door I manufacture, just it's own paired or specific door. I don't think this would be very difficult at all but on the receiving end I don't want to have a stamp or any kind of microprocessor, just some stand alone chips i.e. counters, shift registers, etc. This is just for demonstration purposes so ideally I don't need more then three different id's since it is very easy to create more with larger decoders etc.
01-28-2010, 01:59 AM
If you use a pair of xBee modules, there's already a unique link. Every xBee module has a permanent unique address and the module that's initiating the link has to provide the address of the module at the other end of the link. The receive end has a status line (command or data mode) that switches to data mode when a link is established. You could use that as a trigger.
With the Tx/Rx modules, you'd have to have some kind of simple microcontroller at both ends since the modules have no address, no error checking. The microcontrollers would have to talk to each other to establish "pairing".
01-28-2010, 02:13 AM
In fact XBee modules have three or four separate ways of keeping separate addresses.
First of all, each XBee module has a "PAN ID", a number between 0 and 0xFFFF that sets its Personal Area Network ID. The transmitting and receiving modules must be set to the same PAN ID or they will not communicate. That's over 65,000 different addresses, so that alone could do what you needed. Incidentally, if you use 0xFFFF for the module's PAN ID it will override this and broadcast to units regardless of their PAN ID (but the other addressing methods still "count").
Secondly, each XBee module has a source address, and a destination address.ˇOnly modules whose source address matches the destination address of a sending module will receive the information. There are approximately a gajillion different addresses here, so you won't run out. And again, a destination of 0xFFFF will broadcast to all modules.
Thirdly, each XBee is set to a specific channel (0x0B through 0x1A for regular XBees, and 0x0C to 0x17 for XBee Pros), so you could accomplish something with that as well, though it's not the normal way of addressing.
Finally, each module can be assigned a "Node Identifier" - a regular text descriptive string (like "remote 1" or "base station", for example), that can be used with a destination node command for addressing.
01-28-2010, 03:13 AM
So, from what I understand I will not need a microprocessor on the receiving end? I have a microprocessor on the transmitting side and I am assuming that there is already a processor on the modules to let me set the "PAN ID" for the receiver so i will not need a second processor.
Does this come with software for me to plug into my PC and set a specific "PAN ID"?
01-28-2010, 03:21 AM
You need hardware to connect an xBee to a USB port on a PC.ˇ Parallax sells an adapter board for this purpose.ˇ Once you have it connected, you can use any terminal program like HyperTerm or Parallax's Propeller Terminal program to configure the xBee.
Alternatively, you could write a simple program for the Stamp that would configure the xBee.ˇ Look at the xBee documentation for details.
01-28-2010, 03:28 AM
The new Parallax USB board is certainly going to be the easiest hardware to use for programming the XBees.
Digi does have a piece of free software called XCTU that you can download from their site to set your XBee settings and to update the firmware. In my experience, XBees aren't shipped with the latest firmware, so having a way to update it is important. The good news is that besides the XBee itself, all you need it the $25 Parallax board and the free software.
You can change the settings from a regular terminal program, as Mike points out. I don't believe that you can update firmware that way, though.
You are correct that there is a processor on the XBee where the address settings are made. Whether or not you need a processor on the receiving end depends on the rest of your hardware.