Home Rehabilitation of Stroke Patients. Designing Games Using Arduino and Raspberry Pi

Master's Thesis, 2019

215 Pages

Ali Al-Mahmood (Author)



Chapter 1 Introduction
How to keep Stroke Patients Motivated:
The Proposed System
Aims & Objectives

Chapter 2 Literature Review
Stroke Definition & Causes
Intensity and modality of rehabilitation changed according to phase of stroke:
Physiotherapy & stroke
Constraint-Induced Movement Therapy (CIMT)
Stroke Recovery and Outcomes
Background (Related Work)
Games in Healthcare
Serious Games for Rehabilitation
The Proposed System Overview

Chapter 3 Methodology
The approach of Agile
The Proposed System Development process
Requirement Elicitation
Functional requirements
System Analysis and Design
Database Design and Development
System Implementation
System Testing
System Evaluation

Chapter 4 Requirements Engineering
Elicitation Activities
Requirements specification
Problem Domain and solutions
Functional Requirements
Performance Requirements (non-functional requirements)
Commercial Constraints

Chapter 5 System Analysis & Design
Textual Analysis
Significant Events Analysis
Classes Collaborations and Responsibilities
System User Cases Diagram
Disability Level Assessment Use Case
Therapist System User Case
Patients System User Case
Unified Modelling Language (UML)
Patient Rehabilitation System Use Case.
Therapist Tracking System

Chapter 6 System Design & Development
System architectural Design
The wearable device design architecture
Sensor Board Design Architecture
The games environment architecture
User Interface Design
System Wireframes
Games engine environment wireframes
Therapist Application wireframes
The required activities for the hand/ leg on the wearable device
System Mock-Ups
Video Games Mock-ups
Therapist Application Mock-ups:
Database design

Chapter 7 System Implementation
Development Programming Languages
Why Python
Why Java
Why C & C++ of Arduino
Setting Up the Server
Set Up a Standalone Network
Set Up the Connection Between the Wearable device and the Server.
Network Connection
Setup the web server.
MySQL Server Installation.
Http Request
Processing the Http Request by the Web Server
Hardware Design and Implementation
Hardware tools
Circuit Design
Hand Wearable Circuit
Leg Wearable Circuit
The software behind the designed hardware
Game Engine Development
Video Games Design Architecture
Space War Shoot Game
Graphics Design
Snake and Bird Jumping Games
Select a game window
Therapist Application (Patient’s Tracking App)
The Developed Classes

Chapter 8 System Testing
8.2. Unit Test & Pytest
Video Games Testing:
Therapist Application Unit Testing
Black-Box Testing

Chapter 9 System Evaluation
System Usability Evaluation
Users Findings Analysis
Rehabilitation System Cost

Chapter 10 Conclusion & Future Work
Future Work


Chapter 12 Appendix
System Demonstration
Video Games System
Therapist Application
Source Code
Database DDL
Arduino Code of the wireless microcontroller
Java Code
Python (Games code)


Stroke leads to intense physical disability in the human body, it causes some deficits due to the horrific events that resulted in wars and other problems in our world. Very often stroke survivors suffer from a permanent partial disability that restricts the movement of the hand, arm, and leg. We know that the rehabilitation should be at an earlier stage of the injury to recover the infected parts of the human body. The key success of the stroke recovery is the patient’s motivation, it would be a challenge to recover if the patient is not motivated and not practising. In this project, we are focusing on finding the best ways to motivate stroke patients to do rehabilitation. Serious games have been involved in this area as it is considered as enjoyable and motivated for all people. Games are very popular, and most people enjoy gaming, especially with the development of the modern technologies which made it very easy to interact with games. Games are getting involved in many different areas like in the military, health care, entertainments, education, and government. In this project, the author will implement a new method to motivate stroke survivors to do their rehabilitation through practicing on a game which will be based on a wearable device to control the game in order to encourage stroke survivors to recover the disabled part of their body.

The proposed rehabilitations system is going to be for the upper and lower limbs practising. Few games have been designed for various rehabilitations purposes such as practicing hands, arms and legs. The proposed rehabilitation system consists of two different applications, the first one is for the patients to practice and the second one is for the therapists to keep them updated with the progress and improvement of their patients. Two wearable devices have been designed, the first one is for the hand practising and the second one is for the legs training.

Chapter 1 Introduction


In our world, there are one billion people which represents approximately 15 percent of the world’s population are suffering from different kinds of disabilities [1][7]. Their disabilities caused by many different accidents and diseases of our world. There are several kinds of disabilities that lots of people are suffering from, in this project we will address the most popular disabilities and find the appropriate ways to do the rehabilitations.

Upper and lower limbs are playing enormous role in people’s life actions, consequently people who are experiencing from some deficits in the upper or lower limbs, are facing difficulties in performing simple tasks [2]. Recovery of the upper and lower limbs will help people to improve their body functionalities.

There are many causes for adult or children disabilities like Turmeric, Stroke, accidents that caused a bones break, diabetes which effects the nervous system and Alzheimer's that effects the elder people.

Stroke is the most common cause of old people disability in most developed countries and it is increasing year after year. And because of the increasing of incidences of stroke, the rehabilitation by the National Health Services (NHS) will be forced to reduce the duration of the rehabilitation support because it is costly and sometimes the NHS cannot provide the proper training equipment’s for each signal patient [3]. Patients need to practice regularly in order to improve the disabled function of their body. Therefore, practicing must be continued in the hospital and outside the hospital to keep the advantages of the hospital rehabilitation which will help patients to improve their Psychological conditions. Moreover, recent studies approved that the intensive and early rehabilitation give the ability to recover the function within several weeks of stroke event [4] [26].

