See PDF on github page.

1. What the system will do?

The primary function of this system is to monitor power consumption in a home, business, or appliance/equipment. The device works on anything that uses AC power, and can monitor certain aspects of the function of a device or many devices simultaneously. This system, with the proper setup, is also capable of detecting ground faults and soil moisture levels.

When reading the power consumption of many devices, such as being hooked to the incoming mains of a home, the system should be able to interpret when an 'event' has occurred and be able to interpret the nature of the event.

2. Who are the users of the software?

This devices is intended to be used by business owners/operators, those in the agricultural industries, home owners, and marine applications. Essentially, this device is intended for use by anyone using AC power that either needs a better feedback loop than the 30 days that is provided by power companies through the billing cycle, or anyone that needs near real-time feedback of the power-state of a machine or multiple machines.

3. What are the business rules?

Hardware:

System Design Considerations:

Right now the only hard requirement is that there is a LAN network present. Each node in this system should be able to function independently, or as a part of a larger system. For example, if an Internet connection is present then the power monitor is capable of pushing data to xively.com allowing the user to view their data through that service, and if so desired a custom application could be built that pulls the data from the xively service, but if an Internet connection is not available then it is possible to push data straight to a user defined database, a pre-built system such as emoncms ( http://emoncms.org/ ), or a solution such as phant.io ( http://phant.io/ ).

That said, there should be a system defined configuration page that allows for a user defined formatting of the data string and a system setup selection with the previously mentioned options.

The only other option that I am aware of that parallels my project is the openEnergyMonitor ( http://openenergymonitor.org/emon/ ), however, there are a number of proprietary and open source home automation projects. The primary difference between my system and other systems is the 'base station', or lack of one. As stated previously this system is intended to work at a minimum with out any external appliances, only requiring an Internet connection. The proposed consumer system however would be a wireless b/n/g router with Ethernet hub and computer preferably built into the same box, this is intended to be used as the base station to communicate with all sensors (This is not a system requirement though, any home with a computer and a LAN setup should be able to install the software and build the system). This would allow anyone using the project to essentially be able to implement a 'plug and play' setup.

Another primary design consideration is to keep the system 'hackable' and open source. Design specifications for the computer/router are as follows:

- Phant.io (currently using MySQL, phant needs to be tested)

- The unit is to be treated as a headless appliance with a web interface

- Programmed in python, interface uses flask and flask-socket.io

- Router using dd-wrt or openWRT (havn't used yet)

- All data manipulations are done on the computer, sensors only report data

- The computer/router is an appliance that could be used as if a product in and of itself without external sensors

- Sensors are 'modules' allowing easy installation and incorporation for system expansion, as well as intuitive implemented use of custom user defined sensors


Sensor Design Considerations:

Power Monitor:

- Capture Temperature

- Capture Humidity

- Capture RMS Amperage

- Capture RMS Voltage

- Capture Instantaneous Amperage

- Capture Instantaneous Voltage

- Remotely Programmable

- Selection of Output String Formatting

- Selection of Output String Destination

Other board features:

- Digital pot for load resistor so that the same board can be used to

- Jumper to allow input for soil moisture sensor

- Jumpers for devices that are attached to I/O pins so that the board

Thermostat:

- Capture Temperature

- Capture Humidity

- Furnace Control Relay

- Two-way Communication

- Selection of Output String Formatting

- Selection of Output String Destination

*It should be noted that the thermostat when used alone, and not as part of the system would function as a normal thermostat, that simply turns the heater/AC on and off at a preset point, but when incorporated into the system should function as a "smart" thermostat does, learning the users preferences and behaving as a smart thermostat. The primary difference being cost. This device should not cost more than $30, but have the communication capability to function as well as the ~$200 "smart" thermostat.

Microcontroller Software (assuming setup on a LAN and not using a service such as xively):

Sensors:

- Read Values

- Format String

- Send Data

If Necessary:

- Receive Command

- Act on command

Computer Software:

- Receive Input From Sensors

- Populate Database

- Interpret Data

- Act On Interpretation

Interpretation of Data:

This is the hard part. The data has to be looked at over multiple time series with multiple inputs to be considered, as there are seasonal changes that are considered over many months, changes between night and day, as well as intermittent and one-time changes.

Seasonal Changes:

What I am thinking, it would be best is to break the data up into one week time intervals that should be able to be fit by a sinusoidal wave, and as this will generate quite a number of data points it may be necessary to look at each minimum and maximum using a gradient descent, however normal regression should be tested for eficiency. Once an average has been determined then I think that it should be possible to determine a seasonal change by power fluctuation rising above or falling below some xσ . With the training provided by the data from previous years, and changes in the fluctuation of temperature measurements it would be presumably possible to determine with some statistical certainty that this would be an indication of a change that will last some time prompting the system to notify the user of mechanical inspections of the system that may need to be made (i.e., furnace inspection, what is the level in the fuel oil tank, and when is it predicted to need to be filled, how do these changes affect expected billing)

*I continually address the heater, because homes and heaters are inefficient devices, and we spend a great deal of resources heating the outdoors. I feel that it is important to address this issue, and I don't think that a good solution can be presented with out throughly understanding the problem.

Day to Day Changes:

Many devices in the home are used every day, and with the training data provided by the users habits the system should be able to become aware if something is out of place (i.e., was it remembered to turn the coffee pot off?, is the heating element in the coffee pot drawing a dangerous amount of current?)

When looking at the day to day data points I believe that when there is a new local minimum or maximum in the values it can be looked at, and through a binomial regression a statistical probability can be produced as to what event occurred and whether or not it was 'normal'.

While this is a learning system, and can potentially be given the ability to act autonomously it is of the utmost importance that any device incorporated into the system does not act against the users free will.

4. What are typical use cases?

Living on Cape Cod it is apparent that many people have vacation homes that are vacant during the winter. In New England having a home sitting vacant all winter could prove to be costly. If the furnace were to quit it is possible that the pipes could freeze and potentially flood a portion of the house when they thawed. With this device it is possible to remotely monitor a home and receive a notification promptly enough to intervene in a situation before great cost was incurred.

If it is the middle of the summer in Miami this device would allow a home owner to get a notification that their air conditioner is drawing an abnormal amount of power, and that the motor should be replaced before their is a failure.

A small business owner runs a machine through the weekend to produce parts that have a long production time. However, the machine is prone to stopping for various reasons. This device could send a notification that the machine has stopped, rather than the operator finding out after a long weekend that only a quarter of the job was done.