Bluetooth is one of those technologies that just keeps slowly creeping into our industrial automation applications. A lot of that is because it’s being forced on us. As PC manufacturers continue their crusade to make personal computers less expensive than a cup of coffee, they’ve eliminated all the serial connections we’ve used for the last 30 years. Bluetooth is now one way we can connect to devices that in the past were connected with good old RS232, RS485 or USB cables.
There is an interesting history to the name Bluetooth though I don’t know the veracity of the story. Bluetooth is a Danish technology, and once upon a time, in the 10th century there was a Danish king named Harald "Blåtand" Gormsson. Harlad was the son of “King Gorm the Old” – though I doubt that any of his subjects called him that to his face. Harald became known as King Harald Bluetooth. Though the actual reason is probably lost to history, historians surmise that the derivation of the moniker is from a conspicuous bad tooth that probably appeared "blue,” which at that time was commonly used to mean dark (Stay tuned for the story of old King EtherNet/IP in our next issue).
The Bluetooth standard was published in 1999 and it’s now part of the 802.15 standard (802.15.1) along with other wireless communication technologies like Zigbee (802.15.4). Like many other technologies we use, there have been a few different releases:
Version 1.x |
The first series of useable releases starting in February 2001. |
Version 2 |
In 2004 this was the first version to become widely disseminated. Known as EDR (Enhanced Data Rate) Bluetooth, it increased throughput to 3.0 Mbps. EDR made phone headsets and external microphones for cellphones viable. |
Version 3 |
An even faster version that increased the data rate to over 10 Mbps in 2009. This version is sometimes known as Bluetooth HS for High Speed Bluetooth. |
Version 4 |
In 2009, the Bluetooth Low Energy (BLE) standard, sometimes called Wibree, was released. This version provided mechanisms for battery powered sensors to use Bluetooth in a way that conserves battery life but reduced range and signal strength. |
The BLE standard is of growing importance to us in industrial automation. We can expect to see more and more field-level Bluetooth pressure, temperature and vibration sensors as vendors move to BLE to reduce wiring costs. Sensor applications that require sporadic monitoring (500 msec or more) are good candidates for BLE, such as tank level, temperature and pressure monitoring.
The BLE Radio (physical layer) uses 40 channels in the unlicensed 2.4 Ghz radio band. It is spec’d for 100 m and 2.1 Mbps, although you won’t see that in practice. 2.4 Ghz is also the frequency band used in car alarms, cordless phones, Zigbee and WiFi devices. BLE Radios avoid disruption from these other 2.4 Ghz devices using Frequency Hopping Spread Spectrum (FHSS) to hop from frequency to frequency. (An interesting side note to FHSS is that it was an invention of American actress and WWII pin up girl, Hedy Lamarr. You’ll want to read that story. Apparently her mind was as incredibly well developed as her figure.
Like Ethernet devices, every BLE device can be identified by its unique 48 bit ID. Just like Ethernet, this ID is composed of 24 bits identifying the device manufacturer and 24 bits uniquely identifying that manufacturer’s device.
Advertising Their Presence
Advertising is one of the more interesting and unique aspects of BLE. BLE devices send unsolicited “advertising” packets out to announce their presence to interested BLE “observer” devices. The advertising packets are sent infrequently as BLE devices sleep the majority of the time. They wake up periodically (typically once a second), advertise their presence to any observers, and then return to energy-conserving sleep mode.
There are three specific frequencies in the 2.4 Ghz band that all BLE devices use for advertising: one at the lower end of the band; one at the higher end; and one near the middle. A BLE device transmits its advertising packet on all three frequencies in the hope that one of them is clear of other traffic. Observers monitor all three and ignore the remaining 37 frequencies. The rate that a device transmits its advertising packet is application-dependent, but usually not less than a few hundred milliseconds. At faster rates, a WiFi application makes much more sense.
Included in the advertising packet is the device hardware address (think Ethernet MAC), the vendor ID, the product code and data. Observers can simply listen in and receive data from nearby transmitters or they can optionally connect to the device and perform traditional Master/Slave kinds of communications.
The advertising payload varies from a minimum of 6 bytes to a maximum of 37 bytes where each data group within the payload consists of a length, a data type and the data field. That’s not much data and the Bluetooth designers realized that. When a BLE observer detects a transmitter, it can request an additional response from the advertiser (Scan Response) without forming an energy expensive connection. The Scan response follows the same packet format as the advertising packet and effectively doubles the amount of data that can be received from the device.
If you own something that is part of Apple’s iBeacon standard, you’ve seen an example of BLE advertising. If you’ve been in a retail store where you receive a message welcoming you to the store, you’ve experienced BLE advertising. There are many applications like this.
The iBeacon standard is noteworthy in that the BLE end devices don’t support connections in these systems. They are designed only to be advertisers. Supporting connection mode is optional for BLE devices. Some, like the pressure transducers from Transducers Direct, accept connections, while iBeacon devices won’t.
Tradeoff between Power Consumption and Latency
A critical factor in deploying a Bluetooth system is understanding the tradeoff between power consumption and latency. Every transmission consumes power. The less advertising packets transmitted, the longer the battery life of the sensor. Longer intervals provide longer life, but if the process changes faster than the advertising rate, you miss important data. More transmissions and you reduce battery life. Applications must compromise between battery life and data availability. Users can optionally configure the advertising packet rate of a BLE device.
Don’t make the mistake of thinking that Bluetooth competes with WiFi. That’s just not the case, especially in industrial automation applications. Bluetooth is much slower than WiFi, simpler to configure and good for ad-hoc networks. WiFi is superior for creating larger, higher bandwidth networks over longer distances.
There is a lot more to BLE than I’ve covered in this short article. For more information, a good book on the subject is “Getting Started with Bluetooth Low Energy: Tools and Techniques for Low-Power Networking 1st Edition” by Kevin Townsend.