TI LaunchPad Stellaris and Anaren CC2530 Zigbee BoosterPack kit

I recently got the chance to evaluate the Anaren AIR CC2530 BoosterPack Kit, which is a ZigBee eval platform for TI’s LaunchPad products, i.e MSP430 and Stellaris.
Kudos to the good folks at element14 for providing the kit as part of their RoadTest program.

The review is found at element14’s site, but also here for completeness. I will also post further developments using the kit here on the blog, as described in the review I have some ideas around a cat-detector… So many projects, so little time.

The review follows below.

Update:

I managed to flash the Stellaris board under OS X, turned out to be 10 minutes work including compiling the tool.

The pre-installed demos then performed without a hitch, see below for details on what was done.

First impressions

Ever since TI came to market with the LaunchPad series, I have always been impressed with the solid execution of those products. Good electronics design, nicely packaged in robust cardboard boxes, a couple of leaflets to get you started quickly, usually also including a USB cable just to make sure you are not stuck without one. On the other hand, USB cables are a commodity these days, so maybe it is a bit overkill to include them in every kit… Very competitive pricing too.

Some of the products (such as the Stellaris LaunchPad) does not come with CDs, and I actually prefer this. Download it from online instead, be guaranteed to get the latest version, and do the environment a favour by saving some plastic/oil.

The CC2530 kit does include a CD, not sure I will ever use it though, as I want to ensure I get the latest and greatest version of the software.

While reading up on the CC2530 kit I was also pleasantly surprised by the large number of Booster Packs TI is currently offering. The amount of add-ons does not compare to that of the Italian-originated open source dev board (*uino), that has become so popular in the past years, but that’s all right. TI instead offers a lot of good, affordable add-on boards from a single source, and under a uniform concept. That’s worth a lot to me – you know the BoosterPacks have been verified to work with the main MCU boards.

Anaren’s product page is of course a good source of reference info, they also have a very good ZigBee wiki, plenty of good material in there.

What’s in the box?

The CC2530 box is almost the same width/depth as the Stellaris box, and about twice as high.

A few leaflets and a CD makes it easy to get started, the small stickers for tagging the boards “coordinator”, “router” and “end point” is a nice touch too, they make it easy to remember which device does what.

Three A2530E24A boards are included in the kit, together with a 2xAA battery pack intended for powering a remote/mobile node. As ZigBee is usually about providing remote and/or mobile access to things, that battery pack is likely to come in very handy. Not sure about the voltage though.. I would guess at least some component on either of the boards would need 3.3V, which the two batteries obviously won’t provide.

But wait – the MCU runs off 1.8-3.3V, and the CC2530 documentation states it will run off 2.7-3.6V. So the double AA batteries should be fine.

Each A2530E24A board comes with a pre-programmed MSP430G2533 MCU, which means that it’s super simple to get started. If you power a A2530E24A board from the battery pack you don’t even need a host LaunchPad board!

This means there are four obvious options for using the Anaren boards:

  1. Connect the battery pack directly to the A2530E24A board. This gives you a compact, independent unit, with both ZigBee and various built-in sensors (see below). No USB communication with a host PC in this configuration.
  2. Remove the MCU from a MSP430 LaunchPad and connect the A2530E24A (with a MSP430G2533 in it) to the LaunchPad host. Using this configuration you should still be able to use the LaunchPad’s communication channels to a host PC.
  3. Remove the MCU from the A2530E24A board, and connect that board to a populated MSP430 LaunchPad.
  4. Remove the MCU from the A2530E24A board, and connect that board to a Stellaris LaunchPad.

I intend to test a combination of 1) for the remote node(s) (a.k.a “end points”) and 4) for the central node (=”Coordinator”).

Features

