element14 Community
element14 Community
    Register Log In
  • Site
  • Search
  • Log In Register
  • 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 & Tria Boards Community
    • Dev Tools
    • Manufacturers
    • Multicomp Pro
    • Product Groups
    • Raspberry Pi
    • RoadTests & Reviews
  • About Us
    About the element14 Community
  • 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
      •  Japan
      •  Korea (Korean)
      •  Malaysia
      •  New Zealand
      •  Philippines
      •  Singapore
      •  Taiwan
      •  Thailand (Thai)
      •  Vietnam
      • 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
Connected Cloud Challenge
  • Challenges & Projects
  • Design Challenges
  • Connected Cloud Challenge
  • More
  • Cancel
Connected Cloud Challenge
Blog An Intelligent Mailbox: Summary of the Challenge #10
  • Blog
  • Forum
  • Documents
  • Polls
  • Files
  • Events
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
  • Share
  • More
  • Cancel
Group Actions
  • Group RSS
  • More
  • Cancel
Engagement
  • Author Author: saicheong
  • Date Created: 9 May 2020 4:01 PM Date Created
  • Views 793 views
  • Likes 4 likes
  • Comments 0 comments
  • fram
  • mailbox
  • aws
  • psoc 6
  • cloud
  • dog
  • i2s
  • ios
  • iot
  • pdm
  • cypress
Related
Recommended

An Intelligent Mailbox: Summary of the Challenge #10

saicheong
saicheong
9 May 2020

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

*updated 24-May-2020 for Angry dog sound classification #11

Introduction

In this challenge, the target is by build a prototype of intelligent mailbox, to study how Cypress PSOC6 and AWS cloud can be simplify of iOT both hardware, administration and support costs.

 

In traditional IoT solution, normally with a MQTT broker served for a server role to obtain, admin and process of client data, if number of "Things" increase, the system become hard to manage. An IOT project is easy to engage such many things, for example, detect soil moisture of agriculture is easy require few hundred sensors for a farmer, make it scale like a mid-size network.

 

The AWS Cloud solution, not only become the MQTT broker, it also fully integrated with AWS cloud resources,  the pay-as-you-go also reduce the product initial investment without require excess hardware facility to provide reliability IOT solution.

 

In our project, by use of AWS IoT shadow, Cognito, S3 storage and a lambda function to serve multi user, multi intelligent mailboxs and the mobile APP clients without investment of server, eliminate of hardware and support as well as enjoy high reliabilty AWS framework.

 

Block Diagrams

image

Above show the intelligent mailbox software components involved.

image

In additional of Cypress Pioneer Kit and the TFT shield, only a green led for mail detection is used.

 

For develop platform we run:

 

1. Mbed CLI

2. ModusToolbox 2.1

3. Xcode 11.4

 

Brief of the system working flow

 

Our System with three main parts, the cypress kit, AWS IoT Cloud and IOS APP:

Cypress

  1. Initiation of Mic Sound Card, WIFI and NTP,  Motion sensors, Analog Input of Light Sensors
  2. Initiation of FRAM and retrieve last status
  3. Initialtion emwin LCD display
  4. Setup WIFI connection
  5. Start up AWS IoT MQTT, subscribe to shadow get and productmetadata
  6. Retrieve AWS shadow status
  7. A separated thread for AWSIoT network transfer, included read FRAM sound data for stream and publishing shadow, handling IOS APP pairing, when idle wait of subscribe incoming.
  8. main thread enter to 20ms forever loop for :
    • Capsense read
    • Sensor read
    • Sound recorder control
    • RTC update

   9. Seperated thread for LCD update, which serve the main / awsiot thread for display task by event query

10. PDM MIC and I2S SOUND Interrupt for save data to RAM buffer, forwarding sound clip up to 12s under FRAM, only very small RAM buffer is required thanks of fast FRAM.

 

AWS IoT Cloud

  1. Security access managed MQTT broker
  2. Working for AWS shadow, provide two way synchronisation between IOS APP and Cypress Device
  3. Congnito user login for APP
  4. Kinesis stream for sound
  5. S3 Storage for storage sound clip recorded by cypress kit
  6. Lambda python function reconstruct sound steam, add wav header, build Transcribe job and publish result back to IOS APP and Cypress Kit
  7. Run under SageMaker for recognition of sound to classfield is or is not angry dog, if angry dog sound recognised, push alarm wav to IoT device and play it.

 

IOS APP

  1. Login Control by Congnito
  2. Pairing between the Kits (individual mailbox) and APP
  3. Control Cypress Kit and read sensor data (detect the mail) though AWS shadow
  4. Show transcript / AI result

 

 

The brief introduced of Previous Blog Working

Begin the journey : Hello the World by PSoC6 Kits

The first view of the kits

Mbed connect to AWS iOT, OS, driver, security ..  #2

Work for Mbed, LCD driver and first view of AWS IoT

Mbed RTOS thread: Send CapSense Data to AWS #3

CapSense and send button/slider data to AWS IoT

Study of AWS shadow sync between iOS and the Cypress IoT device #4

Build IOS APP and sync/control by AWS shadow

Sense the mail, Send to cloud #5

Simply use the kit's Ambient Light Sensor and a LED for mail detection, and read the BMI160 Acc and Gyro motion data

Echo the sound by the pioneer kit #6

Work with PDM MIC and Sound Card, use of DMA for CPU-free transfer

Exploring of Cypress long life FRAM sound Recorder control from AWS IOT #7

Study use of FRAM for storage the sound data, use Interrupt read of PDM MIC and transfer data to I2S

Adventure of stream the sound clip to AWS #8

Stream the sound and storage to AWS Cloud

Fun with AWS Transcribe and IOS APP pairing #9

Sound data feed of AWS Transcribe for speech to text process and feedback to IOT device, also implement the IOS APP pairing for owner verifying.

Deep Learning for angry dog sound classification #11

Sound Recognition of Angry Dog by Amazon SageMaker, Tensorflow, AudioSet, Yamnet and custom training.

 

Source Code 

 

Our git provide all the Mbed, IOS and Lambda code with explan for reference, detail can also read from above previous individual blog.

Final versions. Demo of run sound recognised under Amazon SageMaker

https://github.com/sicreative/ConnectedCloudChallenge

Demo of use AWS speech Translate

https://github.com/sicreative/ConnectedCloudChallengeTranslate

 

Conclusion

 

For the limited of time we are hard to build the whole new AI model for dog bites detect in this challenge, instead we fine-turning of Yamnet to get the binary result - AngryDog or Other with achieve around 90% accuracy. Our system run under of Amazon SageMaker for custom inference, as well as use AWS service for text transcription. We also with good performance of use AWS IOT shadow for remote control/monitoring IOT device by Mobile APP, as update time normally under two seconds.

 

By use of AWS IoT, Lambda functions, IAM, S3 our framework support unlimited user by serverless architecture, the system administration cost can be minimum also reduce complex of whole system. With proper design, opportunity of run a large number of IoT devices without high skill of computer technical knowledge such as design a mobile APP for the farmer work for organising hundred of sensors, support customer control and monitor under APP.

 

By using of AWS Kinesis and Lambda function, we are success use of AWS IoT MQTT to translate large sound data by segment with very low memory usage.

As the Cypress Pioneer Kit CPU only provide 288kb SRAM, sometime hard to do more as WHD,TLS and MQTT Socket require many heap size, the 1MB versions become best alternative for task require more ram such as Alexa.

 

Thanks for elements14, Cypress and AWS run of this Community Challenge.

  

 

 

 

  • 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 © 2026 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