Google Analytics

Monday, March 25, 2013

A Home Security System - Sensors OOD

Sensors OOD

Keywords: BeagleBone Black, Python, Tkinter, Raspberry Pi, RPi, Arduino, Security System, Home Automation

March 25, 2013 (Table of Contents)


This system will be Object Oriented (OO).  This page will be concerned with the Object Oriented Design (OOD) of the Sensors.  It will make use of Polymorphism.

The root type: Sensor

A Sensor Object:
  • It has the following Attributes:
    • Name
    • Zone
    • Description
  • It has the following States: 
    • Ignored
    • Alarm
    • Alert
    • Normal
  • It has the following Transition Listeners
    • ListenerOnTransitionToAlert
    • ListenerOnTrasitionToAlarm
    • LietenerOnTrasitionToNormal
    • ListenerOnTrasitionToIgnored
  • It has the following Listener Methods
    • RegisterAlertListener
    • NotifyAlertListener
    • RegisterAlarmListener
    • NotifyAlarmListener
    • RegisterNormalListener
    • NotifyNormalListener
    • RegisterIgnoreListener
    • NotifyIgnoreListener
  • It has the following Sensor Control Methods
    • SetSensorToAlarmMode
    • SetSensorToAlertMode
    • SetSensorToIgnoreMode
  • It has the following Sensor Test Methods
    • TestSetSensorToAlarm
    • TestSetSensorToAlert
    • TestSetSensorToNormal
    • TestSetSensorToIgnore

Sensor Children Types:

  • A Magnetic Contact is a type of Sensor.
    • It has the following states:
      • Contact State
        • Open
        • Closed
    • It has the following Sensor Normal Methods
      • DefineNormalAsOpenContact
      • DefineNormalAsClosedContact
    • It has the following children types:
      • A Door Sensor is a type of Magnetic Contact Sensor
      • A Window Sensor is a type of Magnetic Contact Sensor
  • A Voltage Transition Sensor is a type of Sensor
    • It has the following state transitions:
      • Transition from Voltage Low to Voltage High
      • Transition from Voltage High to Voltage Low
    • It has the following Sensor Normal Methods
      • DefineNormalAsLow
      • DefineNormalAsHigh
    • It has the following children types:
      • A Doorbell Sensor is a type of Voltage Transition Sensor
      • A Carbon Monoxide Detector Sensor is a type of Voltage Transition Sensor 
      • A Smoke Detector Sensor is a type of Voltage Transition Sensor
      • A Water Detector Sensor is a type of Voltage Transition Sensor
      • A HVAC Temperature Controller Sensor is a type of Voltage Transition Sensor
      • A Household AC Power Sensor is a type of Voltage Transition Sensor
  • To be classified:
    • Networked Sensor
    • Video Camera Sensor
    • Access Keypad
    • Door Speaker/Microphone




2 comments:

  1. For the sensors, will need provision for a debouncing attributes. It is not unusual to have dry contacts (doors, windows) debounced between 50 and 700 ms. My old ADEMCO system has a parameter that can be set to 70 or 700 ms.

    Also, there are some clever ways to debounce inputs that can also provide a diagnostic on the sensor, wiring or installation quality. When we can oversample the input to 8x or more, a voting algorithm can provide a three states output (0, noise, 1) based on the last (8 or more) input scans. When the configured noise condition (e.g. 3 to 5) is detected for some time (configurable), an advanced "check hardware" alarm could be issued.

    I wish you could also classify other house subsystems monitoring like pumps. These type of monitoring require a few more parameters. I am developping the algorithms now, I can help on this aspect. For each pump, I can see three different alarms : 1-Duty cycle (pump functions too much, or continuously), 2-Frequent startups (pumps turn-on & off too frequently), 3-Inactivity (pump hasn't functionned for a long time).

    ReplyDelete
    Replies
    1. Fabien,
      Your suggestion for pump monitoring is a good one which I will keep in mind for the future, which would move past the immediate goal of a security system and towards the goal of whole house monitoring and ultimately home automation.

      I plan on monitoring electrical devices, such as pumps, via current sensors at the power distribution panel.

      Delete