Design of grip strength measuring system using FSR and flex sensors using SVM algorithm

Received Nov 18, 2020 Revised May 19, 2021 Accepted Jun 2, 2021 This paper proposes a design of a complete system to identify weak grip strength that is caused by multiple factors like ageing, diseases, or accidents. This paper presents a grip measurement system that comprises of force sensing resistor and flex sensor to evaluate the condition of the hand. The system is tested by gripping a pencil and a cylindrical object using the glove, to determine the condition of the hand. Force sensitive resistor (FSR) evaluates the force applied by the different parts of the palm on the object being grasped. Flex sensor evaluates the bending of the fingers and thumb. The data from the sensors is then compared with existing data to evaluate the state of the hand. The data from the sensors is stored on the personal computer (PC) through serial communication. A model is trained using the data from the sensors, which determine if the grip strength of the user is weak or strong. The model is also trained to differentiate between two modes that are pen mode and object mode. The model achieved an accuracy of 90.8 percent using support vector machine (SVM) algorithm. This glove can be deployed in medical centers to assist in grip strength measurement.


INTRODUCTION
Gloves with sensors are being widely used in various applications like virtual reality (VR) and robotics. It consists of electronic sensors that uses hand gestures or force applied by the hand to manipulate devices. Before the start of 21 st century, the measurement of force exerted by the hand were constrained due to technological restrictions. This circumstance has changed with the advancement of the ultrathin sensors. Estimations of the grip forces are used in many scientific fields, some of the above-mentioned applications are very accessible. The one fundamental reason to estimate the strength of the grip is to diagnose early medical conditions. Crucial force information is provided by the hand structure, which can be used to compute the stress acting on muscles and joints of the hand. This information can be derived using sensors, to monitor the grip force and response estimation. Moreover, these gloves can be used to evaluate the performance of the human grip. This paper addresses the issue of loss of grip strength due to various factors like ageing [1] or accidents. A glove design has been proposed that detects if there are issues in the human grip or not.
This paper focuses on two types of grip, pinch grip which is thumb and finger supporting an object without touching the palm. The other grip is support which involves holding an object. It is used in medicine to detect various types of diseases. It is also used in sports to determine the players' strength.
Borik and Kmecova [2] proposed a smart glove to determine the grip force exerted by the workers. The sensors were calibrated with the help of weight scale. The PC was used to visualize the data received from the microcontroller. To test the system, a worker used the glove to repeatedly connect the connectors to sockets using two fingers.
The results showed that the duration of the force exerted by each finger was not same and forefinger produced more force than the thumb. This system needs more tests to determine the efficiency of the system. It needs to be used in various scenarios that makes use of all the sensors in the gloves. Moreover, the system needs a software to demonstrate the force applied on the glove, so it is easier to comprehend. In this work, we propose a glove that uses FSR and flex sensors to determine the grip strength of the hand. This glove provides a real-time system that:  Acknowledge which mode the user is in.  Measures the grip strength of the user.  Determines if the grip is weak or strong.
This paper presents the design and testing of a grip strength measuring glove. To test the system various amount of force was applied on the glove by holding a cylindrical shaped object and a pencil. The system attained an accuracy of 90.8% in recognizing the grip strength of the hand, by using an SVM based classifier model.
The rest of the paper is arranged is being as: literature review contains related works that were conducted within this field. This is followed by an in-depth proposed solution, which consists of design and testing of the glove. The proposed solution is divided into two subsections that are hardware and software. Finally, a conclusion and discussion to review the findings in this paper.

