CN100465832C - Intelligent sensor - Google Patents

Intelligent sensor Download PDF

Info

Publication number
CN100465832C
CN100465832C CN 200710092670 CN200710092670A CN100465832C CN 100465832 C CN100465832 C CN 100465832C CN 200710092670 CN200710092670 CN 200710092670 CN 200710092670 A CN200710092670 A CN 200710092670A CN 100465832 C CN100465832 C CN 100465832C
Authority
CN
Grant status
Grant
Patent type
Prior art keywords
circuit
output
signal
analog
microcontroller
Prior art date
Application number
CN 200710092670
Other languages
Chinese (zh)
Other versions
CN101118428A (en )
Inventor
邵毅敏
马祥华
Original Assignee
重庆大学
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Grant date

Links

Abstract

本发明公开了一种智能传感器,包括压电传感器、处理电路、微控制器电路,其中,压电传感器将振动信号转换成电荷信号输入到处理电路;处理电路接收压电传感器输出的电荷信号,将电荷信号处理后输出;其特征在于:在处理电路的输出端与微控制器电路的模拟量输入端之间连接模拟输出与数字转换控制电路,并且微控制器电路的串行通讯接口输出端连接通讯接口驱动电路,当需要输出模拟信号时,模拟信号通过模拟输出与数字转换控制电路输出,当需要输出数字信号时,模拟信号通过模拟输出与数字转换控制电路输入微控制器电路,通过微控制器电路完成数字信号输出,本发明具有按要求滤波及输出所需信号的智能化功能,可灵活地实现多点智能并行监测。 The present invention discloses an intelligent sensor comprising a piezoelectric sensor, a processing circuit, microcontroller circuit, wherein the piezoelectric sensor vibration signals into a charge signal is inputted to the processing circuit; a signal processing circuit receives the charge output from the piezoelectric sensor, outputs the processed signal charge; wherein: between the output terminal and the analog input of the microcontroller circuit is connected to the processing circuit converting the analog output and digital control circuitry, and the microcontroller serial communication interface circuit output terminal a communication interface connected to the driving circuit, when it is desired analog output signal, the control circuit outputs an analog signal through the analog output and digital conversion, a digital output signal when needed, and outputs an analog signal via an analog-digital converter input of the microcontroller circuit control circuit, through the micro the controller circuit performs the digital signal output, the present invention has intelligent functions required filtering and the output of the desired signal, the flexibility to implement the multi-parallel intelligent monitoring.

Description

一种智能传感器 An intelligent sensor

技术领域 FIELD

本发明涉及传感器技术,具体涉及采用单片机技术实现的且同时具有模拟信号输出和数字信号输出的智能传感器。 The present invention relates to a sensor technology, particularly relates to a smart sensor technology SCM and simultaneously outputs an analog signal and a digital signal output. 背景技术 Background technique

在工业控制及监测系统中,传感器应用越来越多,现有的压电传感器由于压电敏感器件本身的内阻抗很高,使得压电器件难以直接使用一般的放大器,而必须进行前置阻抗变换,同时由于轴承加工所产生的毛刺、传感器安装以及环境干扰等因素将会在传感器输出信号上叠加一定的高频千扰,而且原始信号经过传输、放大、变换等处理过程,还会混入各种不同形式的噪声, 从而会影响测量精度,同时,现有传感器输出信号单一,通常是只以模拟量输出或者只以数字量输出,给工业应用带来诸多不便。 Industrial control and monitoring systems, sensor applications more and more, the conventional piezoelectric sensor sensitivity due to the high internal impedance of the piezoelectric device itself, so that a piezoelectric device generally difficult to use a direct amplifier, but must be pre impedance converting, processing and because of factors bearing the burr generated, sensor mounting and environmental interference will be superimposed one thousand certain frequency interference on the sensor output signal and the original signal transmitted through the processing, amplification, transformation and the like, will be mixed with each different forms of noise, which will affect the measurement accuracy, while the conventional single sensor output signal is usually only an analog output or a digital output only, inconvenience for industrial applications. 发明内容 SUMMARY

本发明所要解决的技术问题在于提供一种电路简单、精度高、同时具有模拟信号输出和数字信号输出的智能传感器。 The present invention solves the technical problem is to provide a simple circuit, high accuracy, an analog signal and outputs the digital signal output from the intelligent sensor.

为了解决上述技术问题,本发明的一个技术方案是,提供一种智能传感器,包括压电传感器、处理电路、微控制器电路,其中, To solve the above problems, an aspect of the present invention is to provide an intelligent sensor comprising a piezoelectric sensor, a processing circuit, microcontroller circuit, wherein

压电传感器:将振动信号转换成电荷信号输入到处理电路; 处理电路:接收压电传感器输出的电荷信号,将电荷信号处理后输出; Piezoelectric sensor: the vibration signals into charge signal input to the processing circuitry; processing circuitry: receiving a charge of the piezoelectric sensor output signal, and outputs the processed signal charge;

在处理电路的输出端与微控制器电路的模拟量输入端之间连接模拟输出与数字转换控制电路,并且微控制器电路的串行通讯接口输出端连接到通 Between the output terminal and the analog input of the microcontroller circuit is connected to the processing circuit converting the analog output and digital control circuitry, and a serial communication interface circuit output terminal is connected to the microcontroller via

