Fast Prototyping of BLE Sensors for AWS Cloud Using the ATmega4809 Curiosity Nano Development Platform

2021-10-27 Microchip Application note & Design Guide English
●This application note describes how to use the ATmega4809 Curiosity Nano Development Platform to create a low-power BLE (Bluetooth® Low Energy) sensor node that connects to the Amazon Web Services (AWS) Cloud through a gateway. This document includes a detailed tutorial and links to a GitHub repository containing the documented code.
The sensor edge node is controlled by the ATmega4809 microcontroller, a robust, low-power microcontroller engineered for real-time control applications. To prototype the sensor node, the ATmega4809 Curiosity Nano was used in conjunction with the Curiosity Nano Base for click boards™, which has three mikroBUS™ slots. These mikroBUS sockets are used to connect the RN4870 click board, which incorporates a Microchip RN4870 Bluetooth Low Energy module, as well as the Weather click board, which contains a BME280 sensor to provide humidity,temperature, and pressure readings. The application is intended to be an off-the-shelf system – each of the components is designed for seamless prototyping on the Curiosity Nano Platform and can quickly be configured in software through MPLAB® Code Configurator (MCC).
When the application starts, the microcontroller creates three public characteristics for pressure, temperature, and humidity data in the BLE module for the sensor data. The microcontroller reads the data from the sensor every five seconds and updates the characteristics with the respective values. A gateway is required to transmit the information to the cloud. The gateway establishes a connection with the BLE module of the end node and connects to the cloud services from a local Internet network through Ethernet or Wi-Fi®. Every five seconds, the gateway reads the characteristics and publishes the data to the cloud.
A Raspberry Pi® (RPi) 3 Model B+ board is used as a gateway since it incorporates BLE, Wi-Fi, and Ethernet modules, and it is easy to use and provides good documentation.
AWS is used for cloud services. It provides a gateway core software called AWS IoT Greengrass that allows the users to interact with the cloud. Publishing and subscription to topics can be done just by utilizing Application Programming Interfaces (API) in Lambda.
The source code for peripherals used in the microcontroller is generated using MCC. The code generator creates the structure of the project, the files, and the source code. MCC provides support for every peripheral and development extension boards such as the RN4870 click board.
The following GitHub repository contains the project source code for the ATmega4809 Curiosity Nano board together with the Lambda used by the gateway to read characteristics and publish the data to the cloud.
●This application note explains how to obtain the hardware and software configurations required by the BLE Internet of Things (IoT) project. The functionality of the example project and the AWS configurations are also detailed here.
In the example project, the featured device reads pressure, temperature, and humidity data from the weather sensor.
The sensor sends data through an I2C interface, and a five-second reading interval is used for transmitting the data to the cloud. The device exchanges information with the RN4870 BLE device through the USART interface and starts creating services and characteristics for the sensor and updates them after every reading.
The Raspberry Pi board connects to the BLE device, reads the characteristics, and, using the Greengrass core,publishes the data to the cloud. Greengrass is a gateway software provided by AWS capable of using the hardware components of the Raspberry Pi board. Thus, the gateway core can interact with nearby BLE node devices and can provide secure communication to the cloud. ●Prerequisites:
■Integrated Development Environment (IDE):
▲Atmel Studio v7 with the latest device packages installed.
▲MPLAB® X v5.30 with XC8 v2.10 compiler (used in this project).
◆MCC version 3.85.
◆AVR8 Peripheral Library AVR® microcontroller version 2.0.1.
■Microchip ATmega4809 Curiosity Nano development board
■Microchip Curiosity Nano Base for click boards™
■BLE RN4870 click board from MikroE
■Raspberry Pi 3 Model B+
■Weather click board from MikroE
■Amazon Web Services (AWS) Account
世强硬创平台www.sekorm.com
世强硬创平台电子商城www.sekorm.com/supply/
世强硬创平台www.sekorm.com
世强硬创平台www.sekorm.com
- The full preview is over. If you want to read the whole 28 page document ,please Sign in/Register -
Download Documentation will be sent to the business email and automatically synchronized to all devices for easy management
  • +1 Like
  • Add to Favorites

