一种红外触摸屏的抗光电路及抗光方法技术领域本发明涉及一种红外触摸屏的抗光电路及抗光方法,尤其是能明显改善现有红外触摸屏抗光性能较差、发射距离短、整机消耗功率大的缺点。 Anti-light circuit for infrared touch screen and the resistance to light TECHNICAL FIELD The present invention relates to an infrared touch screen and anti-anti-light optical circuit method, in particular can significantly improve the conventional infrared touch screen anti-light performance is poor, emitting a short distance, the whole machine power consumption disadvantages. 背景技术红外触摸屏是利用X, Y方向上密布的红外线矩阵来检测并定位用户的触摸。 Background art is the use of infrared touch screen X, Y direction infrared dense matrix to detect and locate the user's touch. 红外触摸屏在显示器的前面安装一个电路板外框, 电路板在屏幕四边排布红外线发射管和红外接收管,——对应成横竖交叉的红外线矩阵。 Infrared touch screen is mounted a circuit board in front of the display frame, the four sides of the circuit board are arranged on the screen and the infrared emission infrared receiver, - corresponds to a vertical cross-infrared matrix. 用户在触摸屏幕时,手指就会挡住经过该位置的横竖两条红外线,因而可以判断出触摸点在屏幕的位置。 When the user touches the screen, the finger will be blocked if they had two infrared position, and thus can determine the position of the touch on the screen. 目前,通用的红外触摸屏为了消弱外界光对红外触摸屏的影响,一般采取在红外发射灯上对有用信号进行调制的方式,接收端采用了解调的方式来保证去掉直流,从此来去掉外界光对有用信号的影响。 Currently, common infrared touch screen to attenuate ambient light on the infrared touch screen, generally take the form of modulation of the useful signal on an infrared-emitting light, receiving end the demodulated way to ensure that remove DC from to remove the external light on Useful affect the signal. 但是, 由于红外发射管的发射需要灯丝一定的预热时间,不然不能达到标称的发光强度,所以现有电路存在需要占用较长的发射时间或者需要消耗较大的发射功率,而且使红外线的实际传输距离大大缩短。 However, since the emission of the infrared emission of a certain preheating time of the filaments needs, or can not reach the nominal luminous intensity, so that there is a need the conventional circuit takes a long transmission time or requires a larger transmission power consumption, but also the infrared The actual transmission distance is significantly reduced. 发明内容为了克服现有的红外触摸屏抗光电路的不足,本发明提供一种新的解决方案,该方案采用了让输出信号減去背景光的方式,让最终的有用信号只反映发射端的有效信号变化,而背景光的变化被设计电路滤除。 SUMMARY OF THE INVENTION To overcome the conventional infrared touch screen anti insufficient optical circuit, the present invention provides a new solution, so that the program uses the output signal by subtracting the background light, which allows the final desired signal reflects only the effective signal transmitting end changes, changes in the background light is filtered out circuit design. 本发明为解决上述技术问题所采用的技术方案为: 一种红外触摸屏的抗光电路,其包括背景光强度采集单元、背景光保持电路、背景光强度AD转换单元、控制单片机、补偿电平DA转换单元、减法电路;所述控制单片机连接控制背景光强度采集单元、背景光保持电路、背景光强度AD转换单元、补偿电平DA转换单元;所述减法电路输入连接有红外接收信号通道、背景光保持电路以及补偿电平DA 转换单元。 Aspect of the present invention is to solve the above technical problem is: an anti-light circuit for infrared touch screen, which includes background light intensity acquisition unit, background light hold circuit, the background light intensity AD conversion unit, MCU control, compensation level DA conversion unit, a subtraction circuit; the control of the microcontroller connection control background light intensity acquisition unit, the holding circuit background light, the background light intensity AD conversion unit, the DA conversion unit compensation level; input of the subtractor circuit is connected to the infrared receiving signal channels, background and a compensation light level holding circuit DA conversion unit. 一种红外触摸屏的抗光方法,其包括以下步骤:A. 采集背景光强度;B. 发射有效红外光信号;C. 接收端接收红外光信号;D. 将红外接收端接收的红外光强度减去先前采集到的背景光强度得到有效接收光强度。 Anti-light method of infrared touch screen, comprising the steps of: A collection background light intensity; B emission over an infrared light signal; C receiving terminal for receiving an infrared signal; D intensity of infrared light Save the infrared receiver receives the.... background to the previously collected light intensity of the effective intensity of the received light. 所述A步骤包括以下步骤:Al.采集背景光强度;A2.计算采集到的背景光强度对应的电平;A3..用保持电路保持背景光强度对应的电平; A4.计算背景光强度对应的电平的补偿电平,所述D步骤包括以下步骤:Dl.计算接收到的红外光信号强度对应的电平;D2.根据计算出的背景光强度对应补偿电平,控制DA转换电路输出,于应的电平;D 3.将背景光强度对应的补偿电平反馈到减法电路的两个输入端, 背景光强度对应的电平与接收到的红外光信号强度电平进行减法运算, 得到有效接收光强度对应的电平。 Said step A comprises the steps of: Al collecting background light intensity; A2 calculating the intensity of the collected light corresponding to the background level; A3 .. holding circuit holds the background light corresponding to the intensity level; A4 calculates the background light intensity. compensation level corresponding to the level of the step D comprises the steps of: Dl calculating an infrared light signal corresponding to the intensity level received; D2 of compensation corresponding to the intensity of the background light level based on the calculated control DA converter circuit. output at the corresponding level; D 3. background light corresponding to the intensity level of the feedback compensation to the two input terminals of the subtraction circuit, the intensity of the background light level corresponding to infrared light by subtracting signal intensity level of the received to give the active level corresponding to the received light intensity. 所述红外触摸屏的发射端按顺序发射红外光信号,对应的接收端按相应的顺序接收红外光信号;在发射红外光信号的间隙采集背景光强度。 Said transmitter transmitting infrared touch screen in the order infrared light signal, a corresponding receiver to receive the infrared light signal in an appropriate order; background light intensity in the gap acquisition emitting infrared light signal. 本发明的有益效果是,可以在保证一定抗光性的前提下,尽量缩短灯的发射时间和发射电流,简化接收电路、延长发射距离和提高扫描速度。 Advantageous effect of the invention it is possible to guarantee under the premise of light resistance, and to shorten the emission time of the light emission current, to simplify the receiving circuit, and to extend the transmission range to increase the scanning speed. 附图说明下面结合附图和实施例对本发明进一步说明: 图1是本发明的电路原理图; 图2是本发明的控制程序流程。 BRIEF DESCRIPTION OF DRAWINGS embodiments and examples further illustrate the present invention: FIG. 1 is a circuit diagram of the present invention; FIG. 2 is a control program flow according to the present invention. 具体实施方式下面根据附图和实施例对本发明作进一步详细说明: 如图所示,本实施例一种红外触摸屏的抗光电路,其包括背景光强度采集单元、背景光保持电路、背景光强度AD转换单元、控制单片机、补偿电平DA转换单元、减法电路;所述控制单片机连接控制背景光强度采集单元、背景光保持电路、背景光强度AD转换单元、补偿电平DA转换单元;所述减法电路输入连接有红外接收信号通道、背景光保持电路以及补偿电平DA转换单元。 DETAILED DESCRIPTION According to the drawings and embodiments of the present invention as described in more detail: As shown, the embodiment of a circuit resistance to light in the infrared touch screen according to the present embodiment, which includes a background light intensity acquisition unit, the holding circuit background light, the background light intensity AD conversion unit, MCU control, compensation level DA conversion unit, a subtracting circuit; the control of the microcontroller connection control background light intensity acquisition unit, the holding circuit background light, the background light intensity AD conversion unit, the DA conversion unit compensation level; the The subtraction circuit receives an input connected to an infrared signal channels, the background light level holding circuit and compensating the DA conversion unit. 一种红外触摸屏的抗光方法,其包括以下步骤:A. 采集背景光强度;B. 发射有效红外光信号;C. 接收端接收红外光信号;D. 将红外接收端接收的红外光强度减去先前采集到的背景光强度得到有效接收光强度。 Anti-light method of infrared touch screen, comprising the steps of: A collection background light intensity; B emission over an infrared light signal; C receiving terminal for receiving an infrared signal; D intensity of infrared light Save the infrared receiver receives the.... background to the previously collected light intensity of the effective intensity of the received light. 所述A步骤包括以下步骤: A1. 采集背景光强度; A2.计算采集到的背景光强度对应的电平;A3.用保持电路保持背景光强度对应的电平; A4.计算背景光强度对应的电平的补偿电平,所述D步骤包括以下步骤:Dl.计算接收到的红外光信号强度对应的电平;D2.根据计算出的背景光强度对应补偿电平,控制DA转换电路输出对应的电平;D3.将背景光强度对应的补偿电平反馈到减法电路的两个输入端, 背景光强度对应的电平与接收到的红外光信号强度电平进行减法运算, 得到有效接收光强度对应的电平。 Said step A comprises the steps of: A1 collecting background light intensity; A2 calculating the intensity of the collected light corresponding to the background level; A3 holding background light intensity corresponding to the level holding circuit; A4 calculates the background light intensity corresponds to.... the power level compensation level, said step D comprises the steps of: Dl level calculating an infrared light signal corresponding to the intensity of received; D2 of compensation corresponding to the intensity of the background light level based on the calculated control output DA conversion circuit. a corresponding level;. D3 corresponding to the background light intensity level of the feedback compensation to the two input terminals of the subtraction circuit, corresponding to the intensity of the background light level by subtracting the signal intensity level of infrared light received, the effective receiving the corresponding light intensity level. 所述红外触摸屏的发射端按顺序发射红外光信号,对应的接收端按相应的顺序接收红外光信号;在发射红外光信号的间隙采集背景光强度。 Said transmitter transmitting infrared touch screen in the order infrared light signal, a corresponding receiver to receive the infrared light signal in an appropriate order; background light intensity in the gap acquisition emitting infrared light signal. 所采用的技术方案是:在信号输入端加入一个电平釆集和保持电路,让信号发射前,电路自动的采集背景光的强度,并通过AD转换,进入控制单片机,控制单片机根据一定的算法,算出现在对应的补偿电平,然后输出到DA转换单元,DA转换单元再将补偿电平回馈到信号通道参与背景光与信号通道的减法运算,最后只输出有用信号。 Technical proposal is: Add a level preclude set and hold circuit at the signal input, so that signal transmission before, the intensity of the automatic acquisition of background light circuit, and by the AD converter into a control microcontroller, control of the microcontroller according to certain algorithms calculated compensation corresponding to the current level, and then output to the DA conversion unit, the DA conversion unit and then back to the signal level of the compensation channel is involved in the background light and the subtraction signal path, and finally an output useful signal. 达到滤除背景光的影响。 As to affect the filter out background light. 本领域技术人员不脱离本发明的实质和精神,可以有多种变形方案实现本发明,以上所述仅为本发明较佳可行的实施例而已,并非因此局限本发明的权利范围,凡运用本发明说明书及附图内容所作的等效结构变化,均包含于本发明的权利范围之内。 Those skilled in the art without departing from the essence and spirit of the invention, various modifications can be implemented embodiment of the present invention, the above description is only preferred embodiments of the present invention possible embodiments only, and therefore not limited the scope of the claimed invention, where the use of the present equivalent structural changes in the specification and drawings of the invention is made, it is included within the scope of the present invention.