IoT Security

he tra ==4180 Final Design Project== This project demonstrates the capabilities of the mbed to perform Internet of Things (IoT) tasks when connected to a WiFi I/O device. It simulates a home security system, designed to detect when someone is in a room and alert the homeowner through a webpage or smartphone application. Additionally, various devices in the home would be controllable through the same webpage, such as lights, appliances, locks, and sound systems.

Components

Block Diagram

/media/uploads/bmirzakhani3/4180_final_setup_diagram.png
Internet Communication
The base station is a regular mbed LPC1768 that is connected to the Internet through the WiFi module. It is hosting a webpage that allows the homeowner to see messages and change settings in their home remotely.
Inter-Station Communication
The client nodes communicate to the base station using RF communication. A protocol was invented that sends messages to and from the base station using specific bits representing different status information. The protocol is shown in the diagram below. For reliable transfer, a locking signal is used to ensure that the gain of the receiver doesn't skyrocket while the transmitter is not transmitting status information. Acknowledge messages were considered and tested, but the communication is far too simple to require ACKs, and the ACKs ended up creating more collisions than they solved. Instead of Acknowledge signals, the clients transmit a 'status' signal randomly (every 5 seconds) that contains the status of all of their sensors. The base interprets this message, and if a discrepancy is detected, the message is sent again from base to clients until all nodes have the same status. The breakdown of the protocol and its use is shown below.
/media/uploads/jkerickson/commprotocol.png

/media/uploads/jkerickson/code.png
In-Home Security
A PIR motion sensor can detect if a person enters a room (DigitalIn). Depending on if the user is home or away (selected on the web page), an alarm can sound when motion is detected. Lamps can also be connected and controlled through the web page using the power tails (DigitalOut). Additionally, a temperature sensor sends the temperature to the web page for monitoring of the AC/heat unit in the house. Many other I/O devices can be added to this very easily using the various protocols on the mbed (DigitalIn/Out, PWM, Serial, I2C, etc.).

Code/Libraries

There are two programs for this project: Node & Base code. The base code should be put on the base station, which is the mbed that is connected to the WiFi module. The node code should be put on the client nodes, which have the PIR sensors/lights, etc.
Base Code

Import program4180_IoT_Security_Base

This is the base code to be used in conjunction with the node code to achieve an IoT Security simulation

Node Code (including mbed RTOS library required for threading)

Import program4180_IoT_Security_Node

This code is to be used with the 4180_IoT_Security_Base code to simulate an IoT Security device.


Import librarymbed-rtos

Official mbed Real Time Operating System based on the RTX implementation of the CMSIS-RTOS API open standard.

Project Demonstration


Please log in to post comments.