Most patients missed the appropriate time of treatment and that will let them lose the activity progressively.

Currently the rehabilitation ways are poor and the equipment’s that are available in the rehabilitation’s centers are useless, it requires the patients to do repetitive exercises [5]. Because of that, the patients feel boring in using these kinds of machines and this will impact their commitments and motivations.

Daily practicing requires the patients to go to the hospital or to the rehabilitation center to do some training and that puts lots of effort on patients because some patients feel difficulty in movement from a place to another and sometime patients cannot go to the rehabilitation center because it is costly [3]. Even if the cost is not the problem, sometimes we find that the patient doesn't have the incentive to go to a rehabilitation canter to perform some exercises. Therefore, the proposed system will help both patients and the hospital, it will allow patients to practice at home according to some roles which will be provided by the rehabilitation center, hospital, or the therapist and it will help the them by reducing the number of patients who are having treatments in the mentioned places. The proposed project will be able to track the patients’ progress form home by sharing their progresses’ data with their therapists. The system will be explained in later sections.

Clinical medicine and medical theory have proved that the true and early training are playing a massive role in recovering the disabled function of people’s body [6].

Most studies approved that the improvement of rehabilitation of the disabled functions depend on patient’s motivation [5]. It is easier to be motivated in a comfortable place like, at home and often hospitals or rehabilitations centres are not considered as a convenient environment for rehab, so patients are better motivated at home to practice.

Frequently, Stroke survivors find it very difficult to be motivated after their stroke [29]. There are two main things that the stroke survivors suffering from are apathy and depression. In a study of 2012[30], it has been found that, there are 34.6 percent of stroke patients are suffering from apathy and 34 percent are suffering from the depression. Post-stroke patients who are suffering from apathy and depression lose the motivation of their interest, their emotional and they lose the interaction with their environment and life.

There are several ways to keep the stroke patients motivated will be explained in the literature review.

According to a study that around 1.2 billion people are enjoying in gaming worldwide which means games are getting very popular in our world. Serious games are getting involved in many institutions like military, health, education and entertainments. It stimulates by the progressed of games development and in computer graphics hardware. An example of a video game that got very popular among elder people, women and families is the Wii system from Nintendo [7]. It can be played by anyone and it doesn’t need the player to be “hard-core”.

How to keep Stroke Patients Motivated:

Stroke recovery is most critical issue after stroke. Motivation is the borderline between going back to the normal life or living with disability for the rest of the life. Therefore, it become very challenging to be motivated and do the required training to recover. The following steps help the patients to be motivated.

Identify achievable goals

It is very important that a therapist sets some missions to achieve with the patients to do rehabilitation. Goals should be appropriate, reasonable and realistic for the patient as it will help him to recover [31]. Interact with the patient directly and know what the hobbies of the patient and work is to provide the means desired by the patient. For example, if the patient wants to play video games, piano the provision of such means will help him a lot to recover.

Define emotional challenges

The main emotional challenges are depression and apathy that effects the patient’s motivation. In [32] there is some ways that could help the stroke patients to recover their feelings if they were having a depression or apathy.

Committing to a routine

There is no two strokes are same. Each patient has a different stroke according to the affected part of the brain. Therefore, each patient may have a different way of responding to the rehabilitation [33]. Continue a specific training routine can help the stroke survivors to gain the motivation over time. Having a routine stimulate the stroke patients to move to the next level of training. Once a patient started training, he will automatically behave in a positive way responding to the rehabilitation process and that’ll make it easier to finish the rehabilitation course.

Stay motivated

There is no one motivation totaquine works for every patient because people have different ways to be motivated. Therefore, a therapist must be in a very high level of interaction with his patient to find out the best rehabilitation techniques for a patient.

The Proposed System

The suggested rehabilitation tools will be a wearable device that controls serious games, patients can practice on a very simple system at home by playing games through the wearable device.

The proposed project consists of two main parts:

The first part is the games environment for patients which contains three games, each game considering a specific level of disability. The games are Space War, Bird Jumping and Snake. Each game has some levels which should be set by the therapists. A therapist can set as much as levels he wants. Each level has some features that make the games more interesting for patients.

Two wearable devices have been designed to control the games. The first wearable device is for the hand and arm trainings. It allows patients to control the games by moving hands left, right, up and down. There is other activity in the hand wearable device which motivates patients to move their finger to do an activity in playing a game. The second wearable device is for the legs, patients can play games through doing some activities in their legs in order to rehabilitate.

Furthermore, the hand wearable device can measure the patients’ heartbeat while there are training on the system. This feature gives the therapist a better idea of the health conditions of their patients whether it is stable or unstable. The system can prevent the patients from doing a training on the system if their heart rate is not stable.

Patient’s progresses are saved in a database to show the therapist how much they have achieved in playing the games like achieved levels, date, time, hands and leg activities.

Aims & Objectives

The main aim of this project is to motivate people who are suffering from stroke disabilities to do rehabilitation in order to recover the disabled parts of their bodies through doing some practices using this proposed system. Motivation and early rehabilitation considered as the key success of the stroke recovery. Therefore, this project is applying a new method to motivate stroke survivors to do rehabilitation. The proposed system will be focusing on the stroke survivors who are suffering from the upper and lower limbs disabilities.