LITERATURE REVIEW
A study by Tarchanidis and Lygouras [3] proposed a glove that had flex sensors and strain gauge force sensor to calculate the force applied. To test the glove, a ball was squeezed to evaluate the force applied. The maximum applied force was around 85 N. This system lacks in measuring the force applied by tip of the fingers. Moreover, it also needs to measure the force applied by the palm. The glove needs a nonstretchable support around the finger to make it more accurate. Flex sensors used in this experiment have high degree of error, which makes the measured force inaccurate.
Du and Xiong [4] proposed a mechanical approach to calculate the force applied by the hand. It has angle sensors that uses magnet to generate voltage when it is rotated. And displacement sensors generate voltage when the piston is displaced, the piston has a magnetic ring around it. The results showed that a maximum of 47 N could be recorded by the system. This system has high degree of error due to input of friction in the glove. Additionally, the weight of the glove is quite heavy, which makes it harder to evaluate the force. As some of the force is required to hold the glove [5].
Lee et al. [6] proposed an approach to determine the tip force applied by fingers called grip force glove measurement system. It was designed to measure the force applied on muscles and joints. To test the outcomes of the grip system, participants were given long cylindrical handles with different diameters. The results showed that thumb exerted the most force, while middle and ring finger exerted high force. Moreover, this experiment needs more data to evaluate the performance of the grip force glove. It needs an interface to display the force being applied which is easier to comprehend.
Ganeson et al. [7] proposed a hand rehabilitation system which consists of FSR sensors and flex sensors to determine the flexion of the fingers and force applied by the fingertips. To determine the efficiency of the glove, a rubber ball was squeezed while wearing the glove. The flexion of fingers and force applied by the fingers, will be calculated using the glove. Bustamantei et al. [8] proposed a sensor glove which consists of FSR sensors to aid in discovering Parkinson disease and amyotrophic lateral sclerosis (ALS) in patients.
To determine the efficiency of the gloves, handgrip and finger tapping tests were done on it [9], [10].
An inexpensive smart glove was proposed by Akpa et al. [11]. To evaluate the performance of the glove, the user has to wear it and perform exercises. The glove determined which exercise is being performed by the force pattern from FSR sensors. The system achieved an accuracy of 87%.
Another study by Nabilah et al. [12] created a wired glove system called GloveMAP. To test the glove, bottle with different weight was grasped. The glove was then connected to the PC to get data. The data was demonstrated using graph to show how much force each finger is applying. However, this design lacks proper evaluation of the force applied by the hand. It only measures the force applied from thumb, index, and middle fingers. This needs more sensors to get more accurate data. Especially around the palm and other fingers to know their contribution in gripping. Similar design was used in [13], [14] to test the tripod grip strength. The system was able to reach accuracy of 90% in evaluating the grip strength. In another paper Yap et al. [15], proposed a smart glove that uses flex sensors and FSR sensors for post stroke hand therapy. To evaluate the glove, a rubber ball was squeezed with different amount of forces. Nageshwar et al. [16] calibrate an FSR sensor. To calibrate the FSR, known weights were put on the FSR and readings of current were recording. This data is used to create a calibration curve using the current and actual force applied by the weights due to gravity. The results showed the degree of error by the sensor.
Machine learning is becoming common as it enhances the accuracy and speed of the system [17]. Pushpa et al. [18] used machine learning to examine the performance of a class. They created patterns from previous results to forecast the next result. Random forest classifier was the most precise model in forecasting. Krishnamurthy et al. [19] proposed a system MALADY. MALADY used the data from sensor to comprehend and make choices in real-time. Hence, this made the system autonomous. The model was created using an SVM based classifier [1], [20]- [22]. Machine learning was also used to aid fall recognition in [23]. It used data from wearable technology to predict fall and its direction using machine learning. The results were quite accurate and were able to recognize fall. Similarly, hand gestures were recognized using machine learning in [24]. Neural network was used to aid it determining a certain gesture, six gestures were used to test the system.

PROPOSED SOLUTION
An Arduino based solution is proposed, which takes analog values from the sensors. Figure 1 gives an overview of the whole system. The system is divided into two parts sensors and processing unit. The sensors are flex sensors and force-resisting sensor, while the processing unit consists of Arduino and PC. Figure 2 shows the placement of the force resisting sensors on the hand. They are placed at the tip of the hand to get the force exerted by the finger. The rest four are placed on the palm. To determine the position of the FSR, force points need to be located on the hand. The major force points were the tip of the fingers. To determine other points the object was held at different hand positions to see which point applies the force on the object.
This design is made in consideration of the application that are holding an object or a pencil. When an object is held, most of the FSR sensors would function. While in the pen mode only FSR 1, 2 and 5 would function. Figure 3 shows the placement of the flex sensors, they are placed on top of each finger and thumb. They are going to be used to determine the bending of the fingers using the change in resistance from the flex sensors. Flex sensors could be placed where the hand bends, which is around the fingers and thumb. So, the flex sensors would be placed on the fingers and thumb. Since FSR will be placed on the palm so the flex sensor must be placed on the outer hand to avoid any error in FSR or flex sensor readings. When the glove is in object mode, all the flex sensors would show a reading of more than 50 degrees. When it is switched to pen mode, only the thumb and the first two fingers' flex sensor would show a reading of more than 70 degrees. This is used to determine which mode the user is in. To test the modes standardized objects will be uses. For pencil grip strength, a standard hardness blackness (HB) pencil will be used to determine the grip strength. For object grip strength, a cylindrical glass would be used. The diameter of the glass would be around 8 cm.

