Wireless Home Automation - PowerPoint PPT Presentation

1 / 33
About This Presentation
Title:

Wireless Home Automation

Description:

... reliable power supply, interrupter sensor, digital switch control of 120VAC ... Uses a photo interrupter to determine the door's status then transmits its ... – PowerPoint PPT presentation

Number of Views:2915
Avg rating:3.0/5.0
Slides: 34
Provided by: chrisl57
Category:

less

Transcript and Presenter's Notes

Title: Wireless Home Automation


1
Wireless Home Automation
  • Douglas Brown
  • Eric Livergood
  • Chris Lotysz

2
Objective
  • The short term goal of this project was to use a
    computer to turn on and off a light, as well as
    monitor a door, via wireless communication
  • The real objective was to create a basic
    framework for a home monitoring system. New
    devices can easily be added to the system. Only
    new hardware for different sensors/controllers
    would need to be designed.

3
Original Design
  • Base module that communicates to the computer via
    serial connection, as well as with all the
    external devices
  • Light control device that reports light status,
    can turn a 120 VAC light on and off, as well as
    to a dim setting
  • Door monitor reports open/closed status of the
    door
  • User interface controls the system and gives the
    commands/requests to the rest of the system

4
Original Design
  • Communication
  • 2.4 GHz Wireless Transceivers (Nordic 24E1)
  • Basic ACK/NACK Protocol
  • Frequency Hopping

5
Original Design
Base and Device General Layout
6
User Interface
  • Multithreaded Java Swing GUI
  • Easy-to-use changes can be made with a single
    click
  • Real time updates of wireless devices statuses as
    they are collected
  • Easily expandable code to include future devices
    and controls

7
Control Loop
  • Device Communication Thread
  • Check Event Queue for new actions to perform
  • Perform actions, as needed
  • Gather all Light Statuses
  • Gather all Door Statuses

8
Serial Communication
  • To perform any action or request, the program
    sends 2 bytes
  • Byte 1 Address of device
  • Byte 2 Command/Request
  • Wait for confirmation from base station
  • Response will always be 1 byte containing the
    status of the device request/command was made to

9
Interrupts
  • Serial Port Interrupt
  • When data is sent, a flag is set to true to tell
    control loop to begin waiting for response
  • When data is available on the serial port, a flag
    is set to tell control loop to read response
  • Event Interrupt
  • When the user clicks an action, an interrupt
    occurs and the users action is added to the
    event queue

10
Timeouts
  • Timeouts are coded into two places in the system
  • The base station reports a timeout back to the
    computer if it does not hear back within 200 ms
    from the device it is communicating with
  • The control loop will report a timeout if it does
    not hear from the base station within 1500 ms
  • Prevents timeouts from creating major delays in
    the system response

11
Wireless Communication
  • Base serves as a dummy module to PC
  • Underlying communication protocol transparent to
    PC
  • Device modules transmit only when directed to

12
Wireless Communication
  • PC to Device

Command
SuccessStatus OR Fail
13
Wireless Communication
  • Device to Device Instruction

14
Wireless Communication
  • Device to Device Request For Data

15
Wireless Communication
  • Instructions
  • Light ON 0x00
  • Light OFF 0x01
  • Get Light Status 0x02
  • Get Door Status 0x10
  • Dim Light 0x4X (X indicates the level of dim)

16
Wireless Communication
  • packet.address GetChar()
  • packet.operation GetChar()
  • switch(packet.operation)
  • case NEW_INSTRUCTION
  • //Any calculations or base operations
  • SendInstruction(packet)
  • case NEW_GET_STATUS
  • //Any calculations or base operations
  • status SendRequestForData(packet)
  • PutChar(status)

17
System Response
  • Steps taken to decrease response time
  • Increased resolution of checking for data
    availability
  • Decreased the number of bytes sent between the
    devices
  • Only refreshed user interface screen when changes
    have been made
  • Created separate thread to handle serial
    communication

18
Hardware
  • Objectives Wireless communication,
    microcontroller, reliable power supply,
    interrupter sensor, digital switch control of
    120VAC
  • nRF24E1 programmer board was chosen to simplify
    the blending of wireless communication with
    microcontrol

19
Hardware Cont
  • Battery power supply and wall delivered power
    supply both necessary.
  • Battery power for remote, sensor based modules
    (door)
  • Wall power for base station and for modules with
    available wall power (light)

20
Base Station
  • Power Supply and Transceiver
  • Wall delivered power instead of 9v
  • Serial communication from transceiver board to PC

21
Light Module
  • Digital Control of Light with multiple dimming
    options

22
Light Module Cont
  • The relay chosen determines the resistive path
    taken and thus the voltage delivered to the gate
    of the Triac.
  • The Triac turns on allowing current to flow to
    the light bulb when the gate voltage is
    sufficiently high.
  • The relays are DC controlled via I/O pins from
    the transceiver board.

23
Door Sensor Module
  • Uses a photo interrupter to determine the doors
    status then transmits its status via the
    transceiver board

24
Door Module Cont
  • 9V battery supplied power.
  • Sensor used the 3V regulated power and the
    straight 9V battery power.
  • When door is closed power consumption is minimal,
    however when the door is open the sensor
    dissipates much more power

25
Power Analysis
  • Door
  • Transceiver sinks 18mA at 3V or 54mW
  • Always putting out 24Vs on the relays(or120V)

  • Off(24VAC On(120VAC)
  • Relay1 13.4K 3.0mA 42.3 mW 1.0746 W
  • Relay2 13K 3.1mA 44.3 mW 1.1077 W
  • Relay 3 12.4K 3.2mA 46.4 mW 1.1613 W
  • Only one relay on at a time
  • Additional power loss in the triac itself. Heat
    created and leaked through a heat sink
  • Base
  • Transceiver only 54mW wall delivered

26
Power Analysis Cont
  • Door
  • 9v Alkaline Battery supplied power
  • 600 mAh per 9v 5400mWh
  • 3v regulated and 9v unregulated (Vcc)
  • Transciever 54mW
  • Sensor Diode 40.5mW Open 40.5mW
  • Life when door is open 40hrs

27
Hardware Testing
  • The dimming resistances were determined
    experimentally by controlling a triac with a
    potentiometer
  • Power circuits were constructed and tested with a
    voltage meter. No testing for consistency was
    conducted, but repeated checking of voltage
    showed the voltage regulator to be reliable

28
Testing Development for PIC
  • 7 Phases
  • Serial Communication
  • Timer Setup
  • Simple Wireless Communication
  • Complex Wireless Communication
  • Integration of Serial Wireless
  • Protocol Implementation
  • Testing with PC

29
Software Testing
  • Created a PIC Simulation
  • Two computers, one with user interface, the other
    with PIC Simulation
  • Output to console each step
  • Output the data being sent, the data received,
    how the data was interpreted
  • Ran program with one or all devices off to ensure
    timeouts would be handled appropriately

30
Successes
  • Communication interference less than expected,
    frequency hopping unnecessary
  • A very open-ended, easy to use framework
    developed for expansion of project

31
Challenges
  • Range
  • Security
  • Power consumption
  • Cost

32
Ethical Considerations
  • Introduction of another potential surveillance
    system
  • Potential for unwanted outsider control
  • Creating a safe system

33
Acknowledgements
  • Nordic Semiconductor
  • Microchip
  • Professor Scott Carney
  • Ishaan Gupta
  • Tim OConnell
  • Sparkfun
Write a Comment
User Comments (0)
About PowerShow.com