Article count:1884 Read by:2737881

Account Entry

【Original】Bluetooth expands open source applications

Latest update time:2017-09-01
    Reads:


Thanks to the success of open source software, Arduino has pioneered the open source hardware (OSHW) model, encouraging amateur and professional engineers to learn, modify, promote, make and sell publicly available hardware products designed by them. The role of open source hardware in personal and commercial applications continues to expand with its built-in (or ready-made) Bluetooth interconnection. Although the Bluetooth 5.0 specification and the subsequent launch of mesh networks are very important milestones, the low power consumption characteristics of Bluetooth will continue to help open source hardware gain wider application. More importantly, configuring Bluetooth and cloud access are both currently feasible technical solutions. For enthusiasts and engineers, open source hardware and Bluetooth wireless connectivity will be a potentially powerful tool.


The role of open source hardware


For many years, open source hardware (OSHW) has not attracted much attention. The main users are some geeks and enthusiasts. Early products are mainly based on mature and uncomplicated processor chips, such as Atmel's ATmega3228 eight-bit microcontroller (MCU) series, which also makes open source hardware cheaper and more affordable. However, in recent years, startups and mature companies have found that open source hardware can help shorten the development time of hardware (and software), allowing users to focus more on product differentiation design. In addition, using open source hardware can reduce risks and stimulate innovation.


The advantages shown by open source hardware quickly attracted some old and start-up chip suppliers, which involved billions of dollars of business. For each chip giant such as Intel and TI, this is a new field. For example, the single-board computers (SBCs) currently being sold by open source hardware manufacturers Seeed Studio and SparkFun are hardware products that conform to the open source model.


Of course, mature and stable open source hardware is also beneficial to consumers. Engineers have a series of single-board computer (SBC) products to choose from. For open source hardware priced below $100 (usually below $50), it is generally affordable for students and most electronic engineers, such as the BeagleBone Black single-board computer launched by the BeagleBoard open source hardware company (as shown in Figure 1).


Figure 1: This product integrates enough Flash storage space to store the GestIC library


This single-board computer (SBC) uses a Sitara ARM Cortex-A8 32-bit RISC microprocessor and integrates 512MB DDR3L 400MHz SDRAM, 4GB Flash, USB2.0 master-slave interface, network port, etc. The BeagleBone Black single-board computer is powerful enough to run operating systems such as Linux and Android, control complex robots or manage a home security system.


To add more functionality, the latest versions of open source hardware single-board computers have begun to integrate advanced RF wireless chips to support the interconnection of the Internet of Things (IoT) and the Industrial Internet of Things (IIoT). IoT or IIoT is a global Internet network where smart computers, software, devices, machines, actuators, sensors, etc. exchange data and instructions with each other to form a platform with thousands of applications.


Using a web-based integrated development environment (IDE) (typically compatible with Arduino), an engineer with basic programming skills but no RF experience can take advantage of the wireless connectivity capabilities of open source hardware. These applications can be simple data logging (humidity, temperature, etc.), using a smartphone to connect to a cloud server and trigger certain actions based on the measurement results (such as sending a message or triggering an alarm).


The role of wireless connectivity in the Internet of Things (IoT)


Although it may seem simple to connect a smartphone to the Internet, its role is by no means trivial. Complex (and therefore expensive) modems execute advanced network protocols and are integrated into smartphones (as well as computers, tablets, routers, etc.) to maintain various connections. While some progress has been made in the area of ​​simple, resource-constrained sensors, there are still some inevitable engineering challenges to be solved before cheap, regular, and reliable IoT/IIoT connectivity can be achieved.


Several short-range and long-range RF technologies are the basis for conventional connectivity, but Bluetooth LE (a low-power form of Bluetooth wireless connectivity) has some key advantages. These include low power consumption (ensuring longer battery life and less maintenance), an open source standard that can be revised and optimized, and support from multiple vendors. More advantages come from recognition and adoption by more smartphone, tablet and wearable device manufacturers.