Hardware description
The system consists of FSR sensors and flex sensors that are connected to the Arduino. These sensors will be placed on the glove as shown in Figures 2 and 3. The Arduino will be connected to the PC. The values from the sensors will be passed to PC through Arduino. The PC will store these values later so it can be processed by an SVM application to train a model that will aid in detecting the strength of the grip automatically.
The force resisting sensor (FSR) was connected with resistor and Arduino to detect its readings. One pin of the sensor was connected to 5 V, while the other was connected to an analog pin which was also connected to a resistor with resistance of 10 kΩ. The other end of the resistor was connected to ground, Figure 4 shows the connections made.
After the connection, the Arduino was programmed with the code. The code was optimized to show the correct weight values. To test the code weights of 0.5 kg, 0.7 kg, and 0.9 kg were used. The weight was placed on the sensor to determine the force applied. Since the size of the FSR sensor is small, a small weight of 20 g which has the same diameter as the FSR sensor was used. The 0.5 kg was placed on the small weight to make sure all the weight is applied on the surface of the FSR sensor. After placing the sensor, the readings were recorded from the serial monitor. The same thing was repeated with 0.7 kg and 0.9 kg.
The flex sensor was connected with resistor and Arduino to detect its readings. One pin of the sensor was connected to 5 V, while the other was connected to an analog pin which was also connected to a resistor with resistance of 10 kΩ. The other end of the resistor was connected to ground, Figure 5 shows the connections made. After the connection, the Arduino was programmed with the code. The code showed the change in the bend in degrees and resistance. The sensor was calibrated by extracting the resistance at 0 degree and the resistance at 90 degrees. The map function was used to calibrate the resistance from the sensor using the values from 0 and 90 degree. The sensor was tested at different angles to determine if it worked properly or not.
The connection on the gloves would be done using wires, that includes FSR sensors and flex sensors. These connections from wires will then be connected to wires that will be connected to the Arduino. The resistors will be connected outside of the glove to make design better.
The wires and the sensors were attached to the glove using glue, and all the wires went through the backside. This prevents obstruction caused by wires while gripping an object. Figures 6 and 7 shows the glove designed. The wires were coded to aid in determining the sensor and a common 5 V output was used in all sensors. Figure 8 shows the circuit diagram of the whole system. The FSR and flex sensors are connected to the analog pins of the Arduino mega. The resistance of the resistor is same for the flex and FSR sensors. The resistor connected to flex sensor has a resistance of 10 k ohms, while the resistor connected to FSR sensor has a resistance of 10 k ohms. The same connections were done to the glove in Figures 6 and 7. However, a common 5 V was used to save wire and space. It also made the design more compact. While the remaining wires were connected to the resistor and then grounded. Figure 9 shows the connections made to the Arduino and the glove.  Figure 9. Actual circuit of the system

Software description
The software consists of three parts; they are algorithm to get the sensor data, storing the data from the sensors, and machine learning program to train the system to classify the data. The data from the sensor is printed on the serial node using Arduino microcontroller. The data is separated by a comma and prints all the FSR sensors' values first, followed by the flex sensors' values. Using the flex sensor values, the program determines which mode the user is in. If the first two fingers and thumb are gripped the system determines the mode as P which is pencil grip. If all the fingers and thumb are gripped the system determines the mode as O which is object grip. To check the gripping of the fingers and thumb, flex sensor measures the angle created when the hand is closed. The program also classifies the data based on the average force applied by the fingers. The data is classified first into categories that are L (weak) and H (strong). Mode and classes are also printed on the node. Table 1 shows how the sensor values are used to determine the mode and the strength applied. The system registers pencil grip mode if the first two fingers and thumb create an angle of 70 degrees or more. The grip is strong if it is more than 3.2 N. The system registers object mode if all fingers create an angle of 50 degrees or more. The grip is strong if the force generated is more than 1.9 N.  Figure 10 shows the code snippet of the Arduino program to determine the mode. The angle is recorded into a variable using the flex function. The flex function determines the resistance using the voltage from the sensor. The resistance of the flex sensor changes based on how much it is bent. The resistance is then mapped to angles. If first two fingers and thumb are holding an object, it implies that the system is in Pen mode or the person is holding a pen. If four fingers and thumb are holding an object, it implies that the system is in object mode or the person is holding an object. After the mode is evaluated, the Arduino prints it on the serial node. The flex sensors are used to determine the flexion of the fingers as well. It can be used to comprehend whether a person is able to close the first properly or not. If the person closes the fist properly, the angle from flex sensor would be greater than 60 degrees. Table 1 shows the Arduino code for flex sensor, grip test function shows whether a person can move the finger or not and is able to close his grip properly. Figure 10. Arduino code to get raw sensor values Figure 11 shows the code snippet of the processing program used to save csv file. The program opens the port and starts reading from the port. The Arduino sends the data from sensors to the serial port. Both the parties should read and write the port at the same speed that is 9600 here. The data is then separated into rows and column. The first row is reserved for headers, while rest of the rows are reserved for the data received from the sensor. The mode is also sent after the sensor readings. Figure 11. Processing code to store the Arduino files in csv format The layout of the program consists of drop-down list to select the port and a save button to stop reading from port and save all the data. The user should select the port Arduino is connected on to start storing the data and click save to store the data. The data is then saved onto a csv file. This csv file can be used to train model, or to analyze the data using a model. The csv file is processed by an SVM based machine learning program to classify the data. The data is classified first into categories that are L (weak)  and H (strong). And then the program is trained using this manually classified data. Figure 10 shows the outcome of the trained program.
The data was divided into training data and test data. The data was classified manually before separating it. The model was trained using the training data, and then the test data was used to check the model. Figure 12 shows the output of the test data along with the prediction of the model. Figure 12. Output of SVM on test data Figure 13 shows the code snippet of the SVM program used to train the model. The data is divided into two sets training and test data. The test data is 90% of the whole data, while the rest 10% is used to train the model [25]. Each data set is split into the input and output data. The output for the test data is used for comparing the accuracy of the system. The model is trained using Gaussian radial basis function kernel (RBF). The confusion matrix in Table 2 shows the outcomes of the SVM program, it shows that the system has an accuracy of 90.8 percent. The model has difficulty in predicting low class, this can be solved by using more data of low class.  The box plot in Figure 14 shows the difference of force applied by the hand while holding a pencil. The force applied is the average force applied by the first finger, second finger and thumb. The weak grip was mostly in the range of 1.1 and 1.45. The strong grip was in the range of 5.95 to 8.0, which shows the strong grip had more range difference than the weak.
The box plot in Figure 15 shows the difference of force applied by the hand while holding an object. The force applied is the average force applied by all the fingers and thumb. The weak grip was mostly in the range of 0.03 and 0.06. The strong grip was in the range of 1.2 to 1.95, which shows the strong grip had more range difference than the weak grip. data = pd. read_csv ("data.csv", sep=",", header="infer")// values from csv files are stored in a variable training_set, test_set = train_test_split (data, test_size = 0.90, random_state = 1)// the data is spilt into test and training data X_train = training_set.

