Microchip AVR-IoT WG Dev Board - Review

Table of contents

RoadTest: Microchip AVR-IoT WG Dev Board

Author: tonydbeck

Creation date:

Evaluation Type: Development Boards & Tools

Did you receive all parts the manufacturer stated would be included in the package?: True

What other parts do you consider comparable to this product?: There are a number of IoT development kits out there with similar functionality. Here are is a selection I have come across: || Node MCU Boards - These are a low cost open source board that use the ESP8266 wifi module. They can be programmed using a language called Lua or can be set up to use the Arduino tool set. || Particle boards (Argon,Boron,Xenon,Photon and Electron) - These are very small boards similar to the Node MCU boards. The boards are designed to work seamlessly with the Particle Device Cloud. Particle provide everything from the IDE to develop the application to the actual application hosting. There is a very good level of documentation available on their website as well. A particle photon board would be my second choice next to the AVR-IoT board. || Pycom WIPY 3.0 - This is an ESP32 based board and has WiFi, BLE and is programmed with MicroPython. Pycom also make the SiPy which is very similar, but also supports Sigfox - great if you want long range coverage || Samsung ARTIK Boards - Samsung have produced a range of boards that use their ARTIK WiFi and Bluetooth modules. || TI SimpleLink CC3200 Evaluation Board - This is a packaged IoT board referred to as a 'SensorTag' that houses the TI WiFi module and 9 low power MEMS sensors. || ST X-Nulceo-IDW04A1 - This is an add on board that will plug into the popular ST Nucleo development kits to add WiFi functionality.

What were the biggest problems encountered?: The biggest issues I had was trying to send data back to the board due to the lack of documentation to do this and no software examples. Another issue I noticed was the temperature was a few degrees higher than the ambient temperature. I believe this was due to heat produced by the board itself. A way to solve this could be to utilise the low power functionality and send data every 10 or more seconds instead of every second.

Detailed Review:

image

1.0 Introduction

First of all, a big thanks to / element14 and Microchip for giving me the opportunity to participate in this RoadTest.  It is my first Road Test and has been a great way to kick start my participation in the Element 14 community.  I would recommend anyone to give a Road Test a go!

 

I will do my best to write up a good report - I have been looking through lots of reviews, both good and bad, to try and determine the magic formula of what makes a good review.......... I am afraid to say I didn't figure out the magic ingredient! image  But, I have noticed, that something easy to read that gets the point across without just re-writing the manufacturers data sheet seems to go down well..... so I will see what I can do and try my best!  Will be great to get some feedback on the

 

 

So what motivated me to apply for this Road Test?  Well, I have seen many Road Tests advertised before on Facebook and always thought about applying.  When I saw this one, I immediately thought of an application I could use it for, so decided to apply.

 

My idea was to link it with my automated central heating system and use it as a portable room temperature controller.  My central heating control system currently uses a Raspberry Pi running Node-Red to connect to the cloud and allow control from my phone.  I  have a couple of DS18b20 sensors around my home to measure the temperature upstairs and downstairs - these temperatures are read in by the Pi which then controls my central heating based on the temperatures and temperature setpoint.

 

Currently, the sensors I am using are in fixed locations - with this board, as it is wireless and portable, I intend to control the heating based on the temperature of whatever room the board is placed in.

 

1.1 What is the Board and what does it do?

 

The AVR-IoT board is a development board aimed at the Internet of Things.  It has an on board Temperature and Light sensor for which the measurements are sent to the Google Cloud IoT platform every second.

It has a built in Debugger and Programmer that supports drag and drop programming, debugging and access to the built in MCU UART.

 

The user manual describes it as the following:

 

The AVR-IoT WG development board is a small and easily expandable demonstration and development platform for IoT solutions, based on the AVR® microcontroller architecture using Wi-Fi® technology. It was designed to demonstrate that the design of a typical IoT application can be simplified by partitioning the problem into three blocks:

• Smart - represented by the ATmega4808 microcontroller

• Secure - represented by the ATECC608A secure element

• Connected - represented by the WINC1510 Wi-Fi controller module

Microchip have also published a YouTube video that gives a nice introduction:

1.2 Unique Selling Points

  • Very quick set up to connect to the Google Cloud Platform - Less than 1 minute out of the box
  • Secure Element Chip - This
  • Built in LiPo battery charger
  • Built in debugger and programmer
  • USB virtaul COM port that connects to the MCU UART
  • Uses a fully certified WiFi network controller
  • Free software libraries
  • Web based Code Generator using Atmel Start
  • Supported by two free IDE's - Atmel Studio and MPLAB X IDE

 

