Use The Bluetooth LE Client Module To Speed App-Based IoT Design

Designers looking for the best way to wirelessly connect their creation to the Internet of Things (IoT) have no shortage of options. The problem is figuring out which is best for their particular application and then getting up and running on time, within budget and with minimal risk.

To help sort through the myriad wireless IoT options, it’s useful to categorize them into short, medium and long range. Long-range options include LoRaWAN and Sigfox, in unlicensed bands, and Narrowband-IoT and LTE Cat-M in the licensed bands, typically owned by cellular operators. These can directly connect a low-power sensing device to a basestation over distances of up to 15 km, with a battery life of up to 10 years, depending on the duty cycle and operating environment. By incorporating multi-hop and mesh protocols, this range can be extended even further, with better network resilience and reliability.

The classic medium-range option is Wi-Fi, with a typical range of 300 m, beyond which the high data rates typically expected of Wi-Fi start to drop quickly. While Wi-Fi can be used for short-range IoT connectivity, there are a number of dedicated short-range, low-power wireless network (LPWN) options that may offer a better trade-off of data throughput for lower power, smaller size, and lower cost.

These LPWAN options include zigbee and WiSense, both of which use the IEEE 802.15.4 physical (PHY) and media access control (MAC) layer, then there’s Z-Wave, a popular proprietary interface, and of course Bluetooth.

Bluetooth deserves special mention because of its ubiquity. While zigbee has been widely used in industrial and remote gas and electric utility monitoring applications, Bluetooth started as a simple point-to-point wireless connection but then found a home on smartphones and in automobiles, and the rest is, well, history.

We are now on Bluetooth 5, but the Bluetooth Special Interest Group (SIG) made BLE part of the Bluetooth Core Specification Version 4.0 in 2010, and by 2012, Apple had incorporated Bluetooth Smart into its laptops and smartphones, and that’s when designers really began to take notice and start using it for low-power wireless IoT devices.

Marketed as Bluetooth Smart, BLE offered much reduced power consumption, making it suitable for the smart home as well as applications including fitness and health monitors. It has a data rate of up to 2 Mbits/s and a transmit power of 10 mW, for a range of over 300 ft. It uses direct-sequence spread-spectrum modulation and operates across 40, 2-MHz channels, employing frequency-hopping techniques to mitigate narrowband interference. It’s fairly secure too, using 128-bit AES.

Interesting features include beacons, which allow for more accurate location sensing. However, a big step forward came in July of this year (2017) when the SIG announced mesh capability for many-to-many device communication (Figure 1).

Figure 1: With the recent addition of mesh networking capability, Bluetooth low energy gets extended range and greater resilience. (Image source: Bluetooth SIG).

This greatly extends range and network resilience for all relevant applications, including home automation and sensor networks.

Getting started with Bluetooth low energy

The ubiquity of Bluetooth, its strong ecosystem, and its continued development make it an attractive option for designers looking for the assurance of a well-known interface. However, its advisable to look closely at all options, as applications vary in terms of power consumption, cost, security, data throughput, link budget and other factors.

That said, once a designer has decided to go with Bluetooth low energy, the decision now becomes whether to design an interface from scratch, or opt for a ready-made module. If time and cost are not factors, and volumes are high, an optimum design in terms of form, fit, and function is a good reason to design from scratch. Alas, few designers have infinite time or money, and fewer still want to take the risk or go through onerous FCC qualifications for a radio, when modules such as Microchip’s RN4020 are already in production and prequalified.

The RN4020 is a fully certified, Bluetooth Version 4.1 low energy, surface-mount module with the complete Bluetooth stack on-board and is controlled via simple ASCII commands over the UART interface. Along with all Bluetooth SIG profiles it also includes the Microchip Low-energy Data Profile (MLDP) for custom data.

The module has a built-in, high-performance PCB antenna tuned for ranges of over 100 m and it measures only 11.5 x 19.5 x 2.5 mm. While it can be used with any low-cost microcontroller, designers or developers can use the scripting feature to enable standalone operation without a host MCU or processor. It can also be remotely controlled by another module over a secure connection and can be updated via the UART interface or over-the-air.

Client module accelerates development

While the RN4020 module is good for designers who are willing, able, and have the time to develop a board, that can also be costly, even though free tools such as PCBWeb are now available to help reduce costs. However, the differentiation of a design may not be in the board layout, so you, as a designer, need to be able to opt for a ready-made board to commence development right away, and that board might end up being used in the first prototype and even the final design, space permitting.

Recognizing this, Microchip has made available the Bluetooth Low Energy Client Module (BLECM) Development Kit, or DM182022. The BLECM is a complete development kit based around the RN4020 module and a PIC24FJ26GC006 MCU for main control and an MCP1642B boost regulator (Figure 2). With it, you can develop directly using a mobile/smartphone application that is compatible with iOS or Android, so you can focus more on the idea and its realization, instead of the nuances of module and board design.

Figure 2: The Microchip BLECM has all the necessary parts to start prototyping App-based IoT designs that use Bluetooth low energy as the wireless interface (Image source: Microchip Technology)

The kit uses a MikroElektronika mikroBUS footprint to allow connection of any of the various sensor Click Boards. It runs after a quick setup procedure out of the box and features include battery or USB power, analog potentiometer, four digital button inputs, four digital LED outputs, and a USB debug port.

Go here more details and full schematics to help get you started and play around with your own ideas.