## 4 Characterization of the Miniaturized Encoder  
With the fabricated components, the demonstrator samples for the novel optical encoders were assembled and characterized. Figure 19 shows the completely assembled demonstrator for the miniaturized optical encoder. Thereby, the PCB acts also as the connector of the encoder. The part of the PCB which is taller than the encoder chassis is suitable for a conventional board connector [20].  
For characterization, a customized test bench for encoders was used. Figure 20 presents the signal of bit 6 of the Gray code encoder as an example over one revolution (360\({}^{\circ}\)). Because of the layout of the photodiodes, it was possible to generate differential signals. This automatically led to more stable  
Figure 19: Completely assembled demonstrator for the miniaturized optical encoder.  
Figure 18: Injection-molded encoder disc with blazed grating.  
signals with twice the amplitude. As shown, each angular position delivered a signal for the bright spot (bit 6) and the dark spot (bit 6n) on the opto-ASIC. By measuring the difference between them, a defined distinction of cases was possible using comparators instead of analog-to-digital converters.  
To analyze the performance of the Gray code encoder, the diagram in Figure 21 shows the differential signals over a small angular range. Displayed are all 10 tracks from bit 0 to bit 9, whereby bit 0 is the bit with the finest scale and, therefore, has the most oscillations. It can be seen that all bits delivered the correct signals and that they could be digitized at a constant threshold, for example, at 0 V. Furthermore, it can be seen that the signals were still not perfect because a drift could be observed during rotation of the encoder disc. This effect could probably be improved after a design review of the system with a better assembly process of the lens, whereby the optical system could maybe be improved in respect of a more tolerant optical path.  
The encoder with the segmented photodiodes provided only digital signals; thus, no analog signals can be shown here. To demonstrate the functional principle, Figure 22a shows the laser spot on the segmented photo detector. The position of the laser spot could be calculated with a software tool by evaluating all 1024 photodiodes of the opto-ASIC. Figure 22b shows the user interface for the evaluation of the position of the laser spot with a Serial Peripheral Interface (SPI). Because the Gray code and the segmented encoder have two different evaluation principles, the results were not directly comparable. For further investigations of the segmented encoder, it should be enabled to also have access to the analog signals.  
Figure 21: Signals of the Gray code encoder for all bits over a small angular range.  
Figure 20: Example of the Gray code encoder signals (bit 6) for one revolution (360\({}^{\circ}\)).  
The most important features of the two optical encoders are summarized in Table 2.  
Further investigations were performed to study the influence of the required assembly accuracy of the lens and the optical components to determine the allowed tolerances. As expected, it became apparent that the assembly accuracy of the lens has an important role in determining the accuracy of the whole encoder. Therefore, special attention is needed during assembly of the lens. The successful method was to build an active alignment tool and use an active alignment process. This means that, during the assembling process of the lens, the laser diode was switched on and the required beam profile was controlled with an integrated image sensor inside this tool. The misalignment of the lens from the ideal position was calculated automatically. If necessary, the position of the lens was aligned automatically with an additional integrated piezo actuator with an accuracy of 80 nm [21; 22].