1.3 My Planned Testing Methodology

  1. Set up the board as per the Quick Start Guide.
  2. Migrate the cloud connection to my own Google Cloud account
  3. Connect my heating system to my Google Cloud account and pull in the temperature and light data from the AVR board using Node-Red. Then reconfigure my system to use this temperature rather than the current ds18b20 sensor.
  4. Configure the AVR board to receive data sent from my heating system
  5. Connect the AVR board to a Nextion LCD display so that the temperature can be displayed locally and my heating system setpoints can be displayed and set.

1.4 Key Questions

    Here are some key questions I will try and answer in this RoadTest and review in my conclusion.

  1. Can the board be set up quickly and easily?
  2. Is it easy to migrate from the Microchip Sandbox cloud to a personal cloud?
  3. Is it easy to integrate another system into the google Cloud?

 

2.0 Overview

The main processor for the board is an ATMEGA 4808 MCU

 

2.1 Block Diagram

image

 

image

 

2.2 Key Components Overview

The following is a summary of the components used on the board :

 

{tabbedtable} Tab LabelTab Content
ATMEGA 4804

ATMEGA 4808 - Datasheet

 

 

 

  • CPU
    • 8 bit AVR CPU running up to 20MHz
    • Single-cycle I/O access
    • Two-level interrupt controller
    • Two-cycle hardware multiplier
  • Memory
    • 48KB Flash Memory
    • 256Byte EEPROM
    • 6KB SRAM
  • System
    • Power-on Reset (POR) circuit
    • Brown-out Detection (BOD)
    • Clock options:
      • 20 MHz low power internal oscillator with fuse-protected frequency setting
      • 32.768 kHz Ultra Low Power (ULP) internal oscillator
      • 32.768 kHz external crystal oscillator
      • External clock input
    • Single pin Unified Program Debug Interface (UPDI)
    • Three sleep modes:
      • Idle with all peripherals running and mode for immediate wake-up time •
      • Standby –
        • Configurable operation of selected peripherals SleepWalking peripherals • Power Down with limited wake-up functionality • Peripherals – One 16-bit Timer/Counter type A with dedicated period register, three compare channels (TCA) – Three 16-bit Timer/Counter type B with input capture (TCB) – One 16-bit Real Time Counter (RTC) running from external crystal or internal RC oscillator – Three USART with fractional baud rate generator, autobaud, and start-of-frame detection – Master/slave Serial Peripheral Interface (SPI) – Dual mode Master/Slave TWI with dual address match • Standard mode (Sm, 100 kHz) • Fast mode (Fm, 400 kHz) • Fast mode plus (Fm+, 1 MHz) – Event System for CPU independent and predictable inter-peripheral signaling – Configurable Custom Logic (CCL) with up to four programmable Lookup Tables (LUT) – One Analog Comparator (AC) with scalable reference input – One 10-bit 150 ksps Analog to Digital Converter (ADC) – Five selectable internal voltage references: 0.55V, 1.1V, 1.5V, 2.5V, and 4.3V – CRC code memory scan hardware • Optional automatic scan after reset – Watchdog Timer (WDT) with Window Mode, with separate on-chip oscillator – External interrupt on all general purpose pins • I/O and Packages: – 27 programmable I/O lines – 32-pin VQFN 5x5 and TQFP 7x7 • Temperature Range: -40°C to 125°C • Speed Grades: – 0-5 MHz @ 1.8V – 5.5V – 0-10 MHz @ 2.7V – 5.5V – 0-20 MHz @ 4.5V – 5.5V, -40°C to 105°C
  • image

image

MCP73871 LiPo Charger

MCP73871 LiPo Charger with Power Path Management - Datasheet

 

This little IC is a fully integrated power management and Li-Ion battery charging solution for small electronic systems.

 

It will take power sourced both from a wall AC-DC adaptor, USB ports or from a connected Li-Ion battery.

It requires a very low number of components to operate making it great to use on a small embedded board such as this one.

 

Here is a complete example circuit implementation from the datasheet:

image

 

 

 

image

MIC33050 Voltage Regulator

MIC33050 Voltage Regulator - Datasheet

 

Features

  • Input Voltage: 2.7V to 5.5V
  • 600 mA Output Current
  • Fixed and Adjustable Output Voltage Options
  • No External Inductor Required
  • Ultra-Fast Transient Response
  • 20 µA Quiescent Current
  • 4 MHz Switching in PWM Mode
  • Low Output Voltage Ripple
  • >93% Peak Efficiency
  • >85% Efficiency at 1 mA
  • Micropower Shutdown
  • 12-Pin 3 mm x 3 mm HDFN
  • –40°C to +125°C Junction Temperature Range
ATECC608A Security IC

ATECC608A Security IC - Datasheet

 

This security IC gives this board one of the key differentiating features when compared to other IoT development boards on the market.

 

It has a number of excellent security features that if used correctly will make a solution based on this very secure with a high resistance to hacks.

 

