Personal Alert and Safety System Lab 4 – User Manual

advertisement

Lab 4 – User Manual

RUNNING HEAD: LAB 4 – USER MANUAL

Personal Alert and Safety System

Lab 4 – User Manual

1

CS 411 Blue Team:

Dan Cox

Jon Szewczak

Brittany Dufort

Marcus Henry

Gordon Bland

Braden Gibson

Gene H. Price

April 27, 2011

Lab 4 – User Manual

Table of Contents

2

List of Tables ...................................................................................................................... 4

1.

Introduction (Dan Cox) ............................................................................................. 5

2.

Product Features (Dan Cox, Jon Szewczak) ............................................................. 6

3.

Getting Started (Brittany Dufort) .............................................................................. 7

3.1

Hardware Demonstration ...................................................................................... 7

3.2

Simulation Demonstration..................................................................................... 8

4.

Using the Prototype (Jon Szewczak) ........................................................................ 9

4.1

Hardware Demonstration (Marcus Henry) ............................................................ 9

4.2

Simulation Demonstration (Jon Szewczak) ........................................................ 14

4.2.1

Simulation Driver Interfaces (Braden Gibson) .............................................. 15

4.2.2

Dispatch User Interface (Brittany Dufort) ..................................................... 18

5.

Troubleshooting (Gordon Bland) ............................................................................ 21

5.1

Hardware Conditions........................................................................................... 21

5.2

Software Conditions ............................................................................................ 22

6.

Glossary (Group) .................................................................................................... 24

Lab 4 – User Manual

List of Figures

3

Figure 1. Major Functional Component Diagram for Prototype ....................................... 6

Figure 2. Example of Importing Libraries .......................................................................... 8

Figure 3. Desktop Shortcut ................................................................................................. 9

Figure 4. USB Connection to host PC .............................................................................. 10

Figure 5. Serial Port Connection from PC to Arduino Microcontroller ........................... 10

Figure 6. Properly Connected Microcontroller and Transceiver. .................................... 11

Figure 7. Choosing an Arduino Sketch ............................................................................ 12

Figure 8. Correctly Compiled Code .................................................................................. 12

Figure 9. Result of Pressing the Upload Button .............................................................. 13

Figure 10. The Serial Monitor Display. ........................................................................... 13

Figure 11. Displays the User Pushing Buttons on the Fob .............................................. 14

Figure 12. Main Screen of Simulation Driver Interface ................................................... 15

Figure 13. Example of Active Alert .................................................................................. 16

Figure 14. An Alert Has Been Sent .................................................................................. 17

Figure 15. Choosing Map Zones ....................................................................................... 18

Figure 16. Sending Alerts to the MCM ............................................................................ 19

Figure 17. Initial View of DUI After Alerts are Sent ....................................................... 19

Figure 18. Selection of a Row in Active Alerts ................................................................ 20

Figure 19. DUI Immediately After Clear Alerts ............................................................... 20

Lab 4 – User Manual

List of Tables

4

Table 1. Hardware Troubleshooting ................................................................................. 21

Table 2. Software Troubleshooting................................................................................... 22

Lab 4 – User Manual

1.

Introduction (Dan Cox)

The Personal Alert and Safety System (PASS) prototype attempts to demonstrate the major goals of the real world product: receive signals from fob devices, propagate said signals throughout a transceiver network and then process those signals into meaningful information for analysis by dispatch personnel. In the process of assigning priority to the major goals due to the time constraints of the project, one of the major goals was dropped from the prototype. Signal propagation was decided to be of the least priority and was thus removed from the prototype.

However, the other two goals of receiving signals from fobs and processing said signals were incorporated into the construction. The prototype was divided into two different areas of development, hardware and software.

The mission of the hardware area of construction was to show that wireless signals from fob devices could be received and interpreted correctly. For this, four different hardware parts were used. As Figure 1 shows, a fob would send a signal, a transceiver would receive the signal and the Arduino board would process the signal. Finally, a personal computer would show the results of the processing in the form of displaying which user’s signal was received. This construction and signal processing was deemed to meet the goal set for the hardware area.

