Bluetooth Challenge – Home Security System – Blog Post I – EntFlame

Bluetooth Challenge – Home Security System – Blog Post I


Hello everyone,

I just received my BeagleBone black. So, I decided is was time I get started on the project. I decided to review my application before posting it here (See below) and noticed several grammar errors in the document. So, I fixed the errors. Hopefully I corrected all of them.

In my next step I will boot-up the BeagleBone Black. Then I will configure the Wi-Fi, configure a web server, and configure the Bluetooth module on the BeagleBone Black. As soon as the tasks are completed I will give a status on how things went.

Good Luck to all of you that are competing in the challenge!!!

Talk to you soon.

###################################################

Bluetooth Unleashed Design Challenge: A Home Security System Implemented with Bluetooth LE

Introduction

Home security is like IT security. Owners should employ the defense-in-depth methodology to help keep their home, its contents, and its occupants safe. The defense-in-depth methodology does not rely on any one device or technology to provide security. Instead, it employs several technologies that either complement or backup each other.

Typically, homeowners do employ several techniques to secure their homes, such as door locks, window locks, dusk to dawn lights, and smoke alarms. However, to completely protect your home you need other devices and technologies. For example, what happens if a burglar enters the house through a broken window, or what happens if a fire occurs while no one is home? You must ask yourself, what events could happen that could adversely affect your house, its contents, or its occupants? You should address each scenario that you envision with your home security system.

Below, I listed some scenarios that could adversely affect you and/or your home:

A burglar cases your home by walking around the perimeter of your house.
Some stranger knocks on your door.
You think you heard something in the middle of the night.
You forgot close your garage door.
You forgot to turn off a burner on the stove.
You left lights on and you are on vacation.
You have a carbon monoxide leak in your house.
You have a gas leak in your gas stove.
You forgot to turn off your TV or stereo.

The above scenarios are comprehensive, but not all-inclusive. I’m sure you can think of other scenarios. However, this a proof of concept project. Its goal is to show that you can implement a home security system using Bluetooth LE technology, not cover all aspects of home security.

Problem Statement

Most homeowners have inadequate home security systems. They leave many serious security scenarios unaddressed. If any of these security scenarios occur it could adversely affect the homeowner’s house, its contents, or its occupants. The homeowner should address as many of these security vulnerabilities as possible to protect the home and its content from damages and protect the safety of the occupants inside the home.

Goal

The goal of this project is to demonstrate how Bluetooth technology can be implemented to provide a more secure environment for the homeowner. I will build a Bluetooth mesh network made up of series of sensors attached to Bluetooth modules. These sensors will send the status of the devices, appliances, and environment in and around the house to the BeagleBone Black. The BeagleBone Black will process the information sent from the sensors and act accordingly on the information. Depending on the information, the BeagleBone Black will send statuses to a website allowing the homeowner to manipulate the devices attached to the sensor. This includes turning lights on/off, turning appliances on/off, and viewing video streams. Also, the BeagleBone Black will initiate its own alarms when required.

Below, I listed some scenarios that could adversely affect you and/or your home:

A burglar cases your home by walking around the perimeter of your house.
A stranger knocks on your door.
You think you heard something in the middle of the night.
You forgot close your garage door.
You forgot to turn off a burner on the stove.
You left lights on and you are on vacation.
You have a carbon monoxide leak in your house.
You have a gas leak in your gas stove.
You forgot to turn off your TV or stereo.

I will address these scenarios in this project. The above scenarios are comprehensive, but not all-inclusive. However, this a proof of concept project. Its goal is to show that you can implement a home security system using Bluetooth LE technology.

Problem Solutions

This section discusses the scenarios listed in the previous section. It briefly describes the scenario. It describes how Bluetooth technology can help address the problems.

Figure 1 contains a diagram showing how I will implement the home security system. Bluetooth enabled sensors will report the status of a connected device back to the BeagleBone Black. I will create a webpage to interact will the homeowner. The BeagleBone Black will analyze the data received from the sensors. The BeagleBone Black will send the data to the webpage or act upon the information itself (i.e. sounding an alarm if a carbon monoxide leak is detected). Also, the BeagleBone Black will process the response sent back from the webpage. A response may include turning a light on/off, closing the garage door, turning off an appliance.

Each scenario is discussed separately below.

Scenario One – Burglar cases your home by walking around the perimeter of your house

A dusk to dawn light or a light with a motion sensor should discourage prospective burglars. However, lights do not help during the day and lights do not help identify the culprit who is tripping the motion sensor. Adding a camera that starts recording when the motion sensor trips can show that it is only the neighbor’s dog tripping the sensor. If it is a stranger, you have a video recording to show to the police. Also, you can stream the video to a web page so you can observe what is going on, from the safety of your house or from your hotel room if you are on vacation.

Scenario Two – Stranger knocks on your door

You can look through a peephole before opening the door. However, if you are not at home you will not know who is knocking. It could be a burglar casing your house or a delivery person. Adding a camera and streaming/recording the video will allow you to see who is at the door. You could add a speaker and a microphone and communicate with the person if you desire.

