Bilateral mode exoskeleton for hand rehabilitation with wireless control using 3D printing technology based on IMU sensor

Graphical abstract The proposed hardware exoskeleton for hand rehabilitation. The diagram block of the Hand exoskeleton model with bilateral rehabilitation mode.

. The proposed hardware of the exoskeleton for hand rehabilitation. Five IMU sensors are used to detect the movement of the glove when moved by fingers. The output of the IMU sensor is then connected to IC TCA9548A, which is an I2C multiplexer. The microcontroller further choose the IMU sensor to measure in turn. The results of the angle measurements taken by the five IMU sensors are then sent to the slave circuit using ESP-now communication.
Furthermore, the master part is applied to the non-paretic hand. Meanwhile, the other part, the slave block, consists of the ESP32 mini Wemos microcontroller, driver transistor for high current power supply, battery, five servo motors, circuit box, and hand exoskeleton 3D printing. The ESP32 microcontroller in the slave circuit then commands five servo motors to follow the movement according to the angle received by the five IMU sensors. Current driver transistor in the slave circuit is used to provide voltage to the microcontroller and servo motor with sufficient current. The slave part is used on paralyzed hand due to post-stroke.

Exoskeleton hardware
The exoskeleton for Hand Rehabilitation (EHR) was designed using the 3D design application program Sketchup (SketchUp Pro 2019, Version 19.0.685 64-bit, 2018 Trimble Inc., Colorado, US), as shown in Fig. 3. It consists of three main parts, namely the dorsal side ( Fig. 3(a)), palmar side ( Fig. 3(b)) and fingers ( Fig. 3(c) and Fig. 3(d)). In this case, the dorsal side is used as a holder for five servo motors that move the little, ring, middle, index, and thumb fingers. Each finger consists of three main phalanges: distal, middle, and proximal phalanges (Fig. 3(c) and Fig. 3(d)) [22,23]. Distal and proximal are connected via a link. Meanwhile, the five proximal phalanges are attached to the palms. Each proximal phalanx is connected to each servo motor via a rod so that when the servo motor rotates CW 0-90°, the proximal phalanx will be pushed, and vice versa; when the servo motor rotates CCW 90°, the proximal phalanges are retracted. The EHR was designed based on the dimensions of an adult male hand with palm dimensions of 150 mm Â 92 mm Â 9 mm (L Â W Â H). EHR is a hardware integration consisting of mechanical and electronic systems, both master and slave, as shown in Fig. 4.

Hardware circuit
The hardware circuit consists of two main parts, master and slave, as shown in Fig. 5 and Fig. 6. In addition, it also consists of an ESP32 microcontroller [24,25]. In this study, the ESP32 is a built-in mini Wemos D1 which is powered by Xtensa Ò dualcore 32-bit LX6 microprocessor(s) with specification as explained in the Table 1. In the master section, the hardware is composed of a microcontroller ESP32 mini Wemos D1, I2C multiplexer TCA 9548, and five IMU sensors. The IMU sensor is based on the GY-521 module composed of MPU6050. The I2C pin, GPIO21, and GPIO22 are connected to the SCL and SDA input of TCA9548. Meanwhile, the I2C multiplexer TCA9548 communicates to the five IMU sensors alternately.
The five IMU sensors are placed on the hand glove made from leather material. The IMU sensors (GY-521 module) are located on the little, ring, middle, index, and thumb fingers. The angle reading resulting from the IMU sensor is then sent to the slave hardware wirelessly (WIFI protocol) using the ESP-NOW function. The slave hardware circuit consists of the ESP32 mini Wemos D1 microcontroller, five servo motors, TIP 3055 transistor driver, LM7805, 1000 uF/25 V capacitor, LiPo Battery, and 1 N4001 diode. All electronic components of the slave circuit are soldered to the printed circuit board (PCB) with a PCB size of 65 mm Â 65 mm. The power supply circuit consists of high-power transistor TIP3055, 7805, diode 1 N4001, capacitor 1000uF, jack DC black connector, and battery (Fig. 6). According to the servo motor specification, motor servo requires an input voltage of 4.8 V À 6.0 V and operating current (5.0 V) of $ 2.7 mA (idle), $70 mA (no load), $400 mA (Stall). Therefore, the minimum required current to drive five servo motors is 2,000 mA. TIP3055 is able to drive the supply current until 15A; therefore, it will be able to provide the required current for the servo motors. In the slave hardware, we alternately put the IMU sensor on one of the five fingers to validate the angle between the master and the slave.