- Investigate the stroke injury to find out, what are the reasons behind it, what it causes, how it could be recovered, what is the available equipment’s for rehabilitation, how long time it takes to be recovered, what is the stroke side effects, how to reduce its risks. All these kinds of concerns can be achieved through looking at various recourses such as journals, articles, conference papers, physical therapy sources and some other online books.
- Investigate the health condition of the stroke survivors, assess their capabilities of practicing their normal life, how to encourage them to do rehabilitation, how long time they need to practice each day, study their behaviors and track their rehabilitation progress.
- Evaluate the current available stroke rehabilitation techniques.
- Gather as much as possible answers for the potential questions throughout the research and development process. This can be obtained through asking the therapists or the stroke survivors who have fully recovered from stroke.
- Discuss the most motivational means for the stroke patients to do rehabilitation.
- Investigate the available tools of serious games development to design convenient serious games to motivate stroke survivors.
- Design serious games that should meet the purpose of rehabilitation in one environment which should combine all the developed games in one user interface.
- Design suitable wearable devices for the hand and leg.
- Track the patient’s progress on the system. This has been achieved through sharing the result of the rehabilitation each time with the therapist by viewing the result on a desktop application which can be based in the therapy location.
- Assess the health condition of the patients while they are training on the developed system. This can be developed through measuring their stress and heart rate.
- Evaluate the system, usability and key performance indicators - determine project success.
- Test the developed applications. This could be happened through applying some testing techniques on the final product.
- The project will strictly follow the time of development (Gantt Chart) which is at the end of this report. The chart declares the time spans of each part to show how much time each stage is going to take and when the next stage will take a place.
- The final product will be tested on real stroke survivors to find out what their impression about the project.

Chapter 2 Literature Review


This chapter presents a review of the related literature to this research to address the problem domain. A comprehensive research has been done in this project to come up with the most appropriate solutions that should help to solve the problem.

In order to find the most appropriate means to motivate the stroke patients to do rehabilitation, it is necessary to find out the causes, effects, current solutions and how to deal with them. In this section, we will explain the stroke causes, recovery and outcomes, the available tools for rehabilitation and the proposed solutions.

Stroke Definition & Causes

Stroke is a focal neurological deficit caused by loss of blood flow to brain. It is one of two types either ischemic (80%) or hemorrhagic (20%) [8]. Ischemic caused by decrease blood supply by a clot, while hemorrhagic caused by rupture of blood vessel. Motor weakness founds in 80% to 90% of all stroke survivors after stroke which represents a major factor in impaired motor function. Motor deficit is either paralysis (hemiplegia) or weakness (hemiparesis) that occur on the "opposite" side of the body.

Major risk factors for stroke are hypertension, heart disease (HD), abnormal heart rhythm, and diabetes mellitus (DM) [8]. Upper extremity involvement occurs when the defect occurs either higher in the primary motor cortex and internal capsule OR the corticospinal motor tract from the cortex. Injury to the cortex usually occurs when the Middle Cerebral Artery is involved [8], while injury to corticospinal tract occurs then posterior cerebral or Vertebrobasilar artery are involved.

Lacunar strokes are strokes caused by small penetrating artery disease deep in the cerebral white matter [8]. it may cause isolated motor &/or sensory defect without higher cerebral function defect because it not involves the cortex. Pure motor lacunar stroke is associated with involvement of the posterior limb of the internal capsule, pyramids and pons.

The degree of primary weakness is related to the location and size of the brain injury. With distal muscles tend to have greater weakness than proximal muscles.

Studies shows beneficial effects of physical therapy when compared to no treatment or placebo control; and studies on task-oriented practicing have shown positive results on upper extremity function (CIMT training studies).

Intensity and modality of rehabilitation changed according to phase of stroke:

During acute phase [8]: Low-intensity rehabilitation started within 72 hours when the patient health condition is stable as soon mobilization to avoid or decrease the harmful impacts of bed rest as deep vein thrombosis or bed sore.

During Subacute Phase [8]: Usually given as an intensive "inpatient" rehabilitation in a rehabilitation center within the severe hospital care which benefit patients with moderate or severe residual impairments.

Rehabilitation intensity services consist of two or more rehabilitation disciplines, no less than 3 hours a day for six days a week of the effective rehabilitation [8], so Patients should be stable to tolerate such services.

Rehabilitation procedures timing considered as an essential factor of expecting the final outcomes. In general, an early starting of the first 20 days of the injury, has been proven to significantly recover functional outcomes comparing to the later beginning [8]. Other factors that influence the timing of rehabilitation efforts include medical stability, severity of cognitive perceptual deficits, motivation, patient endurance, and recovery.

During Chronic Phase [8]: in general, post-stroke could be for six months or more, and given in an "outpatient" rehabilitation facility, in a community setting, or at home. Usual interventions, including constraint-induced movement therapy (CIMT), bilateral training, virtual reality training, and electromechanical-assisted walking.

The intensity of services provided varies according to specific intervention but is generally less than that of inpatient rehabilitation (e.g., 60 to 90 minutes per visit, two to three times per week) [8].

Physiotherapy & stroke

The connections of neuronal and cortical maps constantly remodeled by our experience [9]. brain capability to compensate for lesions is a serious point for optimal strategies of stroke rehabilitation.

"Active" participation is essential for learning, as passive movements will not induce learning [8].