One great feature is the key production and management.  It is able to create a high quality random private/public key pair where the private key is stored internally and will never be made available outside of the IC.  The public key can then be read using functions contained in the cryptoauth library supplied by Microchip. Keeping the private key secured is extremely important in any secure application to ensure the data can't be compromised.  In IoT and other products where a security IC is not used but that require secure communications, a private/public key combination needs to be provisioned in a manner where it is possible the private key could be compromised.  This IC removes this possibility.

 

Here are the main features taken from the datasheet:

 

  • Cryptographic Co-Processor with Secure Hardware-Based Key Storage:
    • Protected storage for up to 16 keys, certificates or data
  • Hardware Support for Asymmetric Sign, Verify, Key Agreement:
    • ECDSA: FIPS186-3 Elliptic Curve Digital Signature
    • ECDH: FIPS SP800-56A Elliptic Curve Diffie-Hellman
    • NIST Standard P256 Elliptic Curve Support
  • Hardware Support for Symmetric Algorithms:
    • SHA-256 & HMAC Hash including off-chip context save/restore
    • AES-128: Encrypt/Decrypt, Galois Field Multiply for GCM
  • Networking Key Management Support:
    • Turnkey PRF/HKDF calculation for TLS 1.2 & 1.3
    • Ephemeral key generation and key agreement in SRAM
    • Small message encryption with keys entirely protected •
  • Secure Boot Support:
    • Full ECDSA code signature validation, optional stored digest/signature
    • Optional communication key disablement prior to secure boot
    • Encryption/Authentication for messages to prevent on-board attacks
  • Internal High-Quality NIST SP 800-90A/B/C Random Number Generator (RNG)
  • Two High-Endurance Monotonic Counters
  • Unique 72-Bit Serial Number
  • Two Interface Options Available:
    • High-speed Single Pin Interface with One GPIO Pin
    • 1 MHz Standard I2C Interface
  • 1.8V to 5.5V IO Levels, 2.0V to 5.5V Supply Voltage
  • <150 nA Sleep Current
  • 8-pad UDFN and 8-lead SOIC

image

MCP9808 Temperature Sensor

MCP9808 Temperature Sensor - Datasheet

 

This is a digital temperature sensor that will measure and convert a temperature of between -20degC and +100degC to a digital word with a typical accuracy of +/- 0.25degC and maximum of +/-0.5degC.

 

It communicates over a 400kHz 2wire I2C bus.

 

The key features from the datasheet are:

 

  • Accuracy: - ±0.25 (typical) from -40°C to +125°C
  • ±0.5°C (maximum) from -20°C to 100°C
  • ±1°C (maximum) from -40°C to +125°C •
  • User-Selectable Measurement Resolution:
    • +0.5°C, +0.25°C, +0.125°C, +0.0625°C
  • User-Programmable Temperature Limits:
    • Temperature Window Limit
    • Critical Temperature Limit
  • User-Programmable Temperature Alert Output
  • Operating Voltage Range: 2.7V to 5.5V
  • Operating Current: 200 µA (typical)
  • Shutdown Current: 0.1 µA (typical)
  • 2-wire Interface: I2C™/SMBus Compatible

 

 

Here is the Functional Block Diagram taken from the datasheet:

image

image

TEMT6000 Light Sensor

TEMT6000 Light Sensor -https://www.sparkfun.com/datasheets/Sensors/Imaging/TEMT6000.pdfDatasheet

 

This is simply a silicon NPN phototransistor that is sensitive to the visible spectrum of light.

 

It is adapted to human eye responsivity and has a wide angle of half sensitivity - +/- 60deg

image

WINC1510 WiFi Module

WINC1510 WiFi Module - Datasheet | Wi-Fi Network Controller Software Design Guide

 

This component is a Certified 802.11 b/g/n IoT network controller System on Chip.  It abstracts a large portion of the network communications away from the host processor making it much simpler to implement a WiFi base IoT system.

It is especially optimized for low power IoT applications.

 

It contains a fully integrated power amplifier, LNA, switch and power management and printed antenna.

 

The module hosts the WiFi Stack, TCP/IP and TLS stacks with corresponding API and an SPI driver.

 

image

 

One interesting feature I found that would make this module very appealing for use in Industrial IoT products where the product may be used on networks controlled by large corporations is the support for Enteprise security with WPA/WPA2 (802.1X).

 