Software was used in the form of a simulation of the transceiver network. A point could be picked on a map, via a graphical user interface, to allow the approximation of a fob device starting a sending cycle at that physical location. Once another button within the graphical user interface was pressed, the fob message would be processed and then presented to an additional user interface representing the view the dispatch personnel would see. Thus, the goal of processing and providing an interface for analysis for dispatch personnel was also achieved.

5

Lab 4 – User Manual

Figure 1. Major Functional Component Diagram for Prototype

2.

Product Features (Dan Cox, Jon Szewczak)

As mentioned earlier, the PASS prototype will be divided in two separate demonstrations: Hardware and Software Simulation. Each demonstration has a set of unique features that are separate from the other. In the following sub sections each demonstration’s features will be listed.

Hardware

1.

Utilizes a five button fob to mimic different signals being received by the transceiver.

2.

Illustrates interception of wireless signals along the 2.4 GHz radio frequency.

3.

Demonstrates processing of received wireless signals.

4.

Demonstrates communication with a personal computer platform via USB ports.

Software Simulation

1.

Microsoft Windows Application utilizing the .NET Framework 3.5 libraries. a.

It will utilize a multiple document interface to host two windows forms that will communicate with each other. b.

A separate module will be marshaling all communication between the two forms.

2.

The application will allow a user to: a.

Select from a list of up to five different simulated PASS users.

6

Lab 4 – User Manual 7 b.

Initiate an alarm from any of the users, from a selection of four different locations on the ODU campus. c.

Show which simulated transceivers would pick up the alert signal. d.

Calculate a probable location for the alert from the location of the transceivers that picked up the alert signal. e.

Display the calculated alert location and PASS user information on the Display

User Interface.

3.

Getting Started (Brittany Dufort)

The following section will discuss the steps involved in setting up the multiple environments needed to utilize the prototypes. Since the physical portion of the hardware demonstration can be performed anywhere that has enough table top room, this is not discussed.

Instead, the necessary software installations are detailed.

3.1

Hardware Demonstration

To get started with the PASS hardware prototype, the Arduino Software Suite must be installed on the user’s personal computer. This software will allow a user to interact with the microcontroller. Installation instructions:

1.

Acquire necessary installation packages from www.arduino.cc/en/main/software for the appropriate operating system.

2.

Open the Ardiuno-0022 folder, and then double click Arduino.exe to launch. This will extract multiple files to the installation folder.

Next, it is important that the user has access to three unique microcontroller libraries.

The SPI.h , MIRF.h, and Nordic NRF2401.h files allow the Arduino microcontroller to interact

Lab 4 – User Manual with the Nordic wireless transceiver and are therefore vital to the prototype and can be acquired

8 from Arduino forums (www.arduino.cc/playground/interfacingwithhardware/nrf2401, www.arduino.cc/playground/spi, www.tinkerer.eu/avrlib/nrf24l01). As such, the user must choose the option Sketch followed by the Import a library option; they will then select the three files mentioned above. The aforementioned files are all open source files and are freely available on the internet.

Figure 2. Example of Importing Libraries

3.2

Simulation Demonstration

To get started with the PASS software prototype, there are two prerequisites needed. The computer running the demo must have SQL Server 2008 Express installed locally and it must have the necessary database structures fully configured. The user can download SQL Server

