Report 2 PDF
Report 2 PDF
Project
Contents
1 Introduction 3
2 Device 4
2.1 Input devices . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4
2.2 Output devices . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4
3 User Requirements 5
3.1 Functional Requirements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
3.2 Non-Functional Requỉrements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
4 Use-case Detail 6
4.1 Manage study schedule . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
4.2 Notify study time/ break time . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
4.3 Detect student’s presence . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
4.4 Evaluate real-time studying condition . . . . . . . . . . . . . . . . . . . . . . . . 14
4.5 Show study performance . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16
5 Use-case Diagram 18
6 Mockup 19
6.1 Welcome, authentication page . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19
6.2 Homepage and Navigation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20
6.3 Notify at scheduled session time . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21
6.4 Show study performance . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23
6.5 Schedule management . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26
6.6 Evaluate real-time studying condition . . . . . . . . . . . . . . . . . . . . . . . . 28
7 Class diagram 30
7.1 Clarification . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30
7.2 Class diagram . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30
8 Deployment View 32
9 Database Design 33
9.1 Entity-Relationship Diagram (ER diagram) . . . . . . . . . . . . . . . . . . . . . 33
9.2 Relation Schema . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34
DOCUMENT HISTORY
1 Introduction
Self-studying is a learning method where students direct their own studying outside the class-
room and without direct supervision. Since students are able to take control of what (and how)
they are learning, self-studying can be a very valuable way for many students to learn.
Also, since the knowledge nowadays develops exponentially, self-study is a must for every stu-
dent. As a consequence, the amount of time required for students for self-studying is increasing.
However, the study space may affect the efficiency of self-studying. In Vietnam, most students
take place for self-studying in the coffee shops, libraries,... instead of learning at home because of
the distractions which appear in the house and students’ bad self-management skill. The spread
of the COVID-19 pandemic now make students unable to go to coffee shops and libraries, and
almost 100% of their study time will be taken place in their study room.
With said in mind, we are working on a project to guide students to schedule their timetable
well, as well as build a smart study space that can enhance the efficiency of self-studying.
In this project, we intend to use hardware devices for recording self-study’s environmental condi-
tions and notifying when it is time to study as he/she scheduled. An application is also provided
to set schedule, check self-study performance and get advice to improve the study space.
2 Device
2.1 Input devices
1. Sound Sensor
• Characteristics: transform sound signal into electrical signal that the circuit can
interpret. Size: 2.54mm x 2.54mm.
• Usage: Check and validate the sound level, notify the users if the sound quality is
unsuitable for learning problem.
2. Infrared sensor
• Characteristics: It can detect an obstacle effectively.
• Usage: Check if the user is present at the study space(ex: desk), notify the user if
he/she is not at the study space.
3. Real - time clock
• Characteristics: Record the real time value.
• Usage: Assist the system in setting time, recording value.
4. DHT11
• Characteristics: Measure humidity(20% - 90% RH) and temperature(0 ∼ 50 °C).
• Usage: Check if the temperature is comfortable for learning experience.
5. Light sensor
• Characteristics: Check the light condition.
• Usage: Measure the light condition of the learning environment, notify the user if the
study space is dark or dim(unsuitable for learning effectively).
6. Microbit
• Characteristics: This is the central control circuit.
• Usage: Handle communication between server and devices.
3 User Requirements
3.1 Functional Requirements
• User can schedule (set the study time) the timetable in the application.
• The above schedule can be removed if the start time has not come yet.
• The application will be in charge of notifying when will be the study time or the break
time. Normally, if the sessions takes more than 45 minutes, a 10-to-15-minute break time
will be set up after 45 minutes of studying (to protect your spine).
• Data in the study space such as light level, noise,... will be recorded by sensors and trans-
ferred to the database. Notification is needed when an unsatisfying condition of light level,
noise,... in the study space is met.
• The recorded data is also used to calculate study performance score of every self-study
session, the score can be shown to user via the application with additional advice.
• Hardware devices will detect whether student appears in the study session as set previously
in the application or not. Mobile application will send notification if user is not in the study
place at that time.
• Data transfers and queries between user mobile application and device must be at maximum
2 seconds for each actions.
• The system must ensure working correctly 24/7.
• Application can support multi-platform.
4 Use-case Detail
All Implementation views (i.e., Activity diagrams) appear after each use-case detail can be
accessed here in case they are too difficult to observe.
True
Time in schedule
False
End study session
Check study
time
Time in False
schedule?
True
Check for
student
Check remaining
wait time
Start study
Send notification
session
No time False
left?
True
Send notification
Raise exception
Collect data from
environments
[Data received in
real time]
[Data exceeds
threshold]
Raise warning
[Data within
threshold]
[Exit ]
[User chooses a
sensor section]
Display detailed
settings for the
sensor
[User toggles
sensor]
5 Use-case Diagram
There are 2 use-cases (Show current sensor data and Login/Logout/Signup) that are not
mentioned in the use-case detail because of its simplicity.
Show current
sensor data
Login/Logout/Signup
Notify at scheduled
<<extends>>
time
Notify at scheduled
session time
<<extends>>
Notify at break time
Hardware Devices
6 Mockup
6.1 Welcome, authentication page
The images below are the welcome page when users first open the app, the sign up and log
in pages for authentication.
Study/end notifications
show up at scheduled
time
Other study-related
notifications appear
• The color of score circle may have either 4 types: green (when score > 90, updated from
the mock up where needs score = 100), yellow (90 > score > 70), red (70 > score > 0),
grey (score = 0 or no recorded data received).
Figure 12: Main screen of study summary for showing study performance
• Sound sensor to measure the sound level, raise warning if the environment exceeds accept-
able noise threshold.
• Temperature to measure the room temperature, raise warning if the room temperature
may yield uncomfortable learning experience.
Tapping on one of the available sensors will lead users to this screen where they can toggle
the sensors if they do not wish to be disturbed by it, manually set the range to their preference
or view the list of values and their indications (for example: 130db to indicate the sound level
surpass the threshold of pain -> unsuitable for learning)
7 Class diagram
7.1 Clarification
The figure of class diagram is shown in Figure 19. However, it may be difficult to observe in
this document, readers should get on this link for .drawio file or this link for .jpg file.
The whole project is divided into 3+1 blocks as can be seen from the class diagram.
• The Controllers block, whose classes shown with blue headers (except for SensorEvalua-
tion as a enumeration), is responsible for taking the requests from view block and do the
appropriate operations. Most of the business logic in defined here, especially the logic to
get query/information from the servers (e.g., when the user asks for showing all the up-
coming session, it will call the SessionController to handle this. The SessionController will
establish a connection to SQLServer to do a query, then fetch the result into JSON format,
the result will be convert into a Session object that will need to display on the view).
• The Model block, whose classes shown with red headers, stored necessary information and
generate suitable format for showing on the views. It can only be created by classes in the
Controller block.
• The View block, whose classes shown with yellow headers, and the block is divided into
smaller blocks to define members’ work as well as get more convenience while walking
through the use-case. It provides the interface for user and call the appropriate controllers
every time user has a request.
• The 2 classes with purple headers are servers, these are not implemented in the application
itself but in external web servers.
The actual implementation may appear minor difference from this to suit certain desires and
frameworks.
8 Deployment View
9 Database Design
9.1 Entity-Relationship Diagram (ER diagram)
password dob
username
id
1
fname User
lname assigns
date
title
unit
M
id start_time
M 1
Sensor records Session
name
end_time
timestamp d
id status
USER
SESSION
SENSOR
S/T/TH
• Gaining skills of frameworks: Flutter, MySQL, Firebase, MQTT, Flask (Python), etc.
• Teamwork skills.
10.2 Self-evaluation
The team with 5 members have made great contributions to the project. Accordingly,
• Trần Quốc Anh: Work with MQTT server, develop the use-case of notifying study
start/end time, break time and detect student’s presence, organize a web server as a service.
• Nguyễn Lâm Nguyên Bảo: Improve the relation schema, develop the MySQL server,
work with controllers.
• Nguyễn Hoàng Dũng: Improve UI/UX, develop the use-case of show study performance,
take some work at servers (MySQL, MQTT/AdaFruit), improve class diagram, complete
the report and related documents.
• Nguyễn Khắc Hào: Develop the use-case of managing study schedule, improve UI, im-
prove the relation schema.
• Đặng Trần Khánh: Develop the use-case of evaluate real-time studying condition, work
most with MQTT/Adafruit server, organize a web server as a service, improve deployment
view.
• Provide a platform to consult user the best equipment to buy for their study space from
their room specification and user’s preferred style. If success, the application will be a
connection for user and equipment’s seller and be considered as in commercial use.
• The application will separate user roles to be Student Mode and Parent Mode. The noti-
fications will be raised for appropriate user in a particular mode. Parent can observe the
study status of their child.
• Integrate the quiz system that allows users to test themselves when the need arises with
numerous tests from different subjects.
• Suggest study space design according to users’ preference, personalities to further enhance
the learning experience.