讯接口驱动电路,微控制器电路与通讯接口驱动电路之间的信号为双向传输,当智能传感器需要输出模拟信号时,模拟信号通过模拟输出与数字转换控制电路输出,当智能传感器需要输出数字信号时,模拟信号通过模拟输出与数字转换控制电路输入微控制器电路,通过微控制器电路完成将模拟信号转换成数字信号输出,同时微控制器电路通过通讯接口驱动电路实现 Information signals between the interface driver circuit, a microcontroller and a communication interface circuit for the bidirectional transmission of the driving circuit, when the smart sensor needs to output an analog signal, and outputs an analog signal via an analog digital converter control circuit outputs, when the smart sensor needs to output a digital signal when the analog output signal via an analog-digital converter and control circuit input of the microcontroller circuit, the circuit is completed by the microcontroller converts the analog signal into a digital output signal, while the microcontroller circuit is achieved by driving the communication interface circuit

UART串口通信。 UART serial communication.

根据本发明的一个优选方案,所述处理电路由电荷放大器、滤波电路、 归一化放大器组成,所述电荷放大器接收压电传感器输出的电荷信号,将电荷信号转换成电压信号后输出到滤波电路,所述滤波电路对电压信号进行隔 According to a preferred embodiment of the present invention, the processing by the charge amplifier circuit, filter circuit, normalizing amplifier, the charge amplifier receives signals from the piezoelectric sensor output charge output to the filter circuit converts the charge signal into a voltage signal the voltage signal of the filter circuit compartment

直和滤波,输出到归一化放大器,所述归一化放大器将^^莫拟信号通过模拟输出与数字转换控制电路输出或者输入到微控制器电路。 Straight and filtered, normalized to the output amplifier, the normalized analog signal amplifier circuit output ^^ Mo by converting the analog output and digital control circuit or the input to the microcontroller.

根据本发明的一个优选方案,所述模拟输出与数字转换控制电路由继电 According to a preferred embodiment of the present invention, the analog to digital converter and outputs a relay control circuit

器KMb KM2、停止按钮SBb A/D转换控制按钮SB2、模拟输出按钮SB3组成, Is KMb KM2, stop button SBb A / D conversion control buttons SB2, SB3 composition analog output button,

其中继电器KM2的常开触点连接在归一化放大器的输出端,继电器KM!的常开触点连接在归一化放大器的输出端和微控制器电路的输入端之间;模拟输出按钮SB3的常闭触点、继电器KM2的常闭触点、继电器KI^的线圏按所述顺序串联连接,模拟输出按钮SB3的常闭触点的另一端同时与A/D转换控制按钮SB2的常开触点的一端和继电器KM!的常开触点的一端连接;A/D转换控制按钮SB2的常闭触点、继电器D^的常闭触点、继电器KM2的线圈按所述顺序串联连接,A/D转换控制按钮SB2的常闭触点的另一端同时与模拟输出按钮SB3 的常开触点的一端和继电器KM2的常开触点的一端连接;并且所述模拟输出按钮SB3的常开触点的另一端、继电器腿2的常开触点的另一端、A/D转换控制按钮SB2的常开触点的另一端以及继电器KMi的常开触点的另一端同时与停止按钮SB!的常闭触点的一端连接,停止按 ! KM2 wherein the relay normally open contact connected to the normalized output of the amplifier, KM relay normally open contact connected between the input terminal of the normalized output of the amplifier circuit and the microcontroller; analog output button SB3 normally closed contact, a normally closed contact, a line relay KI ^ KM2 rings of the relay are connected in series in the order, the other end of the analog output of the normally closed contact button SB3 button SB2 while often the a / D conversion control ! end open contact and one end of the relay KM normally open contact connected; a / D conversion control button SB2 normally closed contact, a normally closed relay contact D ^, KM2 relay coil connected in series in the order One end of normally open contact of the other end of the a / D conversion control button SB2 while the normally closed contact and the normally open button SB3 analog output end and a relay contact connected KM2; and the constant analog output button SB3 the other end contacts open, the other end of the leg relay normally open contact 2, a / D conversion control button SB2 of the other end of the other end of the normally open contact and a normally open contact of the relay KMi simultaneously with the stop button SB ! normally closed contact connected to one end, by stop 钮SB!的常闭触点的另一端连接电源,继电器KNh的线圏和继电器KM2的线圈的另一端接地。 Button SB! Normally closed contact is connected to the other end of the power supply, the other end of the relay coil KNh rings of wire and the relay KM2.

本发明的一个优选方案,所述电荷放大器由电容d、 C2和电阻R,、 R2、放大器AJ且成,所述压电传感器输出的电荷信号通过电容C2和电阻Rj口到 A preferred embodiment of the present invention, the charge amplifier by the capacitor D, C2 and resistor R ,, R2, and AJ amplifier to the piezoelectric sensor output charge signal via the capacitor C2 and the resistor Rj Koudao

放大器Aj々反相输入端,反馈电容d连接在放大器Ai的输出端和压电传感器的输出端之间,电阻Ri连4妾在放大器A!的输出端和反相输入端之间,同时 Aj々 between the inverting input terminal of the amplifier, a feedback capacitor is connected between the d output of amplifier Ai and the output terminal of the piezoelectric sensor, the resistance Ri of the amplifier A is connected concubine 4! Of the output and the inverting input terminal, and

放大器A)的同相输入端接地。 Amplifiers A) non-inverting input grounded.

根据本发明的一个优选方案,所述滤波电路是采用单个运算放大器构成的滤波器电路,电路为正反馈的电路。 According to a preferred embodiment of the present invention, the filter circuit is a filter circuit using a single operational amplifier, the positive feedback circuit circuit.

根据本发明的一个优选方案,所述微控制器电路具有存储器和A/D控制单元。 According to a preferred embodiment of the present invention, the microcontroller has a memory circuit and A / D control unit.

根据本发明的一个优选方案,所述控制单元包括单片机IC1,所述单片机IC1具有以下装置: According to a preferred embodiment of the present invention, the control unit comprises a microcontroller IC1, the microcontroller IC1 has the following means:

