How to Quickly Connect and Send IoT Data Straight to the Cloud and Access it Remotely

著者 Bill Giovino

Digi-Keyの北米担当編集者 の提供

Many developers are building Internet of Things (IoT) projects that need to connect to the cloud for data storage, remote access, and more recently data analytics services. However, developers struggle to find the most efficient and secure means to make that connection.

This article will describe how to use the Google Cloud evaluation board from Microchip Technology as an IoT sensor endpoint to connect to Google’s Cloud IoT platform. This will allow the board to store data that can be read from anywhere using a simple browser-based interface.

Getting started with cloud storage

For an embedded IoT endpoint, getting started with cloud hosting requires a cloud server with the required secure connectivity and software. The Google Cloud Platform (GCP) provides this. Also, the embedded IoT endpoint must have firmware that allows the endpoint to be controlled remotely. Microchip Technology simplified the development process by providing all the necessary software with the AC164160 AVR-IoT cloud evaluation board.

Image of Microchip AVR-IoT cloud evaluation board

Figure 1: The Microchip AVR-IoT cloud evaluation board is a complete IoT endpoint that a developer can use to quickly connect a project to a Google Cloud IoT server. (Image source: Microchip Technology)

While the AVR-IoT board is appropriate for an IoT endpoint, a close examination of its operation also demonstrates how IoT endpoints and cloud computing works.

Operation of the AVR-IoT board

The board is configured to connect to a Google Cloud server over Wi-Fi. Once a server connection is established, data can be stored and displayed in real time.

The board’s components were chosen to optimize for low power, making it ideal for a battery powered IoT endpoint. The microcontroller is a Microchip ATMEGA4808-MFR 8-bit AVR® processor running at 20 megahertz (MHz) that draws 8.5 milliamperes (mA). In Standby Mode, with only the real-time clock (RTC) running, it draws 690 nanoamperes (nA).

The microcontroller controls the board and interfaces to all the sensors and LEDs. The core is supported by 48 Kbytes of flash, 6 Kbytes of SRAM, and 256 bytes of EEPROM. The EEPROM is used to store Wi-Fi connectivity data. A two-cycle hardware multiplier saves power by reducing CPU cycles.

The ATMEGA4808 has a full complement of peripherals, including four 16-bit timers, three USARTs, an SPI interface and an analog comparator, making it well suited for low power IoT sensor endpoint applications.

For Wi-Fi connectivity the ATMEGA4808 connects via the SPI serial port to a Microchip Technology ATWINC1510-MR210UB1961 2.4 gigahertz (GHz) 802.11 b/g/n IoT Wi-Fi module (Figure 2). It is completely self-contained and supports WEP, WPA, and WPA2 security. It features an integrated antenna to help developers who may not be RF antenna layout experts get started. It also supports an external antenna if additional range is needed. Encrypted connections are supported with TLS.

Image of Microchip Technology WINC1510 Wi-Fi module

Figure 2: The Microchip Technology WINC1510 Wi-Fi module has a footprint of 21.7 millimeters (mm) x 14.7 mm and supports 2.4 GHz 802.11 b/g/n wireless access points. It connects to a host microcontroller over an SPI serial port. (Image source: Microchip Technology)

The WINC1510 operates off a 2.7 volt to 3.6 volt supply and draws 290 mA when operational. A Doze Mode powers down the device while saving all settings. In this mode, the module draws 380 microamperes (µA), which is useful for very-low-power applications that turn the radio on and off, such as beacon monitoring. The WINC1510 features the ability to  connect to a Wi-Fi access in 150 milliseconds (ms). The complete interface to a host microcontroller uses eight pins: a four-wire SPI slave interface and four GPIOs for control signals. The module has all certifications for use in the Americas, Europe, and Asia. This greatly simplifies the process of getting FCC approval for the final design.

The AVR-IoT board has a footprint of 63.5 mm x 25.4 mm and connects to a PC over a USB cable for both power and data. Windows, Linux, and MacOS are supported. When powered, the board’s four LEDs (blue, green, yellow, and red) will flash in sequential order from left to right twice to indicate the board is operating properly.

The board appears like a flash memory stick to the PC and will show five files. To connect to the internet, the developer clicks the file appropriately named CLICK-ME.HTM. This brings up a page in the default browser that allows the developer to connect to local Wi-Fi (Figure 3).

Image of Microchip AVR-IoT board

Figure 3: The Microchip AVR-IoT board is connected to a local Wi-Fi network by entering the Wi-Fi access point information in the lower left of this CLICK-ME.HTM file. (Image source: Microchip Technology)

After entering the network name, selecting the network type, and entering the password, the blue LED will light up indicating the board is connected to the local Wi-Fi network. Soon after, the green LED will light, indicating the board is connected to the Google Cloud server. Each time the board sends data to the Google Cloud server, the yellow LED will flash. All information sent between the AVR-IoT and the Google Cloud server is encrypted.

