# An Optical Encoder Chip with Area Compensation
## 1 Introduction  
An optical encoder is a precision optical instrument that converts mechanical geometric displacements into electrical signals through photoelectric conversion technology and is widely used in many fields, such as robots, avionics systems, and automotive sensors [1, 2, 3]. According to their imaging principle, optical encoders can usually be divided into transmission and reflection types. The imaging principle of the transmissive optical encoder is based on the Moire effect, and this optical encoder has strict requirements on the line width of the grating and the position of the two gratings [4]. Reflective optical encoders are imaged based on the diffraction principle and have better accuracy, higher resolution, and larger installation tolerances [5]. According to their working principles and coding methods, optical encoders can usually be divided into incremental, absolute, and hybrid types. Incremental encoders use output signals to obtain relative position information [6], but suffer from cumulative errors and data loss after power failure. Absolute encoders use digital coding to obtain absolute position information [7, 8], but the higher the number of coding bits, the larger the size, which makes it difficult to realize miniaturization. The code disk of the hybrid optical encoder combines incremental code tracks and absolute code tracks [9], which can not only measure the absolute position but also subdivide the angle. Thus, the hybrid optical encoder ensures miniaturization and increases resolution simultaneously.  
In the previous research on the output signals of the optical encoder, the focus was mainly on improving the sinusoidal property of the incremental signal [10, 11, 12, 13, 14] and reducing the error of the signal [15, 16, 17]. However, there was little research on converting the photocurrent of absolute code into the correct digital signal. The digitization process of the absolute code signals is usually completed by comparators [18]. When multiple absolute codes are output by multiple photodiodes in parallel, the photocurrent generated in different pathways is different due to the different distance between the photodiodes and thelight source and the different illumination intensity. In order to read out the absolute code accurately, the common method is to design the amplifiers for different readout channels with adjustable gain [19] or set different reference levels for the comparators for different channels [20]. These two methods not only make the following processing circuit more complicated but also increase the difficulty of debugging. There are also studies using digital self-calibration [21], which used digital circuits to dynamically calculate the readout signal in the channel to adjust the reference level of the comparator continuously. However, this method increases the complexity of the digital processing circuit, and it is not easy to implement when there are many parallel channels.  
In this paper, a photodiode array chip for the reflective hybrid optical encoder is designed. Aiming at the problem that the output signals of different channels of absolute codes are different, this paper analyzes the reasons from the angle of light intensity. According to the analysis results, the area of photodiodes in different positions is compensated to realize the consistency of output signals of absolute code tracks. Compared with the traditional methods, this method does not need to set different reference levels for the comparators and does not need to design amplifiers with different gains, which reduces the complexity of circuit design.