系统开始运作时,先对单片机IC1的相关定时器,寄存器与中断等进行初始化的装置; When the system becomes operational, the microcontroller IC1 first timers, registers and interrupts device initialization is performed;

判断单片机IC1端口ADC0是否为高电平的装置,当单片机IC1端口ADCO 为高电平时说明有信号输入 ADC0 chip microcomputer IC1 is determined whether the device port is high, the microcontroller IC1 ADCO illustrate the signal input port is at a high level when the

采集数据装置:当单片机IC1端口ADCO是高电平时进行数据的采集装 Data collection means: data collected when the microcontroller IC1 is high loading port ADCO

置; Set;

判断定时器TO的TFO位是否为1的装置,当定时器TO的TFO位为1时, 停止数据采集; Analyzing the TO timer means whether TFO bit is 1, when the TFO-bit timer TO is 1, stop data collection;

数据比较装置:用采集到的数据与存放在单片机IC1中的振动信号限定值即电压信号进行A/D变换后的最大值进行比较; Data comparison means: data collected and stored in the microcontroller IC1 i.e. vibration signals limit the maximum voltage signal after A / D conversion is compared;

点亮LED灯装置:当采集到的数据超过振动信号限定值则点亮LED灯报 LED lamp lighting apparatus: when collected data exceeds the limit value of the vibration signal light LED lamp packets

警, police,

中断装置:使定时器Tl产生中断,关闭定时器中断,把超过振动信号限定值的数据进行传送,然后打开中断,进行中断返回; Interrupt means: Tl timer generates an interrupt, the interrupt timer is turned off, the vibration data exceeds the limit value of the transmission signal, and then open the interrupt, the interrupt return;

数据存储装置:当采集到的数据没有超过振动信号限定值则把数据存储到外部数据存储区。 Data storage means: data collected when the vibration does not exceed the limit value signal put the data stored in the external data storage area.

本发明所述的一种智能传感器的有益效果是,通过传感器获取温度、压力、流量、转速、位移、速度、加速度、声发射信号等信号,并对振动信号放大、滤波、转换、计算处理、有模拟量和数字量两种输出形式,具有按要求滤波及输出所需信号的智能化功能,可使数据采集环节高度集成化,提高了强噪声环境下提取微弱故障信号的真实性,P条低数据采集环节自身故障的可能性,大幅度缩小故障诊断前端的体积,可灵活地实现多点智能并行监测。 Advantageous effects of the present invention is an intelligent sensor, acquires the temperature, pressure, flow, speed, displacement, velocity, acceleration, acoustic emission signals through the sensor signals, and the vibration signal amplification, filtering, conversion, calculation processing, there are two kinds of analog and digital output form, having intelligent functions required filtering and the desired output signal, allows highly integrated data acquisition part to improve the authenticity of the fault signal to extract a weak strong noise environment, P bar the possibility of a failure in itself a low data acquisition part, significantly reduced the volume of the front end of the fault diagnosis, the flexibility to achieve more intelligent monitoring parallel.

附图说明 BRIEF DESCRIPTION

图l是本发明所述的诊断用智能传感器的原理框图。 Figure l is a block diagram of a smart sensor diagnosis according to the present invention. 图2是本发明所述的诊断用智能传感器的电路图。 FIG 2 is a circuit diagram of a smart sensor diagnosis according to the present invention. 图3是本发明所述的装入单片机的程序流程框图。 FIG 3 is a program flow diagram of the microcontroller loaded present invention. 图4是本发明所述的装入单片机的中断程序流程框图。 FIG 4 is a block diagram of the microcontroller loaded interrupt program process of the present invention.

具体实施方式 detailed description

参见图l,本发明所述的一种智能传感器由压电传感器1、电荷放大器2、 滤波电路3、归一化放大器4、处理电路8、微控制器电路5、模拟输出与数字转换控制电路6、通讯接口驱动电路7组成,其中所述电荷放大器2、滤波电路3、归一化放大器4组成处理电路8;将压电传感器1的输出端连接到电荷放大器2的输入端,电荷放大器2的输出端连接滤波电路3的输入端, 滤波电路3的输出端连接归一化放大器4的输入端,归一化放大器4的输出端连接模拟输出与数字转换控制电路6,模拟输出与数字转换控制电路6的一个输出端连接微控制器电路5的模拟量输入端,微控制器电路5的串行通讯接口输出端连接通讯接口驱动电路7 ,其中,压电传感器1将振动信号转换成电荷信号输入到电荷放大器2,电荷放大器2的输入为压电传感器1输出的电荷信号,将高内阻的电荷源转换为低内阻 Referring to FIG. L, an intelligent sensor according to the present invention consists of a piezoelectric sensor, the charge amplifier 2, a filter circuit 3, the normalized amplifier 4, processing circuit 8, a micro controller circuit 5, and outputs the analog-digital conversion control circuit 6, the communication interface drive circuit 7, where the charge amplifier 2, a filter circuit 3, an amplifier 4 normalization processing circuit 8 consisting of; connecting an output of the piezoelectric sensor 1 to the input of the charge amplifier 2, the charge amplifier 2 connected to the output of the filter circuit input terminal 3, the output terminal of the filter circuit 3 is connected to normalized input of the amplifier 4 of the normalized output of amplifier 4 is connected to the analog output to digital converter control circuit 6, the analog output and digital conversion analog input terminal connected to an output terminal 5 of the microcontroller circuit control circuit 6, a serial communication interface circuit of the microcontroller 5 is connected to the communication interface drive circuit 7, wherein the piezoelectric transducer vibration signals into charge 2, the input signal is input to the charge amplifier is a charge amplifier 2, an output charge signal of the piezoelectric sensor, the charge source is converted to a high resistance of low resistance 电压源后输出到滤波电路3;滤波电路3对电压信号进行隔直和滤波,输出到归一化放大器4;归一化 After the source voltage is output to the filter circuit 3; filter circuit 3 and a voltage signal blocking filter, the output of amplifier 4 into normalized; normalized

