# Glove Prototype for Feature Extraction Applied to Learning by Demonstration Purposes
## 5 Real Prototype  
The glove design presented a challenge on two fronts: glove choice and wiring solution. Ensuring the sensors are tightly coupled with their respective links to accurately capture the movement boils down to the glove choice--if the glove is loose on the hand, the sensors attached do not accurately follow the movement, but stiffness helps keep the sensors steady. Gardening gloves were the first idea to try, but it was decided they were often too loose, and certain gestures, such as lifting the proximal, would create a fold exactly below the sensor. On the other end of the spectrum, surgery-like gloves that are very tight were considered, but mounting the sensors is not straightforward. So, a glove made out of wool, shown in Figure 7 was tried because it gave the most options. It was tighter than the gardening ones, and the sensors could be stitched to it. The sensor location is flexible to some extent in contrast to the others that could only fit one way. Figure 7: Glove in the hand without sensors. IC communication protocol only requires two connections and is the best case scenario wire-wise, but the sensors also need 3.3 V power and ground, and half of them need to pull the PC address pin high. In total, half the sensors need four wires, and the other half 5 wires for the total 12 sensors. This amount of sensors in a such a small space results in the wires bumping each other, such as shown in Figure 8, and inadvertently moving the sensors causing false estimations. This solution is not optimal, and to get around the problem a bus-like wiring was attempted. Because sensors are all powered by the same device and voltage, and the IC works as a bus, it allows for a cascading wire layout where the intermediate sensor connects to the proximal and proximal to the multiplexer reducing the floating wires roughly by half, such as shown in Figure 9. This also reduces the chance of long wire communication instabilities although it did not reveal being an issue. This design has a flaw of overloading the current of the power in the wires nearest to the source because the sum of the currents drawn by sensors flows there. Increasing the current, the voltage drop in the wire increases proportionally, the voltage at the further sensors goes lower, and the fluctuations can cause instabilities. In this design, that was not an issue because only two sensors are cascaded, except the thumb that cascades three sensors. As a prototype, the simplest communication protocol was serial, but it is wired, which sometimes may limit flexibility or restrict the user's movement and, generally, wireless (if inside performance requirements) is preferable. The two main options of wireless solutions are changing the microcontroller for one that features a wireless solution or adding a module for the microcontroller to interface. A popular module is the \(ESP8266\) which can be interfaced by SPI or UART, and it is fairly simple with a lot of documentation. Adapting the current solution for any of the two proposed wireless solutions is straightforward. If the microcontroller were to be swapped, the only requirement is to keep the ARM processor architecture not to cause conflicts with libraries, but \(PlatformIO\) would handle the rest. In both solutions, adapting the output function is the main change to interface with the chosen wireless feature. Ideally, the wireless solution is WiFi to connect to the simulator network and communicate directly with through UDP, but it is possible to adopt another wireless solution such as \(Bluetooth\) and implement a \(Bluetooth\) bridge such as the one implemented in \(Python\) for serial. Figure 8: First glove design with individual wiring. Binary encodings are the most efficient sending data and are very popular for real-time applications that are robust to errors, meaning if there is an error in transmission, the system is not fully compromised or there are mechanisms computationally cheap to detect errors and ignore those payloads.