Because patients with stroke have variable levels of function [8], The choice of interventions should be individualized based on abilities and needs, phase of post-stroke recovery, age, co-morbidities, social and financial resources.

There are many interventions to Improve Upper Extremity Function including upper extremity UE Weight-Bearing as a Task-Oriented Reaching, Postural Support and Manipulation, Constraint-Induced Movement Therapy, Simultaneous Bilateral Training, Electromyographic Biofeedback, Electrical Stimulation, Robot-Assisted Therapy.

Constraint-Induced Movement Therapy (CIMT)

Is the modality of physiotherapy we trying to simulate in our study? The stroke survivor can be engaged in intense task-oriented training of the more infected UE for up to six hours a day [8], performed on sequential days of the week for 10-15 days with the minimal affected UE is restrained from use by having the patient wear a safety mitt up to 90% of waking hours.

Variant form of CIMT called the modified CIMT (mCIMT) has also been used for patients with stroke. For example, in [8] they have used 30 minutes of functional task practice and shaping techniques 3 days per week, and restraint of the less affected UE for up to 5 hours per day over an extended 10-week period. This outpatient protocol increased the use and function of the more affected arm.

Significant gains in motor function and a moderate reduction in disability following CIMT have been demonstrated in patients with stroke. The EXCITE trial was a large prospective, single-blind, randomized, multisite study that included 222 patients after stroke .in [10], it showed that CIMT produced significant statistical and clinical improvements in arm motor function that persisted for at least 1 year.

Changes in brain organization [11] associated with CIMT have also been found on functional magnetic resonance imaging (fMRI), including a shift in motor cortical activation toward other ipsilateral areas and the contralesionally hemisphere.

A study shows that there is a significant gain have also been reported in the patients receiving modified CIMT mCIMT [12]. It is an effective method of improving function.

Patients included in these studies when they have a potential for recovery with some residual upper arm and hand movement (active wrist and finger extension) but tended not to use the arm with limited pain or spasticity and in the absence of cognitive impairment [8].

A small study to compare the effects of a 4-week "homebased" CIMT program [8] among chronic stroke patients and with a 2-week CIMT program, based on the original technique, found that "homebased" CIMT as effective as classic CIMT.

Another well-designed randomized trial for "Home based" program showed gains for the intervention group exceeded those in the usual care group [14].

Stroke Recovery and Outcomes

Recovery is depending on several factors, including the location of lesion, severity and ability for adaptation during practicing and differs within patients [8].

The upper extremity more frequently affected than the lower extremity [8] because of high incidence of Middle Cerebral Artery (MCA) strokes, and about 20% of individuals with MCA strokes fail to regain any functional use of the affected UE.

Recovery from stroke is generally most rapid in the first weeks and months after onset [8]. Late recovery of function has been found in patients with chronic stroke who undergo extensive task-specific functional training using the most affected extremities.

Rates of motor recovery vary according to the initial grade of paresis so minor stroke recover rapidly with few or no residual deficits whereas severe stroke tend to limited and prolonged recovery [8]. In the case of complete paralysis on admission, complete motor recovery occurs in less than 15% of patients. Patients who receive inpatient stroke rehabilitation demonstrate the recovery of the improved motor, quality of life at discharge and functional status.

Post-discharge outpatient treatment or home care for stroke survivors is often important because functional status does not fully regain at discharge and rehabilitation effects reduced over time with no treatment [8].

Poor predictor of outcomes is patient with advanced age, severe motor impairments, persistent medical problems (incontinence) [8], impaired cognitive function, severe language disturbances, and other social and economic problems.

Background (Related Work)

A considerable research already has been done in this area of the recent technologies especially games that are involved in rehabilitations. Some of the researches are using special tools which could be expensive or not qualified. Next paragraphs show some of the worthy researches that have been investigated is this area.

A head-motion control system for rehabilitation at home was explained in [15], which implements a set of complicated algorithms to handle the collected data. They produced a cheap system for tracking and improving “Head Angular Motion Monitoring System (HAMMS)” rehabilitation practicing at home. This has the ability to reduce the treatment’s time and to recover the clinical outcomes.

Microsoft Kinect of Xbox game console was used to track patients, who are interesting in practicing at home with the therapist’s direct supervision or without [15]. The sensors captured the data to compare it with the recommended body posture for a specific patient and practice. So, the patient can get an immediate feedback about his movement’s correctness. In [16], rehabilitation game for balance training for adults with neurological injury. The way of playing this game is, the player should go through a mine hole with a specific number of jewels scattered in it, garish to point out when the jewels can be collected. the order is managed by three manners which they are pre-defined (Sequential pattern, Simon pattern, or Sam pattern) [17]. These patterns must be configured by the therapist before starting each class or session.

Virtual reality (VR) has been used in rehabilitation to engage patients who suffer from stroke to practice the upper limb motor disturbances. The system consists of several games based on VR; the framework of the virtual reality designed to highly persuade patients to practice on these games. The system gives patients the ability to interact with virtual objects in real-time via many shapes to exercise particular motor skills. Patients are those who are suffering from motor deficits, therapists are responsible for setting the system for patients and also identifying tasks [18]. This system has been tested on 8 patients within 6 weeks and the improvements were great. This system was built in 2016 by two student at the university of Derby.

Abbildung in dieser Leseprobe nicht enthalten

Fig 1. A Framework for serious game for movement therapy

