IoT Door Monitor and Control

By: Marcus Fisher and Patrick O'Hara

Overview

This project allows remote access to a door system to control whether it is locked or unlocked and whether to disarm or arm the system. An armed system detects objects close to the door and will set off an audible alarm and notify the owner.

Components Used

Photos and Videos

Photo of Board with components wired: /media/uploads/ECE4180/20170309_191030.jpg Video of code functioning on mbed: /media/uploads/ECE4180/20170309_192929.mp4

Implementation

The door is locked by default (solenoid extended) and is unlocked via the web for an allotted amount of time before going back to it's default state and locking again. The unlocking of the solenoid is done by sending a high bit to a MOSFET driver which drives the solenoid. Once unlocked, a timer is set and the solenoid remains unlocked for the duration of the timer.
The system can be armed or disarmed via the web. The armed system uses an IR sensor to detect an object within a field of 10 inches to the door handle using an Analog Input. When an object is detected for multiple scans over the course of specified time period, the alarm state is activated. The alarm state turns on the amplifier and then sends 2 notes in repetition on the PWM pin to make the audible alarm. The alarm also notifies the owner that there is someone detected at the door. The alarm will continue until the owner dismisses the alarm over the web-page.
To access the device web-page, the user must first change the wifi user-name and password field in the code to match their local network. Through the computer serial comm port the device IP address and network will be printed. By typing in the device IP address into a web browser, the user will now be connected to the device web-page. On the web-page, the user has control over the arm modes: Armed and Disarmed, the Lock Mode: Locked or Unlocked, and status of whether the alarm is sounding and control to reset the alarm mode.

Code

Pinouts

MBED5V Pwr SupplyHUZZAHAmplifierSpeakerIR SensorPower MOSFETSolenoid
p9(TX)RX
p10(RX)TX
p19YLW
p23Control
p22lN+
p21S(Low for shutdown)
GNDGNDGND (x2)(IN-) and (PWR-)BLKSys. -
Vin5VV+PWR+REDSys. +
OUT+IN+
OUT-IN-
Device +Sol. RED
Device -Sol. BLK


Please log in to post comments.