The ZigBee Project

Automating your home, one sensor at a time

Zigbee info from TI (Texas Instruments)

by ziggyK - June 15th, 2009

As we are cranking on getting the basics set around the dev platform etc, we will try to do a couple of updates a week with hopefully interesting info around Zigbee. We got a really good comment on our post about “where do you start with Zigbee”. It came from Brian Blum at TI. There was a lot of good information so we decided to publish it as part of a post (his comment is at the end of the post)

A couple of things we really like that he suggests are http://www.tizigbeedemo.com/, not just the fact that they have a huge network of nodes but also the cool way they present it and the other one is the TI community. In Blums comment it says the page adress is [www.community.ti.com] but the right adress is [community.ti.com] without the www, with the prefix you get “can’t find the server”. The forums there are really good even if you do not use TI solutions.

ziggyK

 

Brian Blums comment:

My name is Brian Blum and I work as Product Marketing Engineering for Texas Instruments in the Low-Power RF group responsible for ZigBee, RF4CE and the SimpliciTI protocols which operate on our various low power radios. I saw your post and wanted to comment with some additional places you can get more information on ZigBee and TI’s LPRF portfolio of solutions (not to be self serving, but there are several TI links that are a great source of ZigBee information). Aside from the main information available at http://www.ti.com/zigbee, I would also like to recommend a website featuring a large ZigBee network that operates continuously for the purposes of proving our extensive ZigBee functionality including scaling the network to over 100 nodes and testing various configurations of the network including varying throughput and duty cycle of nodes (http://www.tizigbeedemo.com/). Additionally, I would suggest readers visit and sign up for the TI E2E community (www.community.ti.com) where you can post questions and search for information on problems already resolved or under discussion with respect to LPRF hardware, software or general questions about ZigBee, RF4CE or other networking protocols. As a final point I would like to mention that Freaklabs is a great forum to check out for those interested in ZigBee or other network protocols.

I hope this gets you and your readers started in the right direction.

  • Share/Save/Bookmark

The real missing Link

by ziggyK - June 10th, 2009

In a previous post where we tried out the BeeKit, one of the major issues we had was to get the Digi 1011 patch (code base) to work. The patch is made to be installed on an “old” BeeKit and not the new “BeeKit Wireless Connectivity ToolKit REV 1.5″.

We said in order to get that to work we followed instructions from a PDF. Well we never said which one….. so it may be a bit hard to follow :-) This pdf is really hard to find, it is located in a folder on Digis FTP support site.

This is a direct link to the PDF with instructions how to load the 1011 code base onto the new BeeKit.

PDF Doc

Hope it helps, ziggyK

  • Share/Save/Bookmark

Review: Zigbee Wireless Networking

by ziggyK - June 6th, 2009

We have now read “Zigbee Wireless Networking” by Drew Gislason. This is the book that together with “Zigbee Wireless Networks and Transceivers” gets the best reviews. After reading the book we do agree that this is a really good book, well structured and as Dr Shahin Farahani who wrote “Zigbee Wireless Networks and Transceivers” it shows that Drew Gislason has real world experience.

 

About Gislason:

Gislason is the President of San Juan Software in washington that “provides products, training and services to Original Equipment Manufacturers (OEMs) in order to promote the widespread adoption of the IEEE 802.15.4 and ZigBee standard for wireless sensor networks” and “has more than 22 years experience in the embedded market, and has created software embedded in products as diverse as Canon digital cameras, Nokia cellular phones and Symbol bar code readers”. He is also very active in the Zigbee Alliance.

[Gíslason is an Icelandic name meaning son of Gísli]


The Book:

The book is very hands on with code examples and contains very detailed implementation examples. Gislason covers development environments, applications, network layers, etc. Basically everything you need to know to develop an application from start to finish. What you will find most useful is the parts about the Zigbee Cluster library which is essential to be able to build any applications and finding useful information about how to use the Cluster Libs is very hard.

The only drawback is that Gislason pretty much only use Freescales BeeStack and development environment in his examples, it would have been better if more platforms had been used besides Freescale. He does point out that he uses Freescale because it is the environment he is most used to. Still no matter what platform you work on the examples will help you. There is one other small issue, no Kindle version……..

 

Source Code:

