Xbee to turn on a few LED's ?

Hi All,

I am new to the board and hope someone can point me in the right direction on a winter project I am going to start working on.

Just a brief BIO, I am a physicist by degree but more of a mechanical designer/engineer in my day job. I have a decent working electronics knowledge and have access to electrical engineers at work for the problems that trip me up.

I race hydroplanes and am interested in developing a “red light” system. In the event of an accident a red flag is displayed and everyone is supposed to stop. While that sounds good in theory there are a lot of reasons why people do not see flags immediately.

I would like to develop an RF system where the referee would hit a button in the event of a red flag and a red light would come on in everyone’s cockpit. It might be nice to have an option for a couple of other signal lights but that is not all that important for the discussion at this point.

I started by looking at the LINX RF modules but their range is just not far enough. We race on up to 1 2/3 mile oval courses so I would think at a minimum we would want 1 mile range although I think more overhead would be better, this system really needs to work reliably. There might be up to 12 boats on the course at any given time and there might be several hundred receiver units across the country.

I have JUST started reading about the XBee modules and wonder if they might be a reasonable solution? I could see a small Micro interpreting the button, sending the command over the UART into the Xbee. Then on the receiver end the opposite would happen and the light(s) would be turned on at the appropriate time. I also am wondering if you could send the status of a bit (controlled by a switch) WITHOUT a micro controller and can I get that status out on the other end to control and LED without a micro controller ?

While this all sounds reasonable to me it also sounds like it might be overkill for what I am trying to do. The Xbee’s seem like fairly high end units. The cost of the transmitter unit that the referee would use isn’t that big of a concern (within reason) but the cost of the receivers is pretty important as each boat would have to purchase one. I guess that is what originally got me looking into the LINX solution.

Can anyone offer any insight into a direction that I might want to look at ? Is the XBee a reasonable solution? Is there a simpler solution? I am just getting into this so I don’t know much yet. I am hoping for a little direction so that I don’t waste a lot of time learning about something only to figure out it can’t do what I need to do.

If this is a reasonable direction what which module would you recommend ?

Thanks in advance for any and all suggestions.

Dan Kanfoush

Driver Y-1/A-600

APBA Inboard Technology Committee Chairman

to get that range, with unlicensed, in No. America you can probably succeed with 902-928MHz band instead of 2.4GHz. The Digi modules for this 900MHz band cost 3x or so that of the 2.4GHz band.

You’ll still need line of sight.

see the 900MHz band products at

http://www.digi.com/technology/wireless/products.jsp

In the EU, these cannnot be used.

The XBees have digital Input/output bits that can be remotely manipulated. One could be wired to control a light/LED. You would not need to use the UART at the LED end of the link. The XBEEs also have a “bit replication” capability, where, say, a switch connected to an input bit on XBee #1 can mate with an output bit on XBee #2 - connected to a light/LED/relay. So it’s an elaborate wireless light switch, with optional encryption.

Thank you for the reply. I will take a close look at the products you have suggested.

Does anyone know of any online examples of projects that monitor and output bits on the Xbee line as Stevech has suggested ?

Thanks.

Dan

Yes, this could be easily done with XBee modules (the 900MHz units may be best). A small u-controller at the transmit may be needed to send the commands into the transmitter.

On the units in the boats not much is needed. The XBee units have several Digital outputs that can be used to drive an LED switch (pnp xsistor).

A neat feature if more control/display is done at the transmitter is the acknowledgment of each unit receiving the ‘STOP’.

waltr:
Yes, this could be easily done with XBee modules (the 900MHz units may be best). A small u-controller at the transmit may be needed to send the commands into the transmitter.

On the units in the boats not much is needed. The XBee units have several Digital outputs that can be used to drive an LED switch (pnp xsistor).

A neat feature if more control/display is done at the transmitter is the acknowledgment of each unit receiving the ‘STOP’.

Microcontroller should not be needed on either end, via the pin-replication feature of the standard XBee firmware. Check to be sure the 900MHz version does support this as does the 2.4GHz. The range on the 2.4GHz with clear line of sight and modest gain omni antennas is 1/2 mile or so, for the PRO versions. That’s why I suggested the 900MHz version. Ye ole 20log(d)+20log(f)+k

Thanks guys. I will printout all the documentation for the 900MHz Xbee and dig in. I am sure I will have tons of questions.

Dan

