It's never been easier to start a hardware company. The Internet of Things (IoT) phenomenon—touted by many as the future of embedded computing—is now seen as an amalgam of affordable hardware and software platforms. At the same time, however, software complexity makes the IoT design process a classical case of survival of the fittest.
The IoT design is not a one-size-fits-all premise because the diversity of sensors and connectivity solutions require a new design thinking. Moreover, the IoT projects are typically known to be high-performance, low-cost and low-power, and all of these characteristics are intertwined with the embedded software work one way or the other.
Take the high-performance and low-cost factors, for instance, which imply that the reuse from the previous projects is limited and software engineering teams won't expand proportionately. So, instead of growing the software team and expanding the project cost, IoT product developers are looking to a new generation of tool-chains that help them accomplish greater software productivity.
Figure 1: Across-the-board software tool-chain is crucial in the heterogeneous IoT designs. (Source: Atmel)
The IoT design work is a walk on the tightrope also because there are so many moving parts, and design engineers can't afford to build a subsystem and see later if it works. The start-overs not only add to project cost, they also bring severe time-to-market constraints to the heterogeneous world of IoT design.
So the IoT design recipe—starting with data capture from sensors to data analytics inside the cloud—requires design validation long before engineers commit silicon to an IoT product. Not surprisingly, therefore, an end-to-end hardware and software platform along with a suite of connectivity solutions is critical in dealing with complexities that come with the challenge of connecting a large number of devices in a seamless manner.
The article delves into major software challenges in the IoT design realm and shows how the right choice of tool-chains can help deal with the embedded design challenges. It focuses on three key areas of the IoT software ecosystem and offers insight on how to execute the software work in an efficient and cost-effective manner.
1. Software Complexity
The hardware-software work allocation generally comes down to a 40:60 split in the embedded design projects. However, in the IoT design projects, there is even a greater tilt toward software ecosystem.
The IoT developers are migrating from 8-bit and 16-bit microcontrollers to 32-bit devices in order to accomplish higher performance and enhanced functionality in areas such as connectivity, graphic display and cloud computing.
And that calls for a new software playing field that can efficiently execute communication and cloud computing protocol stacks. Then, there are tasks like the real-time sampling of sensor data, device configuration, security keys, apps, data analytics and more.
Furthermore, a lot of software in the IoT designs is related to communication stacks like TCP/IP and security libraries such as SSL and TLS; these software components are written to comply with specific standards. These software components have been written before, time and time again, and it makes little sense for an IoT developer on a tight deadline to re-implement them instead of using the existing software.
In fact, creating this software from scratch risks introducing issues that have already been found and fixed in the existing implementations.
Figure 2: A complete software ecosystem is vital in confronting the complexity of IoT designs. (Source: Atmel)
Tips and Tricks:
- Integrated development environments (IDEs) are the first line of defense in coping with the software complexity that comes with ever more functionality implemented in the IoT applications.
- When an IoT designer adds services to his application, the dependant software components and drivers are added to the IoT design automatically. For instance, if an embedded developer adds a USB device to his design, ASF will automatically add low-level USB drivers to the design.
- You can use tools such as Atmel START, an online software configuration and deployment engine capable of speeding up the creation of embedded software even further. It is a web-based tool that allows developers to graphically select and configure software components and automatically integrate them with hardware and middleware resources needed. It’s a web-based tool is completely OS independent; it doesn't require anything to be installed on the user’s PC before use. In addition, the generated projects can be targeted to any embedded IDE, offering unparalleled flexibility.
2. Code Size and Density
Another crucial challenge for embedded designers is code size and density that affects both hardware and software efficiency. At one hand, IoT systems require greater intelligence, which leads to more software and algorithms, and on the other hand, IoT solutions need to be low-cost as well as low-power.
The IoT applications can easily top tens of thousands of lines of code, and that asks for a lot more to be done than simply writing the application code. The rising amount of code means more flash and RAM, which in turn, leads to larger and more expensive chips. That not only adds to the cost of the IoT design but also appends to the power consumption.
In the IoT design realm, if the speed of execution is a key criterion in managing the software complexity, energy efficiency is closely tied to the use of large program codes. For a start, there is sensor network code that moves the sensor data to the IoT edge node or gateway.
Then, there is TCP/IP protocol stack for Ethernet controller that often consumes from 50 KB to 100 KB. Likewise, the connectivity links—Bluetooth, Wi-Fi, ZigBee, etc.—come with protocol stacks that comprise of network management, authentication and encryption, and can take twice the memory space compared to the TCP/IP stack.
Figure 3: Atmel Data Visualizer can identify power spikes caused by the specific parts of a code. (Source: Atmel)
Tips and Tricks:
- A new breed of microcontrollers is now equipped with tightly-coupled memory (TCM) features that offer single-cycle access to the CPU and thus boost high-priority latency-critical requests from peripherals. The IoT developers can calibrate the amount of code that requires zero-wait execution performance, so they can dedicate TCM resources to such code segments and data blocks.
- It's quite difficult to determine which parts of a software program are consuming too much power. However, there are tools like Atmel Power Probe that enable IoT developers to quickly figure out which parts of the code are high on the energy usage.
- Then, there are tools like Atmel Data Visualizer plug-in that can profile power usage of an IoT application as part of a standard debug session. Live power measurements can be captured during application execution, and power usage can also be correlated to application source code effortlessly. Moreover, by clicking on a power sample, the tool will highlight the code that was executed when the sample was taken, making it very easy to optimize an application for low-power usage. It also provides an oscilloscope view of signals like GPIO and UART.
- A new array of energy-efficient microcontrollers can now intelligently turn power on and off during the activity and idle periods, respectively, and they draw very little power when asleep. The battery-powered IoT applications can save a lot of power in the always-on sensor operations by allowing the hardware to wake up, do a thing, and go back to sleep.
3. Cloud and Data Deluge
Cloud and data deluge is the third and equally critical part of the IoT's software conundrum. The software protocol stack for the cloud communication encompasses tasks such as device configuration, file transfers, and rule-based data analysis and response.
First and foremost, robust data analytics has a crucial role in creating the real value from data generated by the sensors, machines or things connected to the cloud. Next, there are security aspects that block unauthorized code through application whitelisting and ensure an authentic data connection to the cloud.
Small- to mid-size IoT outfits face the huge challenge of acquiring and effectively using software tool-chains that encompass data acquisition, processing and analytics. Next up, they require a software ecosystem that can confront the highly fragmented world of IoT designs.
That shows why the end-to-end solutions are vital in the IoT environment and why the right engineering decisions are so critical regarding the IoT software ecosystem. A new breed of design tools is required to deal with the flood of networked sensors, and it can help small- and mid-size IoT developers deal with the addition of cloud services that is tallying up the software overhead.
Tips and Tricks:
- Generally, cloud communication goes beyond the core expertise of many IoT product developers, so it makes sense for them to partner with a cloud-based IoT platform provider. The cloud-based IoT suite includes commercial-grade embedded software, DSKs for embedded devices, IoT reference designs, device and application APIs, and highly scalable communication services.
- In order to be able to rapidly deploy connected devices, it is increasingly important for developers to include availability of ready-made device connectivity libraries as part of the initial technology evaluation process
- Companies such as Atmel partners with a number of market leading providers of end-to-end cloud solutions fully capable of handling these aspects for developers. The partners of this cloud eco-system each provide their own distinctive features, making it easy to find solutions that fit particular use cases and needs.