Here is a summary of the features from the datasheet:

 

  • IEEE® 802.11 b/g/n 20 MHz (1x1) solution
  • Single spatial stream in 2.4 GHz ISM band
  • Integrated Transmit/Receive switch
  • Integrated PCB antenna or u.FL micro co-ax connector for external antenna
  • Superior sensitivity and range via advanced PHY signal processing
  • Advanced equalization and channel estimation • Advanced carrier and timing synchronization
  • Wi-Fi® Direct (supported till firmware release 19.5.2)
  • Soft-AP support • Supports IEEE 802.11 WEP, WPA, WPA2 security
  • Support Enterprise security with WPA/WPA2 (802.1X)(1)
    • EAP-TLS – EAP-PEAPv0/1 with TLS
    • EAP-TTLSv0 with MSCHAPv2
    • EAP-PEAPv0/1 with MSCHAPv2
  • Superior MAC throughput via hardware accelerated two-level A-MSDU/A-MPDU frame aggregation and block acknowledgment
  • On-chip memory management engine to reduce host load
  • SPI host interface © 2018 Microchip Technology Inc. Datasheet DS70005304C-page 1
  • Operating temperature range from -40°C to +85°C. RF performance at room temperature of 25oC with a 2-3 db change at boundary conditions
  • I/O operating voltage of 2.7V to 3.6V
  • Built-in 26 MHz crystal
  • Integrated Flash memory for system software
  • Power Save modes
    • 4 µA Power-Down mode typical at 3.3V I/O
    • 380 µA Doze mode with chip settings preserved (used for beacon monitoring)(2)
    • On-chip low power sleep oscillator
    • Fast host wake-up from Doze mode by a pin or SPI transaction
  • Fast Boot options
    • On-chip boot ROM (Firmware instant boot)
    • SPI flash boot
    • Low-leakage on-chip memory for state variables
    • Fast AP re-association (150 ms)
  • On-chip Network stack to offload MCU
    • Integrated Network IP stack to minimize host CPU requirements
    • Network features TCP, UDP, DHCP, ARP, HTTP, TLS, and DNS
    • Hardware accelerators for Wi-Fi and TLS security to improve connection time
  • Hardware accelerator for IP checksum
  • Hardware accelerators for OTA security
  • Small footprint host driver
  • Wi-Fi Alliance® certifications for Connectivity and Optimizations

 

 

image

nEDBG Circuit

nEDBG Circuit

 

The board features a complete Embedded Debugger that allows on-board programming and debugging.  It has a number of interfaces making it very useful!.....

 

  • A Debugger - this allows a range of debugging features that can be used from within MPLAB or Atmel Studio
  • Mass Storage - This makes available a number of files such as the public key and a website shortcut to get you connected to the Microchip sandbox account
  • Virtual COM port - this is directly connected to the UART on the 4808 MCU.  This is very useful as it allows some handy run-time debugging messages to be sent from the application and displayed in a suitable terminal emulation program such as PuTTY.

 

The Embedded Debugger connects to the MCU via the Unified Program and Debug Interface which is an Atmel proprietary 1-wire debug and programming interface.

image

3.0 Un Boxing and First Impressions

 

{gallery} Unboxing

image

image

The board was well protected in the package

image

The box that the board came in was nice a compact

image

image

The board was protected in a small Anti-Static bag

image

The board itself is very compact

4.0 Initial Setup

The set up procedure of this board straight out of the box is exceptionally easy.  The quick start guide suggests it can be set up in 30 seconds!  I would say this is a little optimistic, but possible.  For the average user, it is quite easy to do within a minute or two.

 

There are 3 methods of connecting the board to your network -

  1. Using the web page you are taken to when clicking on the CLICK-ME.HTM shortcut to generate a text file with the necessary WiFi network details.
  2. Powering up the board while holding SW0 will put the board into Soft AP mode.  This allow you to connect to the board from a phone or PC and then browse to the boards in-built web page that allows you to discover local WiFi networks and enter the credentials for the network you want to connect to.  I think this is a really neat feature that makes it really easy to get hooked up.  In my opinion, this would be the best way to use to connect to a WiFi network in a commercial product.  It is interesting to note, that this soft AP functionality is actually integrated in the WINC1510 module rather than the MCU firmware.
  3. Using the CLI over the UART - Once the board is connected to a PC, using a terminal emulation program such as PuTTy, you are able to connect to the board on the virtual COM port and send a command to enter the WiFi connection details.  In the form of:

          image

 

 

Here are the required steps for method 1:

 

{tabbedtable} Tab LabelTab Content
Microchip Instruction Video

Microchip have published a great video on YouTube which gives a really good overview of setting up the board.

 

They have also published a user manual that takes you through each part of setting up the board and gives an overview of the board

Step 1

Plug the board in to a computer

image
Step 2

Double click on the CLICK-ME.HTM link on the CURIOSITY drive


This file contains a link to AVR-IOT.com - Microchips sandbox account that will show data received in real time from the board.

<meta http-equiv="refresh" content="0; url=https://AVR-IOT.com/device/01235779C93D870BFE"/>
imageimage
Step 3