放大器4将滤波以后的模拟信号按测量范围的要求进行归一化处理,其输出 4 after the filtered analog signal amplifier according to claim normalized measuring range, the output

模拟信号通过模拟输出与数字转换控制电路6输出或者输入到微控制器电路5,微控制器电路5通过通讯接口驱动电路7实现UART串口通信。 6 output or input analog signal to a microcontroller circuit 5 through the analog output and digital conversion control circuit, microcontroller circuit 5 implements UART serial communication driver circuit 7 through the communication interface.

参见图2,本发明所述的一种智能传感器,所述模拟输出与数字转换控制电路6由继电器KMb KM2、停止按钮SB!、 A/D转换控制按钮SB2、模拟输出按钮SB3组成,其中继电器KM2的常开触点连接在归一化放大器4的输出端, 继电器KMi的常开触点连接在归一化放大器4的输出端和撰t控制器电路5的输入端之间;模拟输出按钮SB3的常闭触点、继电器KM2的常闭触点、继电器KM!的线圏按所述顺序,联连接,模拟输出按钮SB3的常闭触点的另一端同时与A/D转换控制按钮SB2的常开触点的一端和继电器KMi的常开触点的一端连接;A/D转换控制按钮SB2的常闭触点、继电器KMi的常闭触点、继电器KM2 的线圏按所述顺序串联连接,A/D转换控制按钮SB2的常闭触点的另一端同时与模拟输出按钮SB3的常开触点的一端和继电器KM2的常开触点的一端连接;并且所述模拟输出按钮SB3的常开触点的另一端、 Referring to Figure 2, an intelligent sensor according to the present invention, the analog to digital converter and outputs a relay control circuit 6 KMb KM2, stop button SB !, A / D conversion control buttons SB2, SB3 analog output button, where the relay KM2 normally open contact connected to the normalizing output terminal of the amplifier 4, the normally open contact of the relay KMi connected between an input terminal and an output terminal 4 of the control circuit 5 t essays in normalizing amplifier; analog output button SB3 normally closed contact, the normally closed relay contacts KM2, relay KM! rings of a line in the order, biphenyl, and the other end of the normally closed contact button SB3 analog output while the a / D conversion control button SB2 One end of the normally open contact and a normally open contact of the relay KMi end connection; a / D conversion control button SB2 normally closed contact, a normally closed contact KMi relay, relay KM2 rings of a series of lines in the order connections, a / D conversion control and the other end of the normally closed contact button SB2 is connected to the analog output button while normally open contact and one end of the relay SB3 end normally open contact KM2; and the analog output of the button SB3 the other end of the normally open contacts, 电器KM2的常开触点的另一端、A/D转换控制按钮SB2的常开触点的另一端以及继电器KM!的常开触点的另一端同时与停止按钮SB!的常闭触点的一端连接,停止按钮SB!的常闭触点的另一端连接电源,继电器KMi的线圈和继电器KM2的线圏的另一端接地。 The other end of the normally open contact of KM2 appliances, A / D conversion control normally open contact and the other end of the relay KM button SB2! The other end of the normally open contact simultaneously with the stop button SB! Normally closed contacts the other end connected to one end, a stop button SB! normally closed contact is connected to the power supply, the other end of the wire rings of the relay coil and the relay KMi of KM2.

所述电荷放大器2由电容d、 C2和电阻R!、 R2、放大器Aj且成,所述压电传感器1输出的电荷信号通过电容C2和电阻R2加到放大器Ai的反相输入端,反馈电容d连接在放大器Ai的输出端与压电传感器l的输出端之间,电 2 by the capacitance of the charge amplifier D, C2 and resistor R !, R2, and Aj to the amplifier, the output of the piezoelectric transducer 1 through the signal charge capacitor C2 and the resistance R2 applied to the inverting input of amplifier Ai, the feedback capacitor d is connected between the output terminal of amplifier Ai to the output terminal of the piezoelectric sensor l, electrical

阻R!连接在放大器Ai的输出端与反相输入端之间,同时放大器Ai的同相输入端接地。 R & lt barrier! Is connected between the output terminal and the inverting input of amplifier Ai, Ai amplifier while the noninverting input is grounded.

所述滤波电路3采用单个运算放大器构成的滤波器电路,电路采用正反 The filtering circuit 3 filters using a single operational amplifier circuit, the circuit uses the positive and negative

馈的设计方法,具有隔离直流分量及低通滤波的作用。 Design Method of feeding, with isolated DC component and low-pass filtering effect. 本实施例中滤波电路 In the present embodiment the filter circuit embodiment

3由》文大器&、电容C3、 C4、 C5、电阻R3、 R" Rs组成,其中滤波电路3的输入端与电荷放大器2的输出端相连,滤波电路3的输入端通过由电容C3和电阻Rs 3 by the "text amplifier &, capacitors C3, C4, C5, resistors R3, R" Rs, where connected to the output terminal of the input terminal of the charge amplifier 2 and a filter circuit 3, the input filter circuit 3 through a capacitor C3 and resistor Rs

