Multiple xbees and rfid readers

Hi all. I'm new to arduino and practical experience at electronics - more of a software person, and have a question about a project I'm working on. Can anyone help?

What I want is 10 RFID readers, connected through xbee, to an arduino base station acting as a data logger. I was hoping to get away with not having an Arduino on each node, just connecting the RFID to the tx/rx on the xbee. Is this possible? And can the 10 xbees have simultaneous comms to the same arduino? What if they talk at the same time? I'd also like to connect to the xbee on the base station now and again with a laptop to collect / clear the data.

Many thanks if anyone can tell me if I'm barking up the wrong tree or not.

Cheers

I was hoping to get away with not having an Arduino on each node, just connecting the RFID to the tx/rx on the xbee. Is this possible?

Yes. The XBee will transmit, over the air, anything that arrives on the RX pin, and send to the TX pin anything that it receives over the air.

And can the 10 xbees have simultaneous comms to the same arduino?

Yes.

What if they talk at the same time?

You won't be able to understand a thing that they all said. Imagine 10 people responding to this thread, at the same time, and the keystrokes that those 10 people were making appeared in one window on your computer.

I'd also like to connect to the xbee on the base station now and again with a laptop to collect / clear the data.

Connect what to the XBee? You can connect the Arduino that is the base station to a PC, and communicate between the PC and the Arduino. The XBee will be outside your direct control. It doesn't store any data that you can collect/clear, anyway.

What are the RFID tags that are being read for?

Hi, Thanks for the reply.

I think that what I'm trying to find a solution to is that xbee can communicate to lots of other devices on the network (like, say, ethernet), but the serial connection with the RFID is between pairs (like an RS232 cable). Is there a standard way of dealing with this? I'm guessing from your reply that xbee doesn't sort this out for you. If not, maybe I could do it by putting an arduino with each reader and sorting out the transmission in software. Like I said, I'm new to arduino and xbee so I'm just scratching around for a way to do it and don't want to re-invent the wheel if it's a common task.

For the base station, I want to connect to the Arduino to to grab the data on an SD card, but, rather than connecting via USB, I'd like to use the xbee that I'll have on there anyway. I was imagining either a command in the data stream that tells the arduino that it's now talking to my laptop, so send me the data, or maybe just a switch on the box that switches from 'running' mode to 'talk to my laptop' mode. The kit will be in a sealed box, outside, so a wireless solution is handy.

The tags will be inside harvest mice, We're tagging captive-bred animals and monitoring the success of various release methods to assess survival success. The readers will be positioned along a transect at the release sites, some in feeding stations, so we can see how they're doing after release.

PaulS:

I was hoping to get away with not having an Arduino on each node, just connecting the RFID to the tx/rx on the xbee. Is this possible?

Yes. The XBee will transmit, over the air, anything that arrives on the RX pin, and send to the TX pin anything that it receives over the air.

And can the 10 xbees have simultaneous comms to the same arduino?

Yes.

What if they talk at the same time?

You won't be able to understand a thing that they all said. Imagine 10 people responding to this thread, at the same time, and the keystrokes that those 10 people were making appeared in one window on your computer.

I'd also like to connect to the xbee on the base station now and again with a laptop to collect / clear the data.

Connect what to the XBee? You can connect the Arduino that is the base station to a PC, and communicate between the PC and the Arduino. The XBee will be outside your direct control. It doesn't store any data that you can collect/clear, anyway.

What are the RFID tags that are being read for?

I think that what I'm trying to find a solution to is that xbee can communicate to lots of other devices on the network (like, say, ethernet),

XBees can only communicate with other XBees.

but the serial connection with the RFID is between pairs

Between pairs of what?

If the RFID reader is connected directly to the XBee, no other device is going to be able to read the RFID data. The XBee (it's a radio) can broadcast to any number of other XBees.

PaulS:

I think that what I'm trying to find a solution to is that xbee can communicate to lots of other devices on the network (like, say, ethernet),

XBees can only communicate with other XBees.

I know xbees can only communicate with other xbees. The point I was trying to make is that they communicate with multiple xbees on a network (like ethernet), whereas the connection between the RFID and the device it is talking to is limited to those two devices (like RS232). What I want is to transmit the data from multiple RFID readers to a single arduino, using xbee.

PaulS:

but the serial connection with the RFID is between pairs

Between pairs of what?
(See above)

PaulS:
If the RFID reader is connected directly to the XBee, no other device is going to be able to read the RFID data. The XBee (it's a radio) can broadcast to any number of other XBees.

I don't want any other device to read the RFID data. I want the xbee to read the data and transmit it to the arduino. This is (I think) an almost trivial problem with one RFID reader; rather than connect the arduino and RFID directly, I hang an xbee of each and communicate over the radio. The problem is, how do I put a second (third, fouth...) xbee attached to an RFID reader on to the network. Xbee is designed for creating sensor networks. How does it work if your sensors are serial devices?

Xbee is designed for creating sensor networks.

I think that this is an oversimplification of the purpose of XBees. They are designed to collect and transmit over the air, and to serial ports, a variety of kinds of information.

Your only problem will be preventing two XBees from talking at the same time. I see no easy way to avoid that.

Typically, one sets up the network so that there is one controller (coordinator/master) and several end devices (slaves). The master asks each slave, in turn, for its data. Since 99% of the time yours will have nothing to report, that seems relatively inefficient. On the other hand, letting the slaves blurt out data anytime they have some has drawbacks, too.

If you have an Arduino at each node, you could have the Arduino expect a response when it send data. If the coordinator fails to reply, because it failed to understand a message, due to two or more devices talking at once, the Arduino would choose a random time to wait, and send again.

The XBee alone does not have the processing ability to do that, though.

So, you either need to do polling of the devices, or suffer mangled data.

Unfortunately, now that I think about it, this requires an Arduino at each node, too.

That's the conclusion I was nearing. However, as I only expect to get hundreds of 'hits' a day at most, maybe only a handful, it might be improbable that two nodes communicate at the same time, so I might try it anyway. A problem might arise if the RFID continually transmits the tag number if a mouse is within range, i which case there will be a clash if there are mice at more than one node. I'm hoping the RFID readers (when I get them) will have a function to stop repeat transmissions for a period of time.

Anyway, thanks.

A problem might arise if the RFID continually transmits the tag number if a mouse is within range, i which case there will be a clash if there are mice at more than one node.

The one I have sends the tag once when the tag comes in range. It sends nothing else until the tag goes out of range, even if another tag comes in range.

Hmm. I have to look in to the habits of the mice and hope they don't go around in pairs. Or, better, make sure the reader only reads at 10mm or so. But thanks.