Difference between revisions of "S15: Automated Meeting Room Reservation"

From Embedded Systems Learning Academy
Jump to: navigation, search
(Hardware Interface)
(Hardware Interface)
Line 197: Line 197:
 
The interfacing of PIR sensor with the SJ-One board is fairly simple as it involves only 3 connecting wires and pins namely : Vcc, GPIO and GROUND, as explained in the hardware design section. The details have been provided below for clarification:
 
The interfacing of PIR sensor with the SJ-One board is fairly simple as it involves only 3 connecting wires and pins namely : Vcc, GPIO and GROUND, as explained in the hardware design section. The details have been provided below for clarification:
  
[[File:S15_244_Gr7_interface.jpg|center|400px|thumb|SJ-ONE and PIR sensor interface]]
+
[[File:S15_244_Gr7_interface.jpg|right|400px|thumb|SJ-ONE and PIR sensor interface]]
  
 
<table class="wikitable">
 
<table class="wikitable">

Revision as of 02:31, 25 May 2015

Grading Criteria

  • How well is Software & Hardware Design described?
  • How well can this report be used to reproduce this project?
  • Code Quality
  • Overall Report Quality:
    • Software Block Diagrams
    • Hardware Block Diagrams
      Schematic Quality
    • Quality of technical challenges and solutions adopted.

Project Title

Automated Meeting Room Reservation

Abstract

To implement a wireless automated meeting room reservation system using Nordic Wireless modules and SJONE boards. Each SJOne board will communicate with a central Board to convey the status of meeting room in use through. We have decided to use Nordic wireless because of the following advantages it offers-

  • Low Price
  • Longer range than bluetooth
  • Low power consumption
  • Easy to use and setup

Objectives & Introduction

The automated meeting room reservation is achieved through the built-in Nordic Wireless interface. Each board acts as a node in the mesh network which sends and receives information and communicates with a central node. The following objectives are to be implemented:

  • Auto detection of room use
  • Address nodes with auto-replies
  • Track the rooms in use at the central server.

Team Members & Responsibilities

1. Sumeet Bhagwat

  • Nordic Wireless Communication among nodes
  • Integration of PIR sensors with Nordic
  • Assembly setup in test environment
  • Update Project Wiki

2. Ajinkya Khasnis

  • Nordic Wireless Communication among nodes
  • Develop Master Node Display App
  • Assembly setup in test environment
  • Update Project Wiki

3. Atresh Gummadavelly

  • PIR sensor Interface and code to detect motion
  • Integration of PIR sensors with Nordic
  • Assembly setup in test environment
  • Update Project Wiki

4. Sujay Kulkarni

  • PIR sensor Interface and code to detect motion
  • Hardware Assembly with USB Power Supply
  • Assembly setup in test environment
  • Update Project Wiki

Schedule

Because of issues with sensor reliability and few software glitches in wireless communications, the tasks 2 and 3 take the maximum amount of time.

Week# Start End Task Actual
1 Apr 7, 2015 Apr 21, 2015 Identify hardware requirement, Order parts, Researching about datasheets Complete
2 Apr 21, 2015 May 10 , 2015 Configuring Nordic communication peripheral and testing with wireless.h API to send and receive a message. Complete
3 Apr 21, 2015 Apr 28, 2015 Test the motion sensors - Interfacing the PIR sensors to Sjone board, test them Developing an Algorithm Complete
4 May 12, 2015 May 18, 2015 Integrating Nordic and motion sensors and testing the entire setup. Complete
5 May 12, 2015 Apr 18, 2015 Working on Display App for Master Node. Complete
6 May 18, 2015 May 20, 2015 Hardware Setup in test environment. Complete
6 May 5, 2015 May 12,2015 Writing the project report and updating the wiki page accordingly. Complete
7 May 22, 2015 May 22, 2015 Project Demo. In Progress

Parts List & Cost

Item Price Quantity Price
SJ One Board $80 4 $320
PIR sensors $7.49 5 $37.5
USB Battery Packs $10 3 $30
Nordic Wireless Antenna $3 3 $9
Total (Excluding SJOne) $76.5

Design & Implementation

System Overview

Overall System Diagram

The system diagram evidently shows that the project setup will be implemented with the help three separate rooms. One room will serve as a central monitoring or the server room while the other two rooms will be for meeting or conference sessions. Every meeting room will be equipped with an interface of a SJ-ONE microcontroller and a PIR sensor.

The interface is powered with the help of a 5V portable Dynex power unit which will be connected to the SJ-ONE board with the help of a simple USB to min-USB cable. The monitoring room will consist of a laptop-SJ One microcontroller interfaced setup which will help us obtain and analyze the motion detection values and deduce any movement that occurs in the room from it.

The PIR motion sensors will detect movement in the meeting rooms and accordingly communicate with the central SJ-One board through the on-board Nordic Wireless modules on each SJ-One board. Once the data is received, it will be updated on the GUI(WPF on Laptop) that has records of all the meeting rooms that are currently or had been occupied. The user can monitor this data and keep track of all the rooms being occupied , hence , eliminating need of manually verifying the occupancy of every meeting room of a certain building or structure.


The design and implementation of the project has been divided into sections pertaining to hardware and software design as given below:

Hardware Design

PIR Motion Sensor

