Link Search Menu Expand Document

Google Cloud IoT Core Application on SAM D21 IoT WG Development Board

Download


Important:

There could be updates and bug fixes to the Google IoT sensor node application. Therefore, it is recommended to program SAM D21 IoT WG Development Board with the latest version of hex file from the hex folder.

Description:

The SAM-IoT WG Development board based on SAM D21 microcontroller is a small and easily expandable demonstration and development platform for Wi-Fi based IoT Node applications. This specific development board comes pre-provisioned for Google IoT core and hence the name “WG”. The application that comes pre-programmed with factory shipped boards demonstrates MQTT data transfer of on-board light and temperature sensor data to Google IoT core.

Key Highlights of SAM-IoT WG Development Board:

  • On-board Light and Temperature Sensors.
  • Additional sensors can be interfaced using “click boards” through on-board mikroBUS connector.
  • On-board nEDBG debugger. Hence, no external debugger needed.
  • Virtual COM and USB Mass Storage for Drag & Drop programming.
  • Dual power supply options. USB or Battery.
  • On-board Li-Po battery charging circuitry.
  • ATECC608A based secure cloud connectivity

Features of SAM-IoT WG Development Board:

  • Drag & Drop of application hex files. Hence, no need for IDE to program SAM D21 microcontroller.
  • Drag & Drop of Wi-Fi credentials to connect to the internet.
  • Microcontroller peripheral libraries and Middleware are based on MPLAB Harmony 3 Software framework.
  • MPLABX IDE based project.
  • Command Line Interface (CLI) support for Wi-Fi credentials configuration.
  • 4 LED indicators to indicate the operating status.

Components Used:

Software/Tools Used:

This project has been verified to work with the following versions of software tools:

Because Microchip regularly update tools, occasionally issue(s) could be discovered while using the newer versions of the tools. If the project doesn’t seem to work and version incompatibility is suspected, It is recommended to double-check and use the same versions that the project was tested with.

Application Demonstration:

The below sections describes the steps to run the application.

1. How to setup the SAM-IoT WG Development Board

  • The SAM-IoT WG Development board comes with pre-loaded application for out-of-box experience for the end user. Connect the board to the host PC’s USB port to power-up the board.
  • Alternatively, the board can be powered using a Li-Po battery. In order to perform Firmware upgrade or WiFi configuration, the board must be connected through USB port.
  • Once connected to PC, a mass storage drive icon by the name CURIOSITY will appear.

2. Running the Demo

  • Open the drive and click open the CLICK-ME.HTM file to launch the Google IoT cloud landing page.
  • In the landing page, enter Wi-Fi credentials (SSID, Password, security type) and download WIFI.CFG file.
  • Drag & Drop the downloaded WIFI.CFG onto the CURIOSITY drive to set the Wi-Fi credentials.
  • If the Wi-Fi network is active, then the SAM-IoT WG Development board establishes connectivity with the Wi-Fi network and securely connects to the Google IoT cloud.
  • After successful connection, the SAM-IoT WG Development board pushes the real time light and temperature sensors data to the landing page.

3. Firmware upgrade and WiFi configuration process

  • Firmware upgrade through Drag & Drop

  • Download the latest version of hex file from the hex folder. Drag & Drop the downloaded .hex file onto the CURIOSITY drive.
  • This will automatically program the microcontroller with the supplied .hex file. There is no need to open the MPLABX IDE to program the .hex file through Drag & Drop method.
    • Firmware upgrade through MPLABX IDE

  • This method is usually followed by most of the developers to program the .hex file from MPLABX IDE environment.
    • WiFi configuration through Drag & Drop

  • This is nothing but the WIFI.CFG Drag & Drop method discussed in the previous section.
    • WiFi configuration through CLI

  • Open a terminal application on the host PC for the virtual COM port of connected SAM-IoT WG Development board, with 9600-8-None-1 settings
  • Just enter the below command to set the Wi-Fi credentials.
    wifi <SSID>,<PASSWORD>,<SECURITY TYPE>

Reference:

Comments:

  • The application “sam_d21_iot/google_cloud_iot_core is developed by applying a patch (available in folder google_cloud_iot_core/firmware/app_patch”) to MPLAB Harmony v3. If you need to reconfigure or regenerate this demo using MHC, please refer the “Notes.txt” file under “google_cloud_iot_core/firmware/app_patch” folder.
    The patch is applied due to a known issue in the application. This issue is expected to be fixed in a future release of “reference_apps” repository.
  • This application demo builds and works out of box by following the instructions above in “Running the Demo” section. If you need to enhance/customize this application demo, you need to use the MPLAB Harmony v3 Software framework. Refer links below to setup and build your applications using MPLAB Harmony.

Revision:

  • v1.2.0 - Regenerated and tested application.
  • v1.1.0 released demo application


Copyright © 2020 Microchip Technology.