组成的隔直电路,然后通过电阻R3、电阻R4加到放大器A2的同相输入端,同时放大器A2的同相输入端与电容Cs的一端相连接,电容C5的另一端直接接地,反馈电容Ct的一端连接在放大器A2的输出端,另一端连接在电阻R3和电阻R4的连接节点上,放大器A2的反相输入端与其输出端相连。 Compartment consisting of a linear circuit, and then through resistor R3, a resistor R4 is applied to the noninverting input terminal of amplifier A2, while the amplifier A2 inverting input end terminal of the capacitor Cs is connected to the other end directly grounded capacitor C5, the feedback end of the capacitance Ct of connected to the output terminal of the amplifier A2, and the other end connected to the connection node of the resistor R3 and the resistor R4, connected to the inverting input and its output amplifier A2.

所述归一化放大器4由放大器A3、电阻R6、 R7、 R8、电位器W:组成,其中,归一化放大器的输入端与其信号滤波电路的输出端相连,电压信号经输 The normalized amplifier 4 by an amplifier A3, resistors R6, R7, R8, potentiometer W: composition, wherein the amplifier is connected to normalized input and its signal output terminal of the filter circuit, the output voltage signal

入回路调整电位器Wi和电阻R6加到放大器A3的反相输入端,而放大器A3的同相输入端通过补偿电阻R7接地,反馈电阻Rs连接在放大器A3的输出端和 Wi loop into adjusting potentiometer resistor R6 and applied to the inverting input of amplifier A3, and the noninverting input of amplifier A3 through a resistor R7 to ground compensation, feedback resistor Rs connected between the output terminal of the amplifier A3 and

反相输入端之间。 The inverting input terminal.

所述微控制器电路5中包括单片机IC1和复位集成电路芯片IC3,其中单片机IC1采用的型号可以选用ADpiC812,复位集成电路芯片IC3可以采用ADM810,系统通信可以使用RS-485总线,也可以采用RS-232实现UART串口通信。 The microcontroller circuit 5 comprises a microcontroller IC1 and IC3 reset the integrated circuit chip, wherein the chip microcomputer IC1 model employed can be selected ADpiC812, may be used to reset the integrated circuit chip IC3 ADM810, a communication system can use the RS-485 bus, may be employed RS -232 achieve UART serial communication.

所述通讯接口驱动电路7主要由通讯接口驱动芯片IC2组成,利用通讯接口驱动电路7以实现UART串口通信,并获取较远的通信距离和较好的抗干扰特性,驱动芯片IC2可以采用7MAX485。 The communication interface drive circuit 7 mainly by the communication interface driver chip IC2 composition, using the communication interface 7 to enable the driver circuit UART serial communication, and acquires the communication distance and far better anti-interference characteristics, may be employed driver chip IC2 7MAX485.

在单片机中装入图3、图4所示的程序,其中主程序的工作流程是: FIG 3 is loaded in the microcontroller, the program shown in FIG. 4, the main program where the workflow is:

系统开始运作时,先对单片机IC1的相关定时器,寄存器与中断等进行初始化18,然后判断单片机IC1端口ADCO是否为高电平9,若是高电平则说明有信号输入,则进行数据的采集IO,低电平则继续判断等待;当数据开始采集后,同时判断定时器TO的TFO位是否为1 11,当定时器TO的TFO When the system begins operation, the timer associated to the microcontroller IC1, and the interrupt register 18 and the like are initialized, and then determine whether the microcontroller IC1 ADCO port 9 is high, if then there is a high level signal is input, data acquisition is performed the IO, the low level continues to judge wait; when the data acquisition starts, while TFO is determined whether the bit timer tO 111, tO timer when the TFO

位为1则说明到达设定的采集时间,停止采集,再用采集到的数据与存放在 Bit set to one indicating that the landing time of acquisition, the acquisition is stopped, and then the collected data is stored in

单片机IC1中的振动信号限定值即电压信号进行A/D变换后的最大值进行比较12,如果采集到的数据超过振动信号限定值则点亮LED灯报警14,同时利用定时器Tl产生中断15;如果采集到的数据没有超过振动信号限定值则把数据存储到外部数据存储区13,接着再进行下次采集。 Limit vibration signal-chip microcomputer IC1 in the voltage signal, i.e., the maximum value of the A / D converter 12 is compared, if the collected data exceeds the limit value of the vibration signal light LED warning lamp 14, and 15 using a timer interrupt generated Tl ; If the collected data does not exceed the limit value put vibration signal data stored in the external data storage area 13, then followed by the next acquisition.

中断服务程序流程是:产生中断后,关闭定时器中断,把超过振动量限定值的数据进行传送,然后打开中断,进行中断返回。 Interrupt service routine is: an interrupt, the interrupt timer is turned off, the vibration amount exceeds the defined value of data transmitted, then interrupts are enabled, an interrupt return.

本发明所述的诊断用智能传感器的工作原理是:压电传感器l输出的高内阻的电荷源经过电荷^:大器2转换成低内阻的电压源,以实现阻抗匹配, 并使电荷放大器2的输出电压与输入电荷成正比,输出的电压信号再经过滤波电路3、归一化放大器4的处理,通过模拟输出与数字转换控制电路6实现对信号的模拟输出,以及通过与微控制器电路5相连,完成对模拟信号的数字化转换的自动控制,同时微控制器电路5通过通讯接口驱动电路7实现UART串口通信。 Diagnosis by the present invention is the working principle of intelligent sensors: charge source of the high internal resistance of the piezoelectric sensor through the charge output l ^: amplifier 2 is converted to a voltage source with low internal resistance, in order to achieve impedance matching, and the charge an output voltage proportional to the input of the charge amplifier 2, the voltage signal output circuit 3 is then filtered, the normalization process of the amplifier 4, the output 6 of the analog signal by converting the analog output and digital control circuitry, and by micro-control with circuit 5 is connected to complete automatic control of the digitized analog signal conversion, while the microcontroller circuit 5 implements UART serial communication via a communication interface drive circuit 7.