A Whack-a-mole is a game that has been developed for rehabilitations, a group of researchers and developers from Japan have designed this game in 2016 [19]. Their aim was to build a system that enables a real-time simulation of force feedback for rehabilitation games, the framework of their system is based on a haptic display. The system name is "Virtual Mole". Fig 2 Describes the system diagram, A Falcon haptic device by Novint Technologies, inc [20] is utilized as a haptic device for 3-Degree of Freedom (DOF) feedback of force.

The system depends on two sub modules for haptic performing and collision computation. The game has five moles. Through moving upward and downward randomly the mole appears and disappears

Abbildung in dieser Leseprobe nicht enthalten

Fig 2. Haptic System Overview

RehaCom is a modular system used for cognitive therapy, in 1986 Hans Regel has developed the concept of the system in Germany and Then it is scientifically backed by studies and research. The system was rebuilt by Hasomed (Inc, Ltd) [7]. It is available over 21 modules. The main aim of RehaCom is to help re-establish neuroplasticity within patients that they have had any type of brain damage and any some mental disabilities [21]. It is an early rehabilitation system. It uses the same structure for all practices activities which make It easier to patients to be familiar with the system. There are many levels of the rehabilitations, these levels can be selected by therapists. the system has many different types of activities that patients can do; it starts with the easiest level to the highest depends on the progress of the patient. After completing their practicing, they can go to view their results, RehaCom records all details like (Tasks they achieved, the spending time, how long each session took to be achieved, etc.…). Fig 3 shows a screenshot of the system at the easiest level of rehabilitation practicing.

Abbildung in dieser Leseprobe nicht enthalten

Fig 3. RehaCom System Overview

In fig 3, the patient can select one of the three images to find the one that matches the images that has been displayed on the right side of the application. For example, in the fig 3 the selected image is image 2 which is rounded by the red color. A patient can use the computer keyboard to select the appropriate image.

RehaCom system has many advantages as it is described in [21] and it is very simple to use, and it offers games with two-dimensional interface.

In [22], proposes a synchronization method of novel human-robot based on gait event data. the event of the gait can be recognized in a real-time process during the walking based on the Hidden Markov Model (HMM). The strategy of the proposed control has been implemented on a portable knee, ankle and foot with an impedance-based assistive control strategy to provide gait practicing.

The method behind the proposed control strategy consists of two steps. First, detect events of seven gait in one gait cycle in a real-time with an HMM. Second, utilize an adaptive oscillator to predict the stride percentage of the human gait using anyone of the gait events.

Virtual environment haptic robotic systems have been used for post-Stroke rehabilitation. As an example of these systems, is the Phantom Omni which has been used as a case in [23] in order to support their research in. In this system, there are many tasks that the patient can perform to train. For example, one task is to manipulate a small point within a circle displayed on the screen.

Fig (4) shows that the system consists of two sub-systems. The first sub-system is the computer that asks the patient to perform a task. Whereas the second sub-system is the equipment that allows the patient to perform the task.

The aim of this system is to help patients with upper-limb disabilities. Patients can use their hands to do some training by performing some tasks that the computer ask them through the Phantom Omni device. This device makes it easier for patients to manipulate and touch virtual objects which gives the patient the motivation to do practicing.

Abbildung in dieser Leseprobe nicht enthalten

Fig 4. System Overview

In [24] a new design of one DOF for finger exoskeleton rehabilitation has been proposed. The aim of this device is to help patients after stroke (neurological trauma) to do some practicing. The device has been developed using a flexible actuator, a mechanism wire and 3D printer in order to provide a light-weight wearable device. A very high level of accuracy has been presented for tracking the rehabilitation through using this device. Some experiments have been done on a volunteer to test the device. A video was recorded for the training and it was analyzed using Kinovea software and MATLAB.

Intelligent games engine has been developed which targets the elderly people within ages 60-70 who are suffering from stroke to do rehabilitation [25]. The main aim of these games was to increase the patient’s involvement with games to provide them the best practices [25] of game and design, support a high level of graphics, avoiding the burden of the therapeutically repetitive exercises and build an engaging rehabilitation experience. Their goal was to create effective games that can perform therapeutic tasks of rehabilitation and to encourage patients to practice on a regular basis through playing these games. They have been developed on high level of graphics (3D). the games are animal feeder and fruit catcher. The way of playing these games was flexible, the game engine can communicate with some supposed input devices like Microsoft Kinect and Nintendo Balance Board. In addition, patients can play these games with their hands, feet or the whole body depending on the rehabilitation system requirements.

Because of all the previous issues of the stroke disability, the author has suggested to build a new system that will be very beneficial, efficient and cheap. Therefore, the proposed system is going to help the patients who are suffering from upper-limb disability as a result of stroke. After stroke, rehabilitation is very important to recover the disabled part of the patient’s body. Stroke requires early rehabilitation to recover the disabled part functionality otherwise it will be almost impossible to recover it.

Currently, the available equipment of the rehabilitation in general are limited, costly and most times it is placed in the health care center which make it difficult for patients to go to the rehabilitation center for training. Another critical issue with rehabilitation is that the patients need a very high motivation to do their training. And most of the available tools do not persuade the patients to do practicing.

Furthermore, according to the statistics of the researchers that the percentage of stroke is increasing significantly for some reasons. And because it is increasing, the health care centers that care about rehabilitation cannot accommodate these numbers of disabled people.

Therefore, the proposed system will try to deal with all the above issues to make it easier for patients to practice at home. The proposed system will collaborate most things that the patients need for rehabilitation, it will help patients to train at their houses, it will keep the patients in touch with therapists, it will reduce the rehabilitation time and cost and it will help the patients by motivating them to do some trainings.

