Accelerometer-Based Recorder of Fingers Dynamic Movements for Post-Stroke Rehabilitation

Stroke is a disease that currently attracts more attention in Indonesia according to the statistics provided by the Ministry of Health of the Republic of Indonesia. This research was motivated by the shortage of physiotherapists which can not catch the increasing number of stroke patients. The therapy becomes less effective and less efficient since each therapist must handle too many patients during his/her work hours. This research has developed a device prototype that can help the therapy to measure and monitor patient exercise, especially at the final stage of rehabilitation when the patient gets therapy to move actively. The angle of the moving body parts that can represent the ability of patient motion was measured using accelerometers. The developed prototype was in the form of a glove, equipped with an Arduino Nano and two accelerometer modules, that measures the motion of the thumb and index finger. The device was calibrated and tested to determine the characteristics of the sensors. This test showed that the gloves prototype had an accuracy of 95,8% and precision of 99,6%. The application of the prototype was carried out on four types of finger movements, namely thumb abduction-adduction, thumb flexion-extension, finger flexion-hyperextension, and finger abductionadduction. The prototype was also tested for its ability to work in variations of direction and position of the hand. Keywords— accelerometer; active rehabilitation; finger movement; post-stroke; physiotherapy.


I. INTRODUCTION
Stroke is a disease that comes from disruption of blood flow in the central nervous system and can affect anyone. Stroke has become a particular concern in Indonesia. This condition is evident from the Basic Health Research 2007, which mentioned that 15.4% of all deaths caused by stroke [1]. Ministry of Health in 2014 also stated that the number of stroke survivors in Indonesia in 2013 based on the diagnosis of health personnel and symptoms was estimated more than 2 million people [2]. Statistics show that there are a lot of people with disabilities resulting from a stroke. It has many effects on the society, such as stroke patients who become emotionally unstable and declining productivity that resulted in disruption of the socio-economic of the family.
One effort to improve the quality of stroke survivors is a rehabilitation therapy for stroke patients who survived from the death so that the body will function normally again. In other words, it is a post-stroke recovery. The rehabilitation process is handled by a physiotherapist. One important process in post-stroke rehabilitation therapy is the final stage where the physiotherapist is actively monitoring the development of the patient's ability to move the joints of his/her body.
Unfortunately, the number of physiotherapists is not proportional to the number of patients. The number of physiotherapist in Indonesia in early 2015 was about 8000, and the ratio was one physiotherapist has to handle 35000 residents. Ideally, one physiotherapist just handles 7500 peoples, hence by 2025 the physiotherapists will still be lacking [3]. An alternative to overcome this is by using tools in post-stroke rehabilitation therapy to increase the effectiveness of physiotherapy services.
The function of a physiotherapist is to provide joint movement exercises passively, and later on, actively, for a patient who firstly is unable to move his/her own joints, to be able to do it normally. In the early stages, the physiotherapist guides the patient to perform some movements. In the next stage, physiotherapist leads the patient to move but not in full control; they use touch as a signal. In the final stage, the patient moves the joints independently, while the physiotherapist measures the ability of the patient to do motion until the patient recovers completely. For the final stage, various tools are used as an alternative monitoring system to determine the ability of the patient's progress. Boian, et al., used a glove integrated with Virtual Reality to increase the range of motion (ROM) of post-stroke patients [4].
Based on the literature that has been studied, one parameter that represents the ability of post-stroke patients is the angle between the fingers. Tools that offer the capability to monitor the change of an angle is based on accelerometer sensors, and one of the modules that provide this sensor is MPU6050 [5]. Milenkovic et al. developed a monitoring system for rehabilitation using two-axis micro-electromechanical system (MEMS) accelerometer attached to the hand and the leg [6].
MPU6050 is a 6-axis module containing an accelerometer and a gyroscope sensor that integrated with micro inertial function as a measurement unit for detecting linear acceleration and angular velocity of the movement. The use of MPU6050 in Indonesia is very little, hence the research that utilizes the accelerometer sensor MPU6050 module will increase the applications of sensor technology in Indonesia.
Gubbi et al., performed a study on the analysis of arm motion of 15 post-stroke patients using accelerators using cross-correlation method [7]. Safyzan, et al. also developed a device for post-stroke patients. The patients lifted their arms to the maximum and moved the arms clockwise and counter clockwise. The result of the measurement was used to determine the appropriate exercise [8]. A more specific study on the ability of fingers of the patients was done by Michaelsen et al. They used the accelerometer to train reachto-grasp motion for chronical hemiparesis, by putting it under the forearms [9].
The purpose of the project is to develop a prototype of a device that can measure changes in the angle between fingers from the motion of the fingers in the active rehabilitation treatment for post-stroke patients.

