# A New Method for Haptic Shape Discriminability Detection
## 3 Angle Sorting System Description
### Design of the Haptic Angle Sorting Device  
Figure 6 shows a schematic diagram of the structure of the haptic angle sorting system. The system includes four parts: (1) an interaction part, (2) an angle stimulus detection part, (3) a system control part, and (4) a power supply and data output part. The interactive part consists of a touch screen, which is used by the experimenter for experiments and data manipulation, and five code unit positions where the participants sort the angle stimuli. The angle stimulus detection part is a keycode conversion module (STC89C51, STC Microcontroller Inc., Beijing, China) that can identify five different keycodes of angles of stimuli simultaneously and send the angle stimulus sorting information to the system software control part. The system control part is a field programmable gate array (FPGA) main control module (ZYNQ 7010, Xilinx Inc., San Jose, CA, USA) of the microcomputer. And the reason why FPGA is chosen as the main control is that the functions of this module can be configured according to requirements, and its many interfaces also provide the possibility for later function expansion, including running system software and controlling touch screen. In addition to experimental data calculation, storage and transmission through multiple interfaces. Figure 7b shows the appearance and structure model diagram of the designed haptic angle sorting device, and all operating parts (except the power button), during the experiment: (1) The 7-inch touch screen is used to input the information of the participants and display the results after the test; (2) a square of seven grooves (40 mm \(\times\) 40 mm) was placed  
Figure 5: The design of a haptic pattern. (**a**) The size of angle stimuli; (**b**) The thickness of the haptic pattern. Figure 6: Schematic diagram of the structure of the haptic angle sorting system. on the top part of the device; (3) confirmation key; and (4) a box embedded in the device is designed to store angular stimuli to prevent loss during carrying. Three microswitches are arranged in a group in each position from the grooves of the second to sixth positions to identify each angle stimulus, as shown in Figure 7c. These three microswitches constitute a code unit which is one of the five code units, as shown in Figure 6. In the sorting experiment, the keycodes are triggered by the base of the iron block adsorbed by a magnet, which is combined with an angle stimulus to form a stimulus module. The haptic angle sorting test system must identify five sets of keys to confirm the sequence of angle stimuli in the experiment, as shown in Figure 7b. Each microswitch is connected to an I/O port for processing and transmission efficiency. The haptic angle sorting test system must identify five sets of keys to confirm the sequence of angle stimuli in the angle sort. When each microswitch is connected to an I/O port of the 51 microcontroller unit (MCU) chip, the triggered microswitches can realize high and low levels of the chip at each I/O port so that the MCU can identify the digital signal of the I/O port as 1 or 0. To transform different angle stimulus information into digital code, the three microswitches in the groove will stimulate the trigger switch according to different angles, so the three switches closing or opening combination mode can be converted into three-bit binary, the sole digital signals. The recognition method of angle stimuli is not affected by the environment, and it can quickly and accurately identify different angle stimuli. There are five keycodes (000, 001, 011, 100, 110), corresponding to the value of each angle stimulus and the output binary data value. To obtain those input keycodes, five types of stimulus block bases were designed, as shown in Figure 8a. Among them, the base key codes of the four stimulation blocks (001 and 100, 011 and 110) are symmetrical. Therefore, the same stimulus block base was rotated 180\({}^{\circ}\) for installation, which reduced the processing cost of the equipment.