The low-power Bluetooth specification includes a physical layer (PHY) and a firmware stack. Chip vendors usually provide a standard-compatible firmware, allowing users to focus on the development of their own application code, which is compiled by the development tool to form a stacked system layer (as shown in Figure 2). For example, engineers can add some code to the firmware to process and format data, and periodically send data to the smartphone to display temperature trends. The processing process sounds simple, but even with very convenient development tools, the development of wireless application code can be difficult for those who lack experience.


Figure 2: The Bluetooth Low Energy application code is compiled and executed in the blue part, and the gray part is the system firmware (Source: TI)


Open source hardware single-board computer suppliers are already trying to solve the problem of application layer program development, such as integrating Bluetooth configuration operations into user-familiar integrated development tools (IDEs). Engineers can configure single-board computers through Ethernet or USB communication, which makes it easy to establish wireless connections with smartphones or other devices with integrated Bluetooth functions.


Bluetooth (BLE) configuration


UDOO Neo is a credit card-sized single-board computer that uses FreeScale's iMX6SoloX application processor, which integrates embedded ARM Cortex A9 and M4 cores. This product also integrates a SAM3X8E microcontroller (MCU) and supports Android and Linux operating systems. In addition, the integrated wireless chip (TI WiLink chip) supports both low-power Bluetooth and WiFi (IEEE 802.11 B/g/n) wireless connections.