Generate WiFi Connection File

When navigating to the sandbox page initially, as the board is not connected, you are presented with a page to enter the details for a local WiFi network.

image

Step 4

Once the WiFi details have been entered, you simply click the Download Configuration button to download a small text file containing the WiFi connection details.

 

 

image

 

You save this file to the Mass Storage drive which then loads the Wifi credentials into the MCUs EEPROM

image

 

 

 

 

5.0 Using Microchip Code Configurator (MCC)

There are a few options available to configure a demo program manually for the board - one being the Microchip Code Configurator.  This tool is actually really nice and easy to use.  There is a section in the user guide that takes you through using this tool to set up a demo program and write it to the board.

Here is my experience using it together with the manual to write the program:

 

 

{tabbedtable} Tab LabelTab Content
Step 1

Step 1 - Open MPLAB X IDE


When I first opened MPLAB X IDE, I was presented with the Start Page that has some quick links on the left and allowed me to sign in to my Microchip account.  It Also shows a summary of recent projects.

image

to go to the next step, I had to have the Microchip Code Configurator Add-In downloaded and enabled.  To install this, I clicked on Tools->Plugins then choose the Available Plugins tab, found and selected MPLAB Code Configurator, then clicked install.

image

As I had already installed it when I took the screen shots, it does not show up in the screenshot above - instead it shows up in the Installed Tab:

image

 

So far, so good!! image

Step 2

Create New Project


I next clicked on Create New in the Startup Page

image

and then left the standard selections of Microchip Embedded and Standalone Project

image

Step 3

Choose MCU


Next I selected the MCU that is on the board - 8-bit AVR MCUs (XMega/Mega/Tiny) and then ATmega4808

image

Step 4

Choose Debugger/Programmer

 

I then chose the debugger that is part of the board - the nEDBG.  This is under the Alternate Tools tab.

image

Step 5

Choose Compiler

 

At this point, I had the AVR GNU or avrasm2 compilers available to select as I already had these installed.  If I had the XC8 compiler installed, I would should this option as well.

I chose the AVR GNU compiler / toolchain and clicked Next>

image

Step 6

Choose Project Name

 

Finally for this part of the set up, I chose the Project Name and Folder location.  I called it IoT_Node_MCC for easy future reference:

image

Once this was done, a bare bones project was created - at this point there is only a basic Makefile and a basic project configuration.

image

Step 7

Begin Configuration of the Project with MCC

This is the part where it gets a little more interesting as the MCC tool bulks the project out with all of the necessary functionality........

 

I clicked on the MCC icon on the tool bar to invoke the configurator....

image

 

I then got a dialog to save the MCC project file..... for this I chose the default filename and location.

image

Step 8

Load the AVR-IoT WG Sensor Node Example

 

I next picked the AVR-IoT WG Sensor Node example from the Device Resources pane by double clicking on it.

image

This loaded all of the relevant libraries and configuration for this board.

 

A number of tabs are then presented across the top with various configuration options for a customised application.

image

For example, the Cloud Services Registry ID can be changed for migrating away from the Microchip sandbox account and to a personal cloud account.

image

In the AVR-IoT WG Sensor Node tab, I selected the Debug Messages option as this was initially off.

For this part, I left all of the other settings unmodified.

image

 

You can also navigate to the different settings in the Project Resource Pane, either in a Tree view or Flat View

image

Step 9

Generate the Code

I now clicked the Generate button in the Project Resources pane to create the code from the MCC project set up.

image

 

Once complete, I had a Generation Complete message in the MPLAB Code Configurator status pane.

image

 

To check the file generation, I had a look at the Project Tree Pane where I could see the various project files.....

image

 

I thought the folder organisation is actually pretty good - it is well structured and easy to navigate.

Step 10

Change the Optimizations

As per the manual, the code optimization needs to be changed for the code to run at the optimal level.  To do this, I right clicked on the top level project folder and selected properties.

 

image

As I only have the AVR compiler installed, I selected avr-gcc on the left hand side, then chose Optimization under Option categories and selected s for the optimization level.  This optimizes the project favouring size.

image

Step 11

Building and Loading

Building and loading the project is very simple - you simply click the Make and build icon....

image

and then chose Make and Program Device Main Project.

 

I was asked which debugging tool I wanted to use - my board was already plugged in, so it showed up with the serial number in the list under nEDBG....

image

I selected this, click OK -

The compiler then compiled the program, once it was compiled it was automatically loaded to the board.

 

 

5.0 Cloud Connectivity

 

Out of the Box, the board connects straight to the Microchip sandbox account and publishes data - which is great to get started, but to go further and really get the most out of the board, you need to migrate the connection to your own private account.  I would say this is a relatively easy task, but you do need to take care to follow the instructions exactly. There is a shortcut to start the process off at the bottom of the Microchip Sandbox account webpage.......

 

 

