element14 Community
element14 Community
    Register Log In
  • Site
  • Search
  • Log In Register
  • About Us
  • Community Hub
    Community Hub
    • What's New on element14
    • Feedback and Support
    • Benefits of Membership
    • Personal Blogs
    • Members Area
    • Achievement Levels
  • Learn
    Learn
    • Ask an Expert
    • eBooks
    • element14 presents
    • Learning Center
    • Tech Spotlight
    • STEM Academy
    • Webinars, Training and Events
    • Learning Groups
  • Technologies
    Technologies
    • 3D Printing
    • FPGA
    • Industrial Automation
    • Internet of Things
    • Power & Energy
    • Sensors
    • Technology Groups
  • Challenges & Projects
    Challenges & Projects
    • Design Challenges
    • element14 presents Projects
    • Project14
    • Arduino Projects
    • Raspberry Pi Projects
    • Project Groups
  • Products
    Products
    • Arduino
    • Avnet Boards Community
    • Dev Tools
    • Manufacturers
    • Multicomp Pro
    • Product Groups
    • Raspberry Pi
    • RoadTests & Reviews
  • Store
    Store
    • Visit Your Store
    • Choose another store...
      • Europe
      •  Austria (German)
      •  Belgium (Dutch, French)
      •  Bulgaria (Bulgarian)
      •  Czech Republic (Czech)
      •  Denmark (Danish)
      •  Estonia (Estonian)
      •  Finland (Finnish)
      •  France (French)
      •  Germany (German)
      •  Hungary (Hungarian)
      •  Ireland
      •  Israel
      •  Italy (Italian)
      •  Latvia (Latvian)
      •  
      •  Lithuania (Lithuanian)
      •  Netherlands (Dutch)
      •  Norway (Norwegian)
      •  Poland (Polish)
      •  Portugal (Portuguese)
      •  Romania (Romanian)
      •  Russia (Russian)
      •  Slovakia (Slovak)
      •  Slovenia (Slovenian)
      •  Spain (Spanish)
      •  Sweden (Swedish)
      •  Switzerland(German, French)
      •  Turkey (Turkish)
      •  United Kingdom
      • Asia Pacific
      •  Australia
      •  China
      •  Hong Kong
      •  India
      •  Korea (Korean)
      •  Malaysia
      •  New Zealand
      •  Philippines
      •  Singapore
      •  Taiwan
      •  Thailand (Thai)
      • Americas
      •  Brazil (Portuguese)
      •  Canada
      •  Mexico (Spanish)
      •  United States
      Can't find the country/region you're looking for? Visit our export site or find a local distributor.
  • Translate
  • Profile
  • Settings
Hardware Hacking
  • Challenges & Projects
  • Project14
  • Hardware Hacking
  • More
  • Cancel
Hardware Hacking
Blog Thermal Imaging with AWS IOT
  • Blog
  • Forum
  • Documents
  • Events
  • Polls
  • Files
  • Members
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
Join Hardware Hacking to participate - click to join for free!
  • Share
  • More
  • Cancel
Group Actions
  • Group RSS
  • More
  • Cancel
Engagement
  • Author Author: foozhiqin
  • Date Created: 12 Jul 2020 7:23 AM Date Created
  • Views 1407 views
  • Likes 3 likes
  • Comments 0 comments
  • hardwarehackch
Related
Recommended

Thermal Imaging with AWS IOT

foozhiqin
foozhiqin
12 Jul 2020

image

Introduction

To provide low cost thermal image solution with Panasonic's AMG8833AMG8833 8x8 IR Grid-Eye detector, ESP32 , AWS IOT and serverless infrastructure.

 

image

 

Use case scenario

  • Wild Fire alert
  • Security with object detection
  • Object maintenance monitoring
  • Health temperature screening

