Machinedesign 6711 Ibeaconpromo 0

How to Improve a Sensor Node with Bluetooth

Nov. 20, 2014
Adding Bluetooth to a sensor node can make it more useful and more user friendly.
Download this article in .PDF format
This file type includes high resolution graphics and schematics when applicable.

Bluetooth technology and standards are opening the door for engineers to use portable smartphones and tablets to make sensor nodes more helpful in monitoring a host of parameters. Connecting a sensor to Bluetooth Classic, for example, lets it collect and transmit large amounts of data to practically anywhere in the world.

The latest smartphones are Bluetooth Smart-Ready, letting them monitor and control sensor nodes with a low-energy radio.

Bluetooth is also often less expensive and more compact than other wireless technologies and is based on standards included in virtually all smartphones and tablets shipping today. Beyond access to the smartphone’s well-accepted user interface and high-performance processing, Bluetooth extends their use to new opportunities and features based on the fact cell phones are carried by so many people and are available to so many more.

For instance, a cell phone connected via Bluetooth Smart can serve as an authentication “key” to unlock a user’s front door or verify that an operator has been trained on a particular piece of equipment prior to unlocking it for use. Additionally, Bluetooth Smart-enabled cell phones can provide location-based services to deliver specific content of interest to consumers as they enter a store or go near a display table, clothing rack, or digital sign.

It could also be used by a factory manager touring the factory floor and wanting production numbers for an assembly line or an update on quality data for outgoing shipments. In short, using the smartphone or tablet user interface leverages what is already available to most people.

Bluetooth Basics

Bluetooth Smart is defined by the Bluetooth Special Interest Group (SIG) in that group’s core specification 4.0. (Bluetooth 4.0 is supported on Android devices with firmware version 4.3 or later, Apple iPad 3 or later, and Apple iPhone 4s and later.) The 4.0 spec defines two new modes: dual-mode or “Smart-Ready,” and the single-mode or “Smart” — the latter of which is also referred to as Bluetooth Low-Energy (BTLE). These terms were created to help consumers easily identify Bluetooth products.

Smart-Ready devices are the latest smartphones, tablets, and mobile PCs. In Bluetooth lingo, they are typically “clients.” Clients await information from “servers,” which are the devices that transmit data. Servers can be sensor nodes, such as a blood-pressure cuff, a weight scale, or thermometer. Servers can also be industrial equipment or proximity beacons. The smartphone or tablet is the client that collects data from, or controls, the server sensor node. Engineers can now wirelessly connect projects or devices to the growing number of client devices.

Data sent to the UART the RN4020 Bluetooth Smart module, which is in the MLDP mode=, gets transmitted over the BTLE link.

Client devices traditionally implemented Bluetooth Classic (Core standard version 2.1 or later) to transmit data. In many cases, however, engineers find that Bluetooth Classic is overkill. Many apps don’t require the ability to stream data at 3 Mb/s. Instead, most applications perform simple “command and control” of sensor nodes, such as turning on a switch, checking a temperature, or adjusting the speed on a remote pump. This is where BTLE excels with its quick connection setup of about 5 msec. instead of Bluetooth Classic’s setup, which takes about one second.

The Bluetooth SIG has adopted 36 standard services and profiles for generic attribute or GATT-based BTLE, and they are listed at In some cases, several services are used to create a profile (shown in Table of Profiles).

There are some services or parameters that might be more helpful to engineers such as pump pressure, voltage, or flow. However, until those services are developed, designers can still use any of the services applicable to their designs, confident that they have been well thought out and vetted by teams of Bluetooth SIG engineers. All applications should be able to use the Device Information service, and many can use the battery, time, and alert notification services. And after a smartphone application identifies your equipment, it can read the device information and “know” which profiles your design supports.

Power Considerations

Power conservation is a critical issue for sensors, especially wireless, battery-powered versions. So to ensure a long operational life and postpone field replacement of the battery, the Bluetooth module should be programmed to be in the standby or dormant mode most of the time. The beacon interval (how often the sensor node transmits data) can also be adjusted to control power consumption, and this works in either the chip-down path or a certified Bluetooth module.

For even longer battery life, including an extremely low-powered microcontroller (or MCU) with a real-time clock/calendar (RTCC) lets designers set the device to wake at any interval and consume less than 1 mA. This should enable the battery to last for years. The MCU can also have a broad range of I/Os for actual sensing, along with processing data.     

SPP or BTLE for Moving Data?