image

 

The Graduate link takes you to a GitHub page hosted by Leverege who are a company specialising in IoT technologies.  They have worked with Google and Microchip to provide a Google Cloud based solution that integrates the AVR-IoT board with the Google Cloud.

 

This really simplifies setting up all the 'back-end' stuff to get a working Cloud solution in place.  The only downside is that a lot of the set up and configuration is hidden away as it is all automated.  Also I could not find any detailed information explaining the project and taking you through how it takes data published by the board, places it in the Firebase real time database and then shows it on a graph on a web page.  It would be nice to at least have a manual of some sort specific to this board that explains all of the google cloud services that are used and how they fit together to make the complete solutions work.

 

I guess the criteria that Microchip / Google / Leverege have tried to fulfill is to make a complete solution that is quick and relatively easy to deploy - but I would say this is at the expense of flexibility.

 

image

 

image

 

 

 

5.1 Migrating to Personal Google Cloud Account

 

{tabbedtable} Tab LabelTab Content
Step 1

Follow Link to Leverage GitHub

 

I first clicked on the Graduate button at the bottom of the Microchip Sandbox webpage which takes you to the Leverage GitHub page that hosts the instructions and set up files for this board.

image

This link took me here:

image

 

Leverage have created a set of videos that take you through the process which is very useful.  They also have also described the process.  I will document the steps I took here.....

Step 2

Sign Up / Configure Google Cloud


If you are not already signed up to Google Cloud, then you will need to do this before anything else.  In my case, I had already set up an account before the Road Test started.  One of the nice things about Google Cloud is that you get a bunch of credits for free when you sign up and configure billing.  This allows you to experiment without landing a big bill.

 

The address for the Google Cloud Platform Management Console is: console.cloud.google.com

Step 3

Create Google Cloud Project


Within the Console, I first clicked on Home to open the Dashboard

image

 

and then clicked on CREATE to begin a new project.

image

I then gave my new project a name and clicked CREATE.

 

image

 

It took a few seconds to create the project, but once it was created I was presented with a range of widgets on a dashboard to give a project overview

 

image

On the Leverage instructions, it states that you need to enable billing for the project.  In my case as I am the billing administrator on one billing account, this new project was automatically linked to my billing account.

When I set up my Google Cloud account up, I had to add my card details to enable billing - as I have the free credit and am only running basic functions, I had no concerns I would get any charges.

 

You can see the status of your account at any time by going to the GCP console menu and selecting billing.

image

Step 4

Create Firebase Project

 

I navigated to the Firebase console and clicked on Add project

image

I then had a dialogue where I added my Google Cloud Project just created to Firebase.

image

Once I had selected to accept the terms, the Create project button changed to Add Firebase and became clickable.  Once clicked, a dialogue opens to confirm the billing plan.

image

 

Once I had clicked Confirm Plan, the project was created in Firebase and the dashboard opened.

image

Step 5

Set Up Leverage UI in Google Cloud Account

 

I first activated the Google Cloud Shell which gives a command line access to configure your project. I did this by clicking the CLI button in the tool bar.....

image

This then opens a command line shell at the bottom of the page.

image

This is quite a neat and powerful feature.  The Cloud Shell evironment is a Docker Container that is started from a Google-maintained image.  It is also possible to create your own Docker image and use that!

 

There is a README file located on the folder that contains the following:

image

 

To be able to set up the Leverage application, I first cloned the Leverege project into my shell environment by running the following command:

git clone https://github.com/Leverege/microchip-avr-iot.git && cd microchip-avr-iot/setup && bash setup.sh

This command completed pretty quickly and then presented me with the following

image

I then copied my UID from the last part of the address in the CLICK-ME.HTM file on the board and pasted it into the shell.

image

 

I then had the option to chose my IoT Core registry name - I changed this to AVR-IOT-RoadTest

image

The script then ran and set everything up in the project that was required.

It carries out the following tasks:

  • Enable Cloud Functions, IoT Core, and Pub Sub in your GCP project
  • Create an IoT Core registry called AVR-IOT and register your device
  • Install, build, and deploy Cloud Functions and the UI

 

This whole task is very well automated and made the set up very easy! It took a few minutes, but does report the progress well.

 

Once complete I had the following in the shell:

image

Step 6

Add Device Public Key to IoT Core Registry

To allow my device to talk to Google Cloud, I need to add the Public Key to my account.  To do this, I selected IoT Core from the Google Cloud Console Menu.

image

 

Then selected my registry that had been created.

image

Then selected Devices

image

And then selected my device that had also been created.

image

 

From there I could see the option to add a public key

image

The key is contained in the PUBKEY.TXT file on the board.  I simply copied the text from this and pasted it into the Add authentication key dialogue.