As with ”Zigbee Wireless Networks and Transceivers” there is a companion site to the book where you find source code to the examples. BUT make sure you follow the direct link in the book. If end up on the first page you just get an “advertisement” for the book. This is spelled out in the book but we totally missed this the first times anyhow, I assume you are like us and just want to get to the real stuff so preface and foreword etc may not be what you pay most attention to :-) .  Hint: The link is in the Preface. 

According to the read me file “The example code is (in the most part) written to work with a Freescale NSK kit, a kit which which contains 3 ZigBee boards“.

 

Which Book is best?

The question is of course which book is best, “Zigbee Wireless Networking” by Drew Gislason or  ”Zigbee Wireless Networks and Transceivers” by Dr Shahin Farahani? Besides the fact that the name of the books are almost the same, and the cover of the books looks almost identical, and both are published by Newnes, they are actually very different.

Both gives you a good basic overview of the standard, both authors are very knowable and both have experience implementing Zigbee Solutions. Our view is that Farahani is focusing on the RF and Physical layers and Gislason is focusing on the application layer, protocols and software. The conclusion is that if you are more into the HW and Specifications “Zigbee Wireless Networks and Transceivers” is the better book and if you are into software, applications and practical examples “Zigbee Wireless Networking” is the one. 

Having that said, if you are serious about Zigbee you should read them both, but to build your own stack or solution you also need to read and have access to the Zigbee standard itself.

Read it all, ZiggyK

Zigbee Wireless Networking San Juan Software

  • Share/Save/Bookmark

Off Topic: Free Kindle books!

by K2 - June 6th, 2009

This doesn’t really have anything to do with The ZigBee Project, but most of us here are avid book readers and have jumped on the Kindle bandwagon. To my great delight, I discovered a bunch of books for the Kindle over at Amazon are free!

Some great free fiction:

Searching for “Public Domain Books” on the Kindle store gives 7406 books! Here are some favorites:

  • Share/Save/Bookmark

K2 Status update – X-CTU on a Mac

by K2 - May 29th, 2009

X-CTU has been a great tool for playing around with different, parameters, changing firmware and generally having fun with the XBees, but being a Mac guy, it always makes me grumble a bit when I need to start Virtual Box with Windows 7 just to do trivial things like changing parameters.

Digi has a great document explaining how to send commands to the XBee, so In order to avoid Windows, we decided to write our own replacement for the Mac. Currently, it doesn’t have a GUI, but we’ve used the API commands and a simple python app to read and change configuration to the point where we’re comfortable to start working on a nice Cocoa app to manage our vast collection of XBees. In case you are wondering about me using python first, and now Cocoa, there is a great Python-ObjC bridge that I’m using.

I’ll be back shortly with more updates and screen shots showing off what we think a XBee GUI should look like.

Peace out, K2

  • Share/Save/Bookmark

Where to start?

by ziggyK - May 26th, 2009

Where to start? an Introduction

Lets say you one day wake up and feel an urge to build some cool Zigbee things, what do you do? Besides just going back to sleep because it is 6 am in the morning and just forget about the whole thing, you need to do some research, but where do you start? We have over the years followed the Zigbee standard, to be more precise we have read the news and read some articles now and then. But when we started to be more serious about it we realized it is not that easy to understand where to start. We searched around the Internet, downloaded the standard etc and finally started buying a bunch of books. For sure Zigbee is not one of those technologies where you find information everywhere and you know a lot of people that has real practical experience.

In this post we are trying to give all of you who are new to Zigbee, who want to find out more and asks the question “Where to start?” an answer. We have listed some of the resources that we think you should start with.

 

Online:

Daintree Networks who is “a leading provider of solutions for the development and operation of wireless embedded networks including 802.15.4, ZigBee, ZigBee RF4CE and 6LoWPAN”, but for many they are more known as the guys behind the “Sensor Network Analyzer (SNA)” used to analyze and debug networks. They have put up a good resource page on their site where you find whitepapers, specifications etc. What we recommend you read is the Zigbee Primer they have made, simple, short but to the point.

Daintree Resource page

Daintree Zigbee Primer (PDF)

 

Forums/Blogs:

