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
Azure Sphere Starter Kit
  • Products
  • Dev Tools
  • Avnet Boards Community
  • Azure Sphere Starter Kit
  • More
  • Cancel
Azure Sphere Starter Kit
Blog Azure Sphere Shipping Container Security Device
  • Blog
  • Forum
  • Documents
  • Events
  • Polls
  • Files
  • Members
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
Join Azure Sphere Starter Kit to participate - click to join for free!
  • Share
  • More
  • Cancel
Group Actions
  • Group RSS
  • More
  • Cancel
Engagement
  • Author Author: kurst811
  • Date Created: 1 Dec 2019 7:02 AM Date Created
  • Views 1262 views
  • Likes 6 likes
  • Comments 2 comments
  • sensing the world project
Related
Recommended

Azure Sphere Shipping Container Security Device

kurst811
kurst811
1 Dec 2019

    • Overview
    • Prerequisite
    • Bill Of Material
    • Wiring
    • Configure IoT Central Hub
    • Setting Azure Cloud Services
    • App Implementation
    • Compiling Command
    • Final Product
    • Demo

 

Overview

 

image

The monitoring of incoming cargo into US ports and roadways is of vital importance for a multitude of security and economic reasons. Cargo shipments can be subject to problems such as theft, tampering, or being used to smuggle contraband without the knowledge of the shipper.

The Azure Sphere Shipping Container Security Device is a portable security device that will be mounted inside the doors of a container and will be used to continuously monitor for unauthorized door access, unauthorized relocation of the container outside the facility , and detect breaches to any of the six walls of a container.

Prerequisite

These thing need to be setup for a working Azure Sphere development environment.

  • Installing Azure SDK
  • Setting Up IoT Central Hub

 

Bill Of Material

  • Hardware
    • Azure Sphere Starter Kit
    • Anker Portable Charger
    • Ublox Neo M8N GPS
    • Seed Grove - Vibration Sensor
    • HC-SR505 PIR Motion Sensor
    • SHT15 Temperature Sensor

 

  • Software
    • Visual Studio 2017
    • React Native

 

image

 

Wiring

image

 

 

Configure IoT Central Hub

Once the IoT Central Hub and had been set up with the Azure Sphere MT3620, create the following interfaces in device template :

  • Temperature
  • Latitude
  • Longitude
  • Vibration
  • Infrared

image

 

Then go to view and create five chart as below. These chart will help to visualize Azure Sphere data over time.

image

 

 

Azure Sphere MT3620 Implementation

  • 1. GPS
    • The first sensor that I interface the MT3620 is the GPS. For GPS, I used UART protocol to get the data from the GPS module. Below is the function for GPS:

 

  • 2.Grove Sensor Vibration
    • Next , I configure the Grove Vibration Sensor with I2C protocol. The output is an analog value from 0-3.3V which i scale to 0-100. In my system, anything above 60 is consider major vibration and could be a possible breach.

 

  • 3.Temperature Sensor
    • Temperature Sensor is also use I2C protocol. The process is similar to Vibration Sensor but the register address is changed.

 

  • 4.PIR Motion Sensor
    • The motion sensor implementation is simple. The senor output a high (3.3V) if there detection of human presence and a low (0V) if there no detection. I connect the output of the PIR Motion Sensor to a PWM pin on the MT3620. The simply just check the pin value and send a 1 or 0 based on the pin voltage level.

 

  • 5.Sending Data
    • To send data from the MT3620 to the Azure sphere, I create a function that format data to IoT Central Hub protocol and send it to the Hub via Internet. The function is show below.
    • As an example, i create a function called SendTemp that send Temperature value at an interval of 500ms using the SendTelemetry function.
    • The important part here is that the you must set the data the same as the name you set in IoT Central Hub or else it won't get recognized. The full code is in the repo link below. The code is compile and build using Visual Studio 2017. Once the whole project is uploaded to the MT3620, the graph in IoT Central Hub in the device section will begin display data as show below.

 

Setting Azure Cloud Services

 

For this project, I used the Azure Cloud Services to create an Azure Event Hubs to store the data from the IoT Central Hub. The Azure Event Hubs are going to serve as a cloud storage platform where my app going to pull data that the MT3620 send out. First, I set up an Azure Event Hubs as show below :
image
Then I go and find the primary key connection string-primary key. These number going to be used to link with the Azure IoT Central Hub and the phone app.
image
Then enter the connection primary-key into the Azure IoT Central Hub in the data export section.
image

App Implementation

The android app is made using React Native for ease of cross-platform between ios and android. The main point key thing in this app is the need to set up the Azure Event Hubs. Once the Azure Event Hub is configure correctly and filled with data, I used the following line to import the data.

 

import Azure from "iotc-1e97f318-f85b-42fa-88f8-4f27f7d5a85d.azure-devices.net"

 

The URL come directly from the Azure Sphere Event Hub primary-key link. For example, I used the key in Detect.js which is a page that use infrared data to detect human presence. The code is show below with usage of Azure Event Hub API.

 

Compiling Command

  • 1.Android App
    • To compile the Azure Android App you must have React Native install and a working android phone connected to your computer.
    • To compile the firmware you must have VS2017 with Azure Sphere SDK install. Launch the .sln file in AzureFirmware folder and press F5 to compile.

 

 

 

Final Product

 

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

 

Demo

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

  • Sign in to reply
  • bwilless
    bwilless over 5 years ago

    Nice job!

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • xeonaj
    xeonaj over 5 years ago

    Great project! But I have totally messed up with mine -> Sensing and securing valuables with Azure Sphere

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • More
    • Cancel
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