The proposed system is video game based on a wearable device which will be developed to help patients to recover the disabled part of their body by playing games on the system. The system consists of a wearable device, screen and small server that provides the games. Patients need to wear the wearable device to control the games by doing some activities using their arms, hands or legs.

The wearable device contains some sensor that detects the movements of the disabled part.

Games in Healthcare

Serious games dealing with health have been grown widely. In spite of all authors discussions which proved that the entertainment is not the main goal and there is single description of the game’s concepts. Games have defined by Zyda [7] as a “mental contest, played with a computer in accordance following particular rules, which uses for many purposes like, for governments training, health, education, strategic communication targets, and public policy” [7].

Michael and Chen [7] describes serious games as "A serious game is a game in which education (in its different forms) is the essential aim, rather than entertainment" [26] serious games are not only these application games and the technology of the game [7], they are for entertaining, enjoying and for fun, but the main aim of games is either the imagination of the game designer or that the player realized through playing the game.

Serious games designed and developed for many purposes, for entraining, educational, military, healthcare, and in many other fields. In our work, we are concentrating on the games that allow the user to achieve particular tasks through using the entrainments and engagement component that supported by the game’s experience.

Serious Games for Rehabilitation

Games have been used for rehabilitation featuring physical therapy, human behaviours changes, biofeedback, epidemiology, cognitive exercises, training, health education and nutrition [27].

Video games are used in many fields. Some people are addicted to games especially the children. Therefore, in [28] a new serious game has been developed to help the disabled children to practice mathematics. The serious game called MathBharata, the aim of this game was to motivate the disabled children to study mathematics. MathBharata is a serious quiz game where children can try to answer multiple choice questions with increasing difficulty. It contains various aspects to learn math. Over 85 students have tested MathBharata [28]. The test was in regular schools and disabled schools. The overall presenting was 29.4% of students were “strongly agree” and 70.9% were just “agree”.

The Proposed System Overview

The proposed system is a set of video games which will be allocated at patient’s place (patients houses) to let them play these games at their houses. The games have been designed for rehabilitation purposes. Normally patients feel more comfortable in their houses than the health care centre or the therapy centre. Therefore, the proposed system will be at home. The system is going to allow patients to play some games through the movement of the disabled part of their body, some motion sensors will be linked to the disabled part as a wearable device to read some data that will be generated by their movements in order to play a game which will be displayed on a screen. The system will have some levels for each game, each passed level means that there is a progress in the patient’s health.

The proposed system is not just video games, but it will be a complete environment which will include patients and therapists. Therapists will be able to track their patients through an application which is a desktop application. The application interacts with patients in a real-time. For example, therapists can see the progress of their patients like what level they have achieved, how much time patients have spent on the game, etc...

One more beneficial feature has been added to the system which is a social network that allow patients to share their progresses on playing the games. The author considered this feature as a significant motivation to the patients because when they see others are doing practices on the games, they be highly motivated to achieve what other have achieved.

There are two wearable devices have been developed, each one is for a different rehabilitation function. It consists of some motion sensors which will be illustrated in the system design and development section.

The system will be tested on real patients to find out the possibility of using it and how much it can motivate patients to do rehabilitations.

The following snapshot shows a brief overview of the proposed rehabilitation system.

Abbildung in dieser Leseprobe nicht enthalten

Fig6. Screenshot of the developed system

Chapter 3 Methodology


In software engineering, there are many methodologies can be followed to develop a project. In order to find the correct methodology for a project development, there are few questions must be answered, like 1) are the system requirements static or it can be changed through the development process. 2) How many team members are involved in developing the system. 3) What is the time flexibility. 4) what is the complexity level of the project. 5) By answering these questions carefully, the author will be able to choose the most appropriate methodology to be followed to develop the proposed system.

Due to the nature of the proposed rehabilitation system, which is associated with people health and life, the author should be focusing and aware of several things such as the system development method and the used equipment’s which must be very precise and careful so as not to adversely affect the user’s life. It is also necessary to be fully familiar with the mechanism method of exercising the disabled part of the body which can help the patient in recovery. On top of this, it is essential to meet the user’s expectations of using the proposed system and reach the satisfactory level of their expectations. Also, in the development of such a system related to people life, it is would be necessary to involve users throughout the development process to improve the system according to the given feedback.

The author has selected the Agile development methodology due to its features that match with the proposed system needs. If the project produces valid outcomes, then the development would go further.

The approach of Agile

Agile is an innovative approach, it is a conceptual framework for undertaking software engineering project [34]. Agile software development methodology can be used for producing a full organized project management which allows moderations easily.

In 2001, there was a group of people who were discussing their opinions about the traditional methodologies of IT projects developments and found that these methodologies did not meet all their demands in most times, Therefore, they have thought of creating a new way to help them to find suitable solutions to the problems that they face in the development process. They come up with the agile methodology (agile manifesto) [34] which defines the following principles:

1. Interaction and individuals over procedures and tools
2. It focuses on the software development and implementation over the documentation.
3. The customer involvement throughout the development processes.
4. Not restricted to a fixed plan, it responses to changes as needed.

Abbildung in dieser Leseprobe nicht enthalten

Fig 7: Agile Methodology Overview


- It concentrates the project’s developments more than the documentation.
- Client’s collaborations are considerable.
- It takes less time in developments with less cost.