EHR firmware
Both firmware (master and slave) was developed in this EHR development using Arduino software (Version 1.8.4, Arduino LLC, New York, US). The required libraries to communicate the master and slave are esp_now and WiFi. Furthermore, the slave required the ESP32Servo library to control the motor servo. Further details for the master firmware ( Fig. 7) are explained as follows; the slave's (MAC) address must be determined so that the master part is able to communicate with the slave part. First, the Arduino MACaddress.ino program must be run into the slave microcontroller to get the address. In this study, the slave MAC addresses for this hardware device are 0xEC, 0x94, 0xCB, 0x64, 0xBC, and 0x84 (these addresses    may differ for each microcontroller). In the master firmware, the message structure is defined in five variables to include data from the five IMU sensors. The IMU sensor produces measurement results from a three-axis accelerometer (x, y, and z) and a three-axis gyroscope (x, y, z), but in this study, the measurement from the accelerometer y-axis was chosen for control purposes. This is because the finger flexion and extension movements are linear to the y-axis accelerometer output. Furthermore, the output of the Â and z axis accelerometer does not produce a significant value to changes in the flexion and extension movements of the fingers. The MPU6050 chip (GY-521 module) displays accelerometer values in the range of À17000 to 17000. Therefore, the range must be converted into angle units (°) using the MAP function on Arduino.
The address of the slave is determined before the master broadcasts the data packets. It was carried out to synchronize the slave. In both master and slave firmware, some libraries are declared in the initialization stage to recognize some functions. Apart from broadcasting the measurement data from the IMU sensor to the slave, the master also outputs data to the computer monitor via the serial monitor function to validate the output. In this case, the program will run continuously according to the loop in order to run the system in real-time, as shown in Fig. 7, until the power supply is turned off. Likewise, the slave firmware flowchart shown in Fig. 8 can be explained as follows; specify several libraries, including esp_now, ES32Servo, and WiFi. The slave firmware will receive the data broadcast (angle1, angle2, angle3, angle4, and angle5) from the master. The angle range is then converted to the servo angle range (0-90). In addition, a map function is required to convert the range from 0 to 90 (angle) to 0-90 (servo). After receiving the data, the variable is printed serially and forwarded to control the servo motor. Thus, the program repeats forever to detect broadcast data and control the servo motor, as shown in Fig. 8.

Easy to control the EHR
EHR is used to rehabilitate post-stroke hemiplegic patients, namely patients who experience paralysis of one of his limbs so that he can still use the other limb [323]. This EHR system was designed using 3D printing design, a microcontroller, five mini servo motors, IMU sensors, and wireless communication based on the ESP-NOW function. The resulting product is a lightweight and simple open-source EHR. Weight comparison of the hand exoskeleton design with other studies is shown in Table 2. Furthermore, when EHR is used on the paretic hand, the non-paretic hand can control it wirelessly through a hand glove with an IMU sensor attached to the finger glove.

Cost
The expensive price of commercial exoskeleton products [26,27] on the market (>1000 USD) as well as the long and expensive rehabilitation process become the obstacles in carrying out post-stroke rehabilitation, especially for people who have middle to low incomes (Fig. 9). However, this design has a low cost, namely 51.9 US $ for one EHR product. In addition, this design is open source so that other researchers can develop it with other features and improvement.  Summary EHR can be used for independent rehabilitation process for paralyzed hand using the non-paralyzed hand and wireless means. The contribution of this research is explained as follows: (a) The hardware of this design is simple and portable because it uses a mini ESP32 with a minimum system board dimension of 39 mm Â 31 mm so that this design has a wearable system. (b) The hand exoskeleton (EHR) device can be controlled wirelessly using WiFi via the esp_now function so that no cables are required to control the hand exoskeleton device. (c) The hand exoskeleton (EHR) device can be controlled using gloves that have an IMU sensor attached to each finger, so it does not require pre-processing and pattern recognition for control purposes. (d) Each finger exoskeleton on the hand can be controlled individually using the finger on the glove.