image

I had to also select ES256 as the key type as it is a key based on Elliptic Curve Cryptography.

image

Step 7

Modify Firmware Settings to Connect to Private Cloud

In the Leverege instructions, they state to use the Atmel START web based utility, which is what I tried initially.  However I am going to use the Microchip Code Configurator in this write up for 2 reasons -

  1. To show an alternative method
  2. The Microchip Code Configurator version of the firmware has implemented a subscription to the /config MQTT topic allowing the potential for 2 way communication.

 

First with the MPLAB AVR-IOT project still open, I had to re-open the MCC from within MPLAB by clicking the MCC button on the toolbar.

 

Then, in the Cloud Services Google tab, I entered the corresponding details for my project.

image

Then, in the WINC tab, I entered my WiFi details so these would be saved in the firmware.

image

Step 8

Build and Load Project

 

Click to build and load the project.image

 

Once loaded successfully, I saw the following in the Output and nEDBG panes:

image

image

Step 9

View Data

 

Finally, I navigated to the web page that was now being hosted on my private cloud.  This web page takes the format: https://avr-iot-roadtest.firebaseapp.com/device/XXXXXXXXX where the XXXXXXXXX is the corresponding device ID.

In this video, you can see the live data coming into my app:

 

 

In this video, you can see the data populating the database as it is being delivered:

 

 

 

5.2 Connecting To My Home Heating System

My main goal for this review was to connect the board to my home heating system to send local temperature data to my system and receive information back to display on a locally connected display.  I had initially thought this would be a relatively simple task but unfortunately I have not yet succeeded.  I am determined to find a way and will post a subsequent blog once I have figured it out but for now, I will try to explain what have tried so far, what issues I have encountered and what I am planning on trying out to get it working

 

First of all, a little back ground on my Home Heating System.......

 

I had seen a few IoT systems on the market aimed at connecting a standard domestic heating system to the cloud, notably in the UK - the NEST and HIVE.  Both of these systems are very nice, but also quite pricey.  So, I decided I would have a go at developing my own system using some of the readily available cloud services to link it to the cloud.

 

For my system, I have uses a Raspberry Pi 3 at its core due to the low cost, power and ease of use.  I have then placed a number of  DS18B20 temperature sensors on my hot water tank, some of the pipes and a couple around my home, these then connect together at my Pi on a 1-wire bus and feed temperature data to the Pi.

The sensors I have used are like the following:

image

 

I then have Node-Red running on my Pi which handles all of the data collection, processing / control, UI via a web interface and Cloud Connectivity.  I have used two cloud providers - io.adafruit.com and Blynk.  Both have unique and very useful features.

 

The one big downside to my current set up is that the two sensors around my home are in fixed positions in the upstairs and downstairs hallways.  This is where I had hoped I could use the AVR-IoT board - as a portable, wireless temperature device.

 

As the heart of my system is the Raspberry Pi running Node-Red, the key thing for me was to get the data from the AVR-IoT board into Node-Red.  When I applied for the Road Test I had expected this task to be a very easy task - especially as this board is all set up to integrate into the Google Cloud Platform,

 


6.0 Demo Program Overview - AVRIoTWGSensorNode

 

Program Structure Overview

<html><head><title>Jive SBS</title></head>
<body><font face="arial,helvetica,sans-serif">
<b>Error</b><br><font size="-1">
An general error occurred while processing your request.
</font></font></body></html>

 

{tabbedtable} Tab LabelTab Content
cli

cli Command Line Interface

<html><head><title>Jive SBS</title></head>
<body><font face="arial,helvetica,sans-serif">
<b>Error</b><br><font size="-1">
An general error occurred while processing your request.
</font></font></body></html>
cloud

cloud (shows up in the second tab)

<html><head><title>Jive SBS</title></head>
<body><font face="arial,helvetica,sans-serif">
<b>Error</b><br><font size="-1">
An general error occurred while processing your request.
</font></font></body></html>
Config

cloud (shows up in the second tab)

<html><head><title>Jive SBS</title></head>
<body><font face="arial,helvetica,sans-serif">
<b>Error</b><br><font size="-1">
An general error occurred while processing your request.
</font></font></body></html>

credentials_storage

credentials_storage (shows up in the second tab)

<html><head><title>Jive SBS</title></head>
<body><font face="arial,helvetica,sans-serif">
<b>Error</b><br><font size="-1">
An general error occurred while processing your request.
</font></font></body></html>

cryptoauthlib

cryptoauthlib (shows up in the second tab)

<html><head><title>Jive SBS</title></head>
<body><font face="arial,helvetica,sans-serif">
<b>Error</b><br><font size="-1">
An general error occurred while processing your request.
</font></font></body></html>

doxygen