- It is difficult to predict the budget, the time of completion and the plan.
- Unstructured.
- In some cases, client’s collaborations can cause time consuming.

How Agile methodology works?

There are several steps can be followed in developing a project according to Agile methodology [36]. Firstly, sitting with the customer to collect as much as possible requirements and features about the proposed system to make a list of requirements, these requirements called user stories [35].

Secondly, applying agile estimation techniques to size the list of user stories that related to each other. This could help in visualizing and guessing a set of ideas such as the required time to develop that project.

Thirdly, set the proposed system priorities. this can be done by asking the client about the most important requirements that should be implemented at the beginning and keep other requirement to later stage.

Fourthly, Starting the process of implementing the project from the most important requirements to the least important. Structuring, iteration and getting feedback from the client throughout the development process.

It is possible to keep updating the project development throughout the development process according to the given feedback by the customer.

Abbildung in dieser Leseprobe nicht enthalten

Fig 8. Agile life cycle [37]

The Proposed System Development process

The section will cover the processes that will be taken in the project development to meet the aims and objectives that are listed in Chapter 1. This section will clarify the steps that you will followed in project development process.

Requirement Elicitation

For appropriate and accurate solutions to be developed, problems must be fully understood. Understanding the problems is essential to achieve the right solutions and that can be done through collecting the possible information about the problem by finding out the available resources of the matter and identifying the current solutions. The following table shows how the information/requirements of the problem can be gathered.

Abbildung in dieser Leseprobe nicht enthalten

Table 1. requirement elicitation

Functional requirements

To gain a better understanding of the proposed system functionalities and to identify well-presented solutions. The author believes that the following table that shows a set of implementable techniques will help in understanding the process of the development.

Abbildung in dieser Leseprobe nicht enthalten

Table 2. System functional requirements

System Analysis and Design

To achieve strong and reasonable solutions for the problem, the author has considered several techniques that facilitate the design and development process. The following table illustrates some of the used techniques.

Abbildung in dieser Leseprobe nicht enthalten

Table 3. analysis techniques

Database Design and Development

To justify why a database has been selected to develop a system, in this section the author is going to show two relevant databases to the proposed system to select one and show why it has been selected.

The following tables show a comparison between the two databases.

Abbildung in dieser Leseprobe nicht enthalten

Table 4. databases comparison

Due to the benefits and the negatives of the mentioned databases. The author has selected the RDBMS (MySQL) database because it has been considered as the most convenient database to store the proposed system data.

Furthermore, the way that the proposed system will be design, it will not have to deal with large data. Therefore, MySQL has been selected for this project.

System Implementation

There are some considerations must be created in order to develop the proposed system. The following table shows these considerations and how it will be implemented.

Abbildung in dieser Leseprobe nicht enthalten

Table 5. implementation methodologies

System Testing

Several testing strategies will be used to test the system functionalities throughout the development process and on the final product. The table below shows the testing techniques.

Abbildung in dieser Leseprobe nicht enthalten

Table 6. Testing techniques

System Evaluation

System evaluation is the stage of evaluating the performance and efficiency of the developed system. It plays an ideal role in improving the system performance, efficiency and making it integrated. This can be done through reviewing it by the real users to get their feedbacks which could help in improving the system. There are few steps should take a place in order to evaluate a system [41]. The steps as follows:

- Determining the personal trading aims
- Danger resonance
- The selected parameters
- Testing steps
- Standardization and conclusive testing

It is a fundamental thing that each new system should be completely evaluated before being used in a real live marketing because that would help the system owner to develop it by making changes or adding new ideas.

Chapter 4 Requirements Engineering


This section investigates the problem domain of the proposed system through several steps such as collecting as much as possible information about the project through the elicitation techniques, analyzing the functional and the non-functional requirements.

Elicitation Activities

At this stage, all possible procedures are taken to identify the requirements of the proposed system in order to have a full understanding of the problem domain and difficulties that should be solved in the proposed system.

Due to the nature of our problem which is related to the people health, the author has considered that there are two major methodologies can be followed to gain a full understanding of the proposed system requirements. The first method is the research part that can be done through investigating the available sources of stroke causes, recovery, etc., these sources can be articles, journals, conference papers or books that are related to the subject of our problem.

The second method is to collect information and requirements about the problem by interviewing the stroke survivors who had successfully recovered and therapists because they are the ones who will use this system.

All the system requirements have been gathered through following the mentioned methodologies as the chapter tow of literature review shows. In chapter 2, over 28 researches were reviewed to create a large background of the problems and solutions available, thus all the requirements have been obtained.

During the research, there were new ideas and questions come to the author mind and they need answers. The answer to these questions were either by going deep in the research or by reviewing another research similar to the subject.

Requirements specification

Problem Domain and solutions

As mentioned in the literature review and introduction chapters that stroke survivors suffer from several issues depending on the type of stroke. As the type that we aim to find new solutions that would help stroke patients, is the type of stroke that affects the lower or upper limbs that causes a disability to the stroke survivors.

There are several methods currently used to treat stroke patients depending on the stroke type, some strokes require pushing more blood to the brain, some others need a medical treatment such as injections and some other need to rehabilitate and stimulate the brain through physical exercises.

Due to the stroke psychological impact on the stroke survivors, we find that in most times they are frustrated and disappointed. Therefore, we are trying to find a new motivation method to help stroke survivors to recover the affected cells of their brain through doing rehabilitation using our new system.