Scenario Three – You think you heard something in the middle of the night

This is a scenario you hope never happens. You hear something in the middle of the night and it is an intruder. To put your mind at ease you can put Bluetooth motion sensors in different locations in your house. The sensor can report back to the BeagleBone Black that it detected motion. The BeagleBone Black can then sound an alarm to inform you that an intruder was detected.

Scenario Four – You forgot close your garage door

Have you ever wondered if you left the garage door opened? Me too. It’s easy to add a sensor to determine if your garage door is up. You can check the status of your garage door from a webpage. You can also add a device to your garage door electronics that allows you to close your garage door via a webpage.

Scenario Five – You forgot to turn off a burner on the stove

This is an easy fix if you have an electric stove. You can plug the stove into a Bluetooth smart plug and control the plug from the webpage (i.e. turn it off at the plug and not worry if you left the burner or oven on). A gas stove is harder to control. It contains manual dials to turn the burner on/off. You can install a normally-open electric solenoid valve at the point where you connect your stove to the natural gas line. You then connect the solenoid to a Bluetooth module so that you can shut-off the gas to the stove from the webpage.

Scenario Six – You left lights on and you are on vacation

Forgetting to turn off your lights is easy to do. Fortunately, the fix is also easy. Replace your light bulbs with smart light bulbs. You can control the smart light bulbs from the website.

Scenario Seven – You have a carbon monoxide leak in your house

A carbon monoxide leak is very serious. I have read several news stories about families that went to sleep and never woke up because of a carbon monoxide leak. Smoke detectors do not detect carbon monoxide. You need a separate detector for carbon monoxide. Connect the carbon monoxide sensor to a Bluetooth module. If the sensor detects a leak a program in the BeagleBone Black should sound an alarm that is loud and obnoxious as the one in your smoke alarm. You defiantly want to wake up anyone sleeping if there is a carbon monoxide leak in your house.

Scenario Eight – You have a leak in your gas stove

This is another serious problem. You can pass out very quickly from a natural gas leak. Not to mention that natural gas leaks can cause explosions. Connect a natural gas sensor to a Bluetooth module. If the sensor detects a leak a program in the BeagleBone Black should sound an alarm that is loud and obnoxious as the one in your smoke alarm. Like with a carbon monoxide leak, you defiantly want to wake up anyone sleeping if there is a natural gas leak in your house. You can also turn off the gas like you did in Scenario Five.

Scenario Nine – You forgot to turn off your TV or stereo

To control any device or appliance, connect it to a Bluetooth smart plug. Also, security experts suggest turning lights and devices on and off randomly to fool burglars into thinking you are home instead of on vacation. You can set any device or appliance on/off, at random, via the website if the device or light is connected to a smart plug.

System Design

This section covers the major design elements of the project. It starts out with a brief discussion of the high-level design. In the Hardware sub-section, the hardware components in the design are discussed and a list of the hardware components required for this project is given. Finally, the required software components are listed and their interaction with each other is discussed at a high level.

High-Level Design

Figure 1 shows a high-level view of the home security system. All of the sensors are connected to each other via Bluetooth modules. A Bluetooth LE module will connect to any other Bluetooth LE module within its range. This forms the Bluetooth mesh network shown in Figure 1. Note: to keep Figure 1 from getting too messy I did not show all possible connections between the Bluetooth modules.

The BeagleBone Black Wireless box in Figure 2 shows the components contained within the BeagleBone Black. The BeagleBone Black will receive data via its Bluetooth module, analyze it, pass it to the web server. The web server will send the information to the homeowner’s device via a webpage, depicted by the Web Enabled Device box. The homeowner can view the information on the webpage and act upon it by sending a request (i.e. turn a light on/off) back to the BeagleBone Black. The request will be sent to the appropriate device via the Bluetooth mesh network.

Hardware

Building a Bluetooth mesh network requires a lot of hardware. Figure 3 depicts the hardware required to build out the Bluetooth mesh network. You need sensors to detect what is happening in the environment. Hardware is required to process sensor data and to manipulate the devices the sensors are monitoring. Bluetooth modules are required to send and receive data on the network. A computer is required to process sensor data and to provide web services. Listed below are hardware components for this project. Note that this is not a complete list. Other components may be added as the project progresses.

BeagleBone black (includes Bluetooth LE and Wi-Fi components)
Bluetooth LE modules to attach to sensors that do not have their own Bluetooth LE built-in
Small microprocessors to process and send sensor data over a Bluetooth module. This is for devices that are not Bluetooth enabled.
FTDI Basic Breakout board – for programming microprocessors
Battery holders/batteries for devices that cannot be connected to an outlet.
Micro SD and SD card
Sensors
Motion
Carbon Monoxide
Natural Gas
Light
Proximity
Bluetooth LE modules for sensors that are not Bluetooth enabled.
Bluetooth Smart Plugs
Bluetooth Smart Lights
Normally Open Electric Solenoid Valve
Alarm/Speaker for the BeagleBone Black
Optional Speaker/Microphone for communicating with a person at the front door
Cameras