Express 2008 from Microsoft’s website ( http://www.microsoft.com/express/Database/ ). The database structures can be formed after a successful SQL Server Express installation using the provided database scripts.

Lab 4 – User Manual

Once all database functionality is initiated, the user is then ready to setup the simulation

9 application. The PASS project team has developed an installation program that will install the application on the user’s computer. Once that has been done, the user will need to create a shortcut on the desktop. To launch the program, double click on the “PASS-Simulation” shortcut on the desktop.

Figure 3. Desktop Shortcut

4.

Using the Prototype (Jon Szewczak)

The following sections will detail out the procedures for setting up, initializing, and using the different components of each demonstration. The first section focuses on the hardware demonstration. The last section concentrates on the simulation demonstration. The simulation demonstration section is further broken down into it two main components: the Simulation

Driver Interface and the Dispatch User Interface.

4.1

Hardware Demonstration (Marcus Henry)

The Hardware component of the PASS prototype is made up of four electrical components, a personal computer, Arduino microcontroller, Nordic fob transmitter, and the

Nordic wireless transceiver unit. It is important to have all of these materials in order to use the

PASS prototype at optimal levels.

In order for this to work the user must plug the USB serial cord into an USB port on the computer and into the serial port of the Arduino Microcontroller. After this physical connection

Lab 4 – User Manual is established, the user should open the Arduino Software Suite. Once the Arduino software

10 suite is opened, the user will need to push the upload a sketch button in the program.

Figure 4. USB Connection to host PC

Figure 5. Serial Port Connection from PC to Arduino Microcontroller

The next important step is establishing a connection between the Arduino

Microcontroller and the Nordic Transceiver. The first inputs to implement are to the power and ground pins. The Arduino microcontroller has a 3.5 volt power supply; this is what the transceiver needs to run. Hook a wire from this power supply to the transceiver hole marked

VCC. The ground pin is connected from the ground supply on the Arduino board to the ground

Lab 4 – User Manual pin hole on the transceiver. The next step is to use the digital pins on the Arduino board and

11 connect them to the transceiver.

1.

Using Digital Pin 7, connect a wire from this pin hole to the transceiver pin hole labeled

CSN.

2.

Using Digital Pin 8, connect a wire from this pin hole to the transceiver pin hole labeled

CE.

3.

Using Digital Pin 11, connect a wire from this pin hole to the transceiver pin hole labeled

MOSI.

4.

Using Digital Pin 12, connect a wire from this pin hole to the transceiver pin hole labeled

MISO.

5.

Using Digital Pin 13, connect a wire from this pin hole to the transceiver pin hole labeled

SCK.

Figure 6. Properly Connected Microcontroller and Transceiver.

Lab 4 – User Manual 12

The next step is uploading a program to drive the transceiver via the microcontroller. As such, the next important phase is uploading a sketch that will enable the transceiver to detect the wireless signal from a transmitter. This code will come standard with the prototype and it uses the imported libraries from step 1. Use the File tab in the Arduino Software Suite and select

Open. They should then choose sketch_mar27a, which will come with the prototype. For simplicity it is easy to store this file on the Desktop. Once this sketch is selected, then the user should select the command Sketch and then Verify/Compile. If this is correct and there are no errors, the user should then select the “Upload” button, this will put this program “on board” the

Arduino Microcontroller and will run the source code.

Figure 7. Choosing an Arduino Sketch

Figure 8. Correctly Compiled Code

(This Space Left Intentionally Blank)

Lab 4 – User Manual 13

Figure 9. Result of Pressing the Upload Button

The previous steps lead us to using the hardware prototype. After uploading the source code, select Serial Monitor button in the Arduino Software Suite Program. If everything is working correctly the user should see this screen.

Figure 10. The Serial Monitor Display.

Lab 4 – User Manual 14

This notifies the user that the transceiver is using frequency channel 2, and that the status bits are all correct if it displays rf_setup = 111.

Next the user should press any buttons on the Nordic Fob. The buttons correctly map 1 to 1, with what the transceiver receives. A press of the center button on the Nordic Fob will display text in the Serial Monitor Display as “Center”.

Figure 11. Displays the User Pushing Buttons on the Fob

4.2

Simulation Demonstration (Jon Szewczak)

The simulation demonstration application utilizes a very common application model known as the Multiple Document Interface. This model allows several windows to be hosted by a single parent window. The simulation demonstration application’s parent window hosts two child windows, the Simulation Driving Interface (SDI) and the Dispatch User Interface (DUI).

The application is built around a virtual environment based on the Old Dominion University campus.

The SDI hosts all of the controls and manipulation functions that will allow the user to interact with the software. These functions and control are used to place alert signals and

Lab 4 – User Manual associate them with users within the virtual environment. From here the user also initiates the

15 reporting of the alerts to the DUI.

The DUI’s sole function is to report the calculated location based on the transceivers that heard the alert in the SDI. It does this in two ways, via a table and also a graphical map. The

DUI responds to actions that are sent through the hosting program from the SDI.

4.2.1

Simulation Driver Interfaces (Braden Gibson)

Once the program is up and running, the user will see the main screen for the SDI (Figure

12).

Figure 12. Main Screen of Simulation Driver Interface

Change Map View

After the program has been open and the SDI is displayed, the user can then select a different map to display on the screen. To switch between maps, follow the instructions below:

Step 1: Select the map you would like to choose from inside the “Map Area to Show”.

Lab 4 – User Manual

Step 2: Click on the corresponding bullet to display the map.

16

Choose User

The Selection of a user may be chosen at any given time and can be done so by following the directions below:

Step 1: Click the drop down menu “Choose User” to view a list of users.

Step 2: Select the user that the program will simulate.

Pick Alert Location

Once you have selected a map location between Zone 1 to Zone 5, you can the select a location on the map. To add the location to the map, follow these steps:

 Step 1: Click on “Pick Alert Location”.

Step 2: Pick a point on the map and right click on the screen with the mouse.

Figure 13. Example of Active Alert

Lab 4 – User Manual

Send Alert

17

After having selected a zone on the map and choosing an alert location the user can then send the alert for the simulation to begin. The figure 14 below represents the SDI after an alert has been sent. All surrounding transceivers will be lit up and shown on the screen. To send the alert, follow the steps below

 Step 1: Click on the “Send Alert” button located at the bottom of the screen.

Figure 14. An Alert Has Been Sent

Clear Alerts

After a Successful simulation you can clear the alert by following the steps below:

 Step 1: Click on the “Clear Alert” button located at the bottom of the screen.

Lab 4 – User Manual

Show Transceivers

The transceivers can only be shown on one of the five zone maps so you will have to

18 select a map before you can show the transceivers on the screen. In order to show all of the transceivers on the current map selected, follow the steps below:

 Step 1: Select the “Show Transceiver” tick box.

Figure 15. Choosing Map Zones

4.2.2

Dispatch User Interface (Brittany Dufort)

The Dispatch User Interface’s main purpose is to display information pertaining to current alerts. This includes a map with the alerts signified by red dots. To view active alerts, select alerts on the SDI (See Section 4.2 - Simulation Driver Interface for instructions) and hit the “Send Alert” button.

Lab 4 – User Manual 19

Figure 16. Sending Alerts to the MCM

This will display the alert dots on the map and the alert information under the “Active

Alerts” table. The alerts will be ordered based on time, with the first alert in the first row. This alert will also be selected by default, which in turn transforms the small red dot on the map to a larger purple dot. It also displays extra information in the “Extended Data” form to the right of the map.

Figure 17. Initial View of DUI After Alerts are Sent

Lab 4 – User Manual

To view “Extended Data” per alert, click on the desired alert in the “Active Alerts” table.

20

Figure 18. Selection of a Row in Active Alerts

To clear the alerts on the DUI, click the “Clear alerts” button on the SDI.

Figure 19. DUI Immediately After Clear Alerts

Lab 4 – User Manual

5.

Troubleshooting (Gordon Bland)

21

5.1

Hardware Conditions

1

# Problem:

This means that connections initialization does not equal 111. may not be correct.

Solution:

Repeat the instructions in the manual and test again.

2

3

4 does not verify the Upload

Function.

This occurs because the USB port does always connect correctly from PC to

Microcontroller.

Unplug the connection to the

Microcontroller and plug it in again,

Upload software again. correctly in the Arduino

Software Suite.

This may occur because the correct libraries are not available to the source code.

1.Make sure that MIRF.h, SPI.h and

Nordic.h are all downloaded and imported into Arduino Software

Suite.

2. Check for “bugs” and other coding errors

This is possible because in our Ensure that the wires follow the guide affixed to the components. prototype none of the wires and chips is soldered. in the User Manual, and make sure that the transceiver is correctly connected to the Arduino wires.

Table 1. Hardware Troubleshooting

1.

Problem: The rf_setup for wireless initialization does not equal 111.

Solution: This means that connections may not be correct. Repeat the instructions in the manual and test again.

2.

Problem: The Arduino Microcontroller does not verify the Upload Function.

Solution: This occurs because the USB port does always connect correctly from PC to

Microcontroller. Unplug the connection to the Microcontroller and plug it in again,

Upload software again.

3.

Problem: The sketch does not compile correctly in the Arduino Software Suite.

Solution: This may occur because the correct libraries are not available to the source code. Make sure that MIRF.h, SPI.h and Nordic.h are all downloaded and imported into

Arduino Software Suite. Check for “bugs” and other coding errors

Lab 4 – User Manual

4.

Problem: The wires are not completely affixed to the components.

Solution: This is possible because in our prototype none of the wires and chips is soldered. Ensure that the wires follow the guide in the User Manual, and make sure that the transceiver is correctly connected to the Arduino wires.

22

5.2

Software Conditions

Error Conditions:

Startup.

Application Crashes at

After clicking the Pick

Alert Location button, and selecting a location on the map, nothing happens when the Send

Alerts button is clicked.

A window accidentally closed.

Problem: or installed.

Solution:

SQL Server 2008 Check if SQL Server 2008 is installed. If it is not, may not be started install the software. If it is installed, check to see if it is running. If it is not running, start it. If it is running, restart the database.

There may not be Make sure that there are transceivers in any transceivers in range. Check the box on the right hand side of the range of the selected location on the map.

Simulation Driver Interface that says Show

Transceivers. Once checked, you should see a grid pattern of gray dots appear on the map. Pick an alert location that happens to be near any quantity of those dots. If the selected location is in range of the transceivers, the gray dots will turn red indicating they received the alert signal.

Restart the main application. User accidentally closed one of the windows inside the application.

Table 2. Software Troubleshooting

1.

Upon start up, the application crashes.

Solution: Make sure that there is a SQL Server 2008 database installed on the local machine and started.

2.

Problem: After clicking the Pick Alert Location button, and selecting a location on the map, nothing happens when the Send Alerts button is clicked.

Solution: Make sure that there are transceivers in range. Check the box on the right hand side of the Simulation Driver Interface that says Show Transceivers. Once checked, you should see a grid pattern of gray dots appear on the map. Pick an alert location that

Lab 4 – User Manual happens to be near any quantity of those dots. If the selected location is in range of the

23 transceivers, the gray dots will turn red indicating they received the alert signal.

3.

Problem: One of the windows was closed accidentally.

Solution: Close and restart the main application.

(This Space Left Intentionally Blank)

Lab 4 – User Manual

6.

Glossary (Group)

24

Arduino

Prototype Board

A device that houses a microcontroller and numerous input sockets that can be used to drive a variety of electronic components. The device is specifically designed for testing and prototyping scenarios. It’s architecture is open and well documented.

Dispatch User Interface DUI

Fob A small handheld device usually used as a remote. They are most often used with automobiles and their security systems. When a button is pushed on a fob, an RF signal is emitted.

Master Control

Module

The name given for the complete software module that receives, interprets, and handles any incoming signals from the Master Receiver as well as send data to the Dispatch User Interface for display.

Microcontroller A computer component (usually a microchip on a printed circuit board) that controls small electronic devices.

PASS Personal Alert and Safety System

Simulation Driving Interface SDI

Transceiver An electronic device that combines the capabilities of a receiver and a transmitter. In most places throughout this document, the term transceiver refers to the entire device, including microcontroller and associated equipment (i.e. LEDs, buttons, switches, etc.), power supply, enclosure, and

RF components.

Transceiver

Network

USB

The array of installed transceivers that work in concert with fobs and other transceivers to relay an alert signal to the dispatch station.

Universal Serial Bus. A very common peripheral device connection protocol and physical arrangement.

Download