Method for automatically detecting and updating analog gain and input voltage generating circuit thereof
By introducing analog gain test rows and test peripheral circuits into the image sensor, the simulated gain is calibrated in real time, which solves the gain instability caused by process manufacturing and environmental changes, and improves the analog gain stability and accuracy of the image sensor.
Patent Information
- Application Number
- CN202311844473.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-12-28
- Publication Date
- 2025-07-01
AI Technical Summary
The prior art is difficult to effectively solve the stability and accuracy problems of image sensor analog gain during process manufacturing and application environment changes, resulting in poor gain linearity and may cause AEC oscillation.
By introducing analog gain test rows and test peripheral circuits into the image sensor, the input voltage generation circuit is used to test the input and output curves under different analog gains, and the analog gain is calibrated in real time to improve stability and accuracy.
This achieves improved analog gain stability and accuracy during process manufacturing and environmental changes, reduces power consumption and enhances the gain linearity of the image sensor.
Smart Images

Figure CN120238761A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of image sensors, and particularly to a method for automatically detecting and updating the analog gain of an image sensor. Background Art
[0002] Gain linearity is an important measurement index for evaluating the performance of an image sensor. Moreover, with the development of the image sensor industry, the requirement for this index is getting higher and higher. The gain in an image sensor consists of two parts: analog gain and digital gain. Among them, the digital gain does not change with the manufacturing deviation and application environment (PVT) of the image sensor. However, the analog gain is easily affected by PVT. If the analog gain changes greatly with PVT, it will lead to a poor overall gain linearity of the image sensor, and in severe cases, it will cause AEC oscillation.
[0003] In the prior art, in order to obtain accurate analog gain, usually, the power consumption and area of the analog circuit are increased to enhance the ability of the analog gain to resist PVT changes and reduce the difference between the theoretical value and the actual value of the analog gain, or a posteriori methods for testing the exposure response linearity are used for calibration. However, even if the method of calibrating each chip is adopted, it is impossible to cover all complex application environments. Summary of the Invention
[0004] The purpose of the present invention is to provide a method for automatically detecting and updating the analog gain and its input voltage generation circuit, which can update in real time the change of the analog gain calibration parameter of the image sensor caused by process manufacturing, working environment, and working parameters, and improve the stability and accuracy of the analog gain of the image sensor.
[0005] Based on the above considerations, one aspect of the present invention provides a method for automatically detecting and updating the analog gain, including: providing an analog gain test row; providing an analog gain test peripheral circuit; providing an input voltage generation circuit; before or during the normal operation of the image sensor, at a specific analog gain, using the analog gain test circuit to test a plurality of input voltages generated by the input voltage generation circuit, performing analog-to-digital conversion on the image signal voltages output by the pixel array of the image sensor according to the plurality of input voltages to obtain a plurality of digital signals, obtaining an input-output curve at the current analog gain according to the input voltage difference and the digital signal difference obtained by the analog-to-digital conversion; finally, by adjusting different analog gain levels, obtaining multiple input-output curves at different corresponding analog gain levels, and obtaining an analog gain table for calibrating the normal operation of the image sensor according to the slopes of the multiple input-output curves, so as to improve the stability and accuracy of the analog gain of the image sensor in different situations.
[0006] Preferably, the analog gain test row includes at least one test row located inside or outside the pixel array of the image sensor; the analog gain test peripheral circuit includes a voltage source or a current source located outside the pixel array, each test row includes a series-connected resistor or capacitor module, the first end of the series-connected resistor or capacitor module is connected to the voltage source, and the second end of the series-connected resistor or capacitor module is connected to the current source through a selection switch, wherein the current source comes from a bandgap reference circuit and / or a current source mirror circuit; the test steps for the analog gain value at a specific analog gain level at least include: setting the specific analog gain, and selecting one of the test rows, and the voltage source and the current source provide the same input voltage Vcal to perform analog-to-digital conversion on the reference voltage output by the pixel array of the image sensor to obtain a digital signal D ref , the voltage source and the current source perform analog-to-digital conversion on the image signal voltage output by the pixel array of the image sensor by providing different input voltages to obtain a digital signal D sig , and then use the digital signal difference D sig -D ref and the different input voltages provided by the analog gain test circuit to form an input-output curve at the corresponding analog gain level, and finally obtain the analog gain value at the specific analog gain level according to the input-output curve.
[0007] Preferably, different analog gain levels can be adjusted, and the input voltage of the analog test row is kept consistent during the tests at different analog gain levels. The input-output curves at different analog gain levels are measured by using the analog detection row, and then the analog gain values at different levels are obtained and stored in the storage unit to complete the update of the analog gain of the image sensor.
[0008] Further, by setting the current source in the analog gain test peripheral circuit as a bandgap reference circuit and / or a current source mirror circuit, the input voltage of the analog test row is kept consistent during the tests at different analog gain levels, thereby ensuring that the input signals of the analog gain test circuit are consistent and facilitating subsequent digital processing.
[0009] Preferably, each test row further includes a plurality of test row pixel units, each test row pixel unit includes a source follower transistor and a row selection transistor, the gates of each source follower transistor in the same row are all connected to the first metal wire, the gates of each row selection transistor are connected to the same row control line, the first end of the first metal wire is connected to the voltage source, and the second end of the first metal wire is connected to the current source through a first selection switch; when the first selection switch is turned off, the input voltage generation circuit provides the same input voltage V calWhen the first selection switch is closed, the input voltage generation circuit provides different input voltages.
[0010] Preferably, the gates of the source follower transistors are connected to the first metal wire at equal intervals so that the different input voltages are voltages that vary at equal intervals.
[0011] Preferably, each of the test lines further includes a second metal wire connected in parallel with the first metal wire. The first end of the second metal wire is connected to the voltage source, and the second end of the second metal wire is connected to the current source through a second selection switch. When the first selection switch is open, the second selection switch is closed. When the first selection switch is closed, the second selection switch is open.
[0012] Preferably, the first metal wire and the second metal wire have the same resistance so that the output load of the voltage source is consistent.
[0013] Preferably, each frame or multiple frames of images are calibrated regularly; or calibration is performed when the working environment or working parameters change up to a preset threshold.
[0014] Preferably, the digital codes corresponding to the calibration signal voltages output in the same column of multiple test lines are averaged and then used to fit and form the input-output curve.
[0015] Preferably, the range of the calibration voltage signal output by the test line is adjusted by adjusting the current of the current source.
[0016] Another aspect of the present invention provides an input voltage generation circuit for calibrating an analog gain test circuit, including: At least one analog gain test line located inside or outside the pixel array of the image sensor, and an analog gain test peripheral circuit located outside the pixel array, where the analog gain test peripheral circuit includes a voltage source or a current source; Each of the analog gain test lines includes a series of resistor or capacitor modules. The first end of the series of resistor or capacitor modules is connected to the voltage source, and the second end of the series of resistor or capacitor modules is connected to the current source. When a test line is selected, the voltage source and the current source provide the same input voltage through the series of resistor or capacitor modules to simulate the reference signal voltage output by the pixel array of the image sensor for analog-to-digital conversion to obtain a plurality of digital signals D ref , and by providing different input voltages to simulate the image signal voltage output by the pixel array of the image sensor for analog-to-digital conversion to obtain a plurality of digital signals D sig , so as to utilize the difference D ref -D sigDifferent input voltages provided by the analog gain test circuit are used to form an input-output curve based on the corresponding analog gain gear, so as to obtain the analog gain value of the image sensor at a specific analog gain gear according to the input-output curve.
[0017] Further, each of the test rows further includes one or more test row pixel units, and each test row pixel unit includes a source follower transistor and a row selection transistor. The gates of the source follower transistors in the same row are all connected to the first metal wire, and the gates of each row selection transistor are connected to the same row control line. The first end of the first metal wire is connected to the voltage source, and the second end of the first metal wire is connected to the current source through a first selection switch.
[0018] Further, the gates of the source follower transistors are connected to the first metal wire at equal intervals.
[0019] Further, each of the test rows further includes a second metal wire connected in parallel with the first metal wire. The first end of the second metal wire is connected to the voltage source, and the second end of the second metal wire is connected to the current source through a second selection switch.
[0020] Further, the first metal wire and the second metal wire have the same resistance.
[0021] Further, among the multiple test rows, it is alternately set that: the first ends of the first metal wire and the second metal wire are located at the left end of the test row and the second ends are located at the right end of the test row, or the first ends of the first metal wire and the second metal wire are located at the right end of the test row and the second ends are located at the left end of the test row.
[0022] Further, the multiple test rows are connected to the same current source, and the multiple test rows are connected to the same voltage source.
[0023] Further, by adjusting different analog gain gears and keeping the input voltage of the analog test row consistent throughout the test process, the input-output curves at different analog gain gears are measured by using the analog detection row, and then the analog gain values at different analog gain gears are obtained, and the analog gain values at different analog gain gears are stored in the storage unit to complete the update of the analog gain of the image sensor.
[0024] Further, it is characterized in that the generation circuit of the current source includes one or more of a bandgap reference circuit or a current source mirror circuit.
[0025] Further, automatically detect and update each frame or multiple frames of images regularly; or automatically detect and update when the working environment or working parameters of the image sensor change reach a preset threshold.
[0026] Compared with the prior art, the method for automatically detecting and updating the analog gain of the present invention has the following technical effects: First, the added detection circuit is simple and can be well compatible with the conventional readout circuit of the image sensor, and the area of the added circuit is very small; Second, the detection circuit of the analog gain is only turned on when detection and update are required and is in the off state usually, so the power consumption of the automatic detection of the analog gain is reduced; Third, only by measuring the slopes of the input-output curves of the analog gain at different levels can the analog gain values of each level be obtained, and the method is simple. Fourth, it can be applied to the detection and update of all types of analog gains used in the analog circuit of the image sensor, and has strong practicability. BRIEF DESCRIPTION OF THE DRAWINGS
[0027] Other features, objects, and advantages of the present invention will become more apparent by reading the following detailed description of non-limiting embodiments with reference to the accompanying drawings.
[0028] Figure 1 FIG. is a schematic structural diagram of an image sensor with an analog gain test circuit according to the present invention; Figure 2 FIG. is a schematic circuit diagram of the analog gain test circuit according to an embodiment of the present invention; Figure 3 FIG. is a working timing diagram of the analog gain test circuit according to an embodiment of the present invention; Figure 4 FIG. is an input-output curve of the analog gain test row according to an embodiment of the present invention; Figure 5 FIG. is a timing diagram of the automatic detection of the analog gain according to an embodiment of the present invention; Figure 6 FIG. is a full-screen test diagram of the automatic detection of the analog gain according to an embodiment of the present invention; Figure 7 FIG. is an input-output curve diagram under different analog gains according to an embodiment of the present invention; Figure 8 FIG. is a timing diagram of detecting and updating the analog gain when the image sensor is working normally; In the figures, throughout the different views, the same or similar reference numerals denote the same or similar devices (modules) or steps. EMBODIMENTS
[0029] To solve the above problems in the prior art, the present invention provides a method for automatically detecting and updating the analog gain and its input voltage generation circuit.
[0030] In the following detailed description of the preferred embodiments, reference will be made to the accompanying drawings that form a part of the present invention. The accompanying drawings illustrate, by way of example, specific embodiments capable of implementing the present invention. The exemplary embodiments are not intended to exhaust all embodiments according to the present invention. It will be understood that other embodiments may be utilized and structural or logical modifications may be made without departing from the scope of the present invention. Therefore, the following detailed description is not restrictive, and the scope of the present invention is defined by the appended claims.
[0031] One aspect of the present invention provides a method for automatically detecting and updating analog gain, including: providing an analog gain test row; providing an analog gain test peripheral circuit; before the image sensor operates normally, at multiple specific analog gains, detecting, through the analog gain test circuit, the corresponding analog gain values at multiple levels and storing them in a storage unit; and during the operation of the image sensor, when the application environment changes or periodically updating the analog gain values at the multiple automatically detected analog gain levels to the storage unit to improve the stability and accuracy of the analog gain of the image sensor.
[0032] The method for automatically detecting and updating analog gain proposed by the present invention is not limited to a particular field or a specific architecture, and can be used in any circuit with an analog-to-digital converter having analog gain. It can not only obtain the initial value of the analog gain before normal operation but also update the analog gain value in real time during normal operation.
[0033] Figure 1 A structural block diagram of an image sensor adopting the method for automatically detecting and updating analog gain of the present invention is shown. In addition to including a pixel array 101, a row control module 102, a column processing array 103, a voltage-current generating circuit 104, an analog gain test peripheral circuit 105, and a digital processing module 106, the image sensor further includes an image sensor analog gain test row 107.
[0034] Among them, the pixel array 101 includes a plurality of conventional row pixel units. The circuit schematic diagram of a single pixel unit (the structure is not limited to this, only for the convenience of description) is as Figure 2 shown. The pixel unit has a conventional pixel unit structure and specifically includes a reset transistor MRST, transfer transistors MTX<0> to MTX <m>(where M is an integer greater than or equal to 0), photosensitive units PD<0> to PD corresponding one-to-one with the transfer transistors <m>, a source follower transistor MSF, and a row selection transistor MRSEL.
[0035] The structure of the analog gain test row 107 is not limited as long as it can be used in a circuit for generating multiple input voltage signals. Before or during the normal operation of the image sensor, these input voltages are given to the ADC in the column processing array 103 for analog-to-digital conversion to obtain an input-output curve at a specific analog gain setting. The digital processing module 106 calculates the slope of the input-output curve at the current analog gain setting based on this conversion curve. Then, by adjusting different analog gains, the slopes of the input-output curves at multiple different analog gain settings can be obtained. Then, based on these slopes, the accurate analog gain values at the corresponding different analog gain settings can be obtained. Finally, these actual analog gain values are stored in the storage unit for calibration and update of the analog gain during the normal operation of the image sensor.
[0036] The method for automatic detection and update of the analog gain of the present invention can work regularly as needed, and can update in real time the changes in the analog gain caused by changes in the working environment or parameter settings of the image sensor, improving the stability and accuracy of the analog gain test circuit, thereby obtaining excellent image sensor performance.
[0037] The structure and operating principle of the analog gain test row 107 will be described in detail below with reference to specific embodiments. Embodiment 1
[0038] Figure 2 A preferred embodiment of the circuit for automatic detection and update of the analog gain of the image sensor of the present invention is shown. The circuit includes at least one test row 109 in the analog gain test row, and a voltage source 108 and a current source 110 in the analog gain test peripheral circuit 105. The voltage source 108 and the current source 110 are located outside the pixel array 101. The test row 109 can be located inside or outside the pixel array 101, and can be one or more rows, which can be specifically set according to needs. As an example, Figure 2 The circuit structure of a standard test row is shown in the dashed box, which includes a series-connected resistor module 113. Those skilled in the art can understand that the resistor module can also be replaced by a capacitor module. The first end of the series-connected resistor module 113 is connected to the voltage source 108, and the second end is connected to the current source 110.
[0039] When a test row 109 is selected, a specific analog gain gear is set. The voltage source 108 and the current source 110 provide the same input voltage through the series-connected resistor module 113 to simulate the reference signal voltage output by the image sensor pixel array for analog-to-digital conversion to obtain the digital signal Dref, and provide different input voltages by controlling the selection switch to simulate the image signal voltage output by the image sensor pixel array for analog-to-digital conversion to obtain the digital signal Dsig. Thus, the input-output curve based on the current analog gain gear is obtained by using the difference between the two sets of digital signals and the different input voltages provided by the analog gain test circuit. Then, the analog gain value at the current analog gain gear can be calculated according to the slope of the input-output curve.
[0040] Specifically, the series-connected resistor module 113 includes a first metal wire 111 and a second metal wire 112 connected in parallel. The first end ( Figure 2 the left end in the figure) of the first metal wire 111 is connected to the output Vcal of the voltage source 108, and the second end ( Figure 3 the right end in the figure) is connected to the current source 110 through the first selection switch sw1. Similarly, the first end ( Figure 2 the left end in the figure) of the second metal wire 112 is connected to the output Vcal of the voltage source 108, and the second end ( Figure 2 the right end in the figure) is connected to the current source 110 through the second selection switch sw2. There are many resistors R connected in series on the first metal wire 111 and the second metal wire 112, which can be the resistance of the metal wire itself or an external resistor. Preferably, the resistance values of each R are equal, which is equivalent to dividing the resistance on the metal wire into (N - 1) equal parts, where N is the number of columns of pixel units in the image sensor. When R is the resistance of the metal wire itself, the resistance value of one resistor R corresponds to the resistance value of the metal wire corresponding to the width of one pixel unit. Thus, the voltage can be uniformly changed on the metal wire resistance by using the current flowing through the metal wire resistance, and then voltage output points are set at equal intervals on the metal wire and provided to the analog-to-digital converter (ADC) for quantization to obtain the corresponding output digital signal.
[0041] Each test row 109 further includes a plurality of test row pixel units 114, and each test row pixel unit 114 includes a source follower transistor MSF and a row selection transistor MRSEL. That is to say, compared with the conventional row pixel unit, the test row pixel unit 114 only retains the source follower transistor MSF and the row selection transistor MRSEL part. The number of columns of the conventional row pixel units in the pixel array 101 is the same as that of the test row pixel units in the analog gain test row 107. The outputs corresponding to each column of the pixel array 101 and the analog gain test row 107 are connected together, which are respectively pxda<0> to pxda <n-1>, N is the number of columns of pixel units in the image sensor. The gates of each source follower transistor MSF in the same row are all connected to the first metal wire 111. Preferably, the gates of the source follower transistors MSF are connected to the first metal wire 111 at equal intervals to equally divide the resistance of the first metal wire 111 itself. The gate of each row selection transistor MRSEL is connected to the same row control line, and the control signal RSEL comes from Figure 1 the row control module 102 in. Compared with the conventional pixel array 101, except for the different input signal sources, the other operations and signal processing paths of the analog gain test row 107 are the same. The gate voltage of the controllable source follower transistor in the analog gain test row 107 is used to simulate the signal output range of the real pixel photosensitive unit.
[0042] The voltage source 108 can be a simple voltage source or a complex voltage source generation circuit. Its working principle is as follows: When the current of the current source flows through the variable resistor to generate the output voltage Vr, the sampling circuit samples the voltage Vr onto the capacitor C, and then obtains the output voltage Vcal through the unity gain negative feedback circuit. Since the circuit is relatively common, it will not be elaborated here.
[0043] The current source 110 can be a simple current source or a complex current source generation circuit. Its input current I in comes from the bandgap reference circuit or the current source mirror circuit. The actual circuit of the current source 110 can be made more complex.
[0044] Next, in combination with Figure 2 the circuit schematic diagram of Figure 3 and the timing diagram of
[0045] the working principle of the analog gain test and update of the image sensor of the present invention will be specifically described. When the row control module 102 selects a test row 109 in the analog gain test row 107, the voltage source 108 and the current source 110 are turned on, and at the same time the control signal pu becomes low, the pull-up switch swpu is disconnected, and the output voltage Vcal is determined by the voltage source. The left ends of the first metal wire 111 and the second metal wire 112 are always connected to the output voltage Vcal. The control signal sel1 of the first selection switch sw1 connected to the right end of the first metal wire 111 is low, and the switch sw1 is disconnected and in a floating state. The control signal sel2 of the second selection switch sw2 connected to the right end of the second metal wire 112 is high, and the switch sw2 is turned on to connect the right end of the second metal wire 112 to the current source 110. At this time, the voltage obtained on the gate of the source follower transistor MSF in the test row 109 satisfies the following equation:
[0046] This same input voltage A reference signal voltage used to simulate the output of an image sensor pixel array. At this voltage respectively, analog-to-digital conversion of the reference signal is performed to obtain the digital output codes corresponding to the reference signals of each column, and the analog-to-digital converter quantifies the corresponding digital output signals to .
[0047] After the analog-to-digital conversion of the reference signal is completed, the control signal sel1 of the first selection switch sw1 connected to the right end of the first metal wire 111 becomes high, and the switch sw1 is turned on, connecting the right end of the first metal wire 111 to the current source 110. The control signal sel2 of the second selection switch sw2 connected to the right end of the second metal wire 112 becomes low, and the switch sw2 is turned off, leaving the right end of the second metal wire 111 floating. At this time, since there is a current flowing through the first metal wire 111, a voltage drop from left to right will be generated and evenly applied to the gates of the source follower transistors MSF in this test row 109. The voltage on the gates of the source follower transistors MSF satisfies the following equation:
[0048]
[0049]
[0050]
[0051]
[0052] Among them, I is the output current value of the current source, and R is the equivalent resistance between the gates of two adjacent source follower transistors MSF on the first metal wire.
[0053] These different input voltages to are used to simulate the image signal voltage output by the image sensor pixel array. At this voltage respectively, analog-to-digital conversion of the image signal is performed to obtain the digital output codes corresponding to the image signals of each column, and the analog-to-digital converter quantifies the corresponding digital output signals to .
[0054] By combining the two groups of quantified digital output signals, an input-output curve at a specific analog gain setting can be obtained, with the input voltage ranging from 0 to , and the output being to Among them The slope of the measured input-output curve is K.
[0055] Based on the above-obtained slope K of the input-output curve at a specific analog gain level, how to obtain the analog gain values at different analog gain levels will be described in detail below.
[0056] Before the image sensor leaves the factory or before normal image output after power-on, a test image can be output first. Figure 5 It is the timing control diagram corresponding to the test image. The Window signal frames the entire image height of the output image. To output the test image, it is necessary to enter the analog gain test full-screen mode. That is to say, in this frame of test image, only the addresses of the analog gain test lines are sent. It can be sending the same analog gain test line address repeatedly, or sending different analog gain test line addresses cyclically (in the case of multiple analog gain test lines). Then, by adjusting Figure 2 the output current I of the current source generation circuit in in , the analog gain test circuit is set in a suitable input voltage range, and after setting, it remains unchanged throughout the analog gain test image to ensure that the input is consistent at different analog gain levels, which is convenient for subsequent data processing.
[0057] When there are M levels (M is a natural number greater than 1) of analog gain required for the image sensor, one frame of the image can be divided into M parts from top to bottom (it can be equally divided or not equally divided), and different analog gain levels to be detected are set respectively within each part. In this way, a full-screen test image as shown in Figure 6 can be obtained. Figure 6 shows a case where 13 levels of analog gain are set from top to bottom, and the analog gain increases in sequence. After the digital module or the test platform obtains the full-screen test image, an input-output curve as shown in Figure 4 can be obtained for each analog gain interval. M input-output curves under different analog gains can be obtained for the entire test image, as shown in Figure 7 .
[0058] By calculating the slopes of each input-output curve, the analog gains at different analog levels can be calculated. Set the analog gain reference value K1 as the slope of the input-output curve at 1 times the analog gain level. The ratio of the slopes K N / K1 (N is a natural number greater than 1) is the analog gain value corresponding to the current analog gain level N. In this way, the accurate analog gain values of the image sensor at different analog gain levels are obtained. Finally, these actually measured analog gain values are stored in the storage unit for subsequent calibration and update use.
[0059] In some embodiments, some of the analog gain test lines may also be alternately arranged such that the first ends of the first metal line and the second metal line are located at the left end of the test line and the second ends are located at the right end of the test line, or the first ends of the first metal line and the second metal line are located at the right end of the test line and the second ends are located at the left end of the test line.
[0060] In some embodiments, multiple analog gain test lines are connected to the same current source, and multiple of the test lines are connected to the same voltage source.
[0061] In some embodiments, in order to obtain accurate analog gain values at each analog gain level, it is necessary to obtain the accurate slope K of the input-output curve within each analog gain level range. Therefore, in order to reduce the influence of noise on the calculation of the slope K value, a sufficient number of rows need to be selected for each analog gain level range. First, column averaging is performed to obtain one row of data, and then the input-output curve is fitted.
[0062] If the image sensor wants to detect a relatively large number of analog levels and the image height window is relatively small, for accurate analog gain testing, different analog gains can be assigned to different frames, that is, more than one frame of test images can be output, with different analog gain levels set, for example, levels 1 to X (where X is a natural number between 1 and M) and levels X + 1 to M are in different frames of analog gain test images. However, if it is detected and calibrated before leaving the factory, the test cost will inevitably increase; if it is detected and calibrated after power-on and before normal image output, it will cause an increase in lost frames in the output images, affecting the user experience. Therefore, it is preferably completed within one frame of the image. Moreover, generally, one frame of the image is completely sufficient to complete all analog gain detections.
[0063] The above method can obtain the initial values of all analog gain levels for each image sensor chip. However, during the operation of the image sensor, the application environment may change, which may cause the analog gain to change, thereby affecting the gain linearity of the image sensor. Therefore, when the image sensor is operating normally: the analog gain can be updated by conditional triggering, such as detecting a temperature change, etc.; or it can be automatically detected and updated regularly at fixed intervals.
[0064] In some embodiments, in order not to affect normal image output, the analog gain test can be placed in the area where the window is low, that is, outside the image height. In some embodiments, in order not to affect the frame rate and to ensure that there is sufficient data to correct the analog gain values of each level, according to the time when the window is low, the number of analog gain levels calibrated at one time can be flexibly adjusted, and the update of all analog gain values can be completed through multiple frames of time.
[0065] Such as Figure 8 As shown, in some embodiments, for the timing schematic diagram of calibrating only one analog gain at a time, it takes M frames to detect and update all the analog gain values Again1 to AgainM (analog gain 1 to analog gain M). Among them, the regular rows represent the row addresses of the normal image output, and the corresponding analog gain is Again, which can be any one of Again1 to AgainM.
[0066] Although in the above embodiments, for the sake of convenience of description, only 1 test row is used in the analog gain test row 107, in fact, multiple rows can be used. Further preferably, the digital codes corresponding to the calibration signal voltages output in the same column of multiple test rows can be averaged and then used to form the input-output curve of the analog gain, so as to eliminate the influence of noise and improve the calculation accuracy of the analog gain value.
[0067] In other embodiments, it can be set to detect each frame or multiple frames of images regularly once or multiple times, or it can be detected once or multiple times when it is monitored that the working temperature or working parameters change to reach the preset threshold, and the detection results are updated to the storage unit in real time for subsequent use.
[0068] In summary, the method and circuit for automatically detecting and updating the analog gain of the present invention test the input-output curves under multiple analog gain gears with an analog gain test circuit before or during the normal operation of the image sensor, obtain the analog gain values under different gears, and are used to calibrate the analog gain when the image sensor is working normally, so as to reduce the influence caused by the change of the analog gain due to the change of chip manufacturing, working environment or working parameters, and improve the stability and accuracy of the analog gain of the image sensor.
[0069] For those skilled in the art, it is obvious that the present invention is not limited to the details of the above exemplary embodiments, and can be implemented in other specific forms without departing from the spirit or basic characteristics of the present invention. Therefore, in any case, the embodiments should be regarded as exemplary and non-limiting. In addition, obviously, the word "including" does not exclude other elements and steps, and the word "a" does not exclude a plurality. Multiple elements stated in the apparatus claims can also be implemented by one element. The words such as first and second are used to represent names and do not represent any specific order. < / m> < / m>
Claims
1. A method for automatically detecting and updating the analog gain of an image sensor, characterized in that Comprising: Providing a simulated gain test line; Providing a simulated gain test peripheral circuit; The automatic detection includes, before or during the normal operation of the image sensor, at multiple simulated gains, by controlling the input signal of the simulated gain test peripheral circuit, enabling the simulated gain test line to detect simulated gain values at multiple levels according to multiple simulated gain levels; The update includes, when the application environment of the image sensor changes or periodically writing the simulated gain values at the multiple simulated gain levels detected automatically into a storage unit.
2. The method according to claim 1, wherein: The simulated gain test line at least includes: at least one test line located inside or outside the pixel array of the image sensor; The simulated gain test peripheral circuit at least includes: a voltage source or a current source located outside the pixel array; Wherein each of the test lines includes a series-connected resistor or capacitor module, a first end of the series-connected resistor or capacitor module is connected to the voltage source, and a second end of the series-connected resistor or capacitor module is connected to the current source.
3. The method according to claim 2, wherein The generating circuit of the current source includes one or more of a bandgap reference circuit or a current source mirror circuit.
4. The method according to claim 2, wherein: The test steps for the analog gain value at the specific analog gain level at least include: setting the specific analog gain and selecting one of the test rows, where the voltage source and current source provide the same input voltage Vcal to perform analog-to-digital conversion on the reference voltage output by the image sensor pixel array to obtain the digital signal D ref , and the voltage source and current source perform analog-to-digital conversion on the image signal voltage output by the image sensor pixel array by providing different input voltages to obtain the digital signal D sig , and then using the digital signal difference D sig -D ref and the different input voltages provided by the analog gain test circuit to form an input-output curve corresponding to the analog gain, and finally obtaining the analog gain value at the specific analog gain level according to the input-output curve.
5. The method according to claim 4, characterized in that By adjusting different simulated gain levels and keeping the input voltage of the simulated test line consistent during the entire test process of the simulated gain, using the simulated detection line to measure the input-output curves at different simulated gain levels, thereby obtaining the simulated gain values at different simulated gain levels, and storing the simulated gain values at different simulated gain levels into a storage unit to complete the update of the simulated gain of the image sensor.
6. The method according to claim 2, wherein Each of the test lines further includes a plurality of test line pixel units, each test line pixel unit includes a source follower transistor and a row selection transistor, gates of each source follower transistor in the same row are all connected to a first metal wire, gates of each row selection transistor are connected to the same row control line, a first end of the first metal wire is connected to the voltage source, and a second end of the first metal wire is connected to the current source through a first selection switch; When the first selection switch is turned on, the input voltage generating circuit provides the same input voltage; when the first selection switch is closed, the input voltage generating circuit provides different input voltages.
7. The method according to claim 6, wherein The gates of the source follower transistors are connected to the first metal wire at equal intervals so that the different input voltages are voltages that change at equal intervals.
8. The method according to claim 6, wherein Each of the test lines further includes a second metal wire connected in parallel with the first metal wire, a first end of the second metal wire is connected to the voltage source, and a second end of the second metal wire is connected to the current source through a second selection switch; When the first selection switch is turned off, the second selection switch is closed; When the first selection switch is closed, the second selection switch is turned off.
9. The method according to claim 1, wherein Automatically detecting and updating each frame or multiple frames of images regularly; or automatically detecting and updating when the working environment or working parameters of the image sensor change to reach a preset threshold.
10. A circuit for automatically detecting and updating the analog gain of an image sensor, characterized in that, Comprising: At least one analog gain test line inside or outside the pixel array of the image sensor, and an analog gain test peripheral circuit located outside the pixel array, wherein the analog gain test peripheral circuit includes a voltage source or a current source; Each of the analog gain test lines includes a series-connected resistor or capacitor module. The first end of the series-connected resistor or capacitor module is connected to the voltage source, and the second end of the series-connected resistor or capacitor module is connected to the current source. When a test line is selected, the voltage source and the current source provide the same input voltage through the series-connected resistor module to simulate the reference signal voltage output by the image sensor pixel array for analog-to-digital conversion to obtain a plurality of digital signals D ref , and different input voltages are provided to simulate the image signal voltage output by the image sensor pixel array for analog-to-digital conversion to obtain a plurality of digital signals D sig , so as to utilize the difference D ref- D sig of the plurality of digital signals and the different input voltages provided by the analog gain test circuit to form an input-output curve based on the corresponding analog gain gear, so as to obtain the analog gain value of the image sensor at a specific analog gain gear according to the input-output curve.
11. The circuit according to claim 10, wherein, Each of the test lines further includes one or more test line pixel units, each test line pixel unit includes a source follower transistor and a row selection transistor, the gates of each source follower transistor in the same row are connected to a first metal wire, the gate of each row selection transistor is connected to the same row control line, the first end of the first metal wire is connected to the voltage source, and the second end of the first metal wire is connected to the current source through a first selection switch.
12. The circuit according to claim 11, wherein The gates of the source follower transistors are connected to the first metal wire at equal intervals.
13. The circuit according to claim 11, wherein Each of the test lines further includes a second metal wire connected in parallel with the first metal wire, the first end of the second metal wire is connected to the voltage source, and the second end of the second metal wire is connected to the current source through a second selection switch.
14. The circuit according to claim 13, wherein the first metal wire and the second metal wire have the same resistance.
15. The circuit according to claim 13, characterized in that, Among the multiple test lines, it is alternately set that: the first ends of the first metal wire and the second metal wire are located at the left end of the test line and the second ends are located at the right end of the test line, or the first ends of the first metal wire and the second metal wire are located at the right end of the test line and the second ends are located at the left end of the test line.
16. The circuit according to claim 10, wherein The multiple test lines are connected to the same current source, and the multiple test lines are connected to the same voltage source.
17. The circuit according to claim 11, characterized in that, By adjusting different analog gain levels and keeping the input voltage of the analog test line consistent throughout the test, the input-output curves at different analog gain levels are measured using the analog detection line, and then the analog gain values at different analog gain levels are obtained, and the analog gain values at different analog gain levels are stored in the storage unit to complete the update of the analog gain of the image sensor.
18. The circuit according to claim 10, wherein The generation circuit of the current source includes one or more of a bandgap reference circuit or a current source mirror circuit.
19. The circuit according to claim 10, wherein Automatically detect and update each frame or multiple frames of images regularly; or automatically detect and update when the working environment or working parameters of the image sensor change reach a preset threshold.