doxygen (shows up in the second tab)

<html><head><title>Jive SBS</title></head>
<body><font face="arial,helvetica,sans-serif">
<b>Error</b><br><font size="-1">
An general error occurred while processing your request.
</font></font></body></html>

examples

examples (shows up in the second tab)

<html><head><title>Jive SBS</title></head>
<body><font face="arial,helvetica,sans-serif">
<b>Error</b><br><font size="-1">
An general error occurred while processing your request.
</font></font></body></html>

include

include (shows up in the second tab)

<html><head><title>Jive SBS</title></head>
<body><font face="arial,helvetica,sans-serif">
<b>Error</b><br><font size="-1">
An general error occurred while processing your request.
</font></font></body></html>

mqtt

mqtt (shows up in the second tab)

<html><head><title>Jive SBS</title></head>
<body><font face="arial,helvetica,sans-serif">
<b>Error</b><br><font size="-1">
An general error occurred while processing your request.
</font></font></body></html>

src

src (shows up in the second tab)

<html><head><title>Jive SBS</title></head>
<body><font face="arial,helvetica,sans-serif">
<b>Error</b><br><font size="-1">
An general error occurred while processing your request.
</font></font></body></html>

utils

utils (shows up in the second tab)

<html><head><title>Jive SBS</title></head>
<body><font face="arial,helvetica,sans-serif">
<b>Error</b><br><font size="-1">
An general error occurred while processing your request.
</font></font></body></html>

winc

winc (shows up in the second tab)

<html><head><title>Jive SBS</title></head>
<body><font face="arial,helvetica,sans-serif">
<b>Error</b><br><font size="-1">
An general error occurred while processing your request.
</font></font></body></html>

Top Level Application Files

Top Level Application Files (shows up in the second tab)

<html><head><title>Jive SBS</title></head>
<body><font face="arial,helvetica,sans-serif">
<b>Error</b><br><font size="-1">
An general error occurred while processing your request.
</font></font></body></html>

 

 

 

8.0 IoT Security

 

7.0 Conclusion

7.1 Board Conclusions

 

  • Sandbox demonstration is very easy and quick to set up
  • Demonstration project in personal cloud account has a good level of automated set up
  • Google Cloud is complex
  • Mismatch between firmware versions using MCC and Atmel Start

 

 

8.0 Further Information

 

8.1 Useful Documents

Document DescriptionLink
AVR-IoT WG User Guidehttp://ww1.microchip.com/downloads/en/DeviceDoc/AVR-IoT-WG-Development-Board-User-Guide-50002809B.pdf
AVR-IoT WG Technical Summaryhttp://ww1.microchip.com/downloads/en/DeviceDoc/AVR-IoT0WG-Technical-Summary-50002805A.pdf
ATWINC15x0 (Radio Module) Data Sheethttp://ww1.microchip.com/downloads/en/DeviceDoc/70005304B.pdf
ATWINC1500 (Radio Module) Software Design Guidehttp://ww1.microchip.com/downloads/en/devicedoc/atmel-42420-winc1500-software-design-guide_userguide.pdf

 

 

DescriptionLink
AVR-IoT Homepagehttps://www.element14.com/community/external-link.jspa?url=https%3A%2F%2Fwww.microchip.com%2Fdesign-centers%2Finternet-o…
Atmel STARThttps://www.element14.com/community/external-link.jspa?url=http%3A%2F%2Fstart.atmel.com%2F
Sensor Node Example Pagehttps://www.element14.com/community/external-link.jspa?url=https%3A%2F%2Favr-iot.com%2F
Google Cloud IoT Corehttps://www.element14.com/community/external-link.jspa?url=https%3A%2F%2Fcloud.google.com%2Fiot-core%2F
Getting started with the AVR-IoT https://www.leverege.com/blogpost/avr-iot-guide-pushing-data-to-cloud
Example app GitHub pagehttps://www.element14.com/community/external-link.jspa?url=https%3A%2F%2Fgithub.com%2FLeverege%2Fmicrochip-avr-iot
ATWINC1500 Homepagehttps://www.microchip.com/wwwproducts/en/ATWINC1500
AVR-IoT Board Firmware - Microchip GitHubhttps://github.com/MicrochipTech/AVR-IoT_WG_Sensor_Node
Anonymous
  • Hi Allen, Thanks for taking a look!  I was very late getting this review done which will be why you missed it - I have also had issues trying to publish it, the version as of today (1st Jan) is not my final version but I am currently unable to update it without getting an error.  There are some big gaps at the end.  Hopefully the development team will take a look tomorrow and it should be updated in the next couple of days.

  • Thanks for updating this on New Year's Eve, I missed this roadtest when it originally was done.  But I was a newbie then, it's much more useful to me now.  The price per performance/features of this board looks good.