Archive for the 'XBee' Category

XBee LilyPad Second Draft

This is a second draft of the XBee LilyPad that Kate and I are working on. It adds some noise filtering and decoupling capacitors to help with reliability. We’ve also added LED outputs so users can tell if the XBee is on, associated and receiving information. There’s currently solder jumpers on these lights, so that they can be disconnected if the blinking isn’t appropriate for the project, or if those pins need to be used for something else. Here’s an enlarged view.

A third draft will be done after a couple electrical engineer friends have contributed their wisdom, then it’s off to the circuit printers for an initial prototype.

XBee LilyPad

We work with the LilyPad open-source wearables system and the XBee radios a lot at ITP, so Kate Hartman and I decided that it was time to put the two together. My Friday 7 in 7 project was to create a XBee LilyPad board, the first draft of which is pictured above. There’s probably going to be a second draft before we have the printed circuit boards made, adding some decoupling capacitors and possibly a few output LEDs. I’d like to keep things pretty bare bones and just see how people might use them before adding complexity like sensors or independent power. We’re planning to run some tests on the prototypes to evaluate wearability and integration methods. The XBee can transmit information from an Arduino module, but also has some ability to function independently. There’s eight pins of input and output, including analog transmissions, that can be used without a microcontroller. Therefore it makes sense to think about another iteration with integrated battery power.

When the board files are done, they’ll be posted publicly on my site (under Projects) and can be used by anyone under a Creative Commons open-source license. A couple of my Sociable Objects students working on socially shape-shifting skirts. Hopefully the new XBee LilyPad will enable their creations.

Proximity Maintenance Device

For my first 7 in 7 project I created a prototype for a proximity maintenance device. This is a radio-enabled bracelet or necklace worn by two individuals who do not want to become separated in a crowd. As long as the devices can maintain radio contact, nothing happens. However if the individuals move far enough apart or lose radio contact, their devices begin vibrating. At this point they can seek each other out and reunite.

The prototype I made uses XBee radios paired with Arduino microcontrollers to manage the radio messages and produce the alerts. The challenge of a 7 in 7 project is to complete it in 24 hours, therefore these devices are still in a fairly rough state. Luckily they are fully operational and can easily be worn outside for real-world testing. Thanks to Kate for helping with a quickie sleeve mount and cool sealed vibrator motors with magnetic mounting snaps. One project down, six to go!

Summer XBee Course: Sociable Objects

Sociable Objects

This summer I’ll be teaching a graduate class called Sociable Objects at NYU that includes pretty much everything you ever wanted to know about the XBee radios including ZigBee. Here’s the course description:

Sociable objects are devices that share. They can talk to each other, gain information about their context and react accordingly. Recent advances in wireless mesh networks have created the potential for a massively interconnected world of easy information sharing. Cheap communications, high reliability, unique addressing, small size, standardization, and routing features combine to enable exciting new interactions. Developers of toys, wearables, performance devices, portables, network objects and sensor arrays can take advantage of radio mesh networking to design more interesting, better informed and more complex behaviors for their projects. This course explores devices that connect with and respond to each other. The technical focus will be on 802.15.4/ZigBee wireless mesh networks. Interconnections with other platforms and devices will be examined as appropriate. Students will gain an expertise in all functions of the ZigBee system to facilitate smart and novel behaviors in their projects. Through a series of weekly exercises, students will build skills and explore the challenges and delights of mutual connectivity. As a final project, the class will construct dynamic device networks. Prior experience with basic electronics and physical computing is helpful, but not required. Most labs and projects involve group work, so students should be ready to collaborate extensively as they experiment on the cutting edge of device interaction.

Also be sure to check out ITP’s excellent summer Soft Circuits course and the Studio in Prototyping. Either would make a great double-header with Sociable Objects. Summer classes at ITP are open to everyone so now’s a good time to sign up.

Multiple I/O Samples for XBee API Library for Processing

Dan Shiffman

Why is this man smiling? It’s because our XBee API Library for Processing now can handle multiple I/O samples in each data frame. This is a big help for projects getting high frequency data, like accelerometer information, where the sample rate needs to be very frequent. For example, if you want to take samples every 10 ms, but only need to deliver them every 500 ms, this is the code you’ve been awaiting. And that is precisely why Dan Shiffman is smiling.

Next up is receiving regular data, and then probably AT commands.

XBee API Library Grows for ZNet

LargerLibrary

Dan Shiffman and I are continuing development on our Processing library for Digi’s XBee radios. The 1.1 library now facilitates receiving single sample I/O packets in API mode from both the Series 1 and ZNet radios (formerly known as Series 2), and returns an object that contains the analog values, digital values, sender’s address. Please let me know if you are using this library. Your feedback will helps us make it better.

You can download version 1.1 from the main XBee API Library for Processing page.

ZigBee Updates for January

XBee Series 2

A few interesting developments have happened over the holidays with XBee radios.

  1. The company (formerly known as Maxstream) has rebranded the radios (formerly known as the XBee Series 2). From now on you’ll be calling them the Digi XBee ZNet 2.5.
  2. The XBee ZNet 2.5 name coincides with brand new firmware. This update includes bug fixes and most importantly, automated transmission of I/O readings from the analog and digital input pins. The firmware isn’t posted on their site yet, and it isn’t documented. If you’re at ITP, ask me for the 1×40 files. Otherwise, talk to Digi support.
  3. I’m working on a version of the XBee library for Processing to parse the undocumented ZNet I/O packets. That will get posted here once I feel that it’s working.
  4. We were able to get XBees running off of an unregulated rechargeable coin cell. The Lithium-ion 2450 works for about an hour in my tests, without sleeping the radios at all.

More to come…

Battery Tests: Arduino and XBee

Battery

People ask me all the time which battery they should use for their Arduino project, or how long an XBee will run on a specific type of battery. Rather than continue to give vague answers, I decided that it would be much more helpful to generate some real-world battery life results for Arduino projects and XBee mesh networking radios. There were a lot of surprises. The results depend of course upon which battery you choose, but everything else makes a difference too. Changing the duty cycle of a single LED doubled battery life on an Arduino project. Simply sleeping an XBee radio between transmissions generated a whopping 1470% increase in battery life. In a few cases specific types of batteries failed completely–probably the most helpful test result of all.

Use the real-world battery life results to help choose which setup is right for your project. You can also use my Battery Test program in Processing to run your own tests. Send me any well-documented results and I’ll gladly add them to the list.

XBee API Library for Processing

Library SceneDan Shiffman and I are working on a Processing library for Digi’s XBee Series 1 radios. The library currently facilitates receiving single sample I/O packets in API mode, and returns an object that contains the analog values, digital values, sender’s 16-bit address and RSSI value. The next tasks will be to receive regular RX frames, issue AT commands and receive responses, issue TX frames and receive responses to those. We’d also like to support the XBee Series 2 radios, which have a similar API structure.Here’s a page where you can download and learn about the XBee API Library for Processing v1.00.

Arduino Millis() Rollover Handling

Millis Police

On the Arduino microcontroller, the millis() function counts the number of milliseconds since the program started running. Unfortunately, this count resets to zero after approximately 9 hours and 32 minutes. I have written a millisRollover() function that detects these rollovers, so that programs can respond properly to the overflow event. This can solve problems with servo routines, steppers, timed pauses and a variety of other calculations. In addition, because my millisRollover() function counts the number of times rollover has happened, it is now possible to record total Arduino runtime with a counter that’s good for over 35 years.

You want to blink an LED only on Christmas during leap years? Totally possible now.

(yes, there really is a millis police department)