Close
0%
0%

WiFi Sensors

A range of sensors that use WiFi to communicate

Similar projects worth following
A range of sensors to monitor and report based on the ESP8266 WiFi module... Ideal for home security, monitoring flooding, freezing pipes or whatever you need...

Basic: WiFi Receiver (server) with TFT display and several WiFi Sensors (clients)...

Advanced: Consists of a web interface (Local Web Server running on your computer) and a selection of WiFi Sensors...

Abstract

Ever wanted to install an alarm but could face the mess involved in cabling... Perhaps the cost was prohibitive, or maybe your like me and simply wanted to do it your self. At the very least I've always wanted something simple to tell me if I closed all the windows and doors before leaving the house or going to bed...

The Basic Idea...

This project is a spin off from my first Hackaday project (Home Automation and Security) currently under construction... During the learning process I realised that with a little updated firmware, the ESP8266 WiFi Module would make an ideal remote monitoring platform with the minimum of extra components...

My only concern is battery life but even if I had to add cables, they only needed to get to the nearest power point and not run all through the house like conventional systems... I could live with that, besides, future improvements might increase battery life and remove the need for cables to power outlets...

Simple Monitor...

As the possibilities are endless we best start with a basic monitoring system consisting of a few WiFi Monitors and a little WiFi enabled display to inform us if any doors or windows are open.

We will pace the display near the front door so we can check things before leaving the house (we could actually have as many of these displays in various parts of the house as necessary). With a little more work we could develop a smart phone apps to display this information...

Advanced Monitoring...

A local server (Apache, php and MySql) running on your PC to display and record information received from the sensors in real time... Your browser becomes your interface and allows both the display of sensors data and the option to configure sensors using a simple web page...

Expanding the idea a little...

It follows that we could produce an audible alert or send a text message should one of the monitors detected an intrusion, basically we could have a house alarm with a little additional code.

Personally I don't want a full fledged alarm with all the bells and whistles but I would welcome some type of signal should a door or window be opened when it shouldn't.

Changes to original sensor board...