During our long-term research, we have come up with convenient solutions to motivate the stroke survivors so that they will be able to perform the required exercises continuously and without boredom.

Currently, the available tool of the rehabilitation in general are limited, costly and most times it is placed in the health care center which make it difficult for patients to go to the rehabilitation center to do training. Another critical issue with rehabilitation is that the patients need a very high motivation to do their training. And most of the available tools do not persuade the patients to do practicing.

Furthermore, according to the statistics of the researchers that the percentage of stroke is increasing significantly for some reasons. And because it is increasing, the health care centers that care about rehabilitation cannot accommodate these numbers of disabled people. Therefore, the proposed system will try to deal with all the above issues to make it easier for patients to practice at home. The proposed system will collaborate most things that the patients need for rehabilitation, it will help patients to train at their home, it will keep the patients in touch with therapists, it will reduce the rehabilitation time and cost and it will help the patients by motivating them through enjoyable methods to do some trainings.

The proposed system is video game based which will be developed to help patients to recover the disabled part of their body by playing games on the system. The system consists of a wearable device, screen and small server that provides the games. Patients need to wear the wearable device to control the games by doing some activities by their arms, hands or legs.

The wearable device contains some sensor that detects the movements of the arm or leg. This will be fully explained in the chapter of system design and development.

Functional Requirements

The proposed system consists of two separated applications, the first one is for stroke survivors which include the video games and the wearables devices, the second one will be for the therapists to track and control the training of their patients.

The following table shows the functionalities that have been implemented on the system.

Abbildung in dieser Leseprobe nicht enthalten

Table 7. Expected functionalities

Patients Functional Requirements (users):

- The user system is a full gaming environment which can be located at their place.
- Users should have a verified account on the system in order to play the games.
- Users accounts should be verified by a therapists or admin.
- Three games have been designed to be played by users to do rehabilitation.
- Game 1: Space war
- Game 2: Bird Jumping game
- Game 3: Snake game
- Each game can be classified for a level of disability.
- Each game can have as many levels of difficulty as the therapists want.
- Users must wear the wearable device to control a game.
- Users starts or ends any game at any time they want.
- A new level of difficulty will be started after achieving the required score to move to the next level.
- Users progress’s data will be sent to the main server over the internet to be reviewed by a therapist to check how many times that a user has moved the disabled part of his body up, down, left and right.
- Rehabilitation can be for hand, fingers, arms and legs.
- A heartbeat feature was implemented on the system to measure the user health condition during his training time on the system.
- Users system has a feature of viewing the highest scores of what other users have achieved on the games. This feature has been considered by the author as a motivation feature because it encourages the user to achieve what others have achieved.

Therapists Functional Requirements:

- Therapists can add, update, delete a user on their system.
- Therapists can only track or manage the users who have been added by them.
- Therapists can view the progress results of their users such as how many times a user has trained on the system, how many times a user has moved the deficit part of his body, all these data should be plotted in their system.
- Therapists can set the games and level for every single user.
- Therapists can manage the games such as the required scores, levels and speed of a game.
- Therapists can block a user in case of any unexpected results or rehabilitation finishing

Administration Functional Requirements:

- Admins can manage the therapists and patient’s records/profiles on the system.

Performance Requirements (non-functional requirements)

Rehabilitation system must be attractive, friendly and on a high level of performance due to its nature, especially for patient’s system because the main aim of this project is to motivate them to practice using this system. The system functionalities must meet the required criteria to produce an effective system. This section explains the required performance criteria that the system should include produce an integrated and efficient system.


For the video games environment, there are specific techniques must be followed to meet the video game development roles such as the speed of decision-making, speed in the changing and moving frames. All these require an efficient programming and effective game engine.

The games controller should be connected wirelessly to the game’s server and that requires a fast connection to send data and receive responses. The wireless connection must be powerful and must avoid any delay that could be happened. Patient’s application will be running on a small server that runs the video games. The system must be on high speed because video games requires a real-time process which should be very fast. As well as to keep the patient’s motivation in using the system.


Initially, user’s system requires a high capacity on the server hard drive because games require a high performance. The required memory capacity should not be less than 8GB due to the games size. All the user’s progresses data on the system should be transferred to a database hosting to be reviewed by the therapists. The database capacity must be high as well due to the expected large number of patients on the system.


The games server must be able to handle the high processes of the games. It would be better if the therapists could have a back-up of the system in case if there are any problems that may happened with the patient’s application. The database back-up will be done automatically at the end of each day.


The user interface design of the games will be on a high quality to persuade the patients to use the system. The system must be flexible to be linked on any type of screen monitor.


Excerpt out of 215 pages


Home Rehabilitation of Stroke Patients. Designing Games Using Arduino and Raspberry Pi
University of Northampton
Catalog Number
ISBN (eBook)
IoT, Internet of Things, Wearable Device, Stroke Rehabilitation, Arduino, Raspberry Pi
Quote paper
Ali Al-Mahmood (Author)Michael Opoku Agyeman (Author), 2019, Home Rehabilitation of Stroke Patients. Designing Games Using Arduino and Raspberry Pi, Munich, GRIN Verlag, https://www.grin.com/document/493629


  • No comments yet.
Read the ebook
Title: Home Rehabilitation of Stroke Patients. Designing Games Using Arduino and Raspberry Pi

Upload papers

Your term paper / thesis:

- Publication as eBook and book
- High royalties for the sales
- Completely free - with ISBN
- It only takes five minutes
- Every paper finds readers

Publish now - it's free