Software

The software required for this project includes, but not limited to:

Web server
Application software – web server
Application software – Controller
Microcontroller – Programs to interface with sensors.

The BeagleBone black will host most of the software. See Figure 2. It will contain the web server used to serve up the web pages for the user interfaces to the system. The code for the web pages will reside on the BeagleBone Black. The controller program will also reside on the BeagleBone Black.

In some cases, a microcontroller is required to read the sensor data and determine what information to send back to the BeagleBone Black. The microcontroller will format the sensor data and pass it to the Bluetooth module, which will send the data to the BeagleBone Black via the Bluetooth mesh network. Example, microcontroller attached to the natural gas sensor will send a signal to the electric solenoid valve if it is necessary to turn off the stove. The microcontroller attached to the proximity sensor will open or close the garage door at the homeowner’s discretion.

Figure 1. High-Level Design

Figure 2. BeagleBone Wireless

Figure 3. Hardware

Project Plan

Listed below is a high-level project plan. It lists the major tasks to complete. The order the tasks are completed may change as the project progresses. Each week I will create a blog post documenting the progress of the project. I will complete a final comprehensive document at the end of the project.

Select and procure the hardware for the project
Configure a web server
Configure the Bluetooth module on the BeagleBone Black
Configure the Wi-Fi on the BeagleBone Black
Design the controller program on the BeagleBone Black
Design the web pages for the project
Program the main module for the controller program
Program the main webpage
Add Smart Lights to the Bluetooth mesh network
Add Smart Lights module to the controller program
Create a Smart Lights webpage
Perform unit testing
Add Smart Plugs to the Bluetooth mesh network
Add Smart Plugs module to the controller program
Create a Smart Plugs webpage
Perform unit testing
Write a program for Carbon Monoxide microcontroller
Add Carbon Monoxide Sensor to the Bluetooth mesh network
Add Carbon Monoxide module to the controller program
Create a Carbon Monoxide webpage
Perform unit testing
Write a program for Motion microcontroller
Add Motion Sensor to the Bluetooth mesh network
Add Motion module to the controller program
Create a Motion webpage
Perform unit testing
Write a program for Proximity microcontroller
Add Proximity Sensor to the Bluetooth mesh network
Add Proximity module to the controller program
Create a Proximity webpage
Perform unit testing
Write a program for Natural Gas microcontroller
Add Natural Gas Sensor to the Bluetooth mesh network
Add Natural Gas module to the controller program
Create a Natural Gas webpage
Install the Electric Solenoid Valve
Perform unit testing
Write a program for Camera1(front Door) microcontroller
Add Camera1 to the Bluetooth mesh network
Add Camera1 module to the controller program
Create a Camera1 webpage
Perform unit testing
Write a program for Camera2 (perimeter) microcontroller
Add Camera2 to the Bluetooth mesh network
Add Camera2 module to the controller program
Create a Camera2 webpage
Perform unit testing
Perform System Testing
Complete Documentation

Credentials

I am a retired IT professional who has experience with web server administration and web development. I have built a small robot with the BeagleBone Black. I recently built an Arduino powered robot. The robot interfaces with the user via a Bluetooth / Android interface, which I wrote. The user issues voice commands and the robot executes the request, then acknowledges the receipt of the request with a voice response.

Summary

Most homeowners inadequately secure their home, its contents, and the people who occupy the home. This proof-of-concept project is designed to help address the security needs of the typical homeowner. The system is made up of a Bluetooth mesh network which connects an array of sensors that monitor the environment in and around the home. Web pages will be provided to allow the homeowner to monitor and modify devices and appliances in and around the home.

This is an ambitious undertaking that will present many challenges. Building a Bluetooth mesh network requires connecting and configuring many Bluetooth devices together. I need to program a microcontroller for every sensor that is not Bluetooth enabled. The controller program on the BeagleBone Black will be quite large and take a lot of time to develop. Testing will take a considerable amount of time since there are so many components that interface with the system. Although there is a lot of work ahead I am excited about starting this adventure. I have been wanting to build a home security system for a long time.

What's Your Reaction?

hate hate
0
hate
confused confused
0
confused
fail fail
0
fail
fun fun
0
fun
geeky geeky
0
geeky
love love
2
love
lol lol
0
lol
omg omg
0
omg
win win
0
win

0 Comments

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

You may also like

More From: TECHKNOW

DON'T MISS

Choose A Format
Personality quiz
Series of questions that intends to reveal something about the personality
Trivia quiz
Series of questions with right and wrong answers that intends to check knowledge
Poll
Voting to make decisions or determine opinions
Story
Formatted Text with Embeds and Visuals
List
The Classic Internet Listicles
Countdown
The Classic Internet Countdowns
Open List
Submit your own item and vote up for the best submission
Ranked List
Upvote or downvote to decide the best list item
Meme
Upload your own images to make custom memes
Video
Youtube, Vimeo or Vine Embeds
Audio
Soundcloud or Mixcloud Embeds
Image
Photo or GIF
Gif
GIF format