在模拟输出与数字转换控制电路6中,按下A/D转换控制fe^丑SB2,继电器 In the analog to digital converter and the output control circuit 6, pressing the A / D conversion control fe ^ ugly SB2, relay

KM!的线圏"得电",其常开触点闭合,使信号传入AD^C812芯片,进行A/D转 KM! Wire rings of "energized", which is normally open contacts closed, so that the incoming signal AD ^ C812 chip performs A / D converter

换。 change. 按下停止按钮SBi,继电器KMi的线圈"失电",信号的传输中断。 SBi stop button is pressed, the relay coil KMi "power loss", the transmission interrupt signal. 当按下 When you press

信号模拟输出按4ffSB3时,继电器KM2的线圈"得电",其常开触点闭合,信号 When the analog signal output by 4ffSB3, KM2 relay coil "energized", which normally open contact is closed, the signal

不再传入AD)iC812芯片而直接以模拟状态输出。 No incoming AD) iC812 chip directly output an analog state. 将继电器KMi和KM2的常闭触点 KMi relay normally closed contact and KM2

分别与对方的线圈串联,可以保证继电器KMi和KM2的线圈不会同时"得电", Each coil in series with each other, can guarantee relays KMi and KM2 coil does not also "energized"

这种安全措施在继电器电路中被称为"互锁"。 Such security measures are called "interlock" to the relay circuit. 除此之外,为了方便操作, 还设置了"按钮联锁",即将继电器KM!的线圈与信号模拟输出按钮SB3的常闭 In addition, for ease of operation, also set "button interlock", i.e. relay KM! Coil and the analog output signal of the normally closed button SB3

触点串联,将继电器KM2的线圏与A/D转换控制按钮SB2的常闭触点串联。 Contacts in series, a line relay KM2 rings of the A / D conversion control button SB2 normally closed contacts in series. 当信 Believe

号处在A/D转换的过程中时,如果想转换成模拟信号输出状态,可以不按停 When the resolution in the process of A / D conversion, if you want output state into an analog signal, may not stop by

止按钮SBi而直接按下模拟输出按钮SB3,继电器腿2的线圈"得电",同时模拟输出按钮SB3的常闭触点断开,继电器KMi的线圈"失电",进入模拟信号输出状态。 Hitting the stop button SBi button SB3 analog output, the leg relay coil 2 "energized", while the analog output button SB3 normally closed contacts open, the relay coil KMi "power loss", into the analog signal output state. 信号从模拟信号输出状态到A/D转换状态的转换可通过A/D转换控制按钮SB2直接完成。 Output status signal from an analog signal to A / D conversion can be done directly converted state by A / D conversion control button SB2.

