Your browser does not support script
NAVIGATION
Home Search Disclaimer Login/Register
Updated : 6/2/2017

GHowSA Project

Summary

The intention of the GHowSA system is the creation of a localised sensorweb to log sensor information on phenomenon of interest in the home environment. Rather than produce an integrated all encompassing single piece of software/hardware it was decided to rather develop separate yet integrated systems to capture data, review the data, and finally, take action in response to the data ie Measurement - Review - Control.

Whilst the initial development is built arround the Maxim one-wire method the system is flexible enough to accommodate alternate sytems such as X10, or wireless technologies such as zigbee.

Objectives

The overall objective is the monitoring of phenomena within and around the houshold to obtain data that will facilitate the optimisation of the operation of the household by maximising the usage efficiency of the available consummables.

Definitions

  • Sensor
    A sensor (alternatively referred to as a detector, transducer or device) is an element that responds to the phenomenom to be measured to produce an anologue electrical signal proportional to the magnitude of the phenomenon.
  • One-wire Slave
    A one-wire slave digitises an analogue electrical signal and transmits the digital value over a network in response to requests from a one-wire master.
  • Device
    A device is a combination of a sensor and a one-wire slave. It should be noted that some one-wire slaves have an in-built sensor for temperatures and as such are considered to be a device in themselves. Furthermore, if a one-wire slave has multiple input channels then each used channel is considered to be a device.
  • One-wire network
    A fixed wiring network between the one-wire mastr and the one-wire slaves (refer to the section on One-Wire Wiring).
  • One-Wire Master
    A one-wire master controls the network protocol requesting data from the one-wire slave devices and pipes the data to the server.
  • Server
    A server computer runs the monitoring software to set up and run the network and stores the resultant data in a databse.
  • Database
    A simple non-relational database to store the raw data. All the viewing and interrogation of the data is conducted via the database and not by direct interrogation of the sensors.

Monitoring System

The monitoring system will be a simplified version of a sensorweb to capture data to a simple database. The phenomena to be monitored are shown in the following table.

Phenomena Units Priority
(1-5)
Status Notes
Household        
Electrical Power (total usage) kWh 1 Operational  
Electrical supply voltage V 2 Operational To monitor load shedding
Electrical supply to water heater V 2 Operational To monitor trickle supply switch
Water usage kl 2 Development  
Hot water usage kl 2 Development  
Hot Water temperature °C 1 Operational  
Loft Space temperature °C 1 Operational  
Room temperatures (13 off) °C 4 Development  
Light sensors (13 off) - 5 Development  
Power point power(20 off) kWh 5 Development  
Power point sensor(20 off) - 5 Development  
Security        
Zone alarm monitor (8) - 4 Development For monitoring only - not an alarm
Garage        
Electrical power usage kWh 3 Development  
Garden        
Dry Temperature °C 1 Operational  
Wet Temperature °C 4 Development  
Soil Temperature °C 2 Development  
Humidity RH% 1 Operational  
Pressure Pa 1 Operational  
Wind Speed kph 1 Operational  
Wind Direction deg 1 Operational  
Rainfall mm 1 Operational  
Solar radiation w/m2 1 Operational  
Solar PV kW 2 Development  
Soil moisture % 3 Development  
Gate position - 4 Development  
Post - 4 Development  

If all the items in the above table are impemented then 95 devices will required for the system. The ability of the one-wire master to interogate this number of devices at a sampling frequency of once every sixty seconds will be confirmed during evaluation of the system and if necessary the sampling frequency or the number of sensors reduced.
Apart from the monitoring of the security alarm status GHowSA will not be used for any security or safety critical applications.

Software

Several existing One-Wire Software systems were evaluated and the software that most closely matched my requirements was the Felix version 1.48 software written by Chris Gaebler. Unfortunately Chris no longer supports this software and all references to it have been removed from his website. However, Chris was kind enough to let me have the source code for his software and it is this source code that I initially modified for use with this project. (A copy of the original Felix software can be accesed from the resources page)

Having used the book "Weather Toys" by Tim Bitson to learn about Java programming of one-wire systems I decided that I would develop my own software for the GHowSA system using the netbeans IDE. The result is a small application that searches for devices on a one-wire network and saves the data to a database. I then use a web server to graphically present the data in the database and to provide the user with search and download facilities for any further data processing.

Database

Since a non-relational database would suffice for this project Sqlite database would suffice plus it is small, efficient and is freely available.

However, since all my applications currently use MSSQL and / or MS Access, I decided to use MS Access for the data storage. The GHowSA application connects to the database via an ODBC connection so the modifications needed to access a different database would be minimal.
[NOTE]Following a migration to a new host the one-wire data tables have bee incorporated into the site MySQL database.

Device table

Device descriptions are stored in a separate device table and include the following data:

  1. Device number
  2. Device Description
  3. Unique device ROM address
  4. Device location in longitude, latitude and altitude
  5. Descriptions of each device channel. For example a device using a DS243 slave has, depending on its configuration, up to seven measurement channels plus three timers:
    1. Temperature
    2. Vad voltage
    3. Vdd voltage
    4. Vsens voltage
    5. Integrated Current Accumulator (ICA) in mV.h
    6. Positive Current Accumulator(CCA) mV.h
    7. Negative Current Accumulator(DCA) mV.h
    8. Elapsed time (seconds)
    9. End of charge time (seconds)
    10. Disconnect time (seconds)
  6. Raw data units
  7. Device Units
  8. Transfer function to convert raw data to device units

Detail Table

All data will is stored in its raw form. For example the primary measurement used for example rainfall is measured using counts of bucket tips and hence is saved in the database as counts, similarly radiation is measured using the current flow from a reverse-biased photo-diode but the current is measured as voltage over a load resister and therefore is is this voltage that is recorded. For convenience the time stamp of all data will be recorded in local time

The detail table contains the following data:

  1. Device number
  2. Timestamp - ISO date and time in hh:mm:ss
  3. Raw data for each device channel

The period for which detail data is retained is specified by the application configuration parameters.

Summary Table

The summary table contains the daily maximum, daily minimum and daily mean value for each device channel. The last 1000 days of data are retained.

Network

The network will use CAT5 cabling wherever possible with RJ-45connections. The Network configuration is described in the GHowSA Network page

Guest
375 Page Hits