A common question from developers is, “Do you support SPP (serial port protocol for Bluetooth Classic) or BTLE for transmitting data?”

SPP is not defined for BTLE. Although it is a standard profile for Bluetooth Classic, BTLE and Bluetooth Classic are not compatible. What many developers are really looking for is the flexibility to use BTLE as a wireline replacement for a Universal Asynchronous Receiver/Transmitter (UART). Fortunately, most chip and module providers offer this in one form or another. Some require code, recompilation, and updating the target module’s firmware using provided tools; others enable the mode during runtime through configuration commands or hardware pin assertion. Each method effectively delivers a UART replacement.

Microchip Technology’s low-energy data profile (MLDP) for its RN4020 BTLE module functions like a serial port profile. MLDP is set up via a single ASCII command over the UART interface or by asserting a logic high to the MLDP pin on the BTLE module. Once in MLDP mode, whatever is presented to the UART interface is immediately replicated over the BTLE connection, and is available for parsing and additional processing at the client. The BTLE module remains in MLDP mode until the MLDP pin is logically low or until disconnected by the client.

Download this article in .PDF format
This file type includes high resolution graphics and schematics when applicable.

Saving Money

Download this article in .PDF format
This file type includes high resolution graphics and schematics when applicable.

Design teams with access to experienced communication-stack developers and RF engineers may choose to implement a chip-down-on-board design based on BTLE-capable silicon. But this approach will cost about $50,000 dollars for certification (worldwide) and eat up at least nine months of development time. There’s also the cost of engineering, validation time, and lost revenues due to the delayed time to market. But if volumes are high enough to get favorable costs and the schedule allows, this may be the most economical path for a design.

An alternative approach, one that cost much less, is to drop in a pre-certified and qualified Bluetooth module to quickly get the Bluetooth/BTLE portion of the design out of the way, allowing the team to focus on what it does best. Such modules include the complete Bluetooth stack, as well as a tuned antenna (chip or PCB). Interface and configuration is typically done over the UART interface or a secure Bluetooth Smart link. The most common worldwide regulatory RF certifications are covered, and reputable vendors supply Bluetooth SIG-qualified designs as well (look for QDID).

There are also options regarding the module’s features and Bluetooth SIG-defined services. If a design team does not want write their own services and profiles, they can find an off-the-shelf module that includes them. These are often invoked with a simple command or patch of C-code that only needs to be compiled and loaded into the module.

Some modules can be configured in real-time from the host MCU or processor while others are configured during manufacturing and cannot be easily changed in the field. This latter approach can be risky. So if the team wants the flexibility to update the profiles used, adjust the configuration, such as power-saving modes, or even to do a complete module firmware update after it has been deployed, they should ensure the appropriate interface and pins are available in the end design. Be sure to choose a module that accommodates this.

Some modules can be updated over the air or the UART interface simply by putting the module in update mode and loading code via a terminal program (such as Tera Term). Others require device-specific programming tools and compilers.

A final consideration is what level of processing the sensor needs. Most pre-certified modules offer a method of enabling operation without using a host. Modules that support “Scripting” deliver the capability to monitor or control I/O pins on the module. The pins can be used to monitor an analog voltage or toggle a digital signal in a sensor and communicate over Bluetooth Smart without support of a processor or MCU. This  convenient option will help reduce cost and overall sensor size in designs.

Dave Richkas, Bluetooth Product Line Manager

Wireless Products Div., Microchip Technology Inc., Chandler, Ariz.

Download this article in .PDF format
This file type includes high resolution graphics and schematics when applicable.

Sponsored Recommendations

How BASF turns data into savings

May 7, 2024
BASF continuously monitors the health of 63 substation assets — with Schneider’s Service Bureau and EcoStruxure™ Asset Advisor. ►Learn More: https://www.schn...

Agile design thinking: A key to operation-level digital transformation acceleration

May 7, 2024
Digital transformation, aided by agile design thinking, can reduce obstacles to change. Learn about 3 steps that can guide success.

Can new digital medium voltage circuit breakers help facilities reduce their carbon footprint?

May 7, 2024
Find out how facility managers can easily monitor energy usage to create a sustainable, decarbonized environment using digital MV circuit breakers.

The Digital Thread: End-to-End Data-Driven Manufacturing

May 1, 2024
Creating a Digital Thread by harnessing end-to-end manufacturing data is providing unprecedented opportunities to create efficiencies in the world of manufacturing.

Voice your opinion!

To join the conversation, and become an exclusive member of Machine Design, create an account today!