Claims (7)

  1. 1、一种智能传感器,包括压电传感器(1)、处理电路(8)、微控制器电路(5),其中:压电传感器(1):将振动信号转换成电荷信号输入到处理电路(8);处理电路(8):接收压电传感器(1)输出的电荷信号,将电荷信号处理后输出;其特征在于:在处理电路(8)的输出端与微控制器电路(5)的模拟量输入端之间连接模拟输出与数字转换控制电路(6),并且微控制器电路(5)的通讯接口输出端连接到通讯接口驱动电路(7),微控制器电路(5)与通讯接口驱动电路(7)之间的信号为双向传输,当智能传感器需要输出模拟信号时,模拟信号通过模拟输出与数字转换控制电路(6)输出,当智能传感器需要输出数字信号时,模拟信号通过模拟输出与数字转换控制电路(6)输入微控制器电路(5),通过微控制器电路(5)将模拟信号转换成数字信号输出,同时微控制器电路(5)通过通讯接口驱动电路(7)实现UA 1, an intelligent sensor comprising a piezoelectric sensor (1), a processing circuit (8), a microcontroller circuit (5), wherein: a piezoelectric transducer (1): the vibration signals into charge signal input to the processing circuitry ( 8); processing circuitry (8): receiving a piezoelectric sensor (1) output of the charge signal, and outputs the processed signal charge; wherein: the processing circuit (8) output terminal of the microcontroller circuit (5) the analog output is connected between the input terminal and the analog-digital converter control circuit (6), and the output of the microcontroller communication interface circuit (5) is connected to the communication interface drive circuit (7), a microcontroller circuit (5) and communication the interface signals between the driving circuit (7) for the bidirectional transmission, when the smart sensor needs to output an analog signal, and outputs an analog signal via an analog digital converter control circuit (6) outputs, when the smart sensor needs to output a digital signal, analog signal , by a microcontroller circuit (5) converts the analog signal into a digital signal and outputs the analog output to digital converter control circuit (6) input of the microcontroller circuit (5), while the microcontroller circuit (5) via the communication interface driver circuit ( 7) realization UA RT串口通信。 RT serial communication.
  2. 2、 根据权利要求1所述的一种智能传感器,其特征在于:所述处理电路由电荷放大器(2)、滤波电路(3)、归一化放大器(4)组成,电荷放大器(2)的输入为压电传感器(1)输出的电荷信号,将电荷信号转换成电压信号后输出到滤波电路(3 );滤波电路(3 )对电压信号进行隔直和滤波,输出到归一化放大器(4);所述归一化放大器(4 )将隔直和滤波后的信号按测量范围的要求进行归一化放大, 其输出的模拟信号通过模拟输出与数字转换控制电路(6)输出或者输入到微控制器电路(5)。 2, according to one of the smart sensor as claimed in claim 1, characterized in that: the processing circuit by the charge amplifier (2), a filter circuit (3), normalized amplifier (4), with the charge amplifier (2) input piezoelectric sensor (1) output from the charge signals, converts the charge signal into a voltage signal is output to the filter circuit (3); a filter circuit (3) for blocking voltage signals and filtering the normalized amplifier output ( 4); said normalizing amplifier (4) the blocking signal and the filtered normalized amplification required measuring range, which outputs the analog signal outputted by the analog to digital converter output and a control circuit (6) or input to the microcontroller circuit (5).
  3. 3、 根据权利要求2所述的一种智能传感器,其特征在于:模拟输出与数字转换控制电路(6)由继电器KMi、 KM2、停止按钮SBi、 A/D转换控制按钮SB2、模拟输出按钮SB3组成,其中继电器KM2的常开触点连接在归一化》文大器(4)的输出端,继电器KMi的常开触点连接在归一化放大器(4)的输出端和微控制器电路(5)的输入端之间; 模拟输出按钮SB3的常闭触点、继电器KM2的常闭触点、继电器KM! 的线圏按所述顺序串联连接,模拟输出按钮SB3的常闭触点的另一端同时与A/D转换控制按钮SB2的常开触点的一端和继电器KMi的常开触点的一端连接;A/D转换控制按钮SB2的常闭触点、继电器KM!的常闭触点、继电器KM2的线圏按所述顺序串联连接,A/D转换控制按钮SB2的常闭触点的另一端同时与模拟输出按钮SB3的常开触点的一端和继电器KM2的常开触点的一端连接;并且所述模拟输出按 3, an intelligent sensor according to claim 2, wherein: converting the analog output and digital control circuit (6) of a relay KMi, KM2, stop button SBi, A / D conversion control buttons SB2, SB3 analog output button composition, wherein the relay normally open contact KM2 connected normalized "text amplifier output terminal (4), the normally open contacts of the relay KMi connected normalizing amplifier (4) and the output terminal of microcontroller circuit ( between 5) an input terminal;! button SB3 analog output normally closed contact, the normally closed relay contacts KM2, KM relay rings of wire connected in series in the order, the analog output of the normally closed contact button SB3 another One end of normally open contact of the relay and one end of the normally open contact KMi end simultaneously with the a / D converter connected to the control button SB2;! a / D conversion control button SB2 normally closed contact, the normally closed contact of the relay KM , KM2 rings of the relay coil connected in series in the order, a / D conversion the other end of the control button SB2 normally closed contacts while the analog output button normally open contact and one end of the normally open relay contacts SB3 of KM2 One end of the connection; and the analog output press SB3的常开触点的另一端、继电器KM2的常开触点的另一端、A/D转换控制按钮SB2的常开触点的另一端以及继电器KMj勺常开触点的另一端同时与停止按钮SBi的常闭触点的一端连接,停止按钮SBi的常闭触点的另一端连接电源,继电器KMi的线圏和继电器KM2的线圈的另一端接地。 The other end of the normally open contact of SB3, the other end of the normally open contact of the relay and the other end of the other end of the spoon KMj normally open contact of relay KM2, A / D conversion control button SB2 while the normally open contact with the stop One end of the normally closed contact is connected to a button SBi, stopping the other end of the normally closed contact connected to a power button SBi, KMi other end of the relay coil and the relay wire rings of the KM2.
  4. 4、 根据权利要求2或3所述的一种智能传感器,其特征在于: 所述电荷放大器(2)由电容d、 C2和电阻Ri、 R2、放大器Ai组成,所述压电传感器(1)输出的电荷信号通过电容C2和电阻R2加到放大器Ai的反相输入端,反馈电容d连接在放大器Ai的输出端和压电传感器(1)的输出端之间,电阻l连接在放大器Ai的输出端和反相输入端之间,同时放大器A!的同相输入端接地。 4, an intelligent sensor according to claim 2 or claim 3, wherein: said charge amplifier (2) by the capacitor d, C2 and the resistor Ri, R2, Ai amplifier composed of the piezoelectric transducer (1) output charge signal via the capacitor C2 and the resistance R2 applied to the inverting input terminal of amplifier Ai, d feedback capacitor connected between the output of amplifier Ai and the output terminal of the piezoelectric transducer (1), the resistance of the Ai amplifier is connected l the same between the output and the inverting input terminal, while the amplifier a! inverting input grounded.
  5. 5、 根据权利要求4所述的一种智能传感器,其特征在于:滤波电路(3)采用单个运算放大器构成,电路为具有隔离直流作用的有源二阶低通滤波电路。 5, an intelligent sensor according to claim 4, wherein: a filter circuit (3) use of a single operational amplifier circuit is an active low pass filter circuit having a second order DC isolation function.
  6. 6、 根据权利要求5所述的一种智能传感器,其特征在于:所述微控制器电路(5 )具有存储器和A/D变换及串行通讯接口的控制单元。 6, an intelligent sensor according to claim 5, wherein: said microcontroller circuit (5) having a memory and a control unit A / D converter and a serial communication interface.
  7. 7、 根据权利要求6所述的一种智能传感器,其特征在于:所述控制单元包括单片机IC1,所述单片机IC1具有以下装置:系统开始运作时,先对单片机IC1的相关定时器,寄存器与中断等进行初始化的装置(18);判断单片机IC1端口ADCO是否为高电平的装置(9),当单片机IC1端口ADCO为高电平时说明有信号输入;采集数据装置(10):当单片机IC1端口ADCO是高电平时进行数据的采集装置;判断定时器TO的TFO位是否为1的装置(11),当定时器TO的TF0位为1时,停止数据采集;数据比较装置(12):用采集到的数据与存放在单片机IC1中的振动信号限定值即电压信号进行A/D变换后的最大值进行比较;点亮LED灯装置(14 ):当采集到的数据超过振动信号限定值则点亮LED灯报警;中断装置(15):使定时器T1产生中断,关闭定时器中断,把超过振动信号限定值的数据进行传送,然后打开中断,进 7, an intelligent sensor as claimed in claim 6, wherein: said control means comprises a microcontroller IC1, the microcontroller IC1 has the following means: when the system is operational, the timer associated to the microcontroller IC1, a register and means for initializing the interrupt like (18); the microcontroller IC1 is determined whether a high level ADCO port (9), when the microcontroller IC1 is high port ADCO illustrate the input signal; data acquisition means (10): when the microcontroller IC1 ADCO port means is to collect data at a high level; whether 1 bit TFO means (11) determines the tO timer, when the timer tO is TF0 bit is 1, stop data collection; data comparison means (12): data to be collected and stored in the microcontroller IC1 i.e. vibration signals limit the maximum voltage signal after a / D conversion is compared; LED lamp lighting apparatus (14): when the data collected vibration signal exceeds the limit value the warning light LED lamp; interrupting means (15): the timer T1 to generate an interrupt, the interrupt timer is turned off, the vibration data exceeds the limit value of the transmission signal, then turn interrupted and 中断返回;数据存储装置(13):当采集到的数据没有超过振动信号限定值则把数据存储到外部数据存储区。 Interrupt return; data storage means (13): When the collected data does not exceed the limit value put vibration signal data stored in the external data storage area.