The A2530E24A boards are small but pretty well equipped:

  1. ZigBee AIR radio module (model A2530)
  2. Socket for a MSP430G2533 MCU
  3. Connectors for attaching to LaunchPad boards
  4. Various LEDs and push buttons. Some are passthrough from the LaunchPad, some are specific to the BoosterPack board.
  5. DIP switches for configuring frequencies and other configuration parameters. These switches are a bit more expensive than using regular headers/jumpers, nice by Anaren to go that extra step to allow for easy configuration.
  6. IR temperature sensor (This is a contactless sensor – nice! Move your hand close to it, and it will pick up the change in temperature). Sensor used is a TI TMP006.
  7. RGB light sensor. Once again, this is also a pretty cool little sensor that can detect not only light levels, but also different colours. The sensor used is a AMS/TAOS TCS3414.
    This sensor has a neat approach to colour detection, using an 8×2 array of photodiodes each with a filter for different wavelengths of light. Add to that A/D converters and support circuitry and you get a super compact RGB sensor.
  8. 128 kByte serial EEPROM. Might be useful for sensor node/logging applications. The chip used is an Atmel AT24C128C.
  9. Current sense circuitry. This makes it possible to measure the current drawn by the BoosterPack. Having checked the schematics, it is clear that only the radio unit’s power consumption is included in this measurement. It should therefore be possible to measure active vs standby power consumption for your own applications. This is always nice, as the manufacturers power specs often tend to be not so representative for real-world use cases.
    Sensor used is a TI INA216A2. (The INA family of current sensors is great – I’ve used them in various projects, they are very easy to use, nice specifications while at the same time affordable).

Getting started

Using the included leaflet guides it is pretty easy to get started. All instructions in the CC2530 kit is however for Windows, if you are using OS X (like I am) or Linux you are on your own.

A really nice touch that makes it easy to get started is the fact that Anaren has flashed different firmware into the three included boards. One is a Coordinator, one is a Router and one is an End Point.

This means that the three units will automatically forward a mesh network once powered up. You could have the End Point far away in your house, with the Router half way to the computer to which the Coordinator is attached. Nice!

If you are using Stellaris launchpads you need to flash them with the appropriate firmware before powering up the mesh network. That is done using TI’s LMFlash utility, which is only available for Windows.

Given that I don’t have a Windows machine readily available this is actually a deal breaker. Not good TI/Anaren – the LaunchPad products and BoosterPacks are usually cross platform, but the LMFlash tool seems to be the one exception. Really quite silly that you need to have a dedicated Windows machine just to flash the Stellaris LaunchPad, when everything else runs nicely on OSX… <FAIL>!!

While on the same topic, Anaren’s product documentation for the CC2530 only contains instructions for Windows users, that’s once again a bit of a shame considering how established OS X is today. Still, I didn’t experience any issues setting up drivers  for the CC2530 kit, using instructions from TI’s LaunchPad site for OS X.

Note that you could actually still use the pre-flashed demos, if the included MSP430G2533 MCUs are used on the A2530E24A boards. Some basic feedback via LEDs would be possible, but nothing near as neat or useful as having the Coordinator node hooked up to a PC.

Thus, at this point I am placing this review on a hold, until I get a Windows machine set up here, or find an OS X alternative to LMFlash. That might actually be the best route, as for example the Energia IDE can burn boot loaders to Stellaris boards…

Edit: https://github.com/utzig/lm4tools looks quite promising… Considering it must probably be compiled from source it is not really an out-of-the-box experience, but that’s ok.

Stellaris tool chain for OS X

As noted elsewhere in this review, flashing the Stellaris with binaries provided by Anaren turned out to be a challenge.

There seemed to be two options:

  1. Using TI’s Code Composer Studio (CCS) and compiling from source code. This is TI’s closed source development IDE for various embedded platforms, including the Stellaris.
    The problem is that it only runs on Windows and Linux (not OS X), and that it costs hundred of US dollars for unrestricted versions. You might be
    able to do what you need with the limited eval versions, or not. Hard to tell in advance. Either way, given that OS X is not supported, CCS is not
    even an option
  2. Finding a tool that can transfer the Anaren built binaries to the Stellaris board. Turns out lm4tools (link above) does just this.

The steps for getting lm4tools onto a OS X machine are as follows:

  1. Install Homebrew, http://mxcl.github.io/homebrew/ and use it to set up a build environment (i.e. so that you can run “make” to compile programs from source, in this case
    you need GCC to compile C programs). I did this long ago and don’t remember the exact steps involved, there are plenty of tutorials online for this though.
    Note that you need to be at a command prompt on your OS X machine for this and the following steps.
  2. Make sure you have libusb installed. Run “brew install libusb” and watch Homebrew do it’s job.
  3. Download latest lm4tools into suitable directory, compile it, and copy it to desired place in your path:
cd

mkdir downloads

cd downloads

git clone https://github.com/utzig/lm4tools.git

cd lm4tools/lm4flash

make

sudo cp lm4flash /usr/local/bin            (Note: You might need to change the place to which you copy lm4flash, use "echo $PATH" to find a suitable directory that is in your path)

cd

lm4flash