Design file
This section describes the resulting design files, both the hardware design (schematic and printed circuit board (PCB)) and the firmware for operating the hand exoskeleton, as shown in Table 3. The firmware for detecting the slave microcontroller address is also presented in Table 3. Furthermore, the mechanical design of hand exoskeletons using 3D printing materials is also attached to this study (see Table 4).

Schematic and board
The exoskeleton hand was designed using the Eagle application program (6.3.0, free version for Windows, CadSoft Computer GmbH, Germany). The schematic file consists of the slave and master. The master circuit consists of a circuit that is directly connected to several servo motors (five servo motors), while the slave circuit consists of a circuit connected to four potentiometers and one switch.

Firmware
The hand exoskeleton firmware was developed using Arduino application program (Version 1.8.4, visit the website: URL). Table 1 shows two firmware, namely master (Exo-master.ino) and slave (Exo-slave.ino). The master firmware was programmed on the ESP32 mini Wemos D1 (U1) to detect the angular position of the hand glove by IMU sensors (IMU1, IMU2, IMU3, IMU4, and IMU5). Furthermore, the IMU sensor reading results are sent using the esp_now function to the slave. The slave firmware was programmed on the ESP32 mini Wemos D1 (U2) to detect broadcast data from the master microcontroller. When the data are detected, the data would be used to instruct each servo motor to rotate 0-180 depending on the data received.

