Wiznet makers

rudals

Published August 07, 2023 © 3-Clause BSD License(BSD-3-Clause)

0 UCC

0 VAR

3 Contests

0 Followers

0 Following

IoTGuard

The IoTGuard is a security system developed to protect your life and property.

COMPONENTS Hardware components

ST - NUCLEO-F429ZI

x 1


WIZnet - W5300-TOE-Shield

x 1

Software Apps and online services

WIZnet - WIZnet io Library

x 1


Android - Android Studio

x 1


PROJECT DESCRIPTION

The IoTGuard consisted of a Nucleo-144 and Wiznet W5300-TOE-Shield. And It is connected with Fire, Gas, Door sensors and TFT-LCD. It collects sensor data and publish alarm message to registered devices when an abnormal operation is detected and also receive an image data from registered devices. Below image summarized whole IoTGuard’s data flow. You can understand more easily.

 

 

To perform this operations, The IoTGuard use two TCP ports(#1883, #5000) in W5300-TOE-Shild. TCP port 1883 uses for MQTT service to publish/subscribe MQTT topic messages. and TCP port 5000 uses to receive an image data from the registered android mobile devices.

 

The IoTGuard performs below three main functions to protect your life and property.

  1. The IoTGuard collects data from three types of sensors (fire/gas/door), and send a notification message to the registered devices when an abnormal operation is detected.
  2.  The IoTGuard periodically monitors GPS data from the registered devices to let you know where they are.
  3. The IoTGuard receives an image data from the registered device. This image data can be used to understand in their circumstance more easily.

 

Hardware Implementations

# Connect Nucleo-144 with W5300-TOE-Shield

1. Remove SB5 and SB6 from the top of the STM32 Nucleo-144 board.

2. Connect PC10, PC11 of the W5300 TOE Shield and CN5 TX, RX of the top of the STM32 Nucleo-144 board with jumper cables.

# Make a simple miniature for demonstration

As shown in the image below, you can test and monitor fire/gas/door alarm event and received an image

# Make an interface PCB to connect miniatures and demo board easily

A simple interface board was made to connect various types of sensors and LCD easily.

This interface board used like below. All sensors can be connected easily.

Software Implementations

# MQTT broker setting implementation

I used HiveMQ service for IoTGuard demonstration. The HiveMQ can be used without site registration. And easy to access using your web browser. Connect to https://www.hivemq.com/demos/websocket-client after then click connect button.

Added ig_sub and ig_pub topics on right side in Subscritpios tab. 

When IoTGuard boot-up, It will be published start-up message like below.

Alarm messages are published by IoTGuard.

Update GPS data periodically.

# IoTGuard (Nucleo-144 + W5300-TOE-Shield) implementation

The IoTGuard is developed based on Wiznet example from https://github.com/Wiznet/W5300-TOE-C

 

Create two threads for handling each service (MQTT and Image receive).

 

MQTT topic and TCP data transfer following specification.

Description

Used type

Format

Pub Alarm data

MQTT Topic

<ALARM>:<FIRE>:<GAS>:<DOOR>

Pub/Sub GPS data

MQTT Topic

<GPS>:<dev_name>:<latitude>:<longitude>

Receive image data

TCP

<image length><image data>

[Info] Avoid privacy information, I used below two dummy GPS data for this demonstration.

1. [ 37.5797, 126.9772 ] – Gyeongbokgung Palace in Seoul, South Korea

2. [ 21.276339 , -157.827073 ] – Waikiki Bay in Hawaii, USA

 

Porting ILI9844 TFT-LCD driver after then IoTGuard Monitor display alarm, Device name, GPS data and Received image on TFT_LCD.

When alarm event detected, Alarm icon will be changed to red like below.

# IotGuard android application

I made a dedicated android application for demonstration. 

- Main and Setting screen of IoTGuard android application.  

- After set up, Device name shows in Mobile list window. After a while, GPS data will be updated like below.

- Received alarm event from the IoTGuard

- Mobile device’s location display on the map

- Launch camera application and take an image.

- Send an image to IoTGuard then update received image on TFT-LCD

# Demo on youtube

 

Documents
  • IoTGuard

    IoTGuard Main Source Code

  • This project on Hackster.io

Comments Write