How to Easily Add Google Cloud Support to Your Embedded Application
The SAM-IoT Development Board Rapidly Connects Your 32-bit IoT Embedded Application to Google Cloud Platform’s Cloud IoT Core
Today, sensors and actuators are integrated into modern electronic devices helping collect and analyze large amounts of data for real-time behavior modifications. However, adding enough processing power to the device to analyze this data in real-time can be costly.
So, what is a more cost-effective solution for analyzing this data? Cloud computing platforms.
The data can be passed on to powerful cloud computing platforms and data streams can be analyzed from multiple devices. Upon completion of analysis, these cloud computing platforms calculate responses and securely pass them back to the device via the same cloud gateway. The edge MCU inside each IoT enabled device is responsible for establishing the secure gateway between these cloud computing platforms and the on-board sensors and actuators.
Helping designers implement this simple and more efficient practice when developing a smart, connected and secure embedded IoT application, Microchip‘s SAM-IoT WG Development Board now connects to the Google Cloud Platform’s Cloud IoT Core. The SAM-IoT WG Development Board is the first all-in-one complete edge solution enabling cloud connectivity using a 32-bit microcontroller (MCU).
This board is supported by Microchip’s fully integrated embedded software development framework, MPLAB Harmony v3. This free software can help developers easily add Google Cloud Platform connectivity to new and existing projects, all while providing flexible and interoperable modules to simplify the development process.
View Figure 1. The SAM-IoT WG Development Board
Shape expand / collapse section
About the SAM-IoT WG Development Board
The SAM-IoT WG Development Board is a small and easily expandable demonstration and development platform for IoT solutions providing a seamless migration path for developers using 8-bit and 16-bit IoT solutions for higher performance, low-power MCUs. It features the SAMD21G18 Arm® Cortex®-M0+ based 32-bit microcontroller (MCU), an ATECC608 CryptoAuthentication™ secure element IC and the fully certified ATWINC1510 Wi-Fi® network controller, so users can quickly and easily connect an embedded application to the Google Cloud Platform’s Cloud IoT Core. The on-board debugger helps program and debug the MCU without any additional hardware. Designers can expand the functionality with a choice of MikroElekronika Click boards™ using the mikroBUS™ sockets. The board also features a USB Mass Storage interface which allows easy drag-and-drop update of the MCU Flash memory and configuration of Wi-Fi credentials. The USB can also be used for command line interface.
The development board is designed to demonstrate a typical IoT application component that includes:
• Smart
Microchip’s SAM D21 is a series of low- power MCUs making it a perfect fit for IoT applications.
The most important and fundamental element of an IoT system is the MCU that processes data from the sensor and runs complex algorithms at a faster rate.
Features of the ATSAMD21G18A:
48 pins in compact form factor
256 KB Flash and 32 KB SRAM
Maximum CPU operating frequency – 48 MHz
Flexible peripherals like SERCOM and intelligent peripherals such as Event System for inter-peripheral signaling without using CPU bandwidth
Supported by MPLAB Harmony v3 and MPLAB X IDE for rapid prototyping
• Secure cc
Security is vital when it comes to protecting IoT applications from unauthorized access. The ATECC608 is a secure element from Microchip’s CryptoAuthentication™ portfolio with advanced Elliptic Curve Cryptography (ECC) capabilities, making it ideal for securing IoT applications. The ATECC608A device on the SAM-IoT WG Development Board is used to authenticate the hardware with cloud service providers, like the Cloud IoT Core, to uniquely identify every board.
Features of the ATECC608:
Hardware support for asymmetric sign, verify, key agreement: provides full range of security confidentiality, data integrity and authentication to systems with MCU running encryption/decryption algorithms
Elliptic Curve Digital Signature (ECDSA)
Elliptic Curve Diffie-Hellman (ECDH)
Protected storage for up to 16 keys, certificates or data
Hardware support for symmetric algorithms – SHA-256 and AES-128
Small form factor
Pre-provisioned for easy connection to the Google Cloud Platform’s Cloud IoT Core
• Connected
Microchip’s fully certified ATWINC1510 Wi-Fi controller module effortlessly connects the application to the cloud.
Features of the ATWINC1510:
Single-band 2.4 GHz b/g/n IoT network controller
Small form factor
Interface with ATSAMD21 MCU through SPI
8 MB on-board Flash memory – making edge MCUs free from all networking tasks
Security protocols supported: WPA/WPA2 personal and enterprise, TLS, SSL
Agency certified in the U.S., Canada, Europe, Japan, Korea, China, India and Taiwan
How to Start
The SAM-IoT WG Development Board is pre-configured for the Google Cloud Platform’s Cloud IoT Core. This board comes with a ‘drag and drop’ feature. This feature enables you to quickly download the latest firmware and Wi-Fi configuration. Drag and drop the firmware and wait for restart, then drop the Wi-Fi configuration to the board. The device will start sending data to the Google Cloud Platform.
The board also has an on-board temperature and light sensor. All data gathered by the sensors of the SAM-IoT Development Boards is published on Microchip’s sandbox account. With this, you do not need to be a networking or encryption expert to create a secure device and connect it to the cloud.
Once you are ready to build your own custom design, you can easily generate code using the free software libraries in the MPLAB Harmony v3 embedded software development framework within the MPLAB tools ecosystem. You can even move to your own private Google cloud by simply registering your device using the public key given in the Mass Storage device.
The ATWINC1510 needs a connection to the Wi-Fi network with an internet connection. The ATECC608A is used to authenticate the hardware with the cloud to uniquely identify every board. The demonstration application source code can be modified to publish data to a personal cloud account to get started with a custom cloud application.
The ATSAMD21G18A is mounted on the SAM-IoT WG Development Board and is pre-programmed with an application ready to publish data to a Microchip account with a cloud service provider and subscribe to data sent from sam-iot.com through the cloud service provider. The data is read from the cloud and presented to the user on the sam-iot.com customized dashboard.
Visualizing Cloud Data in Real Time
Out of the box, all SAM-IoT Development Boards are pre-registered to Microchip’s Google Cloud sandbox account. This account is set up for demonstration purposes only. All data gathered by the sensors of the SAM-IoT Development Boards are published on the account in a graphical format. There is no permanent storage or collection of the data published by the boards connected through the Microchip sandbox account. The full storage of the Google Cloud features will be available to the user after the board is removed from the demonstration environment and migrated to a private account. Once the board is connected to Wi-Fi and the cloud, the sam-iot.com web page will show a real-time graph of the data gathered from the on-board light and temperature sensors. Data is transferred and transformed from the sensor to the cloud through a JSON object: an ASCII string formatted as follows: { ‘Light’ : XXX, ‘Temp’: YYY }, where XXX and YYY are numerical values provided by the sensors and preprocessed by the ATSAMD21G18A and are expressed in decimal notation.
Once the development board is connected to the Cloud IoT Core, it is preconfigured to transmit light and temperature data to the cloud. Allowing you to start collecting data instantly for the network of sensor nodes.
View Figure 2. SAM-IoT web page status indicators
View Figure 3. Real time data on the SAM-IoT web page
Conclusion
The SAM-IoT WG Development Board based on the SAM D21 MCU is a compact and easily expandable demonstration and development platform for Wi-Fi based IoT node applications. This specific development board comes pre-provisioned for the Google Cloud Platform Cloud IoT Core. The application that comes pre-programmed with factory shipped boards demonstrates MQTT data transfer of on-board light and temperature sensor data to Cloud IoT Core which acts as a model for quickly creating your custom IoT application.
You can extend the functionality of this board by connecting the board to an endless array of MikroElektronika Click boards using the on-board mikroE header and send the sensor data to the cloud. This development platform acts as a fundamental building block which can be re-used and further customized to suit the needs of your IoT application.
To learn more about this development board and to download the user guides and application demo example, please visit the SAM-IoT WG Development Board page on our website.