3D printing design
The hand exoskeleton was designed using the SketchUp 2019 application (available in the free version: https://www.sketchup.com/). The hand exoskeleton.skp file shown in Table 3 consists of several parts, including palm and finger. Some things related to 3D printing design can follow the following references [28].

Build instructions 3D printing design
The hand exoskeleton was printed using a 3D printer (Anet, Anet 8 Plus, China) using filament polylactic acid (PLA) material. The printer has X, Y axis position with precision of 0.015 mm, Z axis position with precision of 0.004 mm and layer precision 0.1-0.4 mm in according to Anet 8 plus user manual [29]. In addition, in the 3D printing process, the dimension accuracy of the printed parts is 0.2 mm. The hand exoskeleton design using the Sketchup application (SketchUp Pro 2019, Version 19.0.685 64-bit, 2018 Trimble Inc., Colorado, US) was exported in the STL extension (STL unit is model units and file format is binary). Next, the pre-processing step was carried out, namely by converting the STL to GCODE extension file using the Ultimaker Cura application (Version: 4.10.0, Ultimaker, Utrecht, Netherland) (Fig. 10). The parameter setting in the Ultimaker Cura application was 30% infill. With 30% infill, the density of the 3D printing print is quite dense and strong. The higher the infill value, the higher the density of the printout, including the long print time required. Each section takes a different amount of time, depending on the volume of each file. Furthermore, in the Ultimaker Cura setting, the build plate adhesion (type raft) must be adjusted to bind the object to the hotbed (Table 5). During the printing process, the 3D printer was set with the nozzle temperature parameter setting at 225°C and the bed temperature at 60°C, as shown in Table 6 for PLA material (Esun, diameter: 1.75 mm, temperature: 205-225°). In addition, the EHR design was made in adult (Asian) human size. Dimensions of 3D printing parts can be customized by using SketchUp application or setting dimensions through Ultimaker Cura application. Firmware design The firmware was designed using Arduino software (Version: 1.8.4). In this case, the MAC address of the slave should be obtained so that the master is able to communicate or broadcast the data to the slave part. In order to get the MAC address, the user should run the MACAddress file into the slave (MacAdress.ino, see Table 1). User will obtain a serial digital number when using an Arduino serial monitor application (for example, EC:94:CB:64:BC:84) (Fig. 11(a)). As a note, the MAC address is different for each microcontroller ESP32. After the MAC address is obtained, the number is inputted into the master program code (see master.ino, in Table 1 and Fig. 11(b).

Hardware circuit
After the firmware is programmed into each master and slave, the hardware is ready to operate. On the master body, the IMU sensors connectors are connected to the ESP32 mini Wemos D1 header board, as shown in Fig. 12(a). After placing the servo motors at each location on the 3D printing palm, a link rod connecting the servo motor is attached to the finger proximal phalanges of the hand exoskeleton, providing a push and pull movement mechanism ( Fig. 12(b)). The servo motor is mounted on the palm using two bolts with holes that are already available during 3D design so that no drilling process is Fig. 10. Example of setting to support and build plate adhesion type of raft.   required for assembly. On the slave circuit board, the five servo motors installed on the hand exoskeleton are connected via the supplied cables and connectors, as shown in Fig. 12(c). The hardware circuit can immediately respond when the power supply is provided. Five IMU sensors are placed in each finger (little, ring, middle, index, thumb fingers), connected to the circuit board, and now ready to control the hand exoskeleton.

Operation instructions
The power supply must be off before using the EHR device. The EHR is placed on the part of the hand that will receive rehabilitation therapy. The EHR design was made for the treatment of a paralyzed right hand. In this case, each of the elastic   Table 7 Mean values and standard deviations measure the angle of the hand exoskeleton for several angular positions using digital angle-measuring instruments. The measurement process for each angle was repeated ten times for each respondent (10 respondents straps is put on each hand exoskeleton finger. The left hand can operate the hand exoskeleton by moving the hand in flexion or extension motion. When the EHR device is ready, the power supply is turned on for both the slave and master. Furthermore, the data received by the slave can control the movement of the servo motor connected to the proximal phalanges. Each IMU sensor (5 units) in the master system can control one servo motor.

Validation and characterization
The angular calibration process should be done on the hand exoskeleton before the validation process. The calibration process was carried out by installing a digital angle measuring instrument (Mini Protractor digital, X15-007, China) on the radius of the hand exoskeleton. Then, this process was performed by adjusting certain angles by positioning the servo motor's rotating angle and measuring the angular position of the resulting hand exoskeleton using a digital angle measuring instrument, as shown in Fig. 13 (a). Table 7 shows the results of mean measurements and standard deviations of angles that were performed repeatedly for each setpoint. The mean of standard deviation value obtained for all angular positions measured based on Table 7 is 0.490 ± 0.298%.
Furthermore, the angle of motion of the exoskeleton of the hand was validated using the IMU sensor by placing one of the IMU sensors on one of the exoskeleton fingers, as shown in Fig. 13 (b) alternately. The validation process started from the index, middle, ring, little finger, and thumb. Once the master and slave hardware system operates, the finger on the glove can make periodic flexion and extension movements. In order that the flexion and extension movements carried out by the hand glove can run periodically; so the current study used a metronome application. A metronome application (Tem-poPerfect Metronome Software, NCH Software, Australia, URL: homepage) was used in this study to guide the flexion and extension movements which can be repeated periodically and permanently. In this test, the metronome was set at 20 bpm (beats per minute or cycles per minute). In this case, Fig. 14 shows the IMU sensor (angular position) between the glove and the exoskeleton of the hand. Compared to glove movements, the performance measurement of exoskeleton hand movements was calculated using the root mean square error (RMSE) as shown in Eq. (1).

RMSE
where yi indicates the predicted values, xi shows the actual values, and N is the measurement data. The result of the measurement of the average RMSE value for all exoskeleton fingers is 9.04° (Table 8).

Conclusion
This study presents the development of an open-source exoskeleton for hand rehabilitation (EHR) device that can be controlled wirelessly in bilateral mode. This design requires a low cost, namely 51.9 US $ for one EHR product. The mean RMSE and standard deviation measured based on the hand glove and hand exoskeleton is 9.04 ± 1.40°. In the future work, researchers can integrate several types of sensors to control the exoskeleton of the hand such as IMU sensor, EMG senso,r and force sensor. The EMG sensor can be used to detect the muscle activities and force sensor can be used to measure the grasp force.

Ethics statements
The author confirmed that informed consent was obtained from the subjects. This research has passed the ethical examination conducted by Health Research Ethics Committee Poltekkes Kemenkes Surabaya, Indonesia, No.EA/1245/KEPK-Pol tekkes_Sby/V/2022.

CRediT authorship contribution statement
Triwiyanto Triwiyanto: Conceptualization, Methodology, Software. Sari Luthfiyah: . I. Putu Alit Pawana: Validation. Abdussalam Ali Ahmed: . Alcham Andrian: . Table 8 The results of the root mean square error (RMSE) value measurement on each finger through a comparison between the measurement results of the angle of the fingers on the hand glove and the hand exoskeleton.