A. System specification
In this research, we set several problem limitations: 1. The prototype only performed measurements on the fingers. 2. The sensor used was the accelerometer in MPU6050 module. 3. The movement of the fingers were four types of motion pairs for fingers active therapy, i.e. thumb abductionadduction, thumb abduction-adduction, thumb flexionextension, finger flexion-hyperextension, and finger abduction-adduction. 4. The sensor modules were mounted on the thumb and index finger, with the exception of finger abductionadduction movements that use the index finger and the middle finger. 5. At the time of the measurement on one finger, another finger that attached with sensor stayed still. As a result, data retrieval was done by taking turns between the two sensors. 6. The measurement results were displayed and processed on a portable computer (PC).
7. The power and data transmission to the PC used a universal serial bus (USB) port.

B. Hardware Design
The prototype was assembled by installing two MPU6050 modules on the thumb and index finger of a glove, which was connected to an Arduino Nano microcontroller via jumper cables. The pin used to connect between Arduino and MPU6050 modules for both sensors are shown in Table 1.
The circuit schematic diagram of the developed prototype is illustrated in Fig. 1. Two sensors, namely "Accel_Thumb" and "Accel_Index", detected the movement acceleration of the fingers and converted the analog signals produced by the sensors to digital form, and then sent them to the Arduino Nano using jumpers. The microcontroller then processed the digital signal by adding certain offset value, obtained by a calibration process, and sent it to PC via a USB cable. Overall, the block diagram of the prototype can be seen in Fig. 2.

C. Software Design
The software of the device could be divided into three parts, namely offset calculation, an acceleration measurement, and data processing in PC. Another software was written for calibration of the sensors, by calculating the offset for each accelerometer on MPU6050 experimentally.

D. Prototype Calibration
The testing began with calibration of the two sensors independently from each other. The sensor was hung on a string with the z-axis of the sensor facing the same direction as the string. Hence, this sensor would act as a pendulum. The sensor was firstly placed horizontally with the z-axis faced down. Once the sensor was stabilized, the serial monitor shows the value of the offset. Measurements were repeated ten times to take into account the statistical aspect. The calibration process was then performed for the other 2 axes, i.e. x and y-axis.
The average value of the offset for each axis and each sensor were then incorporated into the main program. Hence the sensor would deliver correct values. There prototype generated 6 acceleration measurements for each sampling time. The data should show a value of 0 on the horizontal axis and + 1g on the axis that had the same direction of the gravitational force. To make it easier to distinguish the data from the sensors, each sensor axis was named as shown in Table 2. In the next step, the data from both sensors which were transferred to the PC were then combined hence there were 6 values in the unit of gravitational acceleration (g). The measured data can be viewed in the form of two vectors. So, to determine the relative angle between the two sensors (θ), the operation used was a scalar multiplication. The angle between the two accelerometers was obtained by the following equation. (1) The value of θ represents the angle between two fingers or a finger with the thumb. For analysis purpose, two graphs were then drawn, which were the acceleration and the angle between the two sensors with respect to time.

A. System specification
The results of each accelerometer calibration were averaged with a precision of three decimal places and shown in Table 3 and Table 4.  The offsets obtained from the calibration process for each sensor are given in Table 5. Sensor accuracy in measuring the gravitational acceleration was determined from the error which has been calculated for each axis of both sensors. These values can be seen in Table 6. The characteristic of the prototype includes the two sensors. Thus, the prototype error can be obtained by calculating the average of all of the errors in both sensors. The average error was 0.042 g or 4.2%. The overall accuracy of the prototype was therefore 95.8%. The precisions of the sensors were also calculated which were indicated by the standard deviation of the measurements of each direction for each sensor. These standard deviations are shown in Table 7. The overall precision was obtained by calculating the average of these standard deviations. Hence the overall precision of the device was 0.004 g or 0.4%. This value can be considered as a good characteristic.