All reproduced articles on this site are for the purpose of conveying more information and clearly indicate the source. If media or individuals who do not want to be reproduced can contact us, which will be deleted.

Recommend

Getting Started with the SAMRH71 Microcontroller

March 2020  - Application note & Design Guide

SAMRH71

Manipulating the Stack of the PIC18 Microcontroller

3/01/02  - Application note & Design Guide

PIC18

SAMD Microcontroller Family

8/17  - Datasheet

SAMD,SAMD FAMILY,SAMD20E14A-MUT,SAM D20,SAM D10,SAM D21,SAM D11

PIC18F24/25Q24 28-Pin, Low-Power, High-Performance Microcontroller with XLP Technology

06/2024  - Datasheet

PIC18-Q24,PIC18F24Q24,PIC18F26Q24,PIC18F56Q24,PIC18F25Q24,PIC18F55Q24,PIC18F46Q24,PIC18-Q24 FAMILY,PIC18F45Q24

Using the AT89C2051 Microcontroller as a Virtual Machine

2020/04/14  - Application note & Design Guide

AT89C2051,AT24C64

PIC12F629/675 Microcontroller Family

08/01/02  - Datasheet

PIC12F675,PIC12F629

Migration from the megaAVR® to AVR® Dx Microcontroller Families

11/2020  - Application note & Design Guide

AVR128DB48,AVR128DA28,AVR128DB28,AVR128DA48,AVR128DA64,ATMEGA128,AVR128DB64,AVR32DB28,AVR64DA64,AVR64DB64,AVR32DB32,AVR32DA32,ATMEGA64,AVR DX FAMILY,AVR64DA28,AVR64DB28,AVR64DA48,AVR64DB48,AVR128DA32,AVR128DB32,AVR64DA32,MEGAAVR,ATMEGA32,AVR32DA28,AVR32DB48,AVR32DA48,MEGAAVR FAMILY,ATMEGA16,AVR64DB32

PIC16F15256/74/75/76 28/40-Pin Microcontrollers DataSheet

03/2021  - Datasheet

PIC16F152 FAMILY,PIC16F15256,PIC16F15276 T-I/PT,PIC16F152,PIC16F15276,PIC16F15256 T-E/SP,PIC16F15274,PIC16F15275

PIC16(L)F191XX microcontrollers Data Sheet

06/23/16  - Datasheet

PIC16(L)F19176,PIC16(L)F19155,PIC16(L)F19156,PIC16(L)F19195,PIC16(L)F19185,PIC16(L)F19196,PIC16(L)F19175,PIC16(L)F19186,PIC16(L)F19197

Interfacing Serial EEPROMs with 8-Bit PIC® Microcontrollers

07/14/15  - Application note & Design Guide

8-BIT PIC® MICROCONTROLLERS

PIC16F15225/45 Full-Featured 14/20-Pin Microcontrollers DataSheet

09/2020  - Datasheet

PIC16F15225,PIC16F15214,PIC16F15245,PIC16F15223,PIC16F15256,PIC16F15213,PIC16F15224,PIC16F152,PIC16F152 FAMILY,PIC16F15243,PIC16F15254,PIC16F15276,PIC16F15244,PIC16F15255,PIC16F15274,PIC16F15275,PIC16F15245 T-I/REB,X-X/XX,PIC16F15225 T-E/ST

PIC16(L)F18857/77 Full-Featured 28/40/44-Pin Microcontrollers

09/2020  - Datasheet

PIC16F18857,PIC16LF18854,PIC16LF18876,PIC16LF18875,PIC16F18875,PIC16F18854,PIC16F18876,PIC16F18877,PIC16F18855,PIC16F18856,PIC16LF18856,PIC16LF18877,PIC16LF18855,PIC16LF18857