stevech:
Microcontroller should not be needed on either end, via the pin-replication feature of the standard XBee firmware.

Stevech,

Can you direct me towards (or explain) a little bit more about pin-replication?

I tried searching for it, but I might not have the terms quite right. This looks like it would accomplish something I’m trying to do.

Thanks in advance for your help!

I started looking around and from what I have read so far the XBee Pro 900 has pins 16-20 which can be configured for Analog input and also Digital I/O. This module indicates an outdoor line of site range of 1.6 miles or 6 miles with a high gain antenna. I have not read this documentation yet but it seems on the surface it wouldn’t be very hard to utilize those pins (without a micro).

The XBee PRO XSC doesn’t seem to have those pins available for digital I/O but has the much longer outside range. Am I correct that this module cannot be used for sending digital signals without a UART ?

Since we run on water line of site is not a problem. When they talk about a high gain antenna are they talking about a large external antenna or the small “rubber duck” or wire antennas as opposed to the chip antenna ?

Thanks in advance.

Dan

I think the firmware functionality for the 900MHz

http://ftp1.digi.com/support/documentat … 0903_B.pdf

is the same as the 2.4GHz modules’ factory firmware. I think this is done by not using the firmware for DigiMesh, but rather, the equivalent 900MHz module firmware as in the 2.4GHz module.

In the OEM manual for the 2.4GHz XBee Pro module, the term is “I/O Line Passing”.

2.2.6. I/O Line Passing

Virtual wires can be set up between XBee/XBee-PRO Modules. When an RF data packet is received

that contains I/O data, the receiving module can be setup to update any enabled outputs (PWM

and DIO) based on the data it receives.

Note that I/O lines are mapped in pairs. For example: AD0 can only update PWM0 and DI5 can

only update DO5). The default setup is for outputs not to be updated, which results in the I/O data

being sent out the UART (refer to the IU (Enable I/O Output) command). To enable the outputs to

be updated, the IA (I/O Input Address) parameter must be setup with the address of the module

that has the appropriate inputs enabled. This effectively binds the outputs to a particular module’s

input. This does not affect the ability of the module to receive I/O line data from other modules -

only its ability to update enabled outputs. The IA parameter can also be setup to accept I/O data

for output changes from any module by setting the IA parameter to 0xFFFF.

When outputs are changed from their non-active state, the module can be setup to return the output

level to it non-active state. The timers are set using the Tn (Dn Output Timer) and PT (PWM

Output Timeout) commands. The timers are reset every time a valid I/O packet (passed IA check)

is received. The IC (Change Detect) and IR (Sample Rate) parameters can be setup to keep the

output set to their active output if the system needs more time than the timers can handle.

Note: DI8 can not be used for I/O line passing.

Applicable Commands: IA (I/O Input Address), Tn (Dn Output Timeout), P0 (PWM0 Configuration),

P1 (PWM1 Configuration), M0 (PWM0 Output Level), M1 (PWM1 Output Level), PT (PWM

Output Timeout), RP (RSSSI PWM Timer)

Range drives you to use of 900MHz. If you use the 2.4GHz Pro Modules with an external antenna on each end, and one or both ends have a very high gain antenna, you may get the range you need, if it’s line of sight. And if you can deal with the antenna’s beamwidth. For example, the gain can come from narrow azimuth beamwidth but must be aimed on boresight. Or the gain can come from elevation beamwidth and the antenna must be tilted up/down if the ray out to the target changes much. For example there are 12dBi gain antennas at 2.4GHz with 15 degree beamwidth on elevation. And vice-versa for antennas with gain on the horizontal.

We can do the math for selected antennas, XBee power, and line of sight path length. Formula is ye ole 20log(f in MHz) + 20log(d in miles) + 36.6 To this negative number, add the TX power and the two antennas’ gains. Compare the difference at 900MHz and 2400MHz versus the loss for a 1/2 mile path - interesting, eh? The required signal strength at the receiving end needs to be more positive than about -95dBm, and pad this for fading margins. Physics tells us that the path loss increases by 6dB when the distance doubles. (That’s wny we can talk to spacecraft millions of miles distant.)

The antenna choices depend on mounting practicality, of course.

see also “link budget”, as in

http://en.wikipedia.org/wiki/Link_budget

Great Stuff Stevech. I have printed that manual out and will dig in this weekend.

Thanks again.

Dan