project

profileNoaf18
final_functional_block__muhannad.pdf

Smart Crowd Management: System Algorithm

Smart Crowd Management: System Algorithm

Prepared By

Document Owner(s) Project Role

Almuhannad Althurwi

Algorithm System Designer

Functional Block Revision Control

Version Date Author Change Description

0 1/18/2017 Almuhannad Althurwi

Created document.

1 1/25/2017 Almuhannad

Althurwi Modified Objectives

2 1/28/2017 Almuhannad

Althurwi Updated System level block diagram.

Updated functional block diagram

3 1/30/2017 Almuhannad

Althurwi Revisions to feature set.

Details added to interface specifications.

Revision of Acceptance test.

4 2/02/2017 Almuhannad

Althurwi Revision of words, spellings and grammar.

Improvement in block diagrams.

Improvements in input and outputs

5 2/03/2017 Almuhannad

Althurwi Improved Functional Block

Revision in Feature Set

Revision in Interface specification

Additions in Acceptance test

6 13/02/2017 Almuhannad

Althurwi Updated Hardware functional block.

Updated Program functional block diagram.

Improved feature set

Updated Acceptance test for checking Algorithm delays

Saqer Alhloul
Saqer Alhloul
Saqer Alhloul
Saqer Alhloul
Saqer Alhloul
Saqer Alhloul
Saqer Alhloul
Saqer Alhloul
Saqer Alhloul
Saqer Alhloul
Saqer Alhloul

Smart Crowd Management: System Algorithm

7 26/02/2017 Almuhannad

Althurwi Added flowchart

Added Psuedocode

Made modifications in feature set and acceptance test.

Smart Crowd Management: System Algorithm

Objectives:

1. Room database management.

2. Room allocation decision and database management.

3. Calculation of room size based on the entry/exit data.

4. Database transmission via Wi-Fi interface

System Level Block Diagram

Hardware Functional Block Diagram

Smart Crowd Management: System Algorithm

Program Functional Block Diagram

Flowchart:

Smart Crowd Management: System Algorithm

Psuedocode:

1. Set controller pin configuration for input.

2. Initialize room_count, enter_variable,exit_variable,capacity and enable_bit.

3. Initialize interrupt 1 and interrupt 2.

4. Call Initialize LCD function.

5. While 1

6. If interrupt_1

7. If Enable_bit = 1

8. Enable_bit = 0;

9.

10. Else

11. Enable_bit = 1;

12. End

13. If interrupt_2

14. Reset room_count, enable_bit, enter_variable and exait_variable.

15. End

16. If enable_bit == 1

17. Check sensors inputs

18. If sensor1_input = 1

19. Room_count++

20. Enter_variable ++

21. Else If sencor2_input = 1

22. Room_count—

23. Exit_variable ++

24. End

25. End

26. If Room_count == capacity, sound buzzer and display capacity full.

27.

28. Call LCD data refresh function.

29. Call WiFi data transmission function.

30.

31. End

Saqer Alhloul
Saqer Alhloul

Smart Crowd Management: System Algorithm

Feature Set:

Feature Description Design Constraint

Scope

Required /

Opportunistic

Algorithm for sensor

input

A C++ based algorithm for

taking input data from the

sensors and interpreting the data

as an input or output. Controller

will take input data from each

sensor separately.

Maximum of 4

sensors supported

(Two for entry

data, Two for exit

data) according to

my last week

experiment with

this step, we might

use eight sensors.

First sensor will be

for the entry and

the second one will

be for the

exit.(total of 4

rooms.)

Required

Algorithm for decision

making

Decision making based on the

input and categorize the data

either as an entry or exit of

person.

Support of multiple

inputs at the same

time (Inputs from

all sensors at the

same time).

Required

Maintaining database Record of previous entries and

exits in the built in ROM of the

Microcontroller. The data will be

saved in form of arrays and

organized for the sake of

transmission when required.

Maximum of 5K

records.

Maximum ROM

usage of 2048KB.

Required

Transmission (Wired) Wired transmission of data for

displaying on the LCD.

(Optional depends on what Brett

will use for his part)

6*12 e-ink screen

compatibility.

Opportunistic.

Transmission (Wireless) Algorithm for wireless database

transmission to the cloud via

wifi.

Max data rate of

10Mbps.

Required

Manual Over-ride An interrupt based manual over-

ride, pause, and reset

functionality in case of

emergency

Usage of not more

than 2 interrupts.

Required

MCU Hardware Designing hardware for

supporting relevant

microcontroller, acquisition of

inputs and delivery of outputs.

Physical area of

less than 15cm2.

Rated power of 15

watts.

Required

4x4 Keypad Interface C++ based interfacing of 4x4

Keypad with the

microcontroller.

8 MCU input pins Opportunistic.

External Crystal

oscillator

Crystal oscillator with a pre-

calculated oscillation frequency.

3.2768 MHz Required

Interface Specification:

Input Only:

Smart Crowd Management: System Algorithm

