CN104822032B - A kind of signal acquisition and automatic exposure circuit and its method based on linear CCD - Google Patents
A kind of signal acquisition and automatic exposure circuit and its method based on linear CCD Download PDFInfo
- Publication number
- CN104822032B CN104822032B CN201510187707.2A CN201510187707A CN104822032B CN 104822032 B CN104822032 B CN 104822032B CN 201510187707 A CN201510187707 A CN 201510187707A CN 104822032 B CN104822032 B CN 104822032B
- Authority
- CN
- China
- Prior art keywords
- ccd
- linear ccd
- amplifier
- microprocessor
- output
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Expired - Fee Related
Links
- 238000000034 method Methods 0.000 title claims abstract description 15
- 238000006243 chemical reaction Methods 0.000 claims abstract description 16
- 230000003321 amplification Effects 0.000 claims abstract description 9
- 238000003199 nucleic acid amplification method Methods 0.000 claims abstract description 9
- 239000003990 capacitor Substances 0.000 claims description 12
- 235000015429 Mirabilis expansa Nutrition 0.000 claims description 9
- 244000294411 Mirabilis expansa Species 0.000 claims description 9
- 235000013536 miso Nutrition 0.000 claims description 9
- 230000005669 field effect Effects 0.000 claims description 3
- 239000004065 semiconductor Substances 0.000 claims 8
- 230000005611 electricity Effects 0.000 claims 2
- 241001269238 Data Species 0.000 claims 1
- 238000005516 engineering process Methods 0.000 abstract description 2
- 101100115215 Caenorhabditis elegans cul-2 gene Proteins 0.000 description 9
- 238000010586 diagram Methods 0.000 description 4
- 238000007599 discharging Methods 0.000 description 3
- 238000007405 data analysis Methods 0.000 description 1
- 230000007547 defect Effects 0.000 description 1
- 230000007613 environmental effect Effects 0.000 description 1
- 230000010354 integration Effects 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 229920006395 saturated elastomer Polymers 0.000 description 1
Landscapes
- Transforming Light Signals Into Electric Signals (AREA)
- Facsimile Scanning Arrangements (AREA)
Abstract
本发明公开一种基于线性CCD的信号采集和自动曝光电路及其方法,属于光电技术领域。所述电路包括微处理器,通过微处理器SPI接口、I/O接口与微处理器相连的CCD信号采集与变换单元,线性CCD通过其接口分别与微处理器SPI接口和CCD信号采集与变换单元相连,其中,所述CCD信号采集与变换单元包括比较触发模块,以及与比较触发模块相连的CCD输出电压放大模块和动态阈值产生模块。本发明所述的信号采集和自动曝光电路及其方法,不需要A/D转换,可以在一定光强范围内都能自动调整CCD的曝光时间,适应性强。
The invention discloses a linear CCD-based signal acquisition and automatic exposure circuit and a method thereof, which belong to the field of photoelectric technology. The circuit includes a microprocessor, a CCD signal acquisition and conversion unit connected to the microprocessor through the microprocessor SPI interface and an I/O interface, and the linear CCD is respectively connected to the microprocessor SPI interface and the CCD signal acquisition and conversion unit through its interface The units are connected, wherein the CCD signal acquisition and conversion unit includes a comparison trigger module, and a CCD output voltage amplification module and a dynamic threshold generation module connected to the comparison trigger module. The signal acquisition and automatic exposure circuit and the method thereof in the present invention do not need A/D conversion, can automatically adjust the exposure time of the CCD within a certain light intensity range, and have strong adaptability.
Description
技术领域technical field
本发明涉及一种基于线性CCD的信号采集和自动曝光电路及其方法,属于光电技术领域。The invention relates to a linear CCD-based signal acquisition and automatic exposure circuit and a method thereof, belonging to the field of photoelectric technology.
背景技术Background technique
TSL1401CL为一款线性CCD,其核心是128个光电二极管组成的感光阵列,阵列后面有一排积分电容,光电二极管在光能量冲击下产生光电流,构成有源积分电路,那么积分电容就是用来存储光能转化后的电荷。积分电容存储的电荷越多,说明前方对应的那个感光二极管采集的光强越大。反映在像素点上就是,像素灰度低。光强接近饱和,像素点灰度趋近于全白,则呈白电平,输出电压值越大。前18个时钟周期是像素复位时间,不进行积分与曝光,第19个CLK到下一个SI为曝光时间,因此在线性 CCD的操作过程中,SI信号相当于一个标志,当它变为高电平后,就可以在每个CLK信号高电平到来后进行数据的采样,采样数据的曝光时间是由前一次第19个CLK到本次SI 高电平出现的时间确定的。光线越强,积分电容存储的电荷速度越快,进行曝光的周期就该越短,光线越弱,积分电容存储的电荷速度越慢,进行曝光的周期就该越长。TSL1401CL is a linear CCD. Its core is a photosensitive array composed of 128 photodiodes. There is a row of integrating capacitors behind the array. The photodiodes generate photocurrent under the impact of light energy to form an active integrating circuit. The integrating capacitors are used to store Electric charge after conversion of light energy. The more charges stored in the integrating capacitor, the greater the light intensity collected by the corresponding photodiode in front. It is reflected in the pixels that the grayscale of the pixels is low. The light intensity is close to saturation, and the gray scale of the pixel point is close to full white, then it is white level, and the larger the output voltage value is. The first 18 clock cycles are the pixel reset time, no integration and exposure are performed, the exposure time is from the 19th CLK to the next SI, so during the operation of the linear CCD, the SI signal is equivalent to a sign, when it becomes high After leveling, the data can be sampled after the high level of each CLK signal arrives, and the exposure time of the sampled data is determined by the time from the 19th CLK of the previous time to the appearance of the SI high level this time. The stronger the light, the faster the charge stored in the integrating capacitor, and the shorter the exposure period should be; the weaker the light, the slower the charge stored in the integrating capacitor, and the longer the exposure period should be.
目前的线性CCD曝光时间调整及数据采集方法,主要有以下两种:The current linear CCD exposure time adjustment and data acquisition methods mainly include the following two methods:
1、微处理器通过A/D转换直接采集CCD输出的模拟电压数据,转换为数字信息,微处理器通过数据分析,调整两次SI之间的时间间隔,该方法主要采用微处理器软件来分析数据,CPU程序复杂,数据采集速度较慢,环境适应能力差;1. The microprocessor directly collects the analog voltage data output by the CCD through A/D conversion and converts it into digital information. The microprocessor adjusts the time interval between two SIs through data analysis. This method mainly uses microprocessor software to Analyzing data, the CPU program is complicated, the data acquisition speed is slow, and the environmental adaptability is poor;
2、采用硬件电路二值化黑白像素点电压,但CCD的128个像素点阈值参考电压是相同的,导致CCD两边对应像素点出现误判。2. The hardware circuit is used to binarize black and white pixel voltages, but the threshold reference voltages of the 128 pixel points of the CCD are the same, resulting in misjudgment of the corresponding pixels on both sides of the CCD.
有鉴于此,本发明人对此进行研究,专门开发出一种基于线性CCD的信号采集和自动曝光电路及其方法,本案由此产生。In view of this, the inventor conducted research on this, and specially developed a linear CCD-based signal acquisition and automatic exposure circuit and its method, and this case arose from it.
发明内容Contents of the invention
本发明的目的是提供一种基于线性CCD的信号采集和自动曝光电路及其方法,不需要A/D转换,可以在一定光强范围内都能自动调整CCD的曝光时间,适应性强。The purpose of the present invention is to provide a linear CCD-based signal acquisition and automatic exposure circuit and its method, which can automatically adjust the exposure time of the CCD within a certain light intensity range without A/D conversion, and has strong adaptability.
为了实现上述目的,本发明的解决方案是:In order to achieve the above object, the solution of the present invention is:
一种基于线性CCD的信号采集和自动曝光电路,包括微处理器,通过微处理器SPI接口、I/O接口与微处理器相连的CCD信号采集与变换单元,线性CCD通过其接口分别与微处理器SPI接口和CCD信号采集与变换单元相连,其中,所述CCD信号采集与变换单元包括比较触发模块,以及与比较触发模块相连的CCD输出电压放大模块和动态阈值产生模块。A signal acquisition and automatic exposure circuit based on a linear CCD, including a microprocessor, a CCD signal acquisition and conversion unit connected to the microprocessor through an SPI interface and an I/O interface of the microprocessor, and the linear CCD is respectively connected to the microprocessor through its interface. The SPI interface of the processor is connected to the CCD signal acquisition and conversion unit, wherein the CCD signal acquisition and conversion unit includes a comparison trigger module, and a CCD output voltage amplification module and a dynamic threshold generation module connected to the comparison trigger module.
作为优选,所述CCD输出电压放大模块包括放大器,与放大器相连的滑动变阻器,所述放大器的同向输入端通过一电阻与线性CCD的电压输出端相连,放大器的输出端与比较触发模块的第一比较器、第二比较器相连,通过改变第一滑动变阻器的阻值大小调节放大器的放大倍数。As preferably, the CCD output voltage amplifying module includes an amplifier, a sliding rheostat connected to the amplifier, the same input terminal of the amplifier is connected to the voltage output terminal of the linear CCD through a resistor, and the output terminal of the amplifier is connected to the first comparison trigger module. The first comparator and the second comparator are connected, and the amplification factor of the amplifier is adjusted by changing the resistance value of the first sliding rheostat.
作为优选,所述动态阈值产生模块包括计数器,通过与门与计数器相连的P型MOS管、N型MOS管,以及与P型MOS管、N型MOS管相连的跟随器,其中,P型MOS管与第三滑动变阻器相连,N型MOS管与第四滑动变阻器相连,跟随器的输出端先串联一个电阻,再并联一个充电电容后与第一比较器输入端相连。Preferably, the dynamic threshold generating module includes a counter, a P-type MOS transistor and an N-type MOS transistor connected to the counter through an AND gate, and a follower connected to the P-type MOS transistor and the N-type MOS transistor, wherein the P-type MOS transistor The tube is connected to the third sliding rheostat, and the N-type MOS tube is connected to the fourth sliding rheostat. The output terminal of the follower is first connected in series with a resistor, and then connected in parallel with a charging capacitor, and then connected to the input terminal of the first comparator.
作为优选,所述比较触发模块包括并联在放大器输出端的第一比较器、第二比较器,以及与第二比较器输出端相连的触发器,所述第二比较器的同向输入端与第二滑动变阻器相连,第一比较器和触发器的输出端与微处理器的SPI接口相连。Preferably, the comparison trigger module includes a first comparator connected in parallel to the output terminal of the amplifier, a second comparator, and a flip-flop connected to the output terminal of the second comparator, and the non-inverting input terminal of the second comparator is connected to the output terminal of the first comparator. The two sliding rheostats are connected, and the output terminals of the first comparator and the flip-flop are connected with the SPI interface of the microprocessor.
作为优选,所述触发器采用型号为74HC74的触发器。Preferably, the trigger is a trigger with a model number of 74HC74.
一种基于线性CCD的信号采集和自动曝光方法,包括如下步骤:A signal acquisition and automatic exposure method based on a linear CCD, comprising the steps of:
1)首先将微处理器的SPI接口工作在主模式下,设置工作频率CLK为400KHZ,同时将CLK作为线性CCD的工作时钟,设置微处理器的定时器,使定时时间(即曝光时间)初始值设为5毫秒,作为线性CCD曝光的初始值,每5毫秒产生定时中断,使能SPI通过MOSI口连续输出16个字节数据(1个0x80,其余15个0x00,SI高电平启动线性CCD),形成线性CCD需要的SI信号,同时将微处理器发出的MOSI信号和CLK信号分别作为线性CCD的启动信号SI,CLK,启动线性CCD工作;1) First, make the SPI interface of the microprocessor work in the main mode, set the working frequency CLK to 400KHZ, and at the same time use CLK as the working clock of the linear CCD, set the timer of the microprocessor so that the timing time (ie exposure time) is initially The value is set to 5 milliseconds, as the initial value of the linear CCD exposure, a timing interrupt is generated every 5 milliseconds, and the SPI is enabled to continuously output 16 bytes of data through the MOSI port (1 0x80, the remaining 15 0x00, and the SI high level starts the linear CCD) to form the SI signal required by the linear CCD, and at the same time use the MOSI signal and CLK signal sent by the microprocessor as the linear CCD start signal SI, CLK to start the linear CCD work;
2)线性CCD在CLK和SI的条件下,将输出电压通过一电阻输送到放大器,通过第一滑动变阻器调整放大器的倍数,并通过示波器观察放大器的输出电压值,使中间像素点白点电平值接近4V,同时记录中间和两边像素白点和黑点电压平均值;2) Under the conditions of CLK and SI, the linear CCD transmits the output voltage to the amplifier through a resistor, adjusts the multiple of the amplifier through the first sliding rheostat, and observes the output voltage value of the amplifier through an oscilloscope to make the middle pixel point white point level The value is close to 4V, and the average voltage of the white point and black point of the middle and both sides of the pixel is recorded at the same time;
3)调整第三滑动变阻器和第四滑动变阻器的阻值,即调整两个滑动变阻器的输出电压,进而通过组合场效应管控制P型MOS管、N型MOS管的导通和/或截止,充电电容充放电输出动态的阈值参考电压VREF;3) Adjust the resistance of the third sliding rheostat and the fourth sliding rheostat, that is, adjust the output voltage of the two sliding rheostats, and then control the conduction and/or cut-off of the P-type MOS transistor and the N-type MOS transistor by combining field effect transistors, The dynamic threshold reference voltage VREF of the charging and discharging output of the charging capacitor;
4)调整第二滑动变阻器,分压输出电压值VMAX,使VMAX=4V;4) Adjust the second sliding rheostat to divide the output voltage VMAX so that VMAX=4V;
5)线性 CCD的输出电压值经过放大器放大后进入两个比较器,与动态阈值产生模块输出的电压值VREF比较,输出代表线性CCD前方像素点黑白的值MISO,当MISO=1,说明此像素点为白,否则为黑,随着MOSI的第一个高电平输出之后,连续128个CLK时钟的MISO输入就是代表CCD前方128个黑白像素点的值;与VMAX比较输出的值连接触发器的置位端,MOSI控制触发器的复位端,在MOSI信号输出第一个高电平信号时,触发器复位输出信号OVER为低电平,一旦在1-128个CLK之间放大器输出的电压值只要有一次大于VMAX,使触发器置位,输出信号OVER会一直保持高电平,直到下次MOSI信号的高电平来临;5) The output voltage value of the linear CCD is amplified by the amplifier and then enters two comparators. Compared with the voltage value VREF output by the dynamic threshold generation module, the output value MISO represents the black and white of the pixel in front of the linear CCD. When MISO=1, it means that this pixel The point is white, otherwise it is black. After the first high-level output of MOSI, the MISO input of 128 consecutive CLK clocks represents the value of 128 black and white pixels in front of the CCD; compare the output value with VMAX to connect the trigger The setting terminal of the flip-flop, MOSI controls the reset terminal of the flip-flop. When the MOSI signal outputs the first high-level signal, the flip-flop reset output signal OVER is low. Once the output voltage of the amplifier is between 1-128 CLK As long as the value is greater than VMAX once, the trigger is set, and the output signal OVER will remain high until the next high level of the MOSI signal comes;
6)每当定时器产生中断,微处理器将根据OVER信号的值判断曝光是否过度,曝光时间(大约两次SI信号之间的时间间隔)即为定时时间,如果OVER=1,则曝光时间过长,改变定时参数,缩短定时时间,减少曝光时间;否则认为曝光时间不够,加长定时时间,如此反复调整,保证线性CCD的输出电压经过放大后最大保持在4V左右。6) Whenever the timer generates an interrupt, the microprocessor will judge whether the exposure is excessive according to the value of the OVER signal. The exposure time (about the time interval between two SI signals) is the timing time. If OVER=1, the exposure time If it is too long, change the timing parameters, shorten the timing time, and reduce the exposure time; otherwise, if the exposure time is considered insufficient, lengthen the timing time, and repeat this adjustment to ensure that the output voltage of the linear CCD remains at a maximum of about 4V after being amplified.
本发明所述的基于线性CCD的信号采集和自动曝光电路及其方法在一定光强范围内都能自动调整CCD的曝光时间,既能保证光强时,白像素点输出电压不饱和,又能保证光弱时,像素点输出电压不太低,基本能保证在不同的光线下,黑白像素点对应的输出电压保持在一定的动态范围内,并可以采用动态的阈值参考电压来分辨黑白像素点,动态阈值参考电压的特点是:对应CCD前方128个像素点的阈值参考电压呈现出弧线状,中间高,两边低,这个特点与线性CCD自身的特点想吻合,同样的环境下,两边的光电管电路输出电压低,动态阈值参考电压可以很好地避免两边像素点的误判,此外,所述曝光方法适应能力强,而且不使用A/D转换,不需要专门的时序驱动产生电路,SPI工作在主模式下,同时发出启动信号和接收像素信息,既提供了线性CCD需要的启动信号CLK,SI,同时也采集了CCD前方128个像素点的信息,节省了CPU资源,软件编程更简单,既能够在实验室日光灯环境也可在体育馆强光照射下正常曝光。The linear CCD-based signal acquisition and automatic exposure circuit and method thereof in the present invention can automatically adjust the exposure time of the CCD within a certain light intensity range, which can not only ensure that the output voltage of the white pixel is not saturated when the light intensity is high, but also can Ensure that when the light is weak, the pixel output voltage is not too low, which can basically ensure that the output voltage corresponding to black and white pixels remains within a certain dynamic range under different light conditions, and a dynamic threshold reference voltage can be used to distinguish black and white pixels The characteristics of the dynamic threshold reference voltage are: the threshold reference voltage corresponding to the 128 pixels in front of the CCD presents an arc shape, high in the middle, and low on both sides. This feature is consistent with the characteristics of the linear CCD itself. Under the same environment, the two sides The output voltage of the photocell circuit is low, and the dynamic threshold reference voltage can well avoid misjudgment of pixels on both sides. In addition, the exposure method has strong adaptability, does not use A/D conversion, and does not require a special timing drive generation circuit. The SPI works in the main mode, and sends out the start signal and receives the pixel information at the same time, which not only provides the start signal CLK and SI required by the linear CCD, but also collects the information of 128 pixels in front of the CCD, which saves CPU resources and makes software programming easier. Simple, it can be used for normal exposure in the fluorescent environment of the laboratory and the strong light of the gymnasium.
以下结合附图及具体实施例对本发明做进一步详细描述。The present invention will be described in further detail below in conjunction with the accompanying drawings and specific embodiments.
附图说明Description of drawings
图1为本实施例的基于线性CCD的信号采集和自动曝光电路原理框图;Fig. 1 is the signal acquisition based on linear CCD and the functional block diagram of automatic exposure circuit of the present embodiment;
图2为本实施例的CCD信号采集与变换单元原理框图;Fig. 2 is the functional block diagram of the CCD signal acquisition and conversion unit of the present embodiment;
图3为本实施例的CCD输出电压放大模块和比较触发模块电路图;Fig. 3 is the circuit diagram of the CCD output voltage amplification module and comparison trigger module of the present embodiment;
图4为本实施例的动态阈值产生模块电路图。FIG. 4 is a circuit diagram of the dynamic threshold generation module of this embodiment.
具体实施方式detailed description
如图1-2所示,一种基于线性CCD的信号采集和自动曝光电路,包括微处理器1,通过微处理器SPI接口、I/O接口与微处理器1相连的CCD信号采集与变换单元2,线性CCD3通过其接口分别与微处理器SPI接口和CCD信号采集与变换单元2相连,其中,所述CCD信号采集与变换单元2包括比较触发模块22,以及与比较触发模块22相连的CCD输出电压放大模块21和动态阈值产生模块23。As shown in Figure 1-2, a linear CCD-based signal acquisition and automatic exposure circuit includes a microprocessor 1, and the CCD signal acquisition and conversion connected to the microprocessor 1 through the microprocessor SPI interface and I/O interface Unit 2, the linear CCD3 is respectively connected with the microprocessor SPI interface and the CCD signal acquisition and conversion unit 2 through its interface, wherein, the CCD signal acquisition and conversion unit 2 includes a comparison trigger module 22, and the comparison trigger module 22 is connected CCD output voltage amplification module 21 and dynamic threshold generation module 23 .
如图3-4所示,所述CCD输出电压放大模块21包括放大器U2,与放大器U2相连的滑动变阻器RV1,所述放大器U2的同向输入端通过一电阻R1与线性CCD3的电压输出端(AO端)相连,放大器U2的输出端与比较触发模块22的第一比较器U6、第二比较器相U7连,通过改变第一滑动变阻器RV1的阻值大小调节放大器U2的放大倍数。所述动态阈值产生模块23包括计数器U1,通过与门U5与计数器U1相连的P型MOS管Q2、N型MOS管Q1,以及与P型MOS管Q2、N型MOS管Q1相连的跟随器U3,其中,P型MOS管Q2与第三滑动变阻器RV3相连,N型MOS管Q1与第四滑动变阻器RV4相连,跟随器U3的输出端先串联一个电阻R9,再并联一个充电电容C1后与第一比较器U6输入端相连。所述比较触发模块22包括并联在放大器U2输出端的第一比较器U6、第二比较器U7,以及与第二比较器U7输出端相连的触发器U4,所述第二比较器U7的同向输入端与第二滑动变阻器RV2相连,第一比较器U6和触发器U4的输出端均与微处理器1的SPI接口相连。在本实施例中,触发器U4采用型号为74HC74的触发器。As shown in Figure 3-4, described CCD output voltage amplifying module 21 comprises amplifier U2, the sliding rheostat RV1 that is connected with amplifier U2, the same direction input terminal of described amplifier U2 is connected with the voltage output terminal ( AO terminal) is connected, the output terminal of the amplifier U2 is connected with the first comparator U6 and the second comparator U7 of the comparison trigger module 22, and the amplification factor of the amplifier U2 is adjusted by changing the resistance value of the first sliding rheostat RV1. The dynamic threshold generation module 23 includes a counter U1, a P-type MOS transistor Q2 and an N-type MOS transistor Q1 connected to the counter U1 through an AND gate U5, and a follower U3 connected to the P-type MOS transistor Q2 and the N-type MOS transistor Q1 , wherein, the P-type MOS transistor Q2 is connected to the third sliding rheostat RV3, the N-type MOS transistor Q1 is connected to the fourth sliding rheostat RV4, the output terminal of the follower U3 is first connected in series with a resistor R9, and then connected in parallel with a charging capacitor C1, and then connected to the first A comparator U6 input terminal is connected. The comparison trigger module 22 includes a first comparator U6, a second comparator U7 connected in parallel to the output terminal of the amplifier U2, and a flip-flop U4 connected to the output terminal of the second comparator U7, the same direction of the second comparator U7 The input end is connected with the second sliding rheostat RV2 , and the output ends of the first comparator U6 and the flip-flop U4 are both connected with the SPI interface of the microprocessor 1 . In this embodiment, the flip-flop U4 is a flip-flop of the type 74HC74.
基于线性CCD的信号采集和自动曝光方法,包括如下步骤:A signal acquisition and automatic exposure method based on a linear CCD, comprising the following steps:
1)首先将微处理器1的SPI接口工作在主模式下,设置工作频率CLK为400KHZ,同时CLK作为线性CCD3的工作时钟,设置微处理器1的定时器,使定时时间(即曝光时间)初始值设为5毫秒,作为线性CCD3曝光的初始值,每5毫秒产生定时中断,使能SPI通过MOSI口连续输出16个字节数据(即128位,第1位为高电平1,其他127位为0),形成线性CCD3需要的SI信号(一个CLK时钟的高电平),同时将微处理器1发出的MOSI信号和CLK信号分别作为线性CCD3的启动信号SI,CLK,启动线性CCD3开始工作;1) First, the SPI interface of microprocessor 1 works in the main mode, and the working frequency CLK is set to 400KHZ. At the same time, CLK is used as the working clock of linear CCD3, and the timer of microprocessor 1 is set so that the timing time (ie exposure time) The initial value is set to 5 milliseconds. As the initial value of linear CCD3 exposure, a timing interrupt is generated every 5 milliseconds to enable SPI to continuously output 16 bytes of data through the MOSI port (that is, 128 bits, the first bit is high level 1, other 127 bit is 0), forming the SI signal (high level of a CLK clock) required by the linear CCD3, and at the same time, the MOSI signal and the CLK signal sent by the microprocessor 1 are respectively used as the start signal SI and CLK of the linear CCD3 to start the linear CCD3 start working;
2)线性CCD3工作电压为5V,(在不同的曝光时间和不同的光强,经过线性CCD电路模块内部嵌入的放大器或者外部放大,各像素点输出电压范围可在0-5V之间。)线性CCD3在CLK和SI的条件下,通过第一滑动变阻器RV1调整放大器U2的倍数,通过示波器观察放大器U2输出电压值CCD-AO,使中间像素点白点电平值接近4V,同时记录中间和两边像素白点和黑点电压平均值Vw、Vb;2) The working voltage of linear CCD3 is 5V, (at different exposure times and different light intensities, the output voltage range of each pixel can be between 0-5V after the amplifier embedded in the linear CCD circuit module or external amplification.) Linear Under the conditions of CLK and SI, CCD3 adjusts the multiple of amplifier U2 through the first sliding rheostat RV1, and observes the output voltage value CCD-AO of amplifier U2 through an oscilloscope, so that the white point level of the middle pixel is close to 4V, and records the middle and both sides at the same time Average voltage V w , V b of pixel white point and black point;
3) 调整第三滑动变阻器RV3和第四滑动变阻器RV4的阻值,即调整两个滑动变阻器的输出电压,分别产生电压值Vw,Vb。在动态阈值产生模块中,以Vw,Vb为充放电参考电压,在128个CLK周期的前96个周期,与门U5输出低电平,组合场效应管P型MOS管Q2导通,N型MOS管Q1截止,充电电容C1充电输出阈值参考电压VREF,所述电压值VREF从Vb开始上升接近并保持Vw;在128个CLK周期的后32个周期,与门U5输出高电平,P型MOS管Q2截止,N型MOS管Q1导通,充电电容C1放电,输出参考电压VREF从Vw开始下降接近Vb,;128个时钟之后SPI结束,CLK停止,与门U5输出保持高电平,输出参考电压VREF保持Vb,,保证下次SI启动CCD时,参考电压VREF从Vb开始(因为线性CCD的缺陷是:中间像素点对应的输出电压高,两边输出的电压低,所以该电路保证两边像黑白素点二值化的阈值参考电压两边低,中间高;又由于放电快,所以充电时间比放电时间长。)3) Adjust the resistance values of the third sliding rheostat RV3 and the fourth sliding rheostat RV4, that is, adjust the output voltages of the two sliding rheostats to generate voltage values V w and V b respectively. In the dynamic threshold generation module, Vw and Vb are used as the reference voltage for charging and discharging. In the first 96 cycles of 128 CLK cycles, the AND gate U5 outputs a low level, and the combined field effect transistor P-type MOS transistor Q2 is turned on. The N-type MOS transistor Q1 is turned off, the charging capacitor C1 charges and outputs the threshold reference voltage VREF, and the voltage value VREF rises from V b to approach and maintain V w ; in the last 32 cycles of 128 CLK cycles, the AND gate U5 outputs a high voltage Ping, P-type MOS transistor Q2 is cut off, N-type MOS transistor Q1 is turned on, charging capacitor C1 is discharged, and the output reference voltage VREF starts to drop from V w to close to V b, ; after 128 clocks, SPI ends, CLK stops, and gate U5 outputs Keep the high level, the output reference voltage VREF keeps V b, to ensure that when the SI starts the CCD next time, the reference voltage VREF starts from V b (because the defect of the linear CCD is: the output voltage corresponding to the middle pixel point is high, and the output voltage on both sides low, so the circuit ensures that the threshold reference voltage for binarization of black and white pixels on both sides is low on both sides and high in the middle; and because the discharge is fast, the charging time is longer than the discharging time.)
4)调整第二滑动变阻器RV2,分压输出电压值VMAX,使VMAX=4V;4) Adjust the second sliding rheostat RV2 to divide the output voltage VMAX so that VMAX=4V;
5) 线性 CCD3的输出电压AO值经过放大器U2放大后为CCD-AO,CCD-AO进入两个比较器,与VREF比较输出代表线性CCD前方像素点黑白的值MISO,当MISO=1,说明此像素点为白,否则为黑,随着MOSI的第一个高电平输出之后,连续128个CLK时钟的MISO输入就是代表CCD前方128个黑白像素点的值;与VMAX比较输出的值连接触发器U4的置位端,MOSI控制触发器U4的复位端,在MOSI信号输出第一个高电平信号时触发器U4复位输出信号OVER为低电平,一旦在1-128个CLK之间只要有一次CCD-AO信号值大于VMAX,使触发器U4置位,输出信号OVER会一直保持高电平,直到下次MOSI信号的高电平来临;5) The output voltage AO value of the linear CCD3 is amplified by the amplifier U2 and becomes CCD-AO, and the CCD-AO enters two comparators, and compares it with VREF to output MISO, which represents the black and white value of the pixel in front of the linear CCD. When MISO=1, it means this The pixel is white, otherwise it is black. After the first high-level output of MOSI, the MISO input of 128 consecutive CLK clocks represents the value of 128 black and white pixels in front of the CCD; the value compared with VMAX is connected to the trigger The set end of the trigger U4, MOSI controls the reset end of the flip-flop U4, when the MOSI signal outputs the first high-level signal, the reset output signal OVER of the flip-flop U4 is low, once between 1-128 CLKs as long as Once the CCD-AO signal value is greater than VMAX, the trigger U4 is set, and the output signal OVER will remain high until the next high level of the MOSI signal comes;
6)每当定时器产生中断,微处理器1将根据OVER信号的值判断曝光是否过度,曝光时间(大约两次SI信号之间的时间间隔)即为定时时间,如果OVER=1,则曝光时间过长,改变定时参数,缩短定时时间,减少曝光时间;否则认为曝光时间不够,加长定时时间,如此反复调整,保证线性CCD的输出电压经过放大后最大保持在4V左右。6) Whenever the timer generates an interrupt, the microprocessor 1 will judge whether the exposure is excessive according to the value of the OVER signal. The exposure time (about the time interval between two SI signals) is the timing time. If OVER=1, the exposure If the time is too long, change the timing parameters, shorten the timing time, and reduce the exposure time; otherwise, if the exposure time is considered insufficient, lengthen the timing time, and repeat this adjustment to ensure that the output voltage of the linear CCD remains at a maximum of about 4V after being amplified.
上述实施例和图式并非限定本发明的产品形态和式样,任何所属技术领域的普通技术人员对其所做的适当变化或修饰,皆应视为不脱离本发明的专利范畴。The above-mentioned embodiments and drawings do not limit the form and style of the product of the present invention, and any appropriate changes or modifications made by those skilled in the art should be considered as not departing from the patent scope of the present invention.
Claims (4)
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN201510187707.2A CN104822032B (en) | 2015-04-20 | 2015-04-20 | A kind of signal acquisition and automatic exposure circuit and its method based on linear CCD |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN201510187707.2A CN104822032B (en) | 2015-04-20 | 2015-04-20 | A kind of signal acquisition and automatic exposure circuit and its method based on linear CCD |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| CN104822032A CN104822032A (en) | 2015-08-05 |
| CN104822032B true CN104822032B (en) | 2017-11-28 |
Family
ID=53732186
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| CN201510187707.2A Expired - Fee Related CN104822032B (en) | 2015-04-20 | 2015-04-20 | A kind of signal acquisition and automatic exposure circuit and its method based on linear CCD |
Country Status (1)
| Country | Link |
|---|---|
| CN (1) | CN104822032B (en) |
Families Citing this family (6)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN106209064B (en) * | 2016-07-07 | 2019-05-07 | 西安电子科技大学 | Low-power dynamic threshold comparator interface circuit and rectifier, wireless sensor |
| CN106125545B (en) * | 2016-08-29 | 2023-02-24 | 航宇救生装备有限公司 | Light protection control device adopting illuminance threshold and illuminance increase rate detection |
| CN106679699A (en) * | 2017-01-19 | 2017-05-17 | 济南瑞泉电子有限公司 | Reflective gauging table |
| CN108154060B (en) * | 2018-01-08 | 2021-10-08 | 深圳盈达信息科技有限公司 | Scanning head aiming light exposure solving system |
| CN109283931A (en) * | 2018-08-10 | 2019-01-29 | 中北大学 | Linear CCD line inspection system and line inspection method of medical bed transporter |
| US12126922B2 (en) | 2021-05-11 | 2024-10-22 | Boe Technology Group Co., Ltd. | Virtual image display system, data processing method thereof and display apparatus |
Citations (5)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN1047921A (en) * | 1990-03-28 | 1990-12-19 | 中国科学院上海技术物理研究所 | On-line optoelectronic width instrument |
| JP2006093757A (en) * | 2004-09-21 | 2006-04-06 | Olympus Corp | Image processing apparatus, imaging apparatus, and image processing program |
| CN102347734A (en) * | 2010-07-29 | 2012-02-08 | 三星电机株式会社 | CMOS power amplifier |
| CN204092007U (en) * | 2014-08-29 | 2015-01-14 | 王�义 | A kind of direct digital radiography automatic exposure synchronizer |
| CN204559735U (en) * | 2015-04-20 | 2015-08-12 | 绍兴文理学院 | A Signal Acquisition and Automatic Exposure Circuit Based on Linear CCD |
Family Cites Families (1)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JP3999858B2 (en) * | 1997-10-03 | 2007-10-31 | オリンパス株式会社 | Automatic exposure control device for digital camera |
-
2015
- 2015-04-20 CN CN201510187707.2A patent/CN104822032B/en not_active Expired - Fee Related
Patent Citations (5)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN1047921A (en) * | 1990-03-28 | 1990-12-19 | 中国科学院上海技术物理研究所 | On-line optoelectronic width instrument |
| JP2006093757A (en) * | 2004-09-21 | 2006-04-06 | Olympus Corp | Image processing apparatus, imaging apparatus, and image processing program |
| CN102347734A (en) * | 2010-07-29 | 2012-02-08 | 三星电机株式会社 | CMOS power amplifier |
| CN204092007U (en) * | 2014-08-29 | 2015-01-14 | 王�义 | A kind of direct digital radiography automatic exposure synchronizer |
| CN204559735U (en) * | 2015-04-20 | 2015-08-12 | 绍兴文理学院 | A Signal Acquisition and Automatic Exposure Circuit Based on Linear CCD |
Also Published As
| Publication number | Publication date |
|---|---|
| CN104822032A (en) | 2015-08-05 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| CN104822032B (en) | A kind of signal acquisition and automatic exposure circuit and its method based on linear CCD | |
| CN101630299B (en) | Analysis and trigger method of I2C serial bus signal | |
| CN203433576U (en) | CIS-based multispectral bill image capturing device | |
| CN103248837B (en) | A kind of imageing sensor based on memristor | |
| CN103063979A (en) | Load open-circuit detection circuit | |
| CN105044420A (en) | Waveform searching method of digital oscilloscope | |
| CN105163048A (en) | Dynamic vision sensor based on amplifier multiplexing | |
| CN103607546A (en) | Asynchronous CMOS pixel circuit with light adaptive threshold voltage adjustment mechanism | |
| CN107896308B (en) | Pulse Array Retina-like Image Sensor | |
| CN105338268B (en) | Imaging sensor and its removal solar spot method and removal solar spot device | |
| CN101806619A (en) | Light-sensing device that eliminates dark current | |
| CN105136317B (en) | Single-point sampling judgement single-photon detector and its sampling decision method | |
| CN107995446A (en) | Pulse Width Modulation Pixel Exposure Method and Pixel Structure | |
| CN103365326A (en) | Average voltage generation circuit and method for providing reference voltage for pixel array | |
| CN108732514A (en) | Portable LED lamp aging tester and its application method | |
| CN100553304C (en) | A simulation device of TDI CCD device | |
| CN204559735U (en) | A Signal Acquisition and Automatic Exposure Circuit Based on Linear CCD | |
| CN101841665A (en) | Clamping circuit and solid-state imaging device having the clamping circuit | |
| CN205051792U (en) | Developments vision sensor based on amplifier is multiplexing | |
| CN112162166A (en) | USB charging port no-load detection circuit and detection method thereof | |
| CN104300941A (en) | Nuclear impulse processing circuit | |
| TWI813943B (en) | Image sensor chip and sensing method thereof | |
| EP2224593A3 (en) | Track-and-hold peak detector circuit | |
| JP2005198370A (en) | Average current detecting circuit | |
| CN107071314A (en) | A kind of enhanced dynamic visual sensor of time_domain sensitivity |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| C06 | Publication | ||
| PB01 | Publication | ||
| EXSB | Decision made by sipo to initiate substantive examination | ||
| SE01 | Entry into force of request for substantive examination | ||
| GR01 | Patent grant | ||
| GR01 | Patent grant | ||
| CF01 | Termination of patent right due to non-payment of annual fee | ||
| CF01 | Termination of patent right due to non-payment of annual fee |
Granted publication date: 20171128 Termination date: 20180420 |