Advertisement

Developing Bluetooth low energy ‘appcessories’

What you need to know and what are the challenges when creating an ‘appcessory’ design for a smartphone

BY JARLE BOE
System Applications Manager, Low Power RF
Texas Instruments

 www.ti.com

Lke most smartphone owners, I have a dream to make my own app. And like most app dreamers, I have discovered that most of the apps are already invented. But now, thanks to low-power and low-cost MEMs sensors, I have the chance to develop a new type of app with the Bluetooth Smart (Bluetooth low energy) standard or a smartphone accessory designed to run an app or “appcessory.”
Traditionally, Bluetooth has been used for streaming audio. With the Bluetooth low energy extension as part of the Bluetooth v4.0 specification, applications can operate for years on a single coin cell battery at the expense of lower data bandwidth between the accessory and the phone.
Bluetooth low energy fosters the creativity of app developers to collect real world sensor data from advanced wireless sensors for an unlimited number of potential applications. Just like the launch of the iPhone created a new ecosystem of app developers with creative ideas, the launch of more Bluetooth low energy-enabled smartphones opens up a world of new app opportunities. However, there is still a challenge in that appcessory design requires a combination of skills and knowledge, including sensors, RF, hardware design, embedded firmware, and smartphone app development.
Sensor design
In the last few years, an amazing number of advanced low-cost MEMS sensors with digital interface and very low power consumption have been released. In creating the SensorTag development kit, our goal was to make a Bluetooth low energy device with the maximum number of sensors while achieving years of battery life on a single coin cell battery.

facn_TI01_feb2013

Fig. 1: TI SensorTag block diagram with power numbers.
As shown in Fig. 1 , we ended up with six sensors chosen for their very low sleep current and digital I2C sensor interface. Each of the sensors has separate enable signals and the sensor reading intervals are programmable to be optimized for various applications.

Hardware and RF design
You can make your own RF design if you are experienced. If not, I recommend using a reference design. Do copy everything in the RF design accurately; use the same board-layer buildup and thickness. Keep the same dimensions and distance between components, and be prepared to make a few spins of the board until the design is final.
Note that products containing Bluetooth radios require radio certification from the FCC (U.S.), IC (Canada), and ETSI (Europe) to be sold in each region. FCC/ETSI/IC testing and paperwork normally require six weeks and cost $20,000 to $25,000. These three radio certifications will normally cover all the regulatory requirements needed to sell the device worldwide, but additional certifications may be required.
For low-volume production designs, the use of an RF module is recommended for further simplification. There are numerous Bluetooth low energy modules on the market. A collection of Bluetooth low energy modules can be found here: www.ti.com/ep0213-1. An additional benefit to using a module provider is that most of the time modules are already certified for worldwide use. However, you should make certain the module you are using is already certified by the certification authorities in the region you plan to sell your device.
Embedded firmware development
There are two types of Bluetooth low energy ICs on the market today. A network processor is a standalone Bluetooth low energy device that includes the software stack and radio in a single device. This allows you to use your own MCU and interface to the Bluetooth low energy device through a serial interface like UART or SPI. The second option is to use a flash-based SoC (system-on-chip) with MCU, flash memory, and radio on the same device as the applications. This approach gives the lowest power consumption and cost, and other advantages including:

• The application and stack firmware can be upgraded from the smartphone app.
• Available Flash memory space can be used for data storage to allow use of the Bluetooth accessory as a datalogger in “offline” mode when it is not connected to the smartphone. For example, a heart rate monitor can store data while you are running and load the data to your smartphone when you come home.
• Reduced cost since the PCB is smaller and you need less components as there is no need for an external MCU.

Bluetooth low energy firmware is based on a Bluetooth low energy software stack. There are several stacks on the market both paid and for free. To ensure compliance and interoperability, the software stack should be Bluetooth low energy certified.
Smartphone app development
For most developers of embedded hardware and software, the world of smartphone app development is a step too far. Fortunately, there are very good tools with Apple’s Xcode development environment, but the level of knowledge required to build your own app can still be high. To easily get started with a simple Xcode source project that shows how to connect and pair Bluetooth low energy accessories and collect sensor data, see www.ti.com/ep0213-2 and Figs. 2 and 3 .

_App_on_App_store
Additionally, there other tools that make it even easier to write apps for Bluetooth low energy appcessories. Any engineer that has learned BASIC in school can write (or cut and paste) applications using techBASIC available from Byte Works, www.byteworks.us. This program includes BASIC code examples to interface to Bluetooth low energy sensors and provide advanced mathematic functions and graphical presentation of the data. They also supply tools that convert your BASIC code to Xcode format for publishing your app on App store. 

facn_TI02_feb2013
Fig. 2: The SensorTag user interface on an IPad.
Certifications
After completing your hardware design, firmware programming, and app development, it is time to lean back and wait for your app to be approved. To submit apps to the App store you must be a member of the Apple App developer program, which costs $99 a year. When your app is submitted the first time, you should expect a two- to four-week cycle time for Apple approval. You can track current approval times on this web site: http://reviewtimes.shinydevelopment.com/.
Any Bluetooth products must pass Bluetooth end product certification testing and you must be a member of Bluetooth SIG organization, which is free at the Adaptor level. All certified Bluetooth end products are listed on the Bluetooth product directory for free, giving your appcessory some great promotion: www.bluetooth.com/Pages/Product-Directory.aspx.
Bluetooth end product test time is normally four weeks, and typical cost for certification is approximately $3K. However, this fee is waived for designs that strictly follow a Bluetooth certified reference design (HW and SW), such as TI’s SensorTag. For more information about certification, check out www.ti.com/ep0213-3.

facn_TI03_feb2013

Fig. 3: The complete SensorTag product, including concept drawings and iPad app
The pleasure of seeing the results of a wireless embedded product through an iPad app can’t be explained. Instead of navigating cumbersome menus on a small product display it is gratifying to use engineering skills to create smart touch interfaces that allow the display of all the hidden gems and features of an embedded design.
If you want to test out your own Bluetooth low energy “appcessory,” the complete design files for this project can be downloaded at: www.ti.com/ep0213-4. The source code for both the embedded firmware and app sample project can be downloaded at www.ti.com/ep0213-5.

Advertisement



Learn more about Texas Instruments

Leave a Reply