ATA8741 Microcontroller with UHF ASK/FSK Transmitter

09/14  - Datasheet

ATA8741,ATA8401,ATA8203,ATA8201,ATA8404

Functional Safety Ready Microcontrollers

2021/05/17  - Quick Reference Guide

ATTINY41X,ATTINY81X,PIC16F183XX,DSPIC33CH128MP508,AVR DA,AVR DB,ATMEGA320X,DSPIC33CK64MC105,ATMEGA88,ATTINY162,SAM V71,SAM V70,ATMEGA168,ATTINY82X,SAM D51,DSPIC33CK64MP105,ATTINY322,DSPIC33CK256MP508,DSPIC33,DSPIC33CH512MP508,SAM DA1,SAM C21N,PIC32MZ EF,SAM C20,SAM C21,AVR,SAM,ATTINY321X,PIC18F2XK83,ATMEGA80X,PIC32,PIC16F188XX,PIC16F184XX,DSPIC33EP128GS808,ATMEGA324PB,ATTINY45,ATMEGA160X,SAM C20N,ATMEGA328PB,PIC18FXXQ43,PIC18FXXK42,PIC32MK MC,SAM E5X,PIC32MZ DA,ATTINY40X,DSPIC33EV256GM106,ATTINY80X,ATTINY160X,PIC,PIC16F152XX,ATMEGA480X,PIC18FXXQ10,SAM L21,PIC32MK GP,ATTINY161X,SAM D20,SAM D21

More

Electronic Mall

More

Manufacturer:Powlicon

Category:Buck/Boost Charger

Auth. Dist.

Manufacturer:ETEK

Category:Sensors

Auth. Dist.

Unit Price:$0.1127

Manufacturer:PHATEN

Category:WIFI+BT模块

Auth. Dist.

Manufacturer:PHATEN

Category:WIFI+BT模块

Auth. Dist.

Manufacturer:GXCAS

Category:High-Accuracy Digital Temperature Sensor IC

Auth. Dist.

In Stock:94

Manufacturer:GXCAS

Category:High-Accuracy Digital Temperature Sensor IC

Auth. Dist.

Manufacturer:GXCAS

Category:High-Accuracy Digital Temperature Sensor IC

Auth. Dist.

Manufacturer:ETEK

Category:Magnetic Sensors

Auth. Dist.

Unit Price:$0.1890

Manufacturer:ETEK

Category:Magnetic Sensors

Auth. Dist.

Unit Price:$0.2700

Manufacturer:ETEK

Category:Sensors

Auth. Dist.

Unit Price:$0.2677

Manufacturer:Powlicon

Category:Buck/Boost Charger

Auth. Dist.
RFQ

Manufacturer:ETEK

Category:Sensors

Auth. Dist.

Unit Price:

RFQ

Manufacturer:PHATEN

Category:WIFI+BT模块

Auth. Dist.
RFQ

Manufacturer:PHATEN

Category:WIFI+BT模块

Auth. Dist.
RFQ

Manufacturer:GXCAS

Category:High-Accuracy Digital Temperature Sensor IC

Auth. Dist.

In Stock:

RFQ

Manufacturer:GXCAS

Category:High-Accuracy Digital Temperature Sensor IC

Auth. Dist.
RFQ

Manufacturer:GXCAS

Category:High-Accuracy Digital Temperature Sensor IC

Auth. Dist.
RFQ

Manufacturer:ETEK

Category:Magnetic Sensors

Auth. Dist.

Unit Price:

RFQ

Manufacturer:ETEK

Category:Magnetic Sensors

Auth. Dist.

Unit Price:

RFQ

Manufacturer:ETEK

Category:Sensors

Auth. Dist.

Unit Price:

RFQ
connect

Contact Us

E-mail:contact@sekorm.com

Tel: +86 954668/400-830-1766