Best practice with multiple wireless lilypads?

Hi everyone,

Before I venture into expensive buying things I can't use, I'd like your opinion on a rather basic but demanding set-up. (the demanding factor in here is me, it must work 99,99% of the time).

I have multiple lilypads with sensors attached. They are built into a piece of clothing. All lilypads should talk to the same central computer - at the same time. The computer does not need to send information back.

I've thought about solutions like the XBee's, as there's a lilypad shield available, but how many should there be involved? And how?

Or would there be other - cheaper - solutions? That allow for the same kind of communication?


how many should there be involved? And how?

Tell us more about the

multiple lilypads with sensors attached.

How many lilypads? What kind of sensors? How do they communicate now, if at all?

How much data will be sent to the central computer, and how often and fast does it need to be sent?

There is a difference between what you need to do to get data from 3 lilypads with 3 sensors each, 5 times an hour versus 30 lilypads, with 12 sensors each, 200 times a second.

Hi Paul, thanks for your reply. The system hasn't been built yet, so there's currently no communication to talk of.

The number of lilypads are limited, but not certain yet. Somewhere in between 1 and 4. This is all depending on which solution is best, and how much it costs (we're on a budget, but we'd rather have 1 or 2 perfect working systems in stead of 4 half-working ones).

All lilypads will have 2 force sensing resistors attached, and when either or both sensors are pressed the lilypad has to send out a simple 2-byte message. So no constant connection, only on pressure.

I hope this is any clearer?

Besides the force sensors, what else will the lilypad have attached. In other words, what else will it be doing?

A single lilypad that is just collecting sensor data can easily handle more than 2 sensors.

The 2 byte message - what do you envision that message to be? The sensor value can range from 0 to 1023, which is more than 1 byte. So, the sensor value alone will be two bytes. Does it not matter which sensor the value came from?

If you are just measuring the values for two force sensitive resistors you could probably do it with just the XBee. The XBee has an A/D converter and could be programmed to periodically measure the values and transmit on change.

You may want to take a look at O'Reilly's "Making Things Talk". There may be an example that is similar to your application.

(* jcl *)

www: twitter: blog:

@PaulS Well, the system is pretty straight forward. It is designed to trigger reactions on a computer by models walking down a catwalk. It is all about the feet actually touching the floor and then sending the signals (so distance sensing techniques etc. are not possible). You might remember those old Nike shoes with lights, but then instead of the lights I need a wireless connection to a computer.

So, the pressure sensors will be built into pairs of shoes, with cables going up to the hips where there is either a lilypad+XBee (or apparently just an XBee). The information about the steps (and preferably also the weight of the steps) of multiple people wearing those shoes are then sent to the computer.

@jluciani Please also see above. I looked it up, but ordering that book will probably take too long, because I'd also have to order the XBee's, the show this is for is the end of the month.. Any (online) resources you could advice me to check? The XBee-only solution seems very interesting, I've done so many arduino projects it's gotten kind of hard to not immediately think of using one ;)

Regarding the XBee system, that would in short be something like this?

Model 1: XBee + 2 sensors
Model 2: XBee + 2 sensors
Computer: Xbee + arduino? Or just XBee? (pretty confused here..)

Thank you! Once it's all finished and done I promise to put a video online with the results :)

You diagram looks correct but I would connect the XBee directly to the PC using a USB interface. The sensors will need the same type of signal conditioning that an Arduino would require but you will need to adjust the range since for the XBee A/D.

I wrote a little client-server application (XBsrv) that sits between the USB interface and the PC application. The PC application opens a socket to XBsrv and sends and receives strings. XBsrv handles the XBee interface and string formatting.

The code examples may be online. Check the O'Reilly site. The book should be in stock at Barnes and Noble or online at Amazon. Also IIRC Tom Igoe (author of MTT) has some examples on his website.

(* jcl *)

I've never used XBee's before, so I'm in a little mental limbo here.. when you use an usb interface will that be just another way of getting serial data? for instance can you address it with the serial object in max/msp, or the hi object? Any advice on which interface to buy? Also it seems to me there are hundreds of different XBee's available, and the differences aren't really clear..

The system will be running on a mac, is your app cross platform?

I ordered the book at amazon, and apparently it'll be here already on the 11th, so thats perfect :) Thanks for the advice!

There are really not that many XBee models to choose from. There are Series 1 and Series 2/2.5 models. The Series 1 are point-to-point modules - two radios talking to each other. The Series 2/2.5 modules are for networking - they find each other, and form a mesh. For your needs, the Series 1 radios will work, and are much easier to set up.

Within each series, there are regular and pro models. The difference is the range, and corresponding battery life. Regular radios have a range of 100 meters or so. The pro models go up to 300 meters, but battery life is shortened considerably.

Then, for each configuration, there are chip antennas, wire antennas, and external antennas. Chip antennas are small, but have the lowest range. Wire antennas are about 2 cm (1 inch) long, and have reasonable range. The external antenna is several inches long, and has the best range. It would look a bit strange sewn into clothing, though.

The xbees operate in serial mode. To connect one to a computer, you need a serial interface. The number of computers sporting serial ports is diminishing, rapidly. So, a USB-to-serial converter is required, to connect the xbee (a serial device) to a USB port on the computer.

Any application that can read and/or write serial data can communicate with the xbees using the USB-to-serial converter.

I have not checked out the MaxStream (XBee mfg) site in a while so there may be some more recent information there. When I was working with the XBee there were two series of devices -- Series I and II. These devices were pin compatible but could not communicate with each other. I have only used the Series I devices.

The differences between devices in a series is the transmitter power and the antenna. The "Pro" series has a higher power transmitter -- consumes more power and has a range of 3/4mile. The standard device has a range of around 300ft.

The antenna options from MaxStream are a chip antenna, a wire antenna or a whip antenna. For the most part a larger antenna gives you a longer range. The XBee shown in this picture has a chip antenna, The antenna mounted on the case shown in this picture is the whip antenna. Connection is made to the XBee with a cable. The wire antenna is just a two inch piece of wire mounted to the XBee. Since I just use the XBee to demo my boards I like the chip antenna. I toss my boards in a bag and the antenna does not break off.

Communication to the XBee is through a serial port (which most people convert to a USB port). The software should be portable.

(* jcl *)

www: twitter: blog:

Great, thank you both so much for your explanations :slight_smile: It’s pretty clear now.

It seems I should go for the Series 1, pro model -battery life will only have to be ok for 15 minutes, it’s just a fashion show duration :slight_smile: - with a wire antenna.

Today I received, very much on time, the Making things talk book. There’s indeed quite some stuff on the XBee’s in there, thank you for the advice on buying it jluciani!

I’ll get back to you if I have any other questions, but really thank you for helping so far :slight_smile:

You're welcome.

I am surprised that you decided on the wire antenna for a piece of clothing but I don't know all the details off your application.

At the site I have a few code examples for the XBees. You may be able to modify these to run in your application.

(* jcl *)

www: twitter: blog:

Hi Guys,

In the end we did it with Series-1 xbee's without an external antenna. Besides the arduino-shield (just as a serial port, without ATmega chip inserted) there were no Arduino's involved. Those XBee's are pretty cool indeed!

I found this page almost too late, but it helped a lot with setting everything up: (Check the topics in the second column under the logo). Might be a good resource to you guys too:

Our set-up was based upon the XBEE DIRECT (MULTIPLE XBEE - XBEE- COMP) example.

Thanks for all the help!