This article serves as an initial guideline to help those with little-to-no RF or Bluetooth expertise get started on Internet of Things (IoT) designs and get to market quickly.
The IoT landscape continues to grow at a rapid pace. Between fitness and activity trackers, smart watches, connected cars, and more, the consumer-driven desire to utilize a vast variety of sensors within devices and gadgets to retrieve measurable data is at an all-time high. The challenge for IoT will be mass-market enablement and creating accessibility to IoT through easy-to-use, easy-to-deploy wireless technology and sophisticated sensors that can drive computational resources to the device. This approach may reduce the heavy lifting otherwise delegated to the cloud and can thereby create more power efficient solutions that offer world-class performance and environment/use case accuracy.
Original equipment manufacturers (OEMs) looking to make their way into the IoT need to consider several factors, including their design philosophy. Entering the consumer IoT market space typically drives design toward a balance of simple, intuitive setup and operation with increased battery lifespan, while decreasing power, cost, and form factor. In order to meet these needs, the right communication technology should be selected from the start.
Bluetooth Low Energy (BLE or Bluetooth Smart to many) can be a snap to use. When the Bluetooth SIG announced the formal adoption of Bluetooth Core Specification version 4.0, it included the Bluetooth Smart (low energy) feature giving developers an easy and efficient way to enable Internet connectivity for embedded devices through BLE-enabled platforms like mobile phones and tablets (Figure 1). A slew of accelerometers; magnetometers; IR temperature, hall-effect, position, radar, and light sensors; and hundreds of other devices can now be enabled quickly and deployed as Internet-connected “things.”
Nevertheless, developers should be aware that there are several project-level challenges when it comes to creating an Internet of Things (IoT)-enabled product. Understanding the challenges before beginning a project can save time, effort, and money, and being versed in the emerging application development solutions and ecosystems deployed by device and module providers can benefit developers as well. Most importantly, keeping in mind that “ease of use” is the predominant driver of integration with previously “tethered” solutions is critical to a successful device.
Choosing the right wireless technology
As stated, choosing a technology to enable connectivity for IoT devices is key. As consumer IoT products progressively get smaller and more convenient for portability, mobility, and longer battery life, circuitry for direct Internet connectivity is sacrificed. But, smartphones and tablets allow external devices to connect and send data to the Internet by acting as a gateway through their own means of connectivity. This makes phones and tablets ideal candidates for developers seeking to connect sensor-based embedded devices to the Internet. The list of available wireless connectivity options for external devices to smartphones and tablets can be narrowed to Wi-Fi, Bluetooth, and near-field communication (NFC), with the characteristics of each listed in Figure 2.
[Figure 2 | Wi-Fi, Bluetooth, and near-field communication (NFC) are the most common wireless connectivity options available to design engineers. Listed here are some of their basic characteristics.]
Classic Bluetooth and Wi-Fi are known to steadily drain battery life as they operate based on the application and use case, hence such protocols may be better suited for streaming and high-data rate applications instead of sending small bursts of data packets. By comparison, BLE’s power consumption is very low thanks to the nature of its data exchange. Determining which method of wireless connectivity your product should use depends on the application needs. In most circumstances, IoT devices fit within the same set of principles for design: enabling connectivity while maintaining good battery life, being small and lightweight, and keeping costs low. BLE has therefore found itself a niche within IoT devices due to a few distinguishing factors that address these very needs:
• Many IoT devices are driven by short-range communication. BLE operates under the lowest possible power consumption within low ranges, which is ideal for such communication.
• IoT devices are typically in edge device roles, aiding to lower their power consumption. Devices in central roles — usually the smartphone or tablet itself — are subject to slightly higher power consumption due to their continuous scanning nature and number of devices connecting to them.
• BLE’s low power consumption attributes directly to the size a device can be. BLE-enabled devices can often operate on only a coin-cell. This contributes to reduced overall size, weight, and cost of such devices.
• BLE maintains a low data rate and exchanges small packets of information over extended intervals. This is great for devices sending short bits of data infrequently, as it can maximize the time spent idle while in low power mode.
• BLE is optimized to minimize the time between connection and data exchange to within a few milliseconds, with a typical connection and tear-off cycle only lasting around 6 ms. The protocol then severs the connection and returns to idle mode. This is key for devices that send data.
• Many BLE-enabled devices are natively compatible with mobile operating systems. This makes them great for use with most smartphones and tablets
Each of the connectivity options has its benefits, though, so choosing one over the other is application-specific. While Bluetooth does not provide the data rate and speed of Wi-Fi, it offers a better power-to-battery life ratio. NFC devices offer the lowest power consumption but are range-limited. Additionally, Bluetooth-enabled devices can be paired to smartphones and tablets easily to create an ad hoc network with access to the Internet.
In light of the methods outlined above, BLE appears to stand out as the most viable standard to enable IoT connectivity for embedded devices by using a mobile device as a gateway.
Getting started with development
With a basic understanding of BLE under our belt, let’s consider application development. There’s much to choose from when starting the process as there are numerous development tools available to assist in app creation and custom design. Platforms such as App Inventor, Appcelerator, Atmosphere, MoSync, Phonegap, and others allow easy development of mobile apps that can be customized for embedded solutions and tested across multiple platforms. Users with little-to-no RF or BLE expertise will find the Atmosphere development platform particularly intriguing (Figure 3). With it, developers can create embedded device firmware and mobile apps simultaneously using a web-based drag and drop tool. Further, Atmosphere provides a library of sensors that can be incorporated into designs without coding.
Atmosphere uses a variety of “elements” to help create a project easily. Elements are blocks of pre-made code that perform various functions and can also represent sensors when added into a project, allowing users to easily create a project without understanding programming languages or coding. Whenever an element is placed in the user interface, it automatically creates code for both the mobile app (which can be designed and modified at will) and the embedded system. Elements can be connected in countless ways to utilize a variety of sensors and expand the functionality of a project.
Tools and tech to get started
Among all wireless standards, the gadget-oriented Bluetooth has become a mainstay of personal device interconnectivity, and with BLE we are about to see exponential growth in the emerging IoT space. Developers can greatly accelerate time to market by choosing the right wireless technology, tools, and software to connect their sensor-based embedded devices to the Internet.