Setup

  1. Device
    • Components
      • ESP32 SOC
      • Panasonic's AMG8833AMG8833 8x8 IR Grid-Eye
      • Sensor connectivity
        • I2C
      • Software Development
        • Arduino platform
        • Library dependency
          • Adafruit_AMG88xx
          • MQTTClient
          • ArduinoJson
          • AWS Cert
          • WiFi

      
    2. AWS Service

    • AWS IOT
      • Create thing
      • Create policy
      • Create certificate
      • Configure IoT rules engine
      • Create IoT rules role
      • Create SNS Topic
    • AWS Lambda
      • Create Lambda execution role policy
      • Perform Image processing
      • Persist thermal image to S3
      • Save sensor data to DynamoDB
    • AWS Storage
      • Setup new S3 bucket
      • Setup DynamoDB table

Solution Overview

 

OnPrem

 

Leverage on the WIFI capability of ESP32, this board will first make the connectivity to the AWS IOT network with 3 certificates issued during AWS thing registration

  1. A certificate for this thing
  2. A private key
  3. A root CA for AWS IoT  

 

All 3 certs can be defined in a single certs.h file and imported into core Arduino program for MQTT client to initiate the connection with AWS IOT endpoint.

Once the connectivity is established, I will be calling Adafruit_AMG88xx readPixels() api to retrieve the reading of IR Infrared 8*8 Array(refer to data key below) from the AMG8833AMG8833 sensor.

 

I also utilize ArduinoJson library to help us on Json serialization. The sensor key is set to name of sensor and batch key is set to current unix timestamp. The combination of both will be the key for DynamoDB record.

{

"sensor": "amg8833",

"batch_key": 1593735768,

"data": ['21.2', '21.0', '21.0', '21.8', '21.5', '21.0', '21.5', '20.5',

          '21.8', '21.8', '22.0', '21.5', '21.5', '21.8', '21.5', '21.8',

          '21.8', '22.0', '21.5', '22.0', '21.8', '21.8', '21.5', '21.5',

          '21.2', '21.8', '21.8', '21.8', '22.2', '21.8', '21.8', '22.0',

          '21.5', '22.0', '22.0', '22.2', '22.2', '22.0', '21.8', '21.0',

          '21.5', '22.0', '22.2', '22.5', '21.5', '21.5', '21.8', '21.5',

          '21.8', '21.8', '22.2', '22.0', '22.0', '21.2', '21.8', '21.2',

          '22.0', '21.8', '23.2', '22.2', '21.8', '22.0', '22.0', '21.0']

}

 

A local counter is also defined in the program so that we can control the frequency to publish MQTT topic.

 

On Cloud

 

AWS IoT rule is setup listening to the MQTT topic of IOT endpoint. Every message received in the topic will trigger to push SNS notification.

 

image

We setup our lambda to subscribe the SNS topic.

 

image

 

Lambda logic is written with Python 3.8.

 

I built a heatmap function to first construct a colour gradient range from 0(Blue)  to 1023(Red) and map to the 8*8 matrix received from sensor.

The next step I use cubic interpolation to help us to convert from original low resolution 8*8 pixels into 32*32 pixels .

Finally to use the Python Image Library (PIL) to resize with anti-aliasing and flip the image before saving into S3 bucket.

 

Once the image data is successfully process,  the thermal image is persisted into s3 bucket as JPEG and each of the sensor record is also saved into the DynamoDB.

image

You don't have permission to edit metadata of this video.
Edit media
x
image
Upload Preview
image

  • Sign in to reply
element14 Community

element14 is the first online community specifically for engineers. Connect with your peers and get expert answers to your questions.

  • Members
  • Learn
  • Technologies
  • Challenges & Projects
  • Products
  • Store
  • About Us
  • Feedback & Support
  • FAQs
  • Terms of Use
  • Privacy Policy
  • Legal and Copyright Notices
  • Sitemap
  • Cookies

An Avnet Company © 2025 Premier Farnell Limited. All Rights Reserved.

Premier Farnell Ltd, registered in England and Wales (no 00876412), registered office: Farnell House, Forge Lane, Leeds LS12 2NE.

ICP 备案号 10220084.

Follow element14

  • X
  • Facebook
  • linkedin
  • YouTube