PIR Motion Sensor plays the primary role of detecting motion in the vicinity, in this case,a room. It relies on heat changes in the environment by using temperature variations as an indicator. The sensor has 3 pins: Vcc, GND and a GPIO which can be used while interfacing with a micro-controller. Detection takes place in conical area(~120 degrees) in front of the sensor and the range is approximately 30 feet. This device is power compatible with 3.3V/500uA and 5V/800uA as well and will be interfaced with each of the SJ-One boards that are being used in this project.

PIR Motion Sensor

Internally, the PIR sensor consists of a crystal which is sensitive to IR radiation of particular frequency, which is emitted by heated objects. It uses a lens to focus this IR radiation onto the crystal. output signal from this crystal is given to an amplifier and comparator circuit. This makes the output available in digital form.

PIR Sensor Assembly

Nordic Wireless Module

The Nordic module is an on-board wireless module which is configured to initiate wireless data transfers. Here, the modules are implemented with the purpose of establishing wireless communication with other SJ-One boards which will help send and receive the PIR sensor data resulting from motion detection. Nordic wireless module uses RF transmission with 2.4GHz ISM band. Along with RF transmission, it has a significant feature of operating at ultra-low power range of 1.9-3.6 V supply voltage (with 5 V tolerant pins) and 11.3mA Tx with 1mW output power.

SjOne with Antenna
On-Board Nordic Wireless Module


Portable Dynex 5 V battery

Every SJ-One board in the meeting rooms is powered by using 5 V portable Dynex battery. It can be interfaced with the board using the USB 3.0 to mini USB converter cable. This device is power compatible with the SJ-One board since with input specs of 5V/1000mA and output specs of 5V/1000mA. Charging power of this device can range upto 2200mAh. It is easy to charge, not so expensive and eliminates the need for separate power supply module design. Also makes the entire hardware assembly modular.

Dynex Portable battery

Hardware Interface

In this section, you can describe how your hardware communicates, such as which BUSes used. You can discuss your driver implementation here, such that the Software Design section is isolated to talk about high level workings rather than inner working of your project.

The hardware interfacing required for this project is significantly less since only the external PIR sensors need to be interfaced to the SJ-ONE board. The Nordic transceiver is an on-board module responsible for wireless transmission. The details of wireless transmission and mesh networks is also described in this section.

SJ-ONE and PIR Sensor Interface

The interfacing of PIR sensor with the SJ-One board is fairly simple as it involves only 3 connecting wires and pins namely : Vcc, GPIO and GROUND, as explained in the hardware design section. The details have been provided below for clarification:

SJ-ONE and PIR sensor interface
SJ-ONEPIR Motion Sensor
VCC (5V) VCC (5V)
GND GND
P2.20 OUTPUT


Interrupt Or Polling?

We tried the hardware interface using interrupts as well. However the number of false positives increased in interrupts. This did not provide much reliable information to the master. So we decided to use the polling approach where we sent a Nordic message to the master only if the sensor output was consistent for some count. This did add a little overhead to the slave board, but it provided much better results. There was no other task the slave was running so we went for the polling approach.

Software Design

Master Display App

To provide a better user interface for this project, we decided to create a small app to display the latest status of Meeting room activity in easy to understand intuitive UI. This app was developed using C# .Net and WPF framework. It can also be replaced by a mobile app in future. It is similar to a hyperload terminal but looks cooler. Here are a few screenshots of the application in action -

Display App 1 - start up: No activity Detected
Display App 2 - Board Detected
Display App 3 - Room Status Received (Occupied)
Display App 4 - Room Status Received (Inactive)
Display App 5 - Board Connection Lost


Master Display App Logic Flow

FlowchartA
Flowchart(continued)

Implementation

This section includes implementation, but again, not the details, just the high level. For example, you can list the steps it takes to communicate over a sensor, or the steps needed to write a page of memory onto SPI Flash. You can include sub-sections for each of your component implementation.

Testing & Technical Challenges

We faced a few minor problems in course of this project. They are classifed as hardware related and software related and listed below

Hardware Interfacing

PIR Sensor Reliability:

Some sensors were not giving reliable output. We tried tuning them by adjusting their sensitivity and the time period for which it remains high after detecting motion. Our observation was that sensors from Radioshack (which did not have these adjustments) were more reliable.

Software Design

Message Loss between Master Node and Control App:

We designed an application that communicated with SJOne board through serial port. In our application, we handled the data transmitted through UART0 port of SJOne master board. Because the Each type of message had different size (in bytes/chars), some part of messages was getting lost. As a result the control app was not updating the display. We solved this by padding each message with extra chars so that they were of the same size. Then we configured the master app to trigger an event to handle the data once we received at least two messages.

Conclusion

Conclude your project here. You can recap your testing and problems. You should address the "so what" part here to indicate what you ultimately learnt from this project. How has this project increased your knowledge?

Project Video

Upload a video of your project and post the link here.

Project Source Code

References

Acknowledgement

Any acknowledgement that you may wish to provide can be included here.

References Used

List any references used in project.

http://socialledge.com/docs/wireless_8h.html

http://www.socialledge.com/sjsu/index.php?title=Low_Powered_Mesh_Network_stack

https://www.sparkfun.com/datasheets/Components/SMD/nRF24L01Pluss_Preliminary_Product_Specification_v1_0.pdf

http://www.digikey.com/en-US/articles/techzone/2012/mar/design-considerations-when-using-passive-infrared-sensors-for-motion-detectors

Appendix

You can list the references you used.