Find all your DIY electronics in the MakerShed. 3D Printing, Kits, Arduino, Raspberry Pi, Books & more!

Last time I was up in Rhode Island my good friend Brian Jepson pushed a small red box into my hands with the words, “…try this, you’ll love it.”  I immediately started looking for the blue pill. However I needn’t have worried, because it turned out to be a SensorTag from Texas Instruments.

The SensorTag is a Bluetooth Low Energy development kit from Texas Instruments targeted at mobile developers.

The SensorTag is a Bluetooth Low Energy development kit from Texas Instruments targeted at mobile developers.

The Hardware

The SensorTag is an interesting product, and you get the sense that this is very much a product made by TI to demonstrate their new Bluetooth Low Energy system-on-chip the TI CC2541. It’s marketed directly to smart phone app developers rather than at hardware developers. Either for them to develop an app to directly support the SensorTag, or as a reference hardware design to develop more sophisticated Bluetooth Low Energy accessories.

The CC2541 chip comes in a QFN-40 package and not only implements Bluetooth Low Energy, but has a internal  MCS 8051 micro-controller, general purpose timers, accurate RSSI support to allow range determination, two USARTs, 23 general purpose digital IO pins, 12-bit ADC with eight channels, I²C and the kitchen sink. This is a nice chip that means you should be able to develop a compact board layout with few external components, except the sensors or actuators you’re actually interested in controlling.

Unwrapping the TI SensorTag

Unwrapping the TI SensorTag

Stripping off the somewhat oddly shaped and garish red cover, the SensorTag board is a lot more compact than its casing suggests. It’s also a lot more powerful. It has six onboard sensors, all of which are connected to the CC2541′s I²C interface bus with separate enable signals.

To minimize current consumption, all the onboard sensors are by default disabled and they are kept in sleep mode between measurements and each sensor can be enabled and read individually. Which is why the entire board runs off a single CR2032 coin cell.

The front of the board exposes five of the six onboard sensors; the TMP006 temperature sensor allows us to measure the temperature of on object without any contact by using a thermopile to absorb IR energy emitted from it. Just point the SensorTag at the object and it’ll tell you the temperature, which explains the strange hole in the front of the case. It’s needed to expose the TMP006.

Also on the front of the board are the C953H barometric pressure sensor, along with the KXTJ9 accelerometer, MAG3110 magnetometer and the IMU-3000 MEMS gyroscope. Finally, toward the left hand side of the board (in the picture below) are two small contact switches whose status is also available via Bluetooth to a remote connected device.

SensorTag Front

The front of the TI SensorTag board. Showing the pressure and temperature sensors, along with the accelerometer, magnetometer, and gyroscope.

The rear of the board is where the CC2541 chip itself is mounted, which gains us a couple of extra sensors for free, as amongst the kitchen sink collection available is an onboard temperature sensor which will report the ambient, as opposed to the “at a distance” temperature, and a battery monitoring sensor. The rear of the board also houses the SHT21 digital humidity sensor and the side button (top of frame) is used to put the board into discovery mode.

SensorTag Rear

The rear of the TI SensorTag board showing the CC2541 chip itself and the humidity sensor, along with the CR2032 coin cell powering the board.

The Software

The SensorTag is a Bluetooth Low Energy device, which means that it can talk to any platform that supports Bluetooth Low Energy. Right now that means recent iPhone and iPad models, natively from newer Macbook Pros and from any Windows or Linux PC with an appropriate Bluetooth 4 dongle.

Unfortunately while Bluetooth Low Energy is supported on some Android devices, it’s not yet in the core SDK and there isn’t a standard way to talk to Bluetooth Low Energy hardware. In fact some “SMART Ready” devices, such as the Samsung Galaxy S3, will need a firmware upgrade to fully support the standard. However with Google I/O coming up next month, that situation might well change fairly quickly.

The easiest way to get started with the SensorTag is probably to download TI’s SensorTag application from the iOS App Store. It’s free to download, and is a Universal application for both iPhone and iPad.

Open up the app, put the SensorTag into discoverable mode by pushing the side button and you should see the tag pop up on the list of available devices almost instantly. Interestingly, other devices based on the CC2541 chip might also probably appear on the list.

View All

That said, if you don’t own an iPhone or an iPad the SensorTag is still pretty easy to work with, and TI has some fairly extensive documentation on how to talk to the SensorTag, including a full list of the GATT services the device offers enabling the state of all of its sensors to be read. Even if you’re not working on iOS where TI has helpfully provided code examples, it shouldn’t be too hard to develop an application to talk to the tag.

The iOS SDK

However, if you are developing on iOS there is plenty of source code examples available to you, including the source of the TI SensorTag app that we looked at earlier.

techBASIC