IoT, encrypted connections, and data encryption

Internet traffic between points runs over a secure connection that is typically encrypted using Transport Layer Security (TLS). However, it’s still possible for a hacker to find a flaw in the encrypted connection and capture the data by launching a “man-in-the-middle attack”. To prevent a design from falling victim to such an attack, the data also needs to be encrypted, typically using AES or SHA encryption standards.

To encrypt the data transmitted to the Google Cloud, the AVR-IoT comes with a Microchip Technology ATECC608A-MAHCZ-T Security CryptoAuthentication™ chip which interfaces to the AVR microcontroller though an I2C interface. The ATECC608A is a cryptographic memory chip that supports a number of encryption standards, including AES-128 and SHA-256. It is used to store the public and private keys used for communicating with the Google Cloud server.

Each ATECC608A in every AVR-IoT comes pre-programmed from Microchip Technology with its own unique public and private keys. The private key in the ATECC608A is in secure storage and cannot be revealed, even if the I2C interface is monitored and logged with a logic analyzer. The public key is revealed in the URL sent to the Google Cloud, and is also in a file PUBKEY.TXT that can be read by the USB interface of the host PC connected to the AVR-IoT. Detailed operation of the ATECC608A is available from Microchip Technology only under a non-disclosure agreement.

However, the firmware in the ATMEGA4808 microcontroller in the AVR-IoT comes configured to efficiently use the ATECC608A in a secure Google Cloud project. This makes the details of the cryptographic functions of the ATECC608A mostly transparent to the developer, greatly simplifying and accelerating development.

For high security IoT endpoints, the ATECC608A protects both the application and itself. It is highly resistant to physical hacking and can detect and protect against many side-channel attacks such as applying extreme cold to maintain memory contents, or an unusually fast or slow I2C clock. It can also detect attempts to decap the device to examine its internal architecture. The internal memory contents of the device are also encrypted. The ATECC608A also may contain confidential security mechanisms known only to Microchip Technology engineers.

Working with the Google Cloud IoT server

After the AVR-IoT connects to the Google Cloud IoT server it begins exchanging data. The AVR-IoT contains both a light and a temperature sensor. Data from these sensors is sent to the Google Cloud server and can be displayed in real time (Figure 4). To view the data from any browser, the developer needs to enter the following URL:{publickey}

Where {publickey} is the public key assigned to the AVR-IoT board.

The Google Cloud server used is a demo sandbox account, so data sent from the AVR-IoT to the Google Cloud is not stored permanently and is erased when the connection to the server is broken.

Image of Google Cloud IoT server

Figure 4: The webpage served from the Google Cloud IoT server can display the temperature and light sensor data collected from the AVR-IoT. (Image source: Microchip Technology)

For a more full-featured cloud server, the AVR-IoT kit contains instructions for upgrading to a private Google Cloud account. With a private Google Cloud account, a developer can store information permanently on the Google Cloud for later use. A developer can also build a web interface on the private Google Cloud that can communicate with the AVR-IoT, allowing the web interface to host applications online that can send commands to custom firmware on the board. The developer can, for example, control any of the GPIO pins on the ATmega4808 from anywhere in the world, which can be connected to electronic equipment.


While there are many books and websites that explain cloud storage, access, and usage, it’s often easiest to learn by example. The Microchip AVR-IoT board makes connecting to the cloud easy while demonstrating the basics of cloud storage, encryption, and IoT endpoint control.

免責条項:このウェブサイト上で、さまざまな著者および/またはフォーラム参加者によって表明された意見、信念や視点は、Digi-Key Electronicsの意見、信念および視点またはDigi-Key Electronicsの公式な方針を必ずしも反映するものではありません。


Bill Giovino

Bill Giovino氏は、シラキュース大学のBSEEを持つエレクトロニクスエンジニアであり、設計エンジニアからフィールドアプリケーションエンジニア、そしてテクノロジマーケティングへの飛躍に成功した数少ない人の1人です。

Billは25年以上にわたり、STMicroelectronics、Intel、Maxim Integratedなどの多くの企業のために技術的および非技術的な聴衆の前で新技術の普及を楽しんできました。STMicroelectronicsでは、マイクロコントローラ業界での初期の成功を支えました。InfineonでBillは、同社初のマイクロコントローラ設計が米国の自動車業界で勝利するように周到に準備しました。Billは、CPU Technologiesのマーケティングコンサルタントとして、多くの企業が成果の低い製品を成功事例に変えるのを手助けしてきました。

Billは、最初のフルTCP/IPスタックをマイクロコントローラに搭載するなど、モノのインターネットの早期採用者でした。Billは「教育を通じての販売」というメッセージと、オンラインで製品を宣伝するための明確でよく書かれたコミュニケーションの重要性の高まりに専心しています。彼は人気のあるLinkedIn Semiconductorのセールスアンドマーケティンググループのモデレータであり、B2Eに対する知識が豊富です。