A student can use the Arduino IDE, teaching materials, Arduino Sketch (Arduino's name for code blocks) and some function libraries to implement the function code of the SAM3X8E MCU. Of course, experienced engineers can use C/C++, Python, Java or other programming languages ​​to implement applications for MCUs and i.MX application processors.


Users can use the familiar development environment of Arduino IDE to configure the wireless function of the Neo board, connect the single-board computer (SBC) to the PC via USB, and then open the web control panel to make relevant settings (see Figure 3). The web control panel includes the NEO BLE Bluetooth connection status (in addition to the connection indication status of WiFi, network, and USB). The web control panel can also directly open the Arduino Web IDE development environment to facilitate program development. From the web control panel, we can turn on Bluetooth and set the hardware to be searchable. Select a device from the list of available devices to activate the wireless connection with the Neo board. This process is essentially as simple as establishing a connection between a smartphone with integrated Bluetooth function and a Bluetooth speaker.


Figure 3: UDOO's web control panel makes it easy to activate the Neo board's wireless connection (Source: UDOO)


However, pairing an open source hardware single-board computer with a smartphone and performing some useful functions over a wireless connection are two completely different things. Controlling the data transmission over the link requires some basic coding skills but it will not be difficult for an engineer familiar with the Arduino IDE development environment, such as burning the Flash of a single-board computer to flash a row of LED lights on the board.


Of course, we can also design expansion boards to realize the wireless connection function of single-board computers. This is very common in the open source hardware community. The two boards are seamlessly connected by designing matching connectors on the two boards. For example, ST Microelectronics' Nucleo board is also an open source standard single-board computer. It uses the STM32 MCU processor (ARM Cortex M4 core). It is connected to the X-NUCLEO-IDB05A1 expansion board to enable it to have Bluetooth (BLE) function (as shown in Figure 4).


Figure 4: The IDB05A1 expansion board can add Bluetooth wireless connectivity to the Nucleo SBC board (Source: ST Microelectronics)


Another additional advantage of Nucleo/IDB05A1 comes from ST Microelectronics' participation in the development of the ARM mbed operating system, which is an operating system for low-power IoT devices based on ARM MCUs. Some of the open source code library resources can directly configure the Nudeo board and support a series of common applications, such as heart rate monitoring applications. After the mbed code library is introduced and compiled, an image file is generated, which can be downloaded to the Nucleo SBC board through the mbed IDE tool for operation.


From the STM32 BLE application app on the smartphone, a heart rate monitoring sensor (such as Nucleo) can be selected, and once the connection and data communication are established, the heart rate data will be displayed on the smartphone display.


Access cloud services


In these examples, the open source hardware single-board computer is used as a peripheral to send data (such as data received from a rotary encoder) to a smartphone device. Of course, developers are also studying the use of UDOO, Intel, STM Microelectronics SBC boards as central devices to develop more complex wireless application projects to collect data from multiple wireless peripheral sensors, such as third-party Bluetooth temperature and humidity sensors. The collected data will be temporarily stored in the Flash storage of the SBC board and will be sent to the smartphone app later (the SBC board is equivalent to a peripheral device, and the smartphone acts as a central unit).


This project can be extended with more rich functions, such as triggering some actions or operations based on temperature and humidity data. First, the collected data is uploaded from the smartphone to the cloud server, and then certain trigger services are deployed, such as ThingSpeak.com. Services like ThingSpeak follow the rules of conditional judgment, and the data output is completely dependent on the input data. For example, if the humidity in three rooms of a house exceeds 70%, a notification will be sent to the smartphone to prompt the dehumidifier to turn on.


Using Bluetooth to connect a single-board computer (SBC) to the Internet is challenging. Today, many Bluetooth firmwares contain conversion technology between Internet protocols (IPv4 or IPv6) and Bluetooth protocols, but there is actually no compatible commercial wireless routing device to act as a relay station for conversion between them. One solution is to choose a second open source hardware single-board computer to act as a relay device, but this is undoubtedly very simple and requires in-depth understanding and development experience in Bluetooth firmware development and network protocols and development tools such as IPv6.


For an engineer with no RF experience, a simpler solution is to use a single-board computer with integrated wireless communication capabilities (such as Arduino 101), so that Bluetooth can be used to collect sensor data, and after conversion, the data can be uploaded to the cloud server via WiFi (WiFi routers are everywhere in our lives).


Some available open source resources, such as the Arduino library files released by ThingSpeak, greatly simplify the development process, making it easy to implement functions such as single-board computers joining WiFi networks and periodically uploading data to the ThingSpeak cloud server.


The two-way wireless connection can receive data from sensors and send data to a network gateway (or connect to a cloud server via WiFi). In addition, it can receive data or instructions from other computing devices. With the rapid development of the Internet of Things, wireless connections have closely linked open source hardware single-board computers with "intelligence". In addition, these links can also be used to update the operating system and chip firmware, and maintain system security through software patches.


Summarize


The demand for wireless interconnection of open source hardware single-board computers is becoming more and more widespread. The support of powerful development tools and the appropriate price of development boards allow engineers with almost no RF expertise to quickly get started, which greatly increases the scope and number of applications of these open source hardware products. Open source hardware single-board computers with integrated wireless functions are driving innovation and resource sharing, which is also the driving force behind open source standards.


Original link: http://www.mouser.cn/applications/bluetooth-extends-open-source-applicat...


This article is an exclusive original article. Please indicate the source when reprinting it. We reserve the right to pursue legal liability for unauthorized copying and non-compliant reprinting.


Mouser Electronics WeChat account spreads technical information. This article is an exclusive original article. Please indicate the following information when reprinting:

Source: Mouser Electronics WeChat Official Account

WeChat ID: mouserelectronics

We reserve the right to pursue legal liability for any unauthorized copying or non-compliant reproduction.

↓↓↓ Click "Read original text" [View related links in the text]




Latest articles about

 
EEWorld WeChat Subscription

 
EEWorld WeChat Service Number

 
AutoDevelopers

About Us Customer Service Contact Information Datasheet Sitemap LatestNews

Room 1530, Zhongguancun MOOC Times Building,Block B, 18 Zhongguancun Street, Haidian District,Beijing, China Tel:(010)82350740 Postcode:100190

Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved 京ICP证060456号 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号