## 2 Materials and Methods
### UL Rehabilitation Platform
#### 2.1.1 Haptic Thimble  
The haptic thimble (see Figure 1 right) is a prototype device designed to provide vibration and pressure haptic feedback. The device consists of three main mechanical components (base, platform, and reel) assembled together with a direct current motor and designed to provide feedback thanks to a traction system based on cables (see Figure 2). The main objective is to take advantage of the same feedback principles of tactile gloves but to restrict them from the whole hand to the fingertips in order to solve the problem of discomfort of the patient when donning and doffing the device. A second objective is to reduce the cost of manufacturing and the complexity of the thimble, to be able to build a device that could be acquired, together with the software, as a low-cost platform for its use in home-rehabilitation sessions. Figure 1: Scheduled illustration of the upper limb rehabilitation platform: LeapMotion (**on the left**), Arduino board (**center-right**), and the prototype of the thimble (**on the right**). The mechanical parts were designed using a computer application for 3D mechanical design and then 3D printed (files for replicating the thimble can be found at: [[https://github.com/Robolabo/softHapticThimble](https://github.com/Robolabo/softHapticThimble)]([https://github.com/Robolabo/softHapticThimble](https://github.com/Robolabo/softHapticThimble)), accessed on 9 March 2021). The main piece, the base, is placed on the back of the fingertip and has the functions of securing the whole structure on the finger and holding the motor in its position. The second part is a parallel platform that is pulled through a cable to the first part, so it is the one that produces the feedback touching the user's fingertip. The third one, a reel, is directly connected to the motor axis and allows the platform to be pulled or released towards the base when it rotates. The transmission system is implemented by a steel cable 0.8 mm in diameter; this allows the platform to be pulled towards the user finger. However, for the platform to be released, the thimble includes three compression springs attached vertically. These springs allow the base and the platform to be parallel and stable thanks to the three contact points. Moreover, they provide a soft compression depending on the user's finger characteristics with three degrees of freedom. The springs selected are 25 mm in length and 4 mm in diameter, have 45 N/m of stiffness, and have a maximum compression of 13 mm. A maximum distance of 20 mm between the platform and the base was selected for the resting position. It allows a user with an average finger size to wear the thimble without having the parallel platform in contact with the tip of the finger, thus avoiding incorrect feedback. Two Velcro strips are assembled on the base in order to secure the device to the user's finger. The motor used is a 298:1 micro metal gearmotor 12 V equipped with an extended motor shaft that allows a magnetic encoder of 12 quadrature counts per revolution (Pololu, 3056) to be mounted. The motor is controlled using a vibration function and a PWM (Pulse Width Modulation) implemented on a proportional and derivative control implemented on the Arduino and triggered by the data received by the games. Moreover, the firmware allows the patient to modify the distance of the platform from the base, thus calibrating the device to different needs. The Arduino Due board is connected to the PC through a USB cable and is integrated with the X-NUCLEO-IHM04A1 board (STMicroelectronics), a power stage that allows the direction and the velocity of the motor to be controlled through an H-bridge circuit. This last board is mounted on top of the Arduino. The electronics are encapsulated in a 3D printed box and connected through connectors and a 114 cm-long cable to the thimble, where the cables are welded to the encoder board. The device is lightweight to avoid additional weight that would increase the inertia that in turn would affect the hand movements, resulting in erroneous gestures.