CN 200710092670 2007-09-05 2007-09-05 Intelligent sensor CN100465832C (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN 200710092670 CN100465832C (en) 2007-09-05 2007-09-05 Intelligent sensor

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN 200710092670 CN100465832C (en) 2007-09-05 2007-09-05 Intelligent sensor

Publications (2)

Publication Number Publication Date
CN101118428A true CN101118428A (en) 2008-02-06
CN100465832C true CN100465832C (en) 2009-03-04

Family

ID=39054573

Family Applications (1)

Application Number Title Priority Date Filing Date
CN 200710092670 CN100465832C (en) 2007-09-05 2007-09-05 Intelligent sensor

Country Status (1)

Country Link
CN (1) CN100465832C (en)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
DE102010036212A1 (en) * 2010-08-31 2012-03-01 Siemens Aktiengesellschaft Device with a rotary switch
CN104185311B (en) * 2014-08-26 2016-06-08 无锡市华牧机械有限公司 A circuit for heating the biomass particles machine having a sampling circuit
CN104270108B (en) * 2014-10-15 2017-07-07 威海北洋光电信息技术股份公司 A charge amplifier
CN104483015A (en) * 2014-10-31 2015-04-01 成都美益达医疗科技有限公司 Centrifuge vibration test circuit

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN88201619U (en) 1988-03-17 1988-11-30 中国计量科学研究院 Electronic meter for measuring breath pulse and temp.
CN1473289A (en) 2000-08-10 2004-02-04 罗斯蒙德公司 Multiple die industrial process control transmitter
CN1719201A (en) 2005-07-15 2006-01-11 中国船舶重工集团公司第七一一研究所 Multi parameter intallingent sensor

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN88201619U (en) 1988-03-17 1988-11-30 中国计量科学研究院 Electronic meter for measuring breath pulse and temp.
CN1473289A (en) 2000-08-10 2004-02-04 罗斯蒙德公司 Multiple die industrial process control transmitter
CN1719201A (en) 2005-07-15 2006-01-11 中国船舶重工集团公司第七一一研究所 Multi parameter intallingent sensor

Also Published As

Publication number Publication date Type
CN101118428A (en) 2008-02-06 application

Similar Documents

Publication Publication Date Title
CN201993124U (en) Multi-channel physical quantity measuring device
CN101751787A (en) Multifunctional vehicle intelligent testing sensor and testing method thereof
US20090090186A1 (en) Method and system for diagnosing mechanical, electromechanical or fluidic components
CN201993430U (en) Detection circuit for antenna connection state
CN201383092Y (en) CAN-based digital data and pulse signal acquisition module
CN102135769A (en) Multifunctional data acquisition system and control method
CN201893771U (en) Universal interface circuit for discrete magnitude acquisition of airborne equipment
CN202502104U (en) Automobile line control brake wheel speed acquisition circuit
CN101776916A (en) Sewage level sensor fault instant diagnosing, alarming and switching device
CN2836027Y (en) Motor winding current detecting circuit for shielded door
US20090284263A1 (en) Full function test for in situ test of sensors and amplifiers
CN201166903Y (en) System for monitoring an environment in a vehicle
CN101197072A (en) Wheel velocity signal capturing system
CN201319581Y (en) Separately-excited motor controller
CN101819228A (en) Hall current sensor based current detection device
CN1566960A (en) Fan condition detecting method and apparatus therefor
CN201984325U (en) Multifunctional data acquisition device
CN203376076U (en) A temperature detection circuit for a permanent magnet synchronous motor for an electric car and a controller of the motor
CN201011504Y (en) Current sensor
JP2000161122A (en) Combustion control method for internal combustion engine by use of heating resistor type air flowmeter
CN202777561U (en) Automated fire fighting system for high-rise buildings
CN203289071U (en) An overcurrent protection circuit of a motor controller
CN102590591A (en) Detection circuit for monitoring state of current transformer
CN203012501U (en) Multipurpose diagnosable signal acquisition module
CN204065213U (en) Zero sequence current transformer broken line detection circuit and residual current detection circuit

Legal Events

Date Code Title Description
C06 Publication
C10 Request of examination as to substance
C14 Granted