One of the best, probably the best blog when it comes to Zigbee, at least we have not found one that is better, is Freaklabs. The site is created by a guy named Chris but his nick on the site is Akiba. He has a couple of blogs, a forum and he is the brain behind the open source Zigbee stack, FreakZ. In his blogs you find a ton of information, and equally good is the the forum. In general once you have decided to start some practical experimentation this site “kicks in”. But before that happens you should read some “Zigbee introduction” posts on his blog that focus on the physical and MAC layer.

Freaklabs Blog

Freaklabs Zigbee Part-1 PHY Layer

Freaklabs Zigbee Part-2 MAC Layer

Freaklabs Zigbee Part-3 MAC Layer

 

E-learning:

Jennic a semiconductor company that “focus on the IEEE802.15.4 and ZigBee standards” has created a ZigBee e-learning course. This course is surprisingly good and totally free. It will give you all the basic knowledge you need to understand Zigbee without going too deep. The course is split into six “modules” and after every module you have a quiz, which we find is one of the best ways to learn. Highly recommended. 

Jennic’s ZigBee e-learning Course

 

Books:

There are not that many Zigbee books out there and even less that are any good. We have read them all (almost), the one that stands out is “ZigBee Wireless Networks and Transceivers” by Dr Shahin Farahani. He works as a system engineer at Freescale “designing System-on-Chip transceivers for short-range wireless networking”. What we like is that it does not have the typical theoretical approach that many books like this have, it shows that Shahin actually is designing and  developing real world solutions. He is not one of those guys who reads the standard, removes some complex algorithms and turn it into a book.

The book covers all parts of Zigbee from RF, physical layer to the application layer. If you are a low level engineer working on firmware or just a “technology enthusiast” the book is for you. It really gives a comprehensive understanding of Zigbee. We really want to emphasize the fact that even if it has the mandatory “high level” descriptions it does deep dive into the lower level protocols as well as the RF part, so no matter how advanced you think you are you will learn something new. We truly enjoyed reading the chapter about “Battery Life Analysis” very few books would take you there, and this is one of the chapters that you truly can see that Shahin has real world experience. As smart as we think we are we did find some very interesting aspects of how to optimize battery life that we had not considered.

In addition the book has a companion web site “Learn Zigbee” where you find a lot of resources and lets you download a spreadsheet allowing you to calculate RF range, do a battery life analysis etc. You can buy the book directly from the site or Amazon both as paperback and for the Kindle.

There is another book written by Drew Gislason, “Zigbee Wireless Networking” that we have seen others recommend besides “ZigBee Wireless Networks and Transceivers” both published by Newnes. We have not read that one yet, but we will.

Learn Zigbee (the companion site)

ZigBee Wireless Networks and Transceivers

ZigBee Wireless Networks and Transceivers Kindle edition

Zigbee Wireless Networking

 

Zigbee Alliance

Last but not least is the Zigbee Alliance, they have a “learn more” section where you find a multitude of information. However it is not as straight forward to find information, you will find a lot of abstract white papers, power point presentations and “webinars”. In general you find more “technology marketing” documentation, still good but if you are a hard core engineer you may not find what you are looking for under this section.

BUT what you should get from here is the official Zigbee specification, and it can not be more hard core than that. 

Direct link to “Learn More”

Direct link to Specification download

 

Summary:

Maybe know you know where to start, but how do you start?

Our proposed approach is that you start by reading the Daintree Primer and the Zigbee introductions at Freaklabs. If you are still interested do the Jennic E-learning course. Before diving into the specifications at the Zigbee Alliance site read the “ZigBee Wireless Networks and Transceivers” or the ”Zigbee Wireless Networking” or maybe both. Once you get through the book(s) you can start diving into the standard. However a more realistic scenario is that you start ordering some Zigbee kits and start messing around while you read the book, and that is when Freaklabs blog and forum really becomes handy in combination with the vendors support sites and documentation. What dev kits to choose etc,  is another story that we save for another post.

Heading back to the books, ZiggyK
 

  • Share/Save/Bookmark

Trying out the Xbee Starter Kit

by kenth - May 12th, 2009

As you all know we  received the  XBee Starter kit with the 2.5 dev kit. The starter kit was ordered in Sweden where I am located. I ordered it from Farnell (link in Swedish), the price is 2017.50 SEK (≈ € 190, $260) including tax and shipping. In US you can order it directly from Digi for $129. The Starter Kit only works for Windows.