Supplying Block Name Supply Block Owner Interface Specification Name

(Include a Reference Link)

Counter Hardware WaseemKhalaf  Simple Wired Connection. No specific standard. 5V binary signal.

 The MCU requires inputs from the sensors which will be used by the

FS.1 (Feature Set 1).

MCU Block  Manual Over-ride keys will provide date through simple wired

connection. The inputs lie within the

parent block.

 Binary input using 5v push buttons.

Output Only:

Supplying Block Name Supply Block Owner Interface Specification Name

(Include a Reference Link)

User Interface Brett Hosrtketter Error! Reference source not found.Serial Communication with the

LCD (Optional).

Transmission of data to the 16 x 2 LCD

for displaying. (Optional)

SPI Interface based data transmission.

User Interface Brett Hosrtketter Wireless Communication

Wireless transmission of the data to the

User Interface block for displaying.

802.11 b/g Wifi Interface (Proposed).

Saqer Alhloul
Saqer Alhloul
Saqer Alhloul
Saqer Alhloul
Saqer Alhloul
Saqer Alhloul
Saqer Alhloul
Saqer Alhloul
Saqer Alhloul
Saqer Alhloul
Saqer Alhloul
Saqer Alhloul
Saqer Alhloul
Saqer Alhloul
Saqer Alhloul
Saqer Alhloul
Saqer Alhloul
Saqer Alhloul
Saqer Alhloul
Saqer Alhloul
Saqer Alhloul
Saqer Alhloul
Saqer Alhloul
Saqer Alhloul
Saqer Alhloul
Saqer Alhloul
Saqer Alhloul
Saqer Alhloul
Saqer Alhloul
Saqer Alhloul
Saqer Alhloul
Saqer Alhloul
Saqer Alhloul
Saqer Alhloul
Saqer Alhloul
Saqer Alhloul
Saqer Alhloul
Saqer Alhloul
Saqer Alhloul
Saqer Alhloul
Saqer Alhloul
Saqer Alhloul
Saqer Alhloul
Saqer Alhloul
Saqer Alhloul
Saqer Alhloul
Saqer Alhloul
Saqer Alhloul
Saqer Alhloul
Saqer Alhloul
Saqer Alhloul
Saqer Alhloul
Saqer Alhloul
Saqer Alhloul
Saqer Alhloul
Saqer Alhloul
Saqer Alhloul
Saqer Alhloul
Saqer Alhloul
Saqer Alhloul
Saqer Alhloul
Saqer Alhloul
Saqer Alhloul

Smart Crowd Management: System Algorithm

Acceptance Test:

1. Correct Data Management:

 Correct number of inputs and outputs summary on the LCD. (This is optional, depends

on Brett choice)

2. Storage of Data:

 Data is retained after resetting the device.

 Successful generation of 2D data arrays for data storage.

 Maximum support of 256 entries.

3. System storage:

 Compact program size with the maximum program size that fit on the Arduino.

4. Interrupt Functionality:

 Correct detection and action on interrupts.

 Resetting of the count on reset interrupt.

 Start/Stop of Counting on Pause push button.

5. Wireless Data Transmission:

 Transmissions of the data serial port and/or web upload after export.

 Updating of data on user interface within 500ms of trigger at the input.

6. Required clock frequency:

 Correct delay implementation when measured by a stopwatch.

Saqer Alhloul
Saqer Alhloul
Saqer Alhloul
Saqer Alhloul
Saqer Alhloul
Saqer Alhloul
Saqer Alhloul
Saqer Alhloul
Saqer Alhloul
Saqer Alhloul
Saqer Alhloul
Saqer Alhloul
Saqer Alhloul
Saqer Alhloul
Saqer Alhloul
Saqer Alhloul
Saqer Alhloul
Saqer Alhloul
Saqer Alhloul
Saqer Alhloul
Saqer Alhloul
Saqer Alhloul
Saqer Alhloul
Saqer Alhloul
Saqer Alhloul
Saqer Alhloul
Saqer Alhloul
Saqer Alhloul
Saqer Alhloul
Saqer Alhloul
Saqer Alhloul
Saqer Alhloul
Saqer Alhloul
Saqer Alhloul
Saqer Alhloul
Saqer Alhloul
Saqer Alhloul
Saqer Alhloul
Saqer Alhloul
Saqer Alhloul
Saqer Alhloul
Saqer Alhloul
Saqer Alhloul
Saqer Alhloul
Saqer Alhloul
Saqer Alhloul
Saqer Alhloul
Saqer Alhloul
Saqer Alhloul
Saqer Alhloul
Saqer Alhloul
Saqer Alhloul
Saqer Alhloul
Saqer Alhloul
Saqer Alhloul
Saqer Alhloul
Saqer Alhloul
Saqer Alhloul
Saqer Alhloul
Saqer Alhloul
Saqer Alhloul
Saqer Alhloul
Saqer Alhloul
Saqer Alhloul
Saqer Alhloul
Saqer Alhloul
Saqer Alhloul
Saqer Alhloul