Non IP Connectivity at the Edge of the IoT

The pervasive connectivity of the Internet of Things (IoT) promises to improve every aspect of life and work, from the comfort and security of our homes to safety and productivity at work, and management of the environment. Any "thing" we can imagine could potentially be connected to the Internet, to submit data for processing in The Cloud, enable remote control from anywhere on the web, permit updates to be applied via the network, or a combination of all three.

Big changes are coming. Traditional sensors that previously have been connected to a local controller via a simple wired interface will be transformed into IoT networks feeding "big data" applications such as Industry 4.0, which will revolve around intensive Cloud-based analysis to enhance control and management of machinery and processes. Connecting massive numbers of sensors, including legacy sensors, to The Cloud cost-effectively will depend on bridging existing networks using protocols already commonly used in the industrial space, such as CAN, fieldbus protocols, ZigBee® or others to the Internet via gateway devices as protocol converters.

On the other hand, much of the hype surrounding the IoT today is concerned with smart connected devices that are able to process data from one or more sensors and perform various functions independently, as well as passing processed information to The Cloud for analysis or storage. Local processing such as sensor fusion, which combines the raw data from motion sensors to create useful position and heading information, can effectively reduce loading on the main application processor and on the network, resulting in overall power and cost savings.

Sensor Fusion to Offload the Host

A major requirement in wearable electronics and other mobile IoT applications is to collect data from a group of motion sensors such as an accelerometer, magnetometer and gyroscope, which may be combined with other sensors such as a barometric pressure sensor and GPS sensor. A typical requirement is to monitor the orientation and movement of a wearable such as a smart watch or fitness band, to calculate information such as tilt, shake, rotation, or swing, and transfer the data using a short-range wireless technology, such as Bluetooth®, to a smartphone. The smartphone typically uses the data to drive a local app and will also send the data to The Cloud via Wi-Fi or a cellular connection such as 3G or LTE. In a sports or fitness scenario, the user may choose to sync personal performance data to other devices or share with friends or competitors. Other types of wearables such as health monitors or personal industrial safety monitors may use sensor data locally to generate warnings for the wearer, while applications running in The Cloud take care of maintaining records and generating alerts to care coordinators or supervisors.

Sensor fusion, combining the outputs from multiple sensors, produces a coherent set of data and can enhance application performance by taking advantage of the individual strengths of different sensor types to maximize accuracy and responsiveness. A sensor hub is typically used to process the raw data from the sensors and generate app-ready information without adding to the load on the main application processor. This hub is implemented in a small, low-power microcontroller. The sensors may be discrete devices, multiple co-packaged MEMS sensors, or fully integrated sensor-fusion devices that also include a microcontroller acting as the hub.

The Atmel SAMD21 Xplained-Pro development board for the SAMD21J microcontroller demonstrates how to read data from a sensor fusion device such as the Bosch Sensortech BNO055 smart motion sensor, which is mounted on the Atmel ATBNO055-XPRO extension board. This extension board plugs into the EXT1 port of the main Xplained-Pro board. The on-board sensor combines MEMS accelerometer, gyroscope and magnetometer elements with an ARM® Cortex®-M0 microcontroller that processes the raw sensor data and makes the fused data available as quaternion, Euler angles, rotation vector, linear acceleration, gravity, or heading.

The Euler angles are the three angles needed to completely describe the orientation of a rigid body in three-dimensional space. Figure 1 shows sample code describing how to read the Euler data from the sensor over an I2C connection.

/*************read raw Euler data************/

147
/* variable used to read the euler h data */

148
s16 euler_data_h = BNO055_ZERO_U8X;

149
/* variable used to read the euler r data */

150
s16 euler_data_r = BNO055_ZERO_U8X;

151
/* variable used to read the euler p data */

152
s16 euler_data_p = BNO055_ZERO_U8X;

153
/* structure used to read the euler hrp data */

154
struct bno055_euler_t euler_hrp;

Figure 1: Reading the sensor Euler data via I2C (source: github.com/BoschSensortec/BNO055_driver/)

From Simple Wired Sensor to IoT Device

In industry, the IoT provides a vehicle for bridging the divide between events on the factory floor and the knowledge managers need to make day-to-day decisions in real-time and plan maintenance and investment in the longer term to improve productivity and quality. Various approaches have linked manufacturing equipment to back-end systems: the IoT, an enabler for Industry 4.0, now brings access to Cloud power and Internet economies of scale. Taking advantage of the massive resources available in The Cloud, more intensive data processing can identify previously invisible trends or inefficiencies, and applications can be scaled to support additional data streams providing richer sources of information from multiple locations across the enterprise.

Over several generations, manufacturing machinery, conveyors and other aspects of the factory environment have incorporated increasing numbers of sensors that have been connected to a local controller or PLC using various standards such as simple two-wire interfaces, CAN, fieldbus, or wireless mesh networking such as ZigBee®. Now, gateways are needed to turn these sensors, machines and PLCs into IoT devices. Gateways, generally, are a critical aspect of the IoT infrastructure, vital for delivering services to homes as well as businesses.

Freescale has produced an IoT gateway reference design based on its QorIQ Layerscape architecture communication processors such as the dual-core LS1021 or LS1024. The reference design takes advantage of rich connectivity resources including serial interfaces, GPIOs and Gigabit Ethernet ports, as well as built-in security features. As the diagram of Figure 2 shows, the design also makes provision for integrating devices such as sensors quickly and easily, taking advantage of the vast Arduino ecosystem.

Non IP Connectivity at the Edge of the IoT

Figure 2: Freescale’s IoT gateway reference design based on the QorIQ processor. (Click here to view full-size image)

Gateways to the Gateway

Gateways support the wide-ranging connectivity that will enable the IoT to become all pervading. However, if a large number of sensors or switch-detection inputs need to be connected, exceeding the GPIO resources of the central processor, a multiple switch detection interface such as the Freescale MC34798 allows up to twenty-two switch contacts to be connected to one of the two Serial Peripheral Interface (SPI) ports provided by the Freescale LS1024 dual-core QorIQ processor. Figure 3 shows how the switch detector is connected between the switches and the host SPI port.

Non IP Connectivity at the Edge of the IoT

Figure 3: Connecting multiple switches to the host SPI port via Freescale's MC34978.

Conclusion

The IoT needs to connect with a wide variety of devices that communicate using non-IP protocols for reasons such as convenience, cost or power, including legacy devices that are already in place. A variety of non-IP connections can form the "fingers" of the IoT, connecting sensors at the extremities to gateway devices that provide the bridge to the IP-based infrastructure leading to The Cloud. These connections can be created using a variety of techniques, such as sensor fusion or protocol conversion in hubs and gateway devices connected to the Internet.

  • Non IP Connectivity at the Edge of the IoT已关闭评论
    A+
发布日期:2019年07月13日  所属分类:参考设计