B. Dynamic Measurements
For the dynamic experiments, the hand was positioned parallel to a flat surface, here we use a table. Finger movements were measured for the four types of motion pairs for fingers active therapy, i.e. thumb abduction-adduction, thumb abduction-adduction, thumb flexion-extension, finger flexion-hyperextension, and finger abduction-adduction.
The movements were performed 5 times alternating for each motion in the pair. The sensor needed to stay still for a while before the movement of the fingers started. Hence, the data was taken from the 10th second up to the 40th second. Every action was performed very fast and then halted for for 3 seconds. The angle obtained is the result of the measurement by the two sensors.
The measured acceleration by the prototype of thumb abduction-adduction motion is shown in Fig. 3.

Fig. 3 Acceleration of thumb abduction-adduction
The measurement was quite stable in this type of movement because the motion was very easy to do. Hence the measurement results on the graph also show a high level of consistency. X0 graph shows that after the thumb was doing abduction, the values would go down, which means the thumb was docked back. However, the value of Z0 is lower than the value of X0 because, at the abduction position, the sensor on the thumb was no longer in a flat position, but had a slope to near 45°. Y0 had smaller values compared to the others because the movements had an only minor component to the Y direction.
The angle between the two sensors, and hence the angle of the thumb to the index finger, which was calculated from the acceleration data can be seen in Fig. 4. During the initial state, the angle was about 0 degrees since the thumb was docked to the fingers. Once the thumb moved away and back to be docked, the value was no longer achieve the original value, but slightly larger. This was due to the tilted positions of the thumb and index finger that could not exactly go back to its original position.
Overshoots existed at the end of each finger movement before halted for 3 seconds, due to a sudden stop of the finger. The mechanism behind how the accelerometers work creates a momentum still happens when the sensor is suddenly stopped after having fast movement. To observe the gradual change of the angle, the thumb abductionadduction motion was also carried out in a slow manner, which the result can be seen in Fig. 5. It can be seen that the overshoot no longer existed in slow motions.

C. Effect of forearm position
While doing active therapy, it is often not easy to position the forearm parallel to the table, in the horizontal direction. Therefore, it was necessary to carry out experiments to find out the performance of the device when used with the position of the forearm that was not flat but rather formed a certain angle with the horizontal plane. Fig. 9 shows the position of the forearm which had an angle of 30 o to the horizontal plane, with the help of a metal bar with adjustable slope. The measurements were carried out for the finger active therapy motions. Ideally, the value of the acceleration for 30° tilted forearm position to the horizontal plane for thumb adduction is 0.866 g for the z-axis and 0.5 g for the y-axis. Meanwhile, the xaxis does not change. Hence it will remain 0 g. The manual calculation is given in Fig. 10.  Fig. 11 shows the acceleration in accordance with the state of thumb adduction. X0 and X1 ranges were from 0 to 0.1 g, Y0 and Y1 ranged from 0.4 to 0.5 g, while Z0 and Z1 values were from 0.85 to 0.9 g. These values matched the ideal values given in Fig. 10. Fig. 11 proved that the prototype was able to measure the movement of fingers even though the forearm was not positioned parallel to the horizontal plane. The angle calculated from the two sensors for thumb abduction-adduction can be seen in Fig. 12. The graph in Fig.  12 when is compared to the normal thumb abductionadduction graph at flat forearm position (Fig. 4) had similar angles. This, again, proved that the position of the forearm did not affect the measurement. The conclusions of this research are: A device prototype to measure and record fingers active therapy movements for post-stroke patients has been successfully developed, consisting of two accelerometers and a microcontroller. The characteristics of the prototype are an accuracy of 95.8%, and precision of 0.4%. The prototype has the ability to read the angle between the fingers despites the position of the forearm.