Being able to program the ESP8266 board using the Arduino IDE, has removed the need for the any additional microprocessor... For the moment the new sensor board consists of a small pcb with the ESP8266 soldered on to it and a little space for a few components... (July 2015)


  • 1 × ESP8266 WiFi Module
  • 1 × TFT Display 1.8" TFT Display
  • 1 × Microcontroller ATMega328P
  • 1 × Local Server (WAMP) Using a local server as the UI

  • August 2015

    Michael O'Toole08/06/2015 at 05:41 0 comments

    Displaying sensor status:

    I have started work on the web interface to receive sensor data and process it accordingly. I have chosen to set up a local server as this will provide a nice looking interface independent of the OS and simple to modify and update.

    Example:

    Here I'm using a simple image to represent the layout of a small house. Each window and door is protected by an inertia sensors. Should anyone try to enter the house the corresponding sensor will trigger and send a signal via WiFi to the server.

    While each sensors is designed to operate autonomously and could activate an alarm directly, the inclusion of a web interface gives us the added ability to further analyse the alarm condition and depending on a variety of circumstances take alternative action...

    In its simplest form the web interface might just be used to display information but as you can see from the above example, it could be expanded to almost anything...

  • July 2015

    Michael O'Toole07/30/2015 at 01:38 0 comments

    I've been busy with some long standing projects but have managed to do some testing with inexpensive piezo sensors in order to determine if they are suitable (and reliable) as the main sensing device for the project...

    Inertia Sensors:

    • Capable of detecting the slightest vibration...
    • Must be consistent over various temperature ranges...
    • Free from electrical/electronic induced side effects...
    • Free from corrosion over an extended period...

    Analysing Inertia Sensor Signals:

    Having established that we will receive some signal data for even the slightest vibration it follows that we must analyse each signal both in amplitude and time (relation to any previous signal)...

    A single high amplitude might signal a gross attack (glass breaking or force entry for example) and if above a predetermined level we might generate an alarm straight away... A much more common occurrance might be several small vibration in a short period (gently prying or forcing a window or door without making noise), here the analysis is a bit more tricky, after all we don't want an alarm if it's raining...

    On a side note, some advanced alarm might even include a rain sensor, wind gauge and thunder sensors to augment inertia sensor analysis... we could add that too...

    Implement criteria in software

    On first detecting a signal we measure its amplitude and if above a predetermined level we signal an alarm condition but if below this level we record (count) and start a timer.

    Should the signal be below the gross level, we start a timer and count each successive signal up to a predetermined number... If that number is exceed during the sensor time period we trigger an alarm condition...

    Setting the sensors sensitivity can also be accomplished with software (during the install process) and this help remove some of the guess work but of course you can also modify sensitivity via the web interface...

    A second line of defence:

    As all WiFi sensors send data to a central computer it also follows that we can further analyse signals in relation to each other. For example, if several sensors in different locations appear to indicate a break in at the exact same time (within milliseconds) , we can over-ride the alarm as it's almost certainly something natural, thunder for example...

    A simplified Approach:

    Allowing for the fact that a central computer can do all the analysis, it follows that we could actually simplify the WiFi sensors job and instead simply pass the detection event and the level back to the central computer (after first eliminating extraneous signals locally) and not have to write more complex code...

    Notes to add...

    Note the sensor also signals battery low using the ADC pin...

  • Programming ESP with Arduino IDE

    Michael O'Toole04/28/2015 at 11:57 0 comments

    See: https://hackaday.io/project/3352-esp8266-development-pcbs/log/17066-programming-esp-with-arduino-ide for updates...

    Looks like we will soon be able to use the little ESP8266 as a standalone device (no additional microcontroller required) and that make the WiFi sensor so much more practical... Just write your program in the Arduino IDE, upload to ESP and off you go...

    ...

  • Firmware Update (902)

    Michael O'Toole11/19/2014 at 16:26 0 comments

    There are a few way to update the firmware but for the moment as I am not writing any code I have chosen to use an executable containing the most recent firmware. I should note the little executable program's UI is in Chinese and a bit difficult to work out but as there's only one button it's not impossible...

    After updating to 902, you can no longer use Putty to issue AT commands as it doesn't send CR+LF so I have changed terminals to Termite version 3.1 and it works a treat....

  • Building a development board

    Michael O'Toole11/16/2014 at 17:54 0 comments

    At the stage where I need to program the ESP8266 and see what it's capable of... time to build a development board.

    Started working on one here: https://hackaday.io/project/3352-esp8266-development-pcbs ... As you can see, my current projects are interrelated, working on one, progress all of them...

    It's highly likely that the ESP's on-board controller can handle all the sensing and remove the need for the ATMega328...

  • Toolchain​ and Compile Tests

    Michael O'Toole11/09/2014 at 16:35 0 comments

    The installation of esp_iot_sdk_v0.9.2 toolchain and compile tests were successful... next to upload the compiled binaries to a couple of the early modules...

    Toolchain Contents: (windows)

    MinGW, Python27, the ESP sdk (v0.9.1) and ESP Tool (esptool..).

    All programs are installed to root (C:\) and the path has to be set for the each...

    After compiling the binaries are sent using a python scrip but as I'm old and lazy so I opted for the Flash Download Tools v0.9.2 from esp8266.com... nice simple GUI...

    Check the esp8266 forums (http://www.esp8266.com/index.php) for Linux/Apple information...

  • Getting Started

    Michael O'Toole11/09/2014 at 05:18 0 comments

    As mentioned, this project is a spin-off from my Home Automation and Security project, so some work has already been completed. The next stage is setting up tools to write and compile code for the ESP8266...

    The main display unit consists of a small 1.8" TFT display, ATMega328 and ESP8266 module has been built and tested... The costs of the display hardware is less than $20....

    Each ESP8266 WiFi Monitor Module should cost less than $5

    While any type of sensor can be used, I will use an inexpensive piezo sensors (the output of which is analyses to prevent false alarm) and a simple IR reflector (to determine if door/windows is open or closed)...

View all 7 project logs

Enjoy this project?

Share

Discussions

robomodo123 wrote 11/03/2020 at 08:06 point

Suberb! I wrote an article on Wi-Fi hacking . I would love if you just give a read.

  Are you sure? yes | no

Michael O'Toole wrote 03/16/2015 at 01:44 point

Just a note keep anyone who has interest in this project up to date...

As you may know the ESP8266 module provides all the necessary parts to build a complete WiFi sensor without the need for a second microcontroller... (information on the ADC is still a bit sketchy atm)...

In the mean time I will continue to use of the Arduino as the main processing for sensors but will also add a standalone ESP8266 board (both board will have their uses).... 

I will of course be changing the dev board to accommodate revision 12 of the ESP module which provides the ADC breakout pin...

  Are you sure? yes | no

Michael O'Toole wrote 01/06/2015 at 05:32 point

Didn't do much over the Christmas as I've been up to my eyes on a software project.... Hopefully 2015 will see more progress ;)

Mike

  Are you sure? yes | no

Similar Projects

Does this project spark your interest?

Become a member to follow this project and never miss any updates