You should now see the help output from lm4flash.

The few remaining steps are:

  1. Download the Anaren BoosterPack CD from https://www.anaren.com/air/cc2530-boosterpack-kit. Save it in a suitable place and unpack it.
  2. cd into the CD’s directory A2530-BoosterPack/Firmware/FactoryDefault/Stellaris
  3. Attach the Stellaris board. ATTN!! Make sure to remove the MSP430G2533 from the Anaren board before attachting it to the Stellaris LaunchPad board!!
    Failing to do so will lead to all sort of unpredictable behavior, maybe things will even break/be fried. You have been warned.
  4. Run “lm4flash -v SimpleApplicationCoordinator.bin”. No need to specify a COM port, the lm4flash tool seems to be smart enough to figure it out on its own.
  5. Done!

Trying out the demo application

Make sure the Stellaris/A2530E24A board is plugged into a USB port, then open the serial monitor of your choice.

The one in the Energia (http://energia.nu/) IDE is very easy to use, and as Energia is a great IDE for LaunchPad it’s a good choice.

Set the baud rate to 115200 for Stellaris (9600 for MSP430), and voila – the Stellaris responds with a bunch of initialization messages from the Anaren module.

Hook up the battery pack to either the Router or End Point A2530E24A boards (they are pre-flashed with firmware for different ZigBee roles, remember?).

No need to attach it to a LaunchPad, the MSP430G2533 on the A2530E24A handles everything.

Watch the serial monitor… and voila – you should have messages coming in every few seconds. The remote node sends temperature readings, battery voltage
RGB coded light readings etc.

Holding up the remote board an inch from my throad, the IR temp sensor picks up the body heat, and the serial monitor instantly reports ca 36 degrees Celcius.

IR sensor like this one have no delay in the readings – very nice indeed (but also a bit sensitive from a mechanical point of view).

With that I am actually pretty happy for now. The initial show stoppers turned out to be easily negotiable, and the Anaren devices are performing very nicely.

Schrödinger’s cat – is it there, or is it not?

Those not familiar with Mr Schrödinger’s thought experiment from the 1930’s, it is a fascinating read.

Slightly outside the topic of this review though, true.

We however do have a cat of our own, and as she likes to roam around the neighbourhood late at night after bedtime, we have no means of knowing when she wants to come back in (the food is inside, after all..).

Wait – here’s a great real world test case for these Anaren modules!

The concept is simple: A remote node built from an el-cheapo PIR module hooked up to a Stellaris/Anaren A2530E24A combo placed just outside the door where the cat sits when she wants to come inside. The central node is another Stellaris/Anaren combo (not necessarily connected to a PC, this could too be a mobile unit) with a buzzer to get the attention of a nearby humanoid, who can then go and let the cat inside. Beauty!

For extra points, I am thinking about adding a USB link to a small headless server, which would log the time when the cat appears in front of the PIR. That would make it possible to collect statistics on when the cat wants to get inside, possibly even predict when it will happen next time..

Yes, there is the risk of other animals triggering the PIR. Guess I might need to filter out all events during the day/early evening, only keeping the events during dark hours. Or adding a light sensor to the remote node.. Or an RFID chip in the cat’s collar..
All that in due time, first step will be a basic proof of concept.

Btw, the Stellaris’ 80 MHz ARM Cortex-M4 MCU is of course way overkill for the above application – but it is very convenient and affordable => easy choice.

Anyway – this work will be documented as it develops over on my blog at www.ptarmiganlabs.com, with updates to this review if/when relevant.

Room for improvement

Nothing to complain about with respect to the CC2530 kit itself – it does what it claims it will do, and it does it very nicely.

Some feedback to Element14 though: As with previous road tests that I have been fortunate enough to be part of, there was no notification that I had been selected to review the CC2530 kit. First thing I heard about it was a note from the courier company about a failed delivery attempt. Having no idea what they had tried to deliver, I was of course curious, and very pleasantly surprised, when I realised what the package contained.

Still, it feels like it should be a fairly easy thing to send an email notification to the people selected for the road test. I know this has already been suggested by others in the past – still worth considering, IMHO.

Finally, IMHO Anaren should consider adding at least some instructions for how to get started and use their products with OS X. Or maybe they see that most electronics designers use Windows… I am not so sure how true that is these days though – OS X has definitely gained a lot of ground in the last few years.

Last but not least: TI should make an OS X flashing tool! That would give them a cross platform tool chain, something they do not have today.