The Starter kit contains:

  • 2 XBee 1mW chips with antenna
  • XBee firmware programmer (USB)
  • XBEe firmware programmer (RS-232)
  • CD with software (useless)
  • USB cable
  • RS-232 cable
  • RS-232 loopback adapter

So first thing I tried was to just use the xbee modules as they were intended with included firmware. That worked quite well, almost everywhere in my apartment, except between the most far cornerns, but it was just 2 modules, no relay or anything, and four 20cm (≈8 inch) stone walls in between. So I was pleased with the range-test.

Next on my list was to actually try to compile and run my custom firmware (just a simple program to flash some LEDs).

Below is the stuff I needed to install and it’s not as simple as just installing some packages, I had to tweak it, renaming files and things to get it to work.

  • Freescale CodeWarrior for HC08/Coldfire (CW_MCU_V6_2_EVAL.exe)
  • Freescale BeeKit (BeeKitDownloadPackage.zip)
  • Digi tweaks for BeeKit (1011.zip)
  • FTDI Driver for windows (40002636_A.zip)
  • X-CTU (40002637_c.exe)

Installations:

  • FTDI driver for windows, insert the USB cable to the programmer and install a custom driver from where ever you unzipped the driver files.
  • X-CTU, just install.
  • CodeWarrior, just follow instructions.
  • BeeKit, just install it in it’s predefined installations path, do not change it.

Now to the more complicated stuff, the Digi patch for BeeKit, 1011.zip is designed for an old BeeKit, so it’s not compatible with the new version, there are some instructions in a pdf that you have to follow.

When you compile in this environment, the first time in every project, it complains about a missing file, it’s not missing, just not copied into the right location by the BeeKit builder so it has to be moved by hand and added manualy to every project before first compile.

Now the only thing left is just building some custom firmware, how hard could that be :D

Kenth out.

  • Share/Save/Bookmark

Digi Xbee 2.5 Development Kit and Starter Kit has arrived

by ziggyK - May 10th, 2009

We have received the Digi Xbee 2.5 Development Kit and the Digi Starter Kit……… No candy in this shipment…. bummer. According to Digi this is what we have ordered:

“The 2.4 GHz XBee ZB/ZNet 2.5 (formerly Series 2) Development Kit includes everything you need to set up a wireless ZigBee network in a matter of minutes. Two 50 mW PRO modules and three 1mW regular modules allow OEMs and systems integrators to establish self-discovering/self-healing ZigBee mesh topologies within their custom wireless networks.” 

“The 2.4 GHz XBee Starter Kit includes everything you need to set-up a wireless 802.15.4 network in a matter of minutes. The 1mW XBee OEM RF Modules make it simple to design and range test custom wireless networks. The XBee Starter Kit includes worldwide agency approvals and advanced networking features.”

 

We will for sure put their statements to the test. The 2.5 Kit costs $339, add on tax and shipping and the total comes to $392. Besides all the hardware you get a four page “getting started guide”. As part of the development kit you get free technical support via live chat, e-mail and phone. The Starter Kit costs $129 in US + tax and shipment, but that kit was actually bought in Sweden. in In US and Canada you can call a toll free number, and for the rest of the world you have a “normal” US number to call.

You can order the kits directly from the Digi Store in US - Digi Xbee 2.5 Dev kit - Digi Starter Kit

The reason why we order two kits is that we have people working on the project both in US and Sweden. The difference between the kits is that with the 2.5 you get the Zigbee Pro stacks and you also have other type of modules, but to build a simple test network between two nodes the starter kit is absolutely fine. In our case we look at the starter kit as phase one and then we look at the 2.5 kit for when we are expanding the network. 

As part of the kits there is a CD with “all tools required to program your RF modules and test the range” and for the 2.5 kit there is also a software “conversion kit” so you can install a Zigbee Pro stack instead of the “standard” stack. We will dig into the difference between Pro and “standard” later on in this blog.

The reason we are going with the XBee is because it gives us the very interesting EM250 ”ZigBee System-on-Chip” from Ember, but we won’t have to deal with the antenna mount, getting the radio FCC approved while still getting a zigbee module and a microprocessor in a very sleek and easy to use form factor. You can also buy the EM250 separately which “looks” like it is cheaper, but then we’d have to order boards with it mounted, and we are in no way ready to finalize a board design at this point, nor do we want to order the amount of boards that brings down the price to a reasonable level.