683
Results show that force is not applied from palm during pencil grip. The Figure 16 shows the comparison between force applied by finger and force applied by palm in the two modes. Most of the force is applied by the fingertips which is almost twice the force applied by the palm.

DISCUSSION
The best way to enhance the health of people troubled by weak grip strength is the early diagnosis of it, so it can be treated on time. The basic testing and monitoring processes have not experienced the full advancement required to fulfill the diagnosis and treatment. A glove with sensors is proposed to diagnose the grip strength to treat the hand on time.
The proposed solution is more accurate than other solutions. The system employs flex sensors to add an edge over other solutions. Flex sensors determines whether the sensor is in pencil grip mode or an object grip mode.
The FSR sensors placed on the fingers generated a maximum of 9.8 N force, while the ones on the palm showed a maximum of 4.7 N. The pencil grip mode had more average force than object grip mode. This average force is then used to determine whether the grip is strong or weak. The difference between the pencil mode and object mode is that pencil mode generates almost twice the average force generated by the object mode. This is majorly due to many sensors being taken into consideration in the object mode.
The flex sensor had a maximum of 82° when the fingers were close to the palm. This test was used to determine the flexibility of the fingers. However, for testing the two modes the sensor needs to show a change in angle by 50°. The mode is decided based on the angles generated from each finger. If the first two fingers and the thumb produce an angle of 70° or more, the mode is pencil grip. If more fingers create an angle of more than 50° the system is in object mode.
However, the glove design can be improved to make the glove lighter. The FSR sensors make the glove heavier which could have an impact on the grip strength measurement. The wires connected to the sensor also adds a lot of weight. The wires could also cause hindrance while moving the fingers. Moreover, the placement of the sensor is very crucial for the measurement of the grip strength.
The model generated used SVM to classify the data is 90.08 accurate and can be used to determine the strength of the hand. The model can also differentiate between the two modes and determine whether the grip is weak in a certain mode or not. To increase the accuracy of the model, more data is required in different modes and classes. Another fix could be unsupervised learning, that could learn from the new data. In order to make the glove more practical the age and gender must be taken into consideration. The ideal case would be to enter the age and gender, and then test the glove. This approach requires large set of data which is classified to train the model. This solution is very hard to implement practically, as it requires time and people to obtain the dataset.

CONCLUSION
In this paper a system is designed that measures the strength of the grip based on the age group of the person. The aim is to determine if the grip strength is weak or not. The flex and FSR sensors are used in determining the strength of the grip. The sensors are powered and sampled by the microcontroller. The flex checks the flexibility of the fingers while FSR checks the strength applied by the part of the hand. The raw values of sensors are converted to meaningful data using microcontroller and stored on PC to classify it. A model is generated to classify the data from the sensor to determine the strength of the person. The model is trained by using data which has been classified manually. This model can be used later to predict the strength of the person using the glove. This glove can be modified to employ new features that could improve the method of measuring the grip strength. Further studies are required to increase the accuracy and the design of the system, so it can aid in determining the grip strength more efficiently.