If you’re not that keen on developing native applications for iOS to support the SensorTag, there is also Bluetooth Low Energy support in techBASIC. The techBASIC environment is a full implementation of the BASIC programming language which allows you to develop and run apps on the iPad (and the iPhone) that look just like native applications. However, it also supports taking external data, both using the HiJack board and via Bluetooth Low Energy if your hardware supports it, and it lets you do some impressive things like collecting and analysing data from a model rocket flight.

There is a lot of information on controlling the SensorTag with techBASIC and if you’re not keen on developing native iOS applications this is a solid alternative.

Books

Real-World Arduino, Sensor, and Bluetooth Low Energy Apps in techBASIC

Real-World Arduino, Sensor, and Bluetooth Low Energy Apps in techBASIC

Mike Westerfield, the maker behind that rocket flight, is currently writing a book called Building iPhone and iPad Electronic Projects.” Right now it’s available in early release, but it should go to press later this month.

About half the book discusses Bluetooth Low Energy, and two entire chapters are dedicated to the TI SensorTag. The first walking you through talking to it from techBASIC, the second walking you through building your own Bluetooth enabled model rocket.

I’m acting as a tech reviewer on this book and it’s a really interesting read, and not just for the Bluetooth Low Energy section, as it’s the first time I’ve seen the HiJack board talked about in any detail.

Other Development Kits

While the SensorTag is perhaps the most interesting development kit for the CC2541, TI also offers other developer kits including the DK-MINI which includes a reference design for a Bluetooth Low Energy “key fob” board.

Interestingly, if you have a Hone key fob, you’ll  see that it shows up in the TI SensorTag app. It’s based around a CC2541 chip and is sufficiently similar to the reference design in the DK-MINI developer kit that you can trigger the alarm on the fob from the TI SensorTag app.

Summary

You’ve probably guessed by now that I’m a fan of the TI SensorTag. It’s an interesting bit of hardware aimed squarely at simplifying smart phone developers lives when prototyping Bluetooth accessories. But it’s generally more useful than that and as Mike’s model rocket flights showed it can add a lot of data collection capability to your maker project quickly and cheaply.

Alasdair Allan

Alasdair Allan is a scientist, author, hacker, tinkerer and co-founder of a startup working on fixing the Internet of Things. He spends much of his time probing current trends in an attempt to determine which technologies are going to define our future.


Related

Comments

  1. bobh says:

    Great article. Sensor Tag quite a bargain at $25 USD.
    Could see this finding use in school science lab experiments. Don’t see many apps in the store that target the Sensor Tag as an end product. Like integrated into a weather app.

  2. jorge says:

    Here we go!!!!
    We are considering the following application:
    8 walking cooler (Fruit and Vegetables) .All of them needing a check for temperature and RH.
    Do you consider that we can get those conditions (for each room) using only one smart phone.? One by one.
    If you answer is YES.
    Can we use other smart phone and check those conditions too?
    We have two person at our maintenance department and of course each one use his own phone.
    Thanks a lot in advance.
    Jorge.
    McAllen TX.
    We will be grateful if you had any comments about this issue , send it using our e.mail address.

    1. delete says:

      Hello Jorge,

      this might be late, but I’ll give you an answer anyway. On an iOS device you shall be able to connect to 10 BLE units simultaneously with an app(this is a limit defined by Apple).

      However for such an application that you describe I would consider a broadcasting/iBeacon scheme which will allow your BLE units to transmit your RF and temp to anyone using your app, http://web.stalliance.no/blelogg/?p=269

      delete

  3. Used the sensortag for a recent project, developed an iPhone that uses the SensorTag to monitor weight training, counts the number of repetitions and breaks it down into the type of movement the individual did, e.g. push, pull or curl here the link https://itunes.apple.com/us/app/weight-training-genie/id650541393?mt=8

  4. Maura McDonagh says:

    Any one have sample project on temp and humidity? just want to see it in action, or how that data is corrolated did not purchase the CC2540 USB dongle so any other method just with iphone 4S

    1. delete says:

      Hello Maura,

      The intention with the SensorTag app is to select and deselect the sensors that you need. If you only need temp and humidity you can go into the profiles menu and select only these two sensors. Selecting only the number of sensors needed for your prototype is the principal idea of the SensorTag and the SensorTag app.

      In addition there is an app from Sensirion called comfort guide; https://itunes.apple.com/us/app/comfort-guide-sensible/id515236285?mt=8, which will allow you to only display the temp and humidity from the humidity sensor in a graphical comfort zone manner.

      delete

  5. petter peiling says:

    I would take this board and replace the CC with an nRF51 series from Nordic Semiconductor. Better chip to work with all around and Cortex M0 core is beyond compare to 8051.