An issue we need to resolve is the stack, we are not sure if it will run with any stack other than Freescales, which has a rather steep licensing fee for non commercial projects, about $1000 per “station” so we will take a look at other stacks and see what we can get working, worst case we will have to write our own.

On top of this we prefer developing on Mac OS X……. yes, we are that kind of people. The compiler they ship with is CodeWarrior that does not work on Mac. So besides trying to find another stack (or if someone from Freescale reads this and wants to give use an evaluation stack for longer than 30 days or or a “non commercial” license) we will also see if we can find a compiler that works on Mac, or we have to revert to using PCs (well we have already started using them, like we could wait, but our goal is to develop on Macs)

We will leave you with some very hot pictures (if you are that kind of a person) of the 2.5 dev kit.

Until next time, ZiggyK

xbee_dev_kit

xbee_modules

 

usb_dev_board


  • Share/Save/Bookmark

Thermometer

by K2 - May 5th, 2009

Since I only ordered a single XBee module (What exactly was I thinking?), I obviously can’t set up a network. The next best thing would be to build a thermometer and see how to work with OneWire modules and to get a feel for the Arduino.

After reading some tutorials on the Arduino, this looked to be a piece of cake. I set out to build it using the bread board and quickly managed to do it all wrong.

Not having any of the electrical engineers available (I’m one of software guys. Wires are so old-school.), it took a while to figure the whole thing out. Especially having to feed the second pin with power. The OneWire protocol was easy, especially since there is a library available for the Arduino.

This is what the bread board with everything hooked up and working looks like.

temp_prototype_1

At this point, I was able to send temperature readings to my Mac over USB, bragging how amazing my thermometer was. Most people pointed out several uninteresting facts like it was slightly unpractical, a tad expensive and seemed fragile, but the that wasn’t the point. From now on, I know what the temperature is and soon I’ll have a wireless version. We’ll see who’s laughing then!

Peace out, K2

  • Share/Save/Bookmark

First Delivery of Zigbee stuff

by ziggyK - May 3rd, 2009

 

Step one is sensors and specifically temperature sensors. As the first project we want to be able to measure the temperature, not to control any thermostats. We know there are several products existing that can control the temperature using Zigbee, but the goal with this whole project is to build as much as we can to learn about the possibilities.

We started out by ordering some stuff.

1. Aurdino starter kit: This is basically a starter kit to build a micro controller.

The package includes:

1 x Arduino Duemilanove board (Based on ATMEGA328)

1 x Solderless Breadboard 12 x Flexible Wire Jumpers

3 x Red LEDs

3 x Green LEDs

3 x Blue LEDs

3 x White LEDs

5 x 330 Ohm Resistors

5 x 680 Ohm Resistors

5 x 1k Ohm Resistors

5 x 4.7k Ohm Resistors

5 x 10k Ohm Resistors

1 x Tactile Push Button

1 x USB Cable for programming and powering the board

 

2. Digital Temperature Sensor DS18B20:

It is what it is says, a digital temperature sensor. The “special” thing with this is that it uses 1 wire so it is extremely easy to integrate.

The 1 Wire protocol is developed by Maxim, you can find more info at: http://www.maxim-ic.com/appnotes.cfm/an_pk/1796

 

Up to this point it is just generic electronics, so to make it a “Zigbee thing” you need to add some Zigbee specific stuff, and here they come:

 

3. XBee 1mW Chip Antenna:

This is a 2.4Ghz Xbee Module, it enables communication between the different components in a Zigbee system.

 

4. Arduino XBee Shield

In order to make the Aurduino “Zigbee ready” you need add support for the Zigbee protocol, this is done with the Arduino Xbee Shield. NOTE: it requires an Xbee module to work.

 

We ordered our components from Hacktronics and Sparkfun, it took a bout 3 days to get it delivered.

Below are the components we got:

img_4211
1. Candy (yummy)

2. Arduino

3. LEDs

4. Solderless Breadboard

5. Xbee Antenna

6. Xbee Shield

7. Resistors + Tactile Push Button

8. Temperature Sensor DS18B20

9. Wire Jumpers

  • Share/Save/Bookmark