CN110658447A - A kind of relay life detection method - Google Patents
A kind of relay life detection method Download PDFInfo
- Publication number
- CN110658447A CN110658447A CN201910978796.0A CN201910978796A CN110658447A CN 110658447 A CN110658447 A CN 110658447A CN 201910978796 A CN201910978796 A CN 201910978796A CN 110658447 A CN110658447 A CN 110658447A
- Authority
- CN
- China
- Prior art keywords
- count
- relay
- pulse
- unit
- counting
- 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.)
- Granted
Links
- 238000001514 detection method Methods 0.000 title claims abstract description 55
- 238000005070 sampling Methods 0.000 claims description 87
- 230000002441 reversible effect Effects 0.000 claims description 47
- 230000001186 cumulative effect Effects 0.000 claims description 29
- 238000000034 method Methods 0.000 claims description 29
- 238000007689 inspection Methods 0.000 claims description 9
- 238000001914 filtration Methods 0.000 claims description 8
- 230000000694 effects Effects 0.000 description 12
- 230000000630 rising effect Effects 0.000 description 11
- 230000008569 process Effects 0.000 description 9
- 238000012360 testing method Methods 0.000 description 9
- 230000008859 change Effects 0.000 description 8
- 230000002457 bidirectional effect Effects 0.000 description 5
- 238000010586 diagram Methods 0.000 description 5
- 101000629937 Homo sapiens Translocon-associated protein subunit alpha Proteins 0.000 description 3
- 102100026231 Translocon-associated protein subunit alpha Human genes 0.000 description 3
- 238000009825 accumulation Methods 0.000 description 3
- 239000003990 capacitor Substances 0.000 description 3
- 239000013256 coordination polymer Substances 0.000 description 3
- 238000013461 design Methods 0.000 description 3
- 230000009471 action Effects 0.000 description 2
- 125000004122 cyclic group Chemical group 0.000 description 2
- 230000003247 decreasing effect Effects 0.000 description 2
- 238000012986 modification Methods 0.000 description 2
- 230000004048 modification Effects 0.000 description 2
- 229920006395 saturated elastomer Polymers 0.000 description 2
- 239000007787 solid Substances 0.000 description 2
- 230000001360 synchronised effect Effects 0.000 description 2
- 230000009286 beneficial effect Effects 0.000 description 1
- 238000007796 conventional method Methods 0.000 description 1
- 238000005516 engineering process Methods 0.000 description 1
- 230000001939 inductive effect Effects 0.000 description 1
- 239000004973 liquid crystal related substance Substances 0.000 description 1
- 238000012544 monitoring process Methods 0.000 description 1
- 230000002093 peripheral effect Effects 0.000 description 1
Images
Classifications
-
- G—PHYSICS
- G01—MEASURING; TESTING
- G01R—MEASURING ELECTRIC VARIABLES; MEASURING MAGNETIC VARIABLES
- G01R31/00—Arrangements for testing electric properties; Arrangements for locating electric faults; Arrangements for electrical testing characterised by what is being tested not provided for elsewhere
- G01R31/327—Testing of circuit interrupters, switches or circuit-breakers
- G01R31/3277—Testing of circuit interrupters, switches or circuit-breakers of low voltage devices, e.g. domestic or industrial devices, such as motor protections, relays, rotation switches
- G01R31/3278—Testing of circuit interrupters, switches or circuit-breakers of low voltage devices, e.g. domestic or industrial devices, such as motor protections, relays, rotation switches of relays, solenoids or reed switches
Landscapes
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Electronic Switches (AREA)
- Manipulation Of Pulses (AREA)
Abstract
一种继电器寿命检测方法,由包括控制器单元、L个通断计数单元、人机界面单元、继电器驱动单元、振荡器单元的装置实现,能够同时对多个继电器开关的通断次数分别进行计数得到通断计数值,并依据通断计数值来判断继电器及其开关是否失效;通断计数单元中的抗脉冲干扰电路能够滤除计数脉冲中的边沿抖动干扰和窄脉冲干扰,保证了继电器寿命检测的精确性;采用在控制器单元外部设置多个计数器分别对继电器开关的通断次数进行计数的方式,同时检测继电器寿命的继电器开关数量不受控制器单元内部计数器数量的限制。
A relay life detection method is realized by a device including a controller unit, L on-off counting units, a man-machine interface unit, a relay drive unit, and an oscillator unit, and can simultaneously count the on-off times of a plurality of relay switches. Obtain the on-off count value, and judge whether the relay and its switch fail according to the on-off count value; the anti-pulse interference circuit in the on-off count unit can filter out the edge jitter interference and narrow pulse interference in the count pulse, ensuring the life of the relay. Accuracy of detection; multiple counters are set outside the controller unit to count the on-off times of the relay switches respectively. At the same time, the number of relay switches to detect the life of the relay is not limited by the number of counters inside the controller unit.
Description
本发明专利申请为分案申请,原案申请号为201711133937.6,申请日为2017年11月16日,发明名称为继电器寿命检测装置。The patent application of the present invention is a divisional application, the original application number is 201711133937.6, the application date is November 16, 2017, and the name of the invention is a relay life detection device.
技术领域technical field
本发明涉及测试方法与装置领域,尤其是一种继电器寿命检测方法。The invention relates to the field of testing methods and devices, in particular to a relay life detection method.
背景技术Background technique
继电器寿命一般在几万次至数十万次。模拟继电器的使用条件,通过控制继电器动作使其开关通断产生电脉冲,然后对电脉冲进行计数,可以测试继电器寿命。继电器动作所产生的电脉冲含有边沿抖动,直接对未处理的脉冲进行计数,会产生极大的误差。使用MCU软件延时方式去除抖动脉冲的影响,当MCU需要同时对多个继电器开关进行寿命测试时,MCU的软件延时方式会使MCU力不从心。The life of the relay is generally tens of thousands to hundreds of thousands of times. Simulate the use conditions of the relay, by controlling the action of the relay to make the switch on and off to generate electric pulses, and then counting the electric pulses, the life of the relay can be tested. The electrical pulses generated by the relay action contain edge jitter, and directly counting the unprocessed pulses will cause great errors. Use the MCU software delay method to remove the influence of the jitter pulse. When the MCU needs to test the life of multiple relay switches at the same time, the MCU software delay method will make the MCU powerless.
发明内容SUMMARY OF THE INVENTION
为了解决上述问题,本发明提供了一种继电器寿命检测方法,包括:In order to solve the above problems, the present invention provides a relay life detection method, including:
步骤1,初始化,包括将L个继电器开关的检测标志均置为在检状态,寿命计数器清0,发出清0信号使L个通断计数值全部清0;
步骤2,控制L个继电器开关通断一次,同时对L个继电器开关的通断次数分别进行计数得到L个通断计数值;寿命计数器进行加1计数;Step 2: Control the on-off times of the L relay switches once, and simultaneously count the on-off times of the L relay switches to obtain L on-off count values; the life counter adds 1 to count;
步骤3,读取当次L个通断计数值;
步骤4,逐个对检测标志为在检状态的继电器开关是否失效进行判断;将本次被判断为失效继电器开关的检测标志置为停检状态,同时将当前寿命计数器的计数值作为该次被判断为失效继电器开关的寿命值;Step 4: Judging whether the relay switch whose detection flag is in the state of inspection is invalid one by one; the detection flag of the relay switch which is judged to be invalid this time is set to the state of being stopped, and the count value of the current life counter is used as the judgment this time. is the life value of the fail relay switch;
步骤5,L个继电器开关的检测标志中仍有在检状态者,返回步骤2,否则停止检测。
对检测标志为在检状态的继电器开关是否失效进行判断,方法是,待判断继电器开关累计W次的当次通断计数值与前次通断计数值不是增1关系时,则该继电器开关失效,否则未失效;所述W为大于等于2的整数。The method is to judge whether the relay switch whose detection flag is in the state of inspection is invalid. The method is to judge whether the current on-off count value of the accumulated W times of the relay switch and the previous on-off count value are not in the relationship of increasing by 1, then the relay switch is invalid. , otherwise it does not fail; the W is an integer greater than or equal to 2.
对L个继电器开关的通断次数分别进行计数,由L个结构与组成相同的通断计数单元实现;通断计数单元包括脉冲产生电路、抗脉冲干扰电路和三态输出计数电路。脉冲产生电路输出由继电器开关通断所产生的初始脉冲至抗脉冲干扰电路;抗脉冲干扰电路对初始脉冲进行脉冲滤波,输出计数脉冲;三态输出计数电路对计数脉冲进行计数,输出通断计数值。The on-off times of the L relay switches are counted respectively, which is realized by L on-off counting units with the same structure and composition; the on-off counting unit includes a pulse generating circuit, an anti-pulse interference circuit and a tri-state output counting circuit. The pulse generation circuit outputs the initial pulse generated by the relay switch on and off to the anti-pulse interference circuit; the anti-pulse interference circuit performs pulse filtering on the initial pulse and outputs the counting pulse; the tri-state output counting circuit counts the counting pulse and outputs the on-off count value.
所述抗脉冲干扰电路包括可逆限幅计数器、比较阈值设定器、上限值比较器、下限值比较器、RS触发器。可逆限幅计数器的输入为初始脉冲和采样时钟脉冲,输出为对采样时钟脉冲进行计数的限幅累积计数值;比较阈值设定器的输出为上限比较阈值和下限比较阈值;上限值比较器的输入为限幅累积计数值和上限比较阈值,输出为第一置位信号;下限值比较器的输入为限幅累积计数值和下限比较阈值,输出为第二置位信号;RS触发器的输入为第一置位信号和第二置位信号,输出为计数脉冲;所述限幅累积计数值的下限幅值为0,上限幅值为N;所述N为大于等于2的整数;所述上限比较阈值为大于N/2且小于等于N的整数,下限比较阈值为大于等于0且小于N/2的整数。The anti-pulse interference circuit includes a reversible limiter counter, a comparison threshold value setter, an upper limit value comparator, a lower limit value comparator, and an RS flip-flop. The input of the reversible limiter counter is the initial pulse and the sampling clock pulse, and the output is the limiter accumulated count value that counts the sampling clock pulse; the output of the comparison threshold setter is the upper limit comparison threshold and the lower limit comparison threshold; the upper limit comparator The input of the limiter is the cumulative count value and the upper limit comparison threshold, and the output is the first set signal; the input of the lower limit comparator is the limiter cumulative count value and the lower limit comparison threshold, and the output is the second set signal; RS flip-flop The input is the first set signal and the second set signal, and the output is a count pulse; the lower limit amplitude of the limit accumulated count value is 0, and the upper limit amplitude value is N; the N is an integer greater than or equal to 2; The upper limit comparison threshold is an integer greater than N/2 and less than or equal to N, and the lower limit comparison threshold is an integer greater than or equal to 0 and less than N/2.
所述可逆限幅计数器的功能是,由初始脉冲的电平状态控制可逆限幅计数器处于加计数状态还是减计数状态;可逆限幅计数器处于加计数状态且限幅累积计数值大于等于上限幅值N时,不对采样时钟脉冲进行加计数;可逆限幅计数器处于减计数状态且限幅累积计数值等于下限幅值0时,不对采样时钟脉冲进行减计数。The function of the reversible clipping counter is to control whether the reversible clipping counter is in an up-counting state or a down-counting state by the level state of the initial pulse; the reversible clipping counter is in an up-counting state and the clipped cumulative count value is greater than or equal to the upper limit amplitude value. When N, the sampling clock pulse is not counted up; when the reversible limiter counter is in the down count state and the limiter cumulative count value is equal to the lower limit value of 0, the sampling clock pulse is not counted down.
上限值比较器的功能是,当输入的限幅累积计数值大于等于上限比较阈值时,令第一置位信号有效,否则第一置位信号无效;下限值比较器的功能是,当输入的限幅累积计数值小于等于下限比较阈值时,令第二置位信号有效,否则第二置位信号无效。The function of the upper limit value comparator is to make the first set signal valid when the input limiter cumulative count value is greater than or equal to the upper limit comparison threshold, otherwise the first set signal is invalid; the function of the lower limit value comparator is to make the first set signal valid when When the input limiter cumulative count value is less than or equal to the lower limit comparison threshold, the second set signal is made valid, otherwise the second set signal is invalid.
所述第一置位信号为RS触发器的置位信号,第二置位信号为RS触发器的复位信号;所述计数脉冲从RS触发器的同相输出端输出,或者从RS触发器的反相输出端输出。The first set signal is the set signal of the RS flip-flop, and the second set signal is the reset signal of the RS flip-flop; Phase output terminal output.
可逆限幅计数器由具有单时钟输入的可逆计数器和限幅及加减控制电路组成;所述可逆计数器具有加减控制输入端和使能输入端。The reversible limiter counter is composed of a reversible counter with a single clock input and a limiter and an addition and subtraction control circuit; the reversible counter has an addition and subtraction control input end and an enable input end.
所述继电器寿命检测方法由包括控制器单元、L个通断计数单元、人机界面单元、继电器驱动单元、振荡器单元的继电器寿命检测装置实现。人机界面单元电性连接至控制器单元,用于发出检测命令,显示L个继电器开关的寿命;控制器单元电性连接至继电器驱动单元,向继电器驱动单元发出继电器驱动信号,控制L个继电器开关的通断;振荡器单元输出采样时钟脉冲至L个通断计数单元;L个通断计数单元分别对L个继电器开关的通断进行计数得到L个通断计数值;通断计数单元电性连接至控制器单元,用于控制器单元分别读入L个通断计数单元的通断计数值和控制L个通断计数单元通断计数值的清0。The relay life detection method is realized by a relay life detection device comprising a controller unit, L on-off counting units, a man-machine interface unit, a relay driving unit, and an oscillator unit. The man-machine interface unit is electrically connected to the controller unit for issuing detection commands and displaying the lifespan of the L relay switches; the controller unit is electrically connected to the relay driving unit, and sends a relay driving signal to the relay driving unit to control the L relays The on-off of the switch; the oscillator unit outputs the sampling clock pulse to the L on-off count units; the L on-off count units respectively count the on-off of the L relay switches to obtain L on-off count values; It is connected to the controller unit, and is used for the controller unit to read in the on-off count values of the L on-off count units and control the clearing of the on-off count values of the L on-off count units.
通断计数单元电性连接至控制器单元,用于控制器单元分别读入L个通断计数单元的通断计数值的方法是,L个通断计数单元的通断计数值均采用三态缓冲方式输出;所有通断计数单元的三态缓冲输出端口全部并联至控制器单元的计数数据输入端口;控制器单元发出选通控制信号逐个使能各通断计数单元的三态缓冲输出端口,从计数数据输入端口读入相应的通断计数值。The on-off counting unit is electrically connected to the controller unit, and the method for the controller unit to read in the on-off count values of the L on-off count units respectively is that the on-off count values of the L on-off count units are all tri-state Buffer mode output; all the three-state buffer output ports of all on-off counting units are connected in parallel to the counting data input port of the controller unit; the controller unit sends a gating control signal to enable the three-state buffer output ports of each on-off counting unit one by one, Read the corresponding on-off count value from the count data input port.
所述继电器寿命检测装置还包括选通控制单元;控制器单元向选通控制单元发出通断计数单元地址编码信号,由选通控制单元对通断计数单元地址编码信号进行译码,得到选通控制信号。The relay life detection device also includes a gating control unit; the controller unit sends an on-off counting unit address code signal to the gating control unit, and the gating control unit decodes the on-off counting unit address code signal to obtain the gating control unit. control signal.
本发明的有益效果是:所述方法能够同时对多个继电器开关的寿命进行检测;采用抗脉冲干扰电路自动滤除继电器开关通断所产生的电脉冲中的边沿抖动干扰和窄脉冲干扰,滤除脉冲干扰的效果能够通过改变限幅累积计数值上限幅值的大小或者是改变上限比较阈值、下限比较阈值的大小进行调节;保证了继电器及开关开关寿命检测的精确性;采用在控制器单元外部设置多个计数器分别对继电器开关的通断次数进行计数的方式,同时检测继电器寿命的继电器开关数量不受控制器单元内部计数器数量的限制。The beneficial effects of the invention are as follows: the method can detect the lifespan of a plurality of relay switches at the same time; an anti-pulse interference circuit is used to automatically filter out edge jitter interference and narrow pulse interference in the electrical pulses generated by the on-off of the relay switches, and filter The effect of eliminating pulse interference can be adjusted by changing the size of the upper limit amplitude of the limiter cumulative count value or changing the size of the upper limit comparison threshold and the lower limit comparison threshold; it ensures the accuracy of the life detection of relays and switches; it is used in the controller unit The method of setting up multiple counters outside to count the on-off times of the relay switches respectively, and the number of relay switches for detecting the life of the relays is not limited by the number of counters inside the controller unit.
附图说明Description of drawings
图1为图1为L=4时继电器寿命检测装置实施例框图;1 is a block diagram of an embodiment of a relay life detection device when L=4;
图2为通断计数单元实施例;Fig. 2 is an embodiment of an on-off counting unit;
图3为N=6时可逆限幅计数器实施例;Fig. 3 is an embodiment of a reversible limiter counter when N=6;
图4为N=6时比较阈值设定器实施例;Fig. 4 compares the threshold value setter embodiment when N=6;
图5为N=6时上限值比较器的实施例;Fig. 5 is the embodiment of the upper limit comparator when N=6;
图6为N=6时下限值比较器的实施例;6 is an embodiment of a lower limit comparator when N=6;
图7为RS触发器实施例;Fig. 7 is an RS trigger embodiment;
图8为1#脉冲产生电路实施例;Fig. 8 is 1# pulse generation circuit embodiment;
图9为N=6时抗脉冲干扰电路抗干扰效果示意图;FIG. 9 is a schematic diagram of the anti-interference effect of the anti-pulse interference circuit when N=6;
图10为三态输出计数电路实施例;10 is an embodiment of a three-state output counting circuit;
图11为继电器驱动单元实施例。FIG. 11 is an embodiment of a relay driving unit.
具体实施方式Detailed ways
以下结合附图对本发明作进一步说明。The present invention will be further described below with reference to the accompanying drawings.
图1为L=4时继电器寿命检测装置实施例框图,包括控制器单元10、1#通断计数单元11、2#通断计数单元12、3#通断计数单元13、4#通断计数单元14、人机界面单元15、选通控制单元16、继电器驱动单元17、振荡器单元18。1 is a block diagram of an embodiment of a relay life detection device when L=4, including a
人机界面单元15通过控制器单元10的接口I/O1与控制器单元10通信,用于检测命令的发出、参数修改和各继电器开关寿命的显示等;控制器单元10通过输出端口OUT2向继电器驱动单元17发出继电器驱动信号,控制1#至4#继电器开关的通断;振荡器单元18输出采样时钟脉冲CP1至1#通断计数单元11、2#通断计数单元12、3#通断计数单元13和4#通断计数单元14;1#通断计数单元11、2#通断计数单元12、3#通断计数单元13、4#通断计数单元14分别对4个继电器开关的通断进行脉冲产生、脉冲滤波和通断次数计数;控制器单元10通过输出端口OUT1向选通控制单元16发出待选通的通断计数单元地址编码信号,选通控制单元16对通断计数单元地址编码信号进行译码,得到选通控制信号CS1、CS2、CS3、CS4,分别控制1#通断计数单元11、2#通断计数单元12、3#通断计数单元13、4#通断计数单元的通断计数值CV1、CV2、CV3、CV4通过输入端口IN1送至控制器单元10,IN1为控制器单元的计数数据输入端口;控制器单元10通过输出端口OUT3向1#通断计数单元11、2#通断计数单元12、3#通断计数单元13、4#通断计数单元14发出清0信号CLR;清0信号CLR有效时,4个通断计数单元的通断计数值均被清0。The man-
如图2所示为1#通断计数单元实施例框图。图2中,1#脉冲产生电路100输出由1#继电器开关通断所产生的初始脉冲P1;可逆限幅计数器101、比较阈值设定器102、上限值比较器103、下限值比较器104、RS触发器105组成干扰脉冲过滤电路,对初始脉冲P1进行脉冲滤波,输出计数脉冲P2;三态输出计数电路106对计数脉冲P2进行计数,受选通控制信号CS1的控制,输出1#继电器开关的通断计数值CV1;三态输出计数电路106同时受清0信号CLR的控制,清0信号CLR有效时,三态输出计数电路106中的通断计数值被清0。Figure 2 is a block diagram of an embodiment of the 1# on-off counting unit. In FIG. 2, the 1#
图2的抗脉冲干扰电路中,可逆限幅计数器101的输入为初始脉冲P1和采样时钟脉冲CP1,输出为限幅累积计数值X1,限幅累积计数值X1的上限幅值为N、下限幅值为0;比较阈值设定器102的输出为上限比较阈值Y1和下限比较阈值Y2;上限值比较器103的输入为限幅累积计数值X1和上限比较阈值Y1,输出为第一置位信号SE1;下限值比较器104的输入为限幅累积计数值X1和下限比较阈值Y2,输出为第二置位信号RE1;RS触发器105的输入为第一置位信号SE1和第二置位信号RE1,输出为计数脉冲P2。In the anti-pulse interference circuit of FIG. 2, the input of the
下面的抗脉冲干扰电路实施例中,N=6。In the following embodiments of the anti-pulse interference circuit, N=6.
图3为N=6时可逆限幅计数器的实施例。图3中,FC1为4位二进制可逆计数器74HC191,FC1的置位控制输入端LD输入1,FC1工作在可控的可逆计数状态,为具有单时钟输入的可逆计数器;FC1的M输入端为加减控制输入端,CE输入端为使能控制输入端。与非门FA1、FA2、FA3、FA4组成限幅及加减控制电路。初始脉冲的电平状态包括高电平和低电平,图3实施例中,P1通过与非门FA4接至加减控制输入端M,初始脉冲P1的高电平、低电平状态分别控制可逆限幅计数器处于加计数状态、减计数状态。也可以将P1直接连接至加减控制输入端M,令初始脉冲P1的高电平、低电平分别控制可逆限幅计数器处于减计数状态、加计数状态。FIG. 3 is an embodiment of a reversible slice counter when N=6. In Figure 3, FC1 is a 4-bit binary reversible counter 74HC191, the set control input terminal of FC1 is
当P1为1,x13、x12同时为1时,与非门FA1输出低电平,与非门FA3输出高电平,FC1的使能控制端CE输入高电平,74HC191工作在保持状态,即可逆限幅计数器在采样时钟脉冲CP1的上升沿维持输出状态不变,可逆限幅计数器处于上限值限幅状态,不进行加计数;x13、x12同时为1包括2种情况,x13、x12、x11为1、1、0时,可逆限幅计数器的输出等于上限幅值6;x13、x12、x11为1、1、1时,可逆限幅计数器的输出等于7,处于超限状态,该情况只有在系统启动时的初始状态有可能出现,可逆限幅计数器经过减计数进入正常限幅计数区间后,输出的超限状态不会再出现。当P1为0,x13、x12、x11同时为0时,与非门FA2输出低电平,与非门FA3输出高电平,FC1的使能控制端CE输入高电平,74HC191工作在保持状态,即可逆限幅计数器在采样时钟脉冲CP1的上升沿维持输出状态不变,可逆限幅计数器处于下限值限幅状态,不进行减计数。初始脉冲P1有高电平和低电平2种状态,即初始脉冲P1有1和0这2种状态,初始脉冲P1的两种状态控制可逆限幅计数器分别对采样时钟脉冲CP1进行加计数或者减计数。当P1为1,x13、x12不同时为1时,与非门FA1、FA2均输出高电平,与非门FA3输出低电平,FC1的使能控制端CE输入低电平,P1通过与非门FA4使加减控制端M输入低电平,74HC191工作在加计数状态,可逆限幅计数器在采样时钟脉冲CP1的上升沿进行加计数。当P1为0,x13、x12、x11不同时为0时,与非门FA1、FA2均输出高电平,与非门FA3输出低电平,FC1的使能控制端CE输入低电平,加减控制端M输入高电平,74HC191工作在减计数状态,可逆限幅计数器在采样时钟脉冲CP1的上升沿进行减计数。74HC191为同步二进制计数器,只在其时钟输入端CP输入的采样时钟脉冲CP1的上升沿时刻P1的状态来控制其是否进行计数以及进行加计数还是减计数;在CP1的非上升沿时刻,P1造成使能控制端CE、加减控制端M的改变不影响74HC191输出的x13、x12、x11。在时钟输入端CP低电平期间,P1造成使能控制端CE、加减控制端M的改变会影响74HC191的进位/借位信号,在图3的实施例中并没有用到74HC191的进位/借位信号,因此没有影响。可逆限幅计数器的输出由采样时钟脉冲上升沿时刻的P1值来控制改变,即可逆限幅计数器的输出与采样时钟脉冲上升沿时刻P1的采样值相关,受采样时钟脉冲上升沿时刻P1的采样值控制。可逆限幅计数器的输出也可以由采样时钟脉冲下降沿时刻的P1值来控制改变。When P1 is 1, x13 and x12 are 1 at the same time, the NAND gate FA1 outputs a low level, the NAND gate FA3 outputs a high level, the enable control terminal CE of FC1 inputs a high level, and the 74HC191 works in the hold state, that is The reversible limiter counter keeps the output state unchanged at the rising edge of the sampling clock pulse CP1, and the reversible limiter counter is in the upper limit limit state and does not count up; x13 and x12 are 1 at the same time, including two cases, x13, x12, When x11 is 1, 1, and 0, the output of the reversible limiter counter is equal to the upper limit value of 6; when x13, x12, and x11 are 1, 1, and 1, the output of the reversible limiter counter is equal to 7, and it is in an over-limit state. Only the initial state when the system is started may appear. After the reversible limiter counts down and enters the normal limiter count range, the over-limit state of the output will not appear again. When P1 is 0, x13, x12, and x11 are 0 at the same time, the NAND gate FA2 outputs a low level, the NAND gate FA3 outputs a high level, the enable control terminal CE of FC1 inputs a high level, and the 74HC191 works in the hold state , that is, the reversible slice counter keeps the output state unchanged at the rising edge of the sampling clock pulse CP1, and the reversible slice counter is in the lower limit slice state and does not count down. The initial pulse P1 has two states of high level and low level, that is, the initial pulse P1 has two states of 1 and 0. The two states of the initial pulse P1 control the reversible limiter counter to count up or down the sampling clock pulse CP1 respectively. count. When P1 is 1, and x13 and x12 are not 1 at the same time, NAND gates FA1 and FA2 both output high level, NAND gate FA3 outputs low level, the enable control terminal CE of FC1 inputs low level, and P1 passes the AND The non-gate FA4 makes the addition and subtraction control terminal M input low level, 74HC191 works in the counting state, and the reversible limiter counts up on the rising edge of the sampling clock pulse CP1. When P1 is 0, and x13, x12, and x11 are not 0 at the same time, NAND gates FA1 and FA2 both output high level, NAND gate FA3 outputs low level, and the enable control terminal CE of FC1 inputs low level, plus Minus control terminal M inputs a high level, 74HC191 works in a down counting state, and the reversible limiter counts down on the rising edge of the sampling clock pulse CP1. 74HC191 is a synchronous binary counter, and it is only controlled by the state of P1 at the rising edge of the sampling clock pulse CP1 input from its clock input terminal CP to control whether it counts and counts up or down; at the non-rising edge of CP1, P1 causes The changes of the enable control terminal CE and the addition and subtraction control terminal M do not affect the x13, x12, and x11 output by the 74HC191. During the low level period of the clock input terminal CP, the change of the enable control terminal CE and the addition and subtraction control terminal M caused by P1 will affect the carry/borrow signal of the 74HC191. In the embodiment of Figure 3, the carry/borrow signal of the 74HC191 is not used. Borrow signal and therefore have no effect. The output of the reversible limiter counter is controlled and changed by the value of P1 at the rising edge of the sampling clock pulse, that is, the output of the reverse limiter counter is related to the sampling value at the rising edge of the sampling clock pulse P1, and is subject to the sampling of the rising edge of the sampling clock. value control. The output of the reversible limiter counter can also be controlled and changed by the value of P1 at the falling edge of the sampling clock pulse.
N为其他数值时,可以增减图3中进行计数限幅控制的与非门数量,以及增减各与非门的输入信号数量来实现。可逆限幅计数器的功能也可以采用其他器件或者是电路来实现,例如,采用74HC190、CD4516等替换74HC191,或者是采用触发器和门电路组成同步可逆计数器。When N is other values, it can be realized by increasing or decreasing the number of NAND gates for counting and limiting control in Figure 3, and by increasing or decreasing the number of input signals of each NAND gate. The function of the reversible limiter counter can also be realized by other devices or circuits. For example, 74HC191 can be replaced by 74HC190, CD4516, etc., or a synchronous reversible counter can be composed of flip-flops and gate circuits.
图4为N=6时比较阈值设定器的实施例。图4中,+VCC为供电电源,GND为公共地,电阻R91、R92、R93和开关K91、K92、K93组成上限比较阈值Y1设定电路;当K91、K92、K93分别处于断开、闭合、断开状态时,比较阈值设定器输出的上限比较阈值Y1为5,其3位二进制输出y13、y12、y11为1、0、1。电阻R94、R95、R96和开关K94、K95、K96组成下限比较阈值Y2设定电路;当K94、K95、K96分别处于闭合、闭合、断开状态时,比较阈值设定器输出的下限比较阈值Y2为1,其3位二进制输出y23、y22、y21为0、0、1。比较阈值设定器还可以由二进制拨码开关,或者是BCD拨码开关,或者是控制0、1输出的多个上拉电阻及电路短接点,以及其他能够输出多位二进制设定值的电路组成。FIG. 4 is an embodiment of a comparison threshold setter when N=6. In Figure 4, +VCC is the power supply, GND is the common ground, resistors R91, R92, R93 and switches K91, K92, K93 form the upper limit comparison threshold Y1 setting circuit; In the off state, the upper limit comparison threshold Y1 output by the comparison threshold setter is 5, and its 3-bit binary outputs y13, y12, and y11 are 1, 0, and 1. Resistors R94, R95, R96 and switches K94, K95, K96 form a lower limit comparison threshold Y2 setting circuit; when K94, K95, K96 are in the closed, closed, and open states respectively, the lower limit comparison threshold Y2 output by the comparison threshold setter is 1, its 3-bit binary output y23, y22, y21 is 0, 0, 1. The comparison threshold setter can also be a binary DIP switch, or a BCD DIP switch, or multiple pull-up resistors and circuit short contacts that control the output of 0 and 1, and other circuits that can output multi-bit binary setting values. composition.
上限值比较器的功能是,当输入的限幅累积计数值大于等于上限比较阈值时,令第一置位信号有效,否则第一置位信号无效。图5为N=6时上限值比较器的实施例,由四位二进制数值比较器FC2和或门FO1组成上限值比较器,FC2的型号为74HC85。限幅累积计数值X1的3位二进制输出x13、x12、x11分别连接至FC2的A2、A1、A0输入端,上限比较阈值Y1的3位二进制输出y13、y12、y11分别连接至FC2的B2、B1、B0输入端,输入端A3、B3均输入0。FC2的输入端A>B IN和A<B IN均输入0,输入端A=B IN输入1。FC2的输出端A>B OUT、A=B OUT分别连接至或门FO1的输入端,或门FO1的输出端为第一置位信号SE1。图5中上限值比较器实现的功能是,当限幅累积计数值X1大于等于上限比较阈值Y1时,输出SE1为高电平,否则SE1为低电平。图5中SE1为高电平有效;将或门FO1改为或非门,则SE1为低电平有效。The function of the upper limit comparator is to make the first set signal valid when the input limiter cumulative count value is greater than or equal to the upper limit comparison threshold, otherwise the first set signal is invalid. Fig. 5 is an embodiment of the upper limit comparator when N=6. The upper limit comparator is composed of a four-bit binary value comparator FC2 and an OR gate FO1, and the model of FC2 is 74HC85. The 3-bit binary outputs x13, x12, and x11 of the limiter cumulative count value X1 are respectively connected to the A2, A1, and A0 input terminals of FC2, and the 3-bit binary outputs y13, y12, and y11 of the upper limit comparison threshold Y1 are respectively connected to the B2, A1, and A0 terminals of FC2. B1, B0 input terminal, input terminal A3,
下限值比较器的功能是,当输入的限幅累积计数值小于等于下限比较阈值时,令第二置位信号有效,否则第二置位信号无效。图6为N=6时下限值比较器的实施例,由四位二进制数值比较器FC3和或门FO2组成下限值比较器,FC3的型号为74HC85。限幅累积计数值X1的3位二进制输出x13、x12、x11分别连接至FC3的A2、A1、A0输入端,下限比较阈值Y2的3位二进制输出y23、y22、y21分别连接至FC2的B2、B1、B0输入端,输入端A3、B3均接0。FC3的输入端A>B IN和A<B IN均接0,输入端A=B IN接1。FC3的输出端A<B OUT、A=B OUT分别连接至或门FO2的输入端,或门FO2的输出端为第二置位信号RE1。图6中下限值比较器实现的功能是,当限幅累积计数值X1小于等于下限比较阈值Y2时,输出RE1为高电平,否则SE1为低电平。图6中RE1为高电平有效;将或门FO2改为或非门,则RE1为低电平有效。The function of the lower limit comparator is to make the second set signal valid when the input limiter cumulative count value is less than or equal to the lower limit comparison threshold, otherwise the second set signal is invalid. Fig. 6 is an embodiment of the lower limit value comparator when N=6, the lower limit value comparator is composed of a four-bit binary value comparator FC3 and an OR gate FO2, and the model of FC3 is 74HC85. The 3-bit binary outputs x13, x12, and x11 of the limiter cumulative count value X1 are respectively connected to the A2, A1, and A0 input terminals of FC3, and the 3-bit binary outputs y23, y22, and y21 of the lower limit comparison threshold Y2 are respectively connected to the B2, A1, and A0 terminals of FC2. B1, B0 input terminals, input terminals A3, B3 are connected to 0. The input terminals A>B IN and A<B IN of FC3 are both connected to 0, and the input terminal A=B IN is connected to 1. The output terminals A<B OUT and A=B OUT of FC3 are respectively connected to the input terminals of the OR gate FO2, and the output terminal of the OR gate FO2 is the second set signal RE1. The function implemented by the lower limit comparator in FIG. 6 is that when the limiter accumulated count value X1 is less than or equal to the lower limit comparison threshold Y2, the output RE1 is high, otherwise SE1 is low. In Figure 6, RE1 is active high; if the OR gate FO2 is changed to a NOR gate, RE1 is active low.
当N值较大时,可以选择2片或者多片74HC85组成多位二进制数值比较器实现上限值比较器或者下限值比较器的功能;也可以采用1片或者多片四位二进制数值比较器CD4063实现上限值比较器或者下限值比较器的功能,或者是采用其他组合逻辑电路来实现上限值比较器或者下限值比较器的功能。When the N value is large, two or more pieces of 74HC85 can be selected to form a multi-bit binary value comparator to realize the function of the upper limit value comparator or the lower limit value comparator; one or more pieces of four-bit binary value comparison can also be used. The CD4063 implements the function of the upper limit value comparator or the lower limit value comparator, or uses other combinational logic circuits to realize the function of the upper limit value comparator or the lower limit value comparator.
图7为RS触发器实施例。图7中,或非门FO3、FO4组成RS触发器,第一置位信号SE1为RS触发器的置位信号,第二置位信号RE1为RS触发器的复位信号,均高电平有效;计数脉冲P2从RS触发器的同相输出端,即FO4的输出端输出。计数脉冲P2也可以从RS触发器的反相输出端,即或非门FO3输出端输出。RS触发器还可以采用其他形式的RS触发器。FIG. 7 is an embodiment of an RS flip-flop. In Figure 7, the NOR gates FO3 and FO4 form an RS flip-flop, the first set signal SE1 is the set signal of the RS flip-flop, and the second set signal RE1 is the reset signal of the RS flip-flop, both of which are active high; The count pulse P2 is output from the non-inverting output terminal of the RS flip-flop, that is, the output terminal of FO4. The count pulse P2 can also be output from the inverting output terminal of the RS flip-flop, that is, the output terminal of the NOR gate FO3. RS flip-flops may also adopt other forms of RS flip-flops.
上述N=6的实施例中,上限比较阈值Y1取值为5,下限比较阈值Y2取值为1。当限幅累积计数值X1大于等于5时,输出SE1为高电平,将计数脉冲P2置为1;当限幅累积计数值X1小于等于1时,输出RE1为高电平,将计数脉冲P2置为0。In the above-mentioned embodiment of N=6, the upper limit comparison threshold Y1 takes a value of 5, and the lower limit comparison threshold Y2 takes a value of 1. When the limiter cumulative count value X1 is greater than or equal to 5, the output SE1 is high level, and the count pulse P2 is set to 1; when the limiter cumulative count value X1 is less than or equal to 1, the output RE1 is high level, and the count pulse P2 is set to 0.
图8为1#脉冲产生电路实施例。1#继电器开关KA1与负载电阻RA1串联后,接至供电电源V1、V2上;降压电阻R11与双向稳压管VD1串联后,再并联至负载电阻RA1两端;U11是双向输入光耦,限流电阻R12与U11输入端双向发光二极管串联后再并联至双向稳压管VD1两端;上拉电阻R13为U11输出三极管的集电极负载电阻;初始脉冲P1从U11输出三极管的集电极输出。交直流切换开关K11与降压电容C11串联后再并联至降压电阻R11两端。图8实施例中,继电器开关KA1为常开开关;继电器开关也可以为常闭开关,例如,图8实施例中的KA1可以更换为常闭开关,电路的其他部分维持不变。FIG. 8 is an embodiment of a 1# pulse generating circuit. 1# Relay switch KA1 is connected in series with the load resistor RA1, and then connected to the power supply V1 and V2; the step-down resistor R11 is connected in series with the bidirectional voltage regulator tube VD1, and then connected in parallel to both ends of the load resistor RA1; U11 is a bidirectional input optocoupler, The current limiting resistor R12 is connected in series with the bidirectional light-emitting diode at the input end of U11 and then connected in parallel to both ends of the bidirectional voltage regulator tube VD1; the pull-up resistor R13 is the collector load resistance of the output triode of U11; the initial pulse P1 is output from the collector of the output triode of U11. The AC/DC switch K11 is connected in series with the step-down capacitor C11 and then connected in parallel to both ends of the step-down resistor R11. In the embodiment of FIG. 8 , the relay switch KA1 is a normally open switch; the relay switch can also be a normally closed switch. For example, the KA1 in the embodiment of FIG. 8 can be replaced with a normally closed switch, and other parts of the circuit remain unchanged.
图8中测试供电电源V1、V2为直流电源时,V1为正、V2为负,或者是V1为负、V2为正均可,此时交直流切换开关K11断开。KA1断开时,负载电阻RA1上没有电压,U11的输出三极管截止,初始脉冲P1为高电平。KA1接通时,负载电阻RA1上的电压经R11降压和VD1稳压后,经R12控制U11的输入二极管发光,U11的输出三极管饱和导通,初始脉冲P1为低电平。KA1通断一次,初始脉冲P1输出一个带边沿抖动窄脉冲干扰的脉冲。In Figure 8, when the test power supplies V1 and V2 are DC power supplies, V1 is positive and V2 is negative, or V1 is negative and V2 is positive. At this time, the AC-DC switch K11 is turned off. When KA1 is disconnected, there is no voltage on the load resistor RA1, the output transistor of U11 is turned off, and the initial pulse P1 is high. When KA1 is turned on, after the voltage on the load resistor RA1 is stepped down by R11 and stabilized by VD1, the input diode of U11 is controlled by R12 to emit light, the output transistor of U11 is saturated and turned on, and the initial pulse P1 is low level. KA1 is switched on and off once, and the initial pulse P1 outputs a pulse with edge jitter and narrow pulse interference.
图8中测试供电电源V1、V2为交流电源时,V1、V2之间正负交替变化,此时交直流切换开关K11接通。KA1断开时,负载电阻RA1上没有电压,U11的输出三极管截止,初始脉冲P1为高电平。KA1接通时,负载电阻RA1上非过零点的交流电压经R11降压和VD1稳压后,经R12控制U11的输入二极管发光,U11的输出三极管饱和导通,初始脉冲P1为低电平;负载电阻RA1上的交流电压过零时,其电压低,不足以驱动U11的输入二极管发光,U11的输出三极管截止,初始脉冲P1为高电平;因此,KA1接通时,初始脉冲P1为低电平占比多、高电平占比少的脉冲,或者称此时初始脉冲P1为低电平,但其中有正窄脉冲干扰;KA1通断一次,初始脉冲P1输出一个带边沿抖动窄脉冲干扰和正窄脉冲干扰的脉冲。In Fig. 8, when the test power supply V1 and V2 are AC power, the positive and negative of V1 and V2 change alternately, and the AC-DC switch K11 is turned on at this time. When KA1 is disconnected, there is no voltage on the load resistor RA1, the output transistor of U11 is turned off, and the initial pulse P1 is high. When KA1 is turned on, the AC voltage of the non-zero-crossing point on the load resistor RA1 is stepped down by R11 and stabilized by VD1, and then the input diode of U11 is controlled by R12 to emit light, the output transistor of U11 is saturated and turned on, and the initial pulse P1 is low level; When the AC voltage on the load resistor RA1 crosses zero, its voltage is low enough to drive the input diode of U11 to emit light, the output transistor of U11 is turned off, and the initial pulse P1 is high; therefore, when KA1 is turned on, the initial pulse P1 is low A pulse with a large proportion of level and a small proportion of high level, or the initial pulse P1 is a low level at this time, but there is positive narrow pulse interference; KA1 is turned on and off once, and the initial pulse P1 outputs a narrow pulse with edge jitter Pulses of interference and positive narrow pulse interference.
改变负载电阻RA1的大小,可以调整待检测继电器开关KA1的阻性负载电流的大小。当图8中测试供电电源V1、V2为交流电源时,负载电阻RA1也可以改为感性负载或者是容性负载。图8中的VD1也可以选择双向TVS管。当测试供电电源V1、V2恒为直流电时,可以将图8中的交直流切换开关K11和降压电容C11去掉,VD1选择单向稳压管或者单向TVS管,U11选择单向输入光耦。当测试供电电源V1、V2恒为交流电时,可以将图8中的交直流切换开关K11去掉,降压电容C11直接并联至降压电阻R11两端。脉冲产生电路也可以采用图8之外其他形式的电路。By changing the size of the load resistance RA1, the magnitude of the resistive load current of the relay switch KA1 to be detected can be adjusted. When the test power supply V1 and V2 in FIG. 8 are AC power, the load resistance RA1 can also be changed to an inductive load or a capacitive load. VD1 in Figure 8 can also choose a bidirectional TVS tube. When the test power supply V1 and V2 are always DC, the AC/DC switch K11 and the step-down capacitor C11 in Figure 8 can be removed, VD1 selects a one-way voltage regulator or one-way TVS tube, and U11 selects a one-way input optocoupler . When the test power supplies V1 and V2 are always AC, the AC/DC switch K11 in Figure 8 can be removed, and the step-down capacitor C11 is directly connected in parallel to both ends of the step-down resistor R11. The pulse generating circuit can also use circuits other than those shown in FIG. 8 .
图9为N=6时抗脉冲干扰电路抗干扰效果示意图。图9中给出了15个采样时钟脉冲CP1对初始脉冲P1的采样值P1*,每个采样点的限幅累积计数值X1,以及得到的计数脉冲P2。采样值P1*为采样时钟脉冲CP1计数边沿时初始脉冲P1的值;由初始脉冲P1的2种状态分别控制可逆限幅计数器对采样时钟脉冲CP1进行加计数或者减计数,实质是由采样时钟脉冲CP1计数边沿时初始脉冲P1的值分别控制可逆限幅计数器对采样时钟脉冲CP1进行加计数或者减计数。设在图9中CP1的采样点1之前的限幅累积计数值X1为0,计数脉冲P2为0。图9中,初始脉冲P1在CP1的采样点2出现了正脉冲干扰,导致X1在采样点2采样得到P1*的干扰值1;初始脉冲P1在CP1的采样点4至采样点5之间出现了正窄脉冲干扰,但该正窄脉冲宽度小于采样周期且处于2个采样点之间,未影响采样结果P1*,即采样过程自动滤除了该正窄脉冲干扰。初始脉冲P1在CP1的采样点6之后开始从0变1,从0变1过程中出现了2次边沿抖动(或者是包括有正窄脉冲干扰和边沿抖动),其中的第2个正窄脉冲抖动干扰被采样过程自动滤除,采样点7、采样点8的值分别为1、0。图9中,在时钟脉冲CP1的采样点1至采样点15得到的采样值P1*、计数脉冲P2和限幅累积计数值X1见表1。FIG. 9 is a schematic diagram of the anti-interference effect of the anti-pulse interference circuit when N=6. Fig. 9 shows the sampling value P1* of the initial pulse P1 by the 15 sampling clock pulses CP1, the limit accumulated count value X1 of each sampling point, and the obtained count pulse P2. The sampling value P1* is the value of the initial pulse P1 when the sampling clock pulse CP1 counts the edge; the two states of the initial pulse P1 respectively control the reversible limiter counter to count up or down the sampling clock pulse CP1. When CP1 counts the edge, the value of the initial pulse P1 respectively controls the reversible limiter counter to count up or down the sampling clock pulse CP1. It is assumed that the limiter accumulation count value X1 before the
表1采样点1-15的采样值P1*、限幅累积计数值X1和计数脉冲P2Table 1 Sampling value P1*, limit accumulated count value X1 and count pulse P2 of sampling point 1-15
观察表1中采样点的情况,在采样点1-9,X1小于等于Y2,RE1有效,SE1无效,P2被置为0;在采样点10-12,X1大于Y2且小于Y1,SE1、RE1均无效,P2维持为0;在采样点13-15,X1大于等于Y1,SE1有效,RE1无效,P2被置为1。N=6时,可逆限幅计数器的计数区间为0-N;在表1中的采样点3,X1已经达到了下限幅值0,在采样点4-6,P1*=0(即此时的P1=0),X1也不再进行减计数,X1维持为下限幅值0;在采样点14,X1已经达到了上限幅值6,在采样点15,P1*=1(即此时的P1=1),X1也不再进行加计数,X1维持为上限幅值6。在采样点1-8,初始脉冲P1为脉冲产生电路输出的低电平状态,为低电平占比多、高电平占比少的脉冲,即中间包含了一些正窄脉冲干扰,但由于在此区间初始脉冲P1的低电平保持时间远大于正窄脉冲干扰所占的时间,这些正窄脉冲干扰未整体影响限幅累积计数值X1的变化区间,X1维持在0、1之间变化;即使是正窄脉冲干扰的影响再大一些,只要正窄脉冲干扰所占的时间比低电平保持时间小,则限幅累积计数值X1不会超过N/2,更难达到大于等于Y1,不会改变计数脉冲P2的状态。图9给出的是干扰脉冲过滤电路在初始脉冲P1为0时的抗正脉冲干扰效果,以及初始脉冲P1由0变为1的条件与过程。干扰脉冲过滤电路在初始脉冲P1为1时的抗负脉冲干扰效果,以及初始脉冲P1由1变为0的条件与过程,与初始脉冲P1为0时的抗正脉冲干扰效果,以及初始脉冲P1由0变为1的条件与过程相同。同样地,在初始脉冲P1的高电平状态中间包含了一些负窄脉冲干扰时,至于在此期间初始脉冲P1的高电平保持时间大于负窄脉冲干扰所占的时间,则限幅累积计数值X1不会小于N/2,更难达到小于等于Y2,不会改变计数脉冲P2的状态。Observe the situation of the sampling points in Table 1. At sampling points 1-9, X1 is less than or equal to Y2, RE1 is valid, SE1 is invalid, and P2 is set to 0; at sampling points 10-12, X1 is greater than Y2 and less than Y1, SE1, RE1 are invalid, and P2 remains 0; at sampling points 13-15, when X1 is greater than or equal to Y1, SE1 is valid, RE1 is invalid, and P2 is set to 1. When N=6, the count interval of the reversible limiter counter is 0-N; at
设在时钟脉冲CP1的采样点31之前的限幅累积计数值X1为6,计数脉冲P2为1。采样点31至采样点45得到的采样值P1*、限幅累积计数值X1和计数脉冲P2见表2。It is assumed that the slice accumulated count value X1 before the sampling point 31 of the clock pulse CP1 is 6, and the count pulse P2 is 1. See Table 2 for the sampling value P1*, the limit accumulated count value X1 and the count pulse P2 obtained from the sampling point 31 to the sampling point 45.
表2采样点31-45的采样值P1*、限幅累积计数值X1和计数脉冲P2Table 2 Sampling value P1*, limit accumulated count value X1 and count pulse P2 of sampling points 31-45
观察表2中采样点的情况,在采样点31-32,X1大于等于Y1,SE1有效,RE1无效,P2置为1;在采样点33,X1大于Y2且小于Y1,SE1、RE1均无效,P2维持为1;在采样点34,X1大于等于Y1,SE1有效,RE1无效,P2置为1;在采样点35-39,X1大于Y2且小于Y1,SE1、RE1均无效,P2维持为1;由于在采样点31-40之间,采样值P1*处于0多1少状态,可逆限幅计数器累积计数的结果是限幅累积计数值X1趋向于减小,到采样点40,X1小于等于Y2,RE1有效,SE1无效,P2置为0;在采样点41,X1大于Y2且小于Y1,SE1、RE1均无效,P2维持为0;在采样点42-45,X1小于等于Y2,RE1有效,SE1无效,P2置为0。在表2中的采样点43,X1已经达到了下限幅值0,在采样点44-45,P1*=0(即此时的P1=0),X1也不再进行减计数,X1维持为下限幅值0。Observe the sampling points in Table 2. At sampling points 31-32, X1 is greater than or equal to Y1, SE1 is valid, RE1 is invalid, and P2 is set to 1; at sampling point 33, X1 is greater than Y2 and less than Y1, SE1 and RE1 are invalid, P2 remains 1; at sampling point 34, X1 is greater than or equal to Y1, SE1 is valid, RE1 is invalid, and P2 is set to 1; at sampling points 35-39, X1 is greater than Y2 and less than Y1, SE1 and RE1 are invalid, and P2 remains at 1 ;Because between the sampling points 31-40, the sampling value P1* is in the state of 0 more than 1 Y2, RE1 is valid, SE1 is invalid, P2 is set to 0; at sampling point 41, X1 is greater than Y2 and less than Y1, SE1 and RE1 are invalid, P2 remains at 0; at sampling points 42-45, X1 is less than or equal to Y2, RE1 is valid , SE1 is invalid, and P2 is set to 0. At the sampling point 43 in Table 2, X1 has reached the lower limit value of 0. At the sampling points 44-45, P1*=0 (that is, P1=0 at this time), X1 is no longer counted down, and X1 remains as The lower limit value is 0.
在本N=6的实施例中,计数脉冲P2与初始脉冲P1之间为同相关系。如果将可逆限幅计数器的功能改为:P1=1时,可逆限幅计数器进行减计数;P1=0时,可逆限幅计数器进行加计数,则计数脉冲P2与初始脉冲P1之间为反相关系。或者是在图7中将计数脉冲P2改为从或非门FO3输出,则计数脉冲P2与初始脉冲P1之间为反相关系。如果同时进行上述修改,则计数脉冲P2与初始脉冲P1之间又为同相关系。In this embodiment of N=6, the count pulse P2 and the initial pulse P1 are in an in-phase relationship. If the function of the reversible limiter counter is changed to: when P1=1, the reversible limiter counter will count down; when P1=0, the reversible limiter counter will count up, and the phase between the count pulse P2 and the initial pulse P1 will be reversed. relation. Or in FIG. 7 , the count pulse P2 is changed to be output from the NOR gate FO3, and the count pulse P2 and the initial pulse P1 are in an inverse relationship. If the above modification is carried out at the same time, the relationship between the count pulse P2 and the initial pulse P1 is in phase again.
以计数脉冲P2与初始脉冲P1之间为同相关系为例,从表1、表2及电路的工作原理可以得出结论,由于可逆限幅计数器具有累积效应,当初始脉冲P1的采样值在一段时间之内1的数量多于0的数量时,限幅累积计数值X1会趋向增大,使X1大于等于Y1并将计数脉冲P2置为1;当初始脉冲P1的采样值在一段时间之内0的数量多于1的数量时,限幅累积计数值X1会趋向减小,使X1小于等于Y2并将计数脉冲P2置为0;该特性使本发明电路的限幅计数单元具有自启动能力,限幅作用及初始脉冲P1采样值P1*中的0,会使限幅计数单元进入正常的限幅计数区间进行限幅加减计数。当初始的限幅累积计数值X1大于N,处于超限状态时,X1大于等于上限比较阈值Y1,上限值比较器输出的SE1有效,下限值比较器输出RE1的无效,P2被置为1。Taking the in-phase relationship between the counting pulse P2 and the initial pulse P1 as an example, it can be concluded from Table 1, Table 2 and the working principle of the circuit that due to the cumulative effect of the reversible limiter counter, when the sampling value of the initial pulse P1 is in the When the number of 1s is more than the number of 0s within a period of time, the limiter cumulative count value X1 will tend to increase, so that X1 is greater than or equal to Y1 and the count pulse P2 is set to 1; when the sampling value of the initial pulse P1 is within a period of time. When the number of 0s is greater than the number of 1s, the limiter cumulative count value X1 will tend to decrease, so that X1 is less than or equal to Y2 and the count pulse P2 is set to 0; this feature enables the limiter counting unit of the circuit of the present invention to have self-start Capability, limit function and 0 in the initial pulse P1 sampling value P1* will cause the limiter counting unit to enter the normal limiter count interval to perform limiter addition and subtraction counting. When the initial limiter accumulative count value X1 is greater than N and is in the over-limit state, X1 is greater than or equal to the upper limit comparison threshold Y1, the SE1 output by the upper limit comparator is valid, the lower limit comparator output RE1 is invalid, and P2 is set to 1.
由于上限比较阈值Y1为大于N/2且小于等于N的整数,下限比较阈值Y2为大于等于0且小于N/2的整数,第一置位信号SE1和第二置位信号RE1不可能同时有效,因此,RS触发器的输出不会出现逻辑状态不确定的情况。Since the upper limit comparison threshold Y1 is an integer greater than N/2 and less than or equal to N, and the lower limit comparison threshold Y2 is an integer greater than or equal to 0 and less than N/2, the first set signal SE1 and the second set signal RE1 cannot be active at the same time , therefore, the output of the RS flip-flop will not have an indeterminate logic state.
以计数脉冲P2与初始脉冲P1之间为同相关系为例做进一步的说明。当初始脉冲P1使限幅累积计数值X1小于等于下限比较阈值Y2,计数脉冲P2置为0后,只要限幅累积计数值X1一直小于上限比较阈值Y1,则计数脉冲P2不会变为1;当初始脉冲P1使限幅累积计数值X1大于等于上限比较阈值Y1,计数脉冲P2置为1后,只要限幅累积计数值X1一直大于下限比较阈值Y2,则计数脉冲P2不会变为0。当P1、P2都为低电平时,只要在P1中出现的正脉冲使P1采样值中连续出现大于等于Y1个为1的值,或者是,在连续Y1+2个P1采样值中出现Y1+1个为1的值,等等,则能够从P2输出与该P1中正脉冲相对应的正脉冲;当P1、P2都为高电平时,只要在P1中出现的负脉冲使P1采样值中连续出现大于等于N-Y2个为0的值,或者是,在连续N-Y2+2个P1采样值中出现N-Y2+1个为0的值,等等,则能够从P2输出与该P1中负脉冲相对应的负脉冲。当初始脉冲P1由0变为1后,计数脉冲P2需要限幅累积计数值X1经过几个采样脉冲周期的加计数延迟,才能使限幅累积计数值X1大于等于上限比较阈值Y1,将P2置1;当初始脉冲P1由1变为0后,计数脉冲P2需要限幅累积计数值X1经过几个采样脉冲周期的减计数延迟,才能使限幅累积计数值X1小于等于下限比较阈值Y2,将P2置0。当上限比较阈值Y1的取值越大时,计数脉冲P2从0变1的条件更加苛刻,电路的低电平抗正脉冲干扰效果更好;当下限比较阈值Y2的取值越小时,计数脉冲P2从1变0的条件更加苛刻,电路的高电平抗负脉冲干扰效果更好。当N的取值变大时,干扰脉冲过滤电路将计数脉冲P2从0变1,以及从1变0的条件变严格,抗干扰效果变好,但计数脉冲P2相对于初始脉冲P1的延迟时间变大;当N的取值变小时,干扰脉冲过滤电路将计数脉冲P2从0变1,以及从1变0的条件变宽,抗干扰效果变小,但计数脉冲P2相对于初始脉冲P1的延迟时间变小。Further description is given by taking the in-phase relationship between the count pulse P2 and the initial pulse P1 as an example. When the initial pulse P1 makes the limiter cumulative count value X1 less than or equal to the lower limit comparison threshold Y2, and the count pulse P2 is set to 0, as long as the limiter cumulative count value X1 is always smaller than the upper limit comparison threshold Y1, the count pulse P2 will not become 1; When the initial pulse P1 makes the limiter cumulative count value X1 greater than or equal to the upper limit comparison threshold Y1, and the count pulse P2 is set to 1, as long as the limiter cumulative count value X1 is always greater than the lower limit comparison threshold Y2, the count pulse P2 will not become 0. When both P1 and P2 are at low level, as long as the positive pulse that appears in P1 makes P1 sampling values greater than or equal to Y1 values of 1 continuously appear, or, Y1+ appears in successive Y1+2 P1 sampling values A value of 1, etc., can output a positive pulse corresponding to the positive pulse in the P1 from P2; when both P1 and P2 are high, as long as the negative pulse that appears in P1 makes the P1 sampling value continuous If there are more than or equal to N-Y2 values of 0, or, N-
图10为三态输出计数电路实施例。图10(a)为三态输出计数电路实施例1,由计数器FC4和非门FN1组成,FC4为带三态输出的8位二进制计数器74HC590。FC4的计数允许端CCKEN输入0,清0控制端CCLR为三态输出计数电路的清0信号CLR输入端;清0信号CLR低电平有效,即控制器单元输出的清0信号CLR为低电平时,计数器FC4中的通断计数值被清0;控制器单元输出的清0信号CLR为高电平时,FC4工作在加计数状态,计数脉冲P2直接连接至FC4的计数脉冲输入端CCK,FC4在计数脉冲P2的上升沿加1计数,得到通断计数值。计数脉冲P2经非门FN1连接至FC4数据锁存端RCK,FC4内部计数器的内容在计数脉冲P2的下降沿被锁存至输出锁存器。选通控制信号CS1连接至FC4的输出使能控制端G,CS1为低电平时,FC4将输出锁存器中的通断计数值CV1从Q7-Q0输出;CS1为高电平时,FC4的Q7-Q0为高阻状态。三态输出计数电路实施例1输出的通断计数值为8位二进制计数值。FIG. 10 is an embodiment of a three-state output counting circuit. Figure 10 (a) is the first embodiment of the tri-state output counting circuit, which is composed of a counter FC4 and a non-gate FN1, and FC4 is an 8-bit binary counter 74HC590 with tri-state output. FC4's counting enable
图10(b)为三态输出计数电路实施例2,由计数器FC5和三态缓冲器FB1组成,FC5为4位二进制计数器74HC161,FB1为三态缓冲器74HC244。FC5的计数控制端CTP和CTR,以及置数控制端LD均连接至1,清0控制端CR为三态输出计数电路的清0信号CLR输入端;清0信号CLR低电平有效,即控制器单元输出的清0信号CLR为低电平时,计数器FC5中的通断计数值被清0;控制器单元输出的清0信号CLR为高电平时,FC5工作在加计数状态,计数脉冲P2直接连接至FC5的计数脉冲输入端CP,FC5在计数脉冲P2的上升沿加1计数,得到通断计数值。三态缓冲器FB1的4位数据输入端A3-A0分别连接至计数器FC5的4位计数值输出端Q3-Q0,选通控制信号CS1连接至FB1的输出使能控制端1G,CS1为低电平时,FB1将计数器FC5输出的通断计数值CV1从Y3-Y0输出;CS1为高电平时,FB1的Y3-Y0为高阻状态。三态输出计数电路实施例2输出的通断计数值为4位二进制计数值。Figure 10(b) shows the second embodiment of the tri-state output counting circuit, which is composed of a counter FC5 and a tri-state buffer FB1, FC5 is a 4-bit binary counter 74HC161, and FB1 is a tri-state buffer 74HC244. The counting control terminals CTP and CTR of FC5, and the number setting control terminal LD are connected to 1, and the clearing control terminal CR is the input terminal of the clearing signal CLR of the three-state output counting circuit; the clearing signal CLR is active at a low level, that is, the control When the clear signal CLR output by the controller unit is low level, the on-off count value in the counter FC5 is cleared to 0; when the clear signal CLR output by the controller unit is high level, FC5 works in the counting state, and the counting pulse P2 directly Connected to the count pulse input terminal CP of FC5, FC5 adds 1 to count on the rising edge of count pulse P2 to obtain the on-off count value. The 4-bit data input terminals A3-A0 of the tri-state buffer FB1 are respectively connected to the 4-bit count value output terminals Q3-Q0 of the counter FC5, the gating control signal CS1 is connected to the output enable
L=4时继电器寿命检测装置实施例中,2#通断计数单元、3#通断计数单元和4#通断计数单元采用与1#通断计数单元相同的电路组成与结构,即所有通断计数单元中都包括有脉冲产生电路、抗脉冲干扰电路和三态输出计数电路;所有脉冲产生电路、抗脉冲干扰电路、三态输出计数电路的组成与结构均相同。In the embodiment of the relay life detection device when L=4, the 2# on-off counting unit, the 3# on-off counting unit and the 4# on-off counting unit adopt the same circuit composition and structure as the 1# on-off counting unit, that is, all on-off counting units The off-counting unit includes a pulse generating circuit, an anti-pulse interference circuit and a tri-state output counting circuit; all pulse generating circuits, anti-pulse interference circuits, and tri-state output counting circuits have the same composition and structure.
图11为继电器驱动单元实施例。图11(a)为继电器线圈采用直流电源供电时的实施例,由三极管VT、续流二极管VD、基极电阻R61组成;待检测继电器的线圈并联在节点A1、A2上,继电器线圈的直流供电电源为+V。设图1实施例中的4个继电器开关包括在2个继电器中,图11(a)中,只并联了2个继电器线圈J1、J2。当控制器单元发出的继电器驱动信号C1为高电平时,并联在节点A1、A2上的所有继电器线圈得电;当控制器单元发出的继电器驱动信号C1为低电平时,并联在节点A1、A2上的所有继电器线圈失电;控制器单元发出的继电器驱动信号C1变化一个脉冲周期,则线圈并联在节点A1、A2上所有继电器中的继电器开关通断一次。当继电器线圈的数量多,图11(a)中三极管VT不足以全部驱动时,可以增加相同的或者类似的驱动电路,扩大驱动能力。FIG. 11 is an embodiment of a relay driving unit. Figure 11(a) is an embodiment when the relay coil is powered by a DC power supply, which is composed of a triode VT, a freewheeling diode VD, and a base resistor R61; the coil of the relay to be detected is connected in parallel to nodes A1 and A2, and the DC power supply of the relay coil The power supply is +V. Assuming that the four relay switches in the embodiment of FIG. 1 are included in two relays, in FIG. 11( a ), only two relay coils J1 and J2 are connected in parallel. When the relay drive signal C1 sent by the controller unit is at a high level, all the relay coils connected in parallel to nodes A1 and A2 are energized; when the relay drive signal C1 sent by the controller unit is at a low level, the parallel connection between nodes A1 and A2 All relay coils on the switch are de-energized; the relay drive signal C1 sent by the controller unit changes for one pulse period, and the relay switches in all the relays on the nodes A1 and A2 are connected in parallel with the coils on and off once. When the number of relay coils is large and the triode VT in Fig. 11(a) is not enough to drive all of them, the same or similar drive circuit can be added to expand the drive capability.
图11(b)为继电器线圈采用交流电源供电时的实施例,由电流驱动型固态继电器SSR1、压敏电阻RU1、限流电阻R62组成;待检测继电器的线圈并联在节点B1、B2上,继电器线圈的交流供电电源为AC0;+VCC为SSR1的电流驱动供电电源。设图1实施例中的4个继电器开关包括在2个继电器中,图11(b)中,只并联了2个继电器线圈J3、J4。当控制器单元发出的继电器驱动信号C2为低电平时,并联在节点B1、B2上的所有继电器线圈得电;当控制器单元发出的继电器驱动信号C2为高电平时,并联在节点B1、B2上的所有继电器线圈失电;控制器单元发出的继电器驱动信号C2变化一个脉冲周期,则线圈并联在节点B1、B2上所有继电器中的继电器开关通断一次。当继电器线圈的数量多,图11(b)中固态继电器SSR1不足以全部驱动时,可以增加相同的或者类似的驱动电路,扩大驱动能力。Figure 11(b) is an embodiment when the relay coil is powered by an AC power supply, which consists of a current-driven solid state relay SSR1, a varistor RU1, and a current limiting resistor R62; the coils of the relays to be detected are connected in parallel to nodes B1 and B2, and the relay The AC power supply of the coil is AC0; +VCC is the current drive power supply of SSR1. Assuming that the four relay switches in the embodiment of FIG. 1 are included in two relays, in FIG. 11( b ), only two relay coils J3 and J4 are connected in parallel. When the relay drive signal C2 sent by the controller unit is at low level, all the relay coils connected in parallel on nodes B1 and B2 are energized; when the relay drive signal C2 sent by the controller unit is at high level, they are connected in parallel at nodes B1 and B2. All the relay coils on the switch are de-energized; the relay drive signal C2 sent by the controller unit changes for one pulse period, and the relay switches in all the relays on the nodes B1 and B2 connected in parallel with the coils are turned on and off once. When the number of relay coils is large and the solid state relay SSR1 in Figure 11(b) is not enough to drive all of them, the same or similar drive circuit can be added to expand the drive capability.
当L个继电器开关所在的继电器中,同时存在采用直流电源供电的继电器线圈和采用交流电源供电的继电器线圈,则可以同时使用图11(a)、图11(b)电路来分类驱动。继电器驱动单元还可以根据需要采用其他电路。When there are relay coils powered by DC power supply and relay coils powered by AC power supply in the relay where the L relay switches are located, the circuits of Figure 11(a) and Figure 11(b) can be used to classify and drive at the same time. The relay drive unit can also use other circuits as required.
振荡器单元用于输出采样时钟脉冲CP1,可以选择各种多谐振荡器中的任何一种来组成振荡器单元。测试时,继电器开关通断的频率通常在10次/min至30次/min之间,初始脉冲来自于继电器开关的通断控制输出,其形成的脉冲高电平、低电平宽度接近或者大于1000ms,因此,采样时钟脉冲CP1的周期可以在8ms至48ms之间选择,且因为P1中正窄脉冲干扰的周期为10ms,采样时钟脉冲CP1应该避免为10ms整倍数的关系,N在5至10范围内取值。The oscillator unit is used to output the sampling clock pulse CP1, and any one of various multivibrators can be selected to form the oscillator unit. During the test, the on-off frequency of the relay switch is usually between 10 times/min and 30 times/min. The initial pulse comes from the on-off control output of the relay switch. 1000ms, therefore, the period of the sampling clock pulse CP1 can be selected between 8ms and 48ms, and because the period of the positive narrow pulse interference in P1 is 10ms, the sampling clock pulse CP1 should be avoided to be an integer multiple of 10ms, and N is in the range of 5 to 10 internal value.
人机界面单元优选使用触摸屏,采用RS485或者是RS232与控制器单元进行通信。人机界面单元也可以选择由按键电路和液晶显示器共同组成。The human-machine interface unit preferably uses a touch screen, and uses RS485 or RS232 to communicate with the controller unit. The man-machine interface unit can also be composed of a key circuit and a liquid crystal display.
所有通断计数单元的通断计数值均采用三态缓冲方式输出;所有通断计数单元的三态缓冲输出端口全部并联至控制器单元的计数数据输入端口,控制器单元发出选通控制信号分别使能各通断计数单元的三态缓冲输出端口,从计数数据输入端口读入被使能三态缓冲输出端口输出的通断计数值。三态输出计数电路实施例1中的通断计数值为8位二进制数据,通断计数单元的三态缓冲输出端口、控制器单元的计数数据输入端口均为8位并行端口;三态输出计数电路实施例2中的通断计数值为4位二进制数据,通断计数单元的三态缓冲输出端口、控制器单元的计数数据输入端口均为4位并行端口。当L值小且通断计数值的位数少时,通断计数单元的通断计数值可以不采用三态缓冲方式输出,而是将每个通断计数单元的通断计数值输出端口分别直接连接至控制器单元的不同并行端口;例如,L=4且通断计数值为4位二进制数值时,直接将4个通断计数单元的通断计数值输出端口连接至控制器单元的不同并行端口,只需要消耗控制器单元共16位I/O口线,即2个8位输入端口。The on-off count values of all on-off count units are output in tri-state buffer mode; the tri-state buffer output ports of all on-off count units are all connected in parallel to the count data input port of the controller unit, and the controller unit sends out gating control signals respectively The tri-state buffer output port of each on-off count unit is enabled, and the on-off count value output by the enabled tri-state buffer output port is read from the count data input port. The on-off count value in
控制器单元通过选通控制单元发出选通控制信号。选通控制单元为译码器电路,对控制器单元发出的通断计数单元地址编码信号进行译码,得到选通控制信号。图1的实施例中,与1#通断计数单元11、2#通断计数单元12、3#通断计数单元13、4#通断计数单元对应的通断计数单元地址编码信号分别为二进制00、01、10、11,译码输出为CS1、CS2、CS3、CS4;控制器单元逐个使CS1、CS2、CS3、CS4有效,使能各通断计数单元的三态缓冲输出端口,然后从计数数据输入端口IN1读入相应的通断计数值。实施例中选通控制单元的译码器电路可以选择74HC139,或者是74HC138,或者是采用门电路组成。当L值大时,译码器电路可以采用多片74HC139,或者是74HC138等组成的多级级联电路,或者是采用多个门电路组成。当L值小时,也可以省略选通控制单元,由控制器单元通过输出端口直接向各通断计数单元发出选通控制信号,例如,图1的实施例中,选通控制信号CS1、CS2、CS3、CS4可以直接由控制器单元10发出,无需采用选通控制单元。The controller unit sends a gating control signal through the gating control unit. The gating control unit is a decoder circuit, which decodes the address coding signal of the on-off counting unit sent by the controller unit to obtain the gating control signal. In the embodiment of FIG. 1, the on-off counting unit address coding signals corresponding to 1# on-off
控制器单元用于对整个继电器寿命检测装置进行控制,优选使用单片机作为核心来组成。控制器单元的核心也可以选择ARM,或者是DSP,或者是可编程序控制器。继电器寿命检测装置的检测控制过程包括以下步骤:The controller unit is used to control the entire relay life detection device, and is preferably composed of a single-chip microcomputer as the core. The core of the controller unit can also choose ARM, or DSP, or programmable controller. The detection and control process of the relay life detection device includes the following steps:
步骤1,初始化,包括将L个继电器开关的检测标志均置为在检状态,寿命计数器清0,发出清0信号使L个通断计数值全部清0;
步骤2,控制L个继电器开关通断一次,同时对L个继电器开关的通断次数分别进行计数得到L个通断计数值;寿命计数器进行加1计数;Step 2: Control the on-off times of the L relay switches once, and simultaneously count the on-off times of the L relay switches to obtain L on-off count values; the life counter adds 1 to count;
步骤3,读取当次L个通断计数值;
步骤4,逐个对检测标志为在检状态的继电器开关是否失效进行判断;将本次被判断为失效继电器开关的检测标志置为停检状态,同时将当前寿命计数器的计数值作为该次被判断为失效继电器开关的寿命值;Step 4: Judging whether the relay switch whose detection flag is in the state of inspection is invalid one by one; the detection flag of the relay switch which is judged to be invalid this time is set to the state of being stopped, and the count value of the current life counter is used as the judgment this time. is the life value of the fail relay switch;
步骤5,L个继电器开关的检测标志中仍有在检状态者,返回步骤2,否则停止检测。
控制L个继电器开关通断一次,是指控制器单元发出继电器驱动信号,通过继电器驱动单元使继电器开关通、断一次,例如,图11(a)中控制器单元发出的继电器驱动信号C1变化一个脉冲周期,或者是图11(b)中控制器单元发出的继电器驱动信号C2变化一个脉冲周期。寿命计数器为控制器单元中的一个软件计数器,控制器单元发出使继电器开关通、断一次的继电器驱动信号,寿命计数器计数值加1。同时对L个继电器开关的通断次数分别进行计数得到L个通断计数值,由控制器单元之外的L个通断计数单元分别进行。Controlling L relay switches on and off once means that the controller unit sends a relay drive signal, and the relay switches are turned on and off once through the relay drive unit. For example, the relay drive signal C1 sent by the controller unit in Figure 11(a) changes by one The pulse period, or the relay drive signal C2 sent by the controller unit in FIG. 11(b) changes by one pulse period. The life counter is a software counter in the controller unit. The controller unit sends a relay drive signal to make the relay switch on and off once, and the count value of the life counter is incremented by 1. At the same time, the on-off times of the L relay switches are respectively counted to obtain L on-off count values, which are respectively performed by the on-off count units other than the controller unit.
对检测标志为在检状态的继电器开关是否失效进行判断,方法是,待判断继电器开关被控制通断的次数与其通断计数值之间的误差小于E,则该继电器开关未失效,否则失效。当前寿命计数器的计数值为待判断继电器开关被控制通断的次数。具体的判断方法是,设通断计数值的最大计数值为G,将当前寿命计数器的计数值对G取模,得到余数Q;读取的待判断继电器开关通断计数值为K,则当|K-Q|<E,或者是|K-(Q-G)|<E,或者是|K-(Q+G)|<E三者之一得到满足时,则该继电器开关未失效,否则失效。通断计数值采用的是循环加计数方式,通断计数值达到三态输出计数电路的最大计数值G后再加1会溢出变为0;以三态输出计数电路实施例2输出的4位二进制通断计数值为例,其最大值为1111,下一次通断计数值为0;上述判断表达式中,将K与Q-G进行比较,是抵消K值加计数溢出后较小、而Q值较大的影响;将K与Q+G进行比较,是抵消K值较大、而Q值对G取模后较小的影响。由于E为大于等于1且小于等于G/2(G除以2)的整数,确定了误差E后,通断计数值的最大计数值G必须大于E的2倍;例如,确定E为3,则通断计数值的最大计数值G必须大于6,此时,十进制BCD计数器,或者是3位以上的二进制计数器均满足要求。读取的当次L个通断计数值中,对于检测标志为停检状态的继电器开关是否失效,控制器单元不再进行判断与处理。The method of judging whether the relay switch whose detection flag is in the state of inspection is invalid is that the error between the number of times the relay switch is controlled to be turned on and off and its on-off count value is less than E, then the relay switch is not invalid, otherwise it is invalid. The count value of the current life counter is the number of times the relay switch to be judged is controlled on and off. The specific judgment method is to set the maximum count value of the on-off count value to G, and take the count value of the current life counter modulo G to obtain the remainder Q; the read on-off count value of the relay switch to be judged is K, then when When either |K-Q|<E, or |K-(Q-G)|<E, or |K-(Q+G)|<E is satisfied, the relay switch does not fail, otherwise it fails. The on-off count value adopts the cyclic counting method. After the on-off count value reaches the maximum count value G of the tri-state output counting circuit, it will overflow and become 0; Take the binary on-off count value as an example, the maximum value is 1111, and the next on-off count value is 0; in the above judgment expression, comparing K with Q-G is to offset the K value plus the count overflow and the smaller value, and the Q value Larger influence; comparing K with Q+G is to offset the larger K value and the smaller effect of the Q value on G modulo. Since E is an integer greater than or equal to 1 and less than or equal to G/2 (G divided by 2), after determining the error E, the maximum count value G of the on-off count value must be greater than 2 times of E; for example, if E is determined to be 3, Then the maximum count value G of the on-off count value must be greater than 6. At this time, the decimal BCD counter or the binary counter with more than 3 digits can meet the requirements. In the current L on-off count values read, the controller unit no longer judges and processes whether the relay switch whose detection flag is in the stop-check state is invalid.
对检测标志为在检状态的继电器开关是否失效进行判断,也可以采用以下方法:待判断继电器开关的当次通断计数值与前次通断计数值不是增1关系时,则该继电器开关失效,否则未失效;方法或者是,待判断继电器开关连续V次的当次通断计数值与前次通断计数值不是增1关系时,则该继电器开关失效,否则未失效;所述V为大于等于2的整数。通断计数值采用的是循环加计数方式,通断计数值达到三态输出计数电路的最大值后再加1会溢出变为0;以三态输出计数电路实施例2输出的4位二进制通断计数值为例,其最大值为1111,满足增1关系的下一次通断计数值为0。The following method can also be used to judge whether the relay switch whose detection flag is in the state of inspection is invalid: when the current on-off count value of the relay switch to be judged is not in the relationship between the previous on-off count value and the previous on-off count value, the relay switch is invalid. , otherwise it does not fail; the method is alternatively, when it is to be judged that the current on-off count value of the relay switch V consecutive times and the previous on-off count value are not in the relationship of increasing by 1, then the relay switch fails, otherwise it does not fail; the V is Integer greater than or equal to 2. The on-off count value adopts the cyclic counting method. After the on-off count value reaches the maximum value of the tri-state output counting circuit, adding 1 will overflow to 0; Take the off-count value as an example, the maximum value is 1111, and the next on-off count value that satisfies the relationship of increment by 1 is 0.
对检测标志为在检状态的继电器开关是否失效进行判断,还可以采用如下方法:待判断继电器开关累计W次的当次通断计数值与前次通断计数值不是增1关系时,则该继电器开关失效,否则未失效;所述W为大于等于2的整数。The following method can also be used to judge whether the relay switch whose detection flag is in the state of inspection is invalid: when it is judged that the current on-off count value of the accumulated W times of the relay switch and the previous on-off count value are not in the relationship of increasing by 1, then the The relay switch fails, otherwise it does not fail; the W is an integer greater than or equal to 2.
控制器单元、人机界面单元可以根据需要实现继电器开关的NO、NC占空比(即设置吸合时间和释放时间比例)调整与显示,失效判断方式选择及失效判断参数设置与显示,继电器开关的通断周期设置与显示等。所述装置还可以增加温度监测单元来监测测试过程中继电器的温度。The controller unit and the man-machine interface unit can adjust and display the NO and NC duty ratio of the relay switch (that is, set the ratio of the pull-in time and the release time) according to the needs, select the failure judgment method and set and display the failure judgment parameters. On-off cycle setting and display, etc. The device can also add a temperature monitoring unit to monitor the temperature of the relay during the test.
为减小体积,提高可靠性,优选将L个通断计数单元、振荡器单元、选通控制单元中的全部,或者是部分功能采用PAL、GAL、CPLD、FPGA,或者是其他可编程逻辑器件、逻辑单元来实现。In order to reduce the volume and improve the reliability, it is preferable to use PAL, GAL, CPLD, FPGA, or other programmable logic devices for all or part of the L on-off counting units, oscillator units, and gating control units. , the logic unit to achieve.
除说明书所述的技术特征外,均为本领域技术人员所掌握的常规技术。例如,选择控制器单元的控制器,设计相关的外围控制电路和根据装置的检测控制过程与方法编制程序,实现其功能;选择或者设计选通控制单元电路,满足译码选通的要求;选择或者设计振荡器单元的多谐振荡器,输出满足要求的采样时钟脉冲CLK;选择人机界面单元的组成与电路结构,与控制器单元相连接,实现相应的功能;等等,均是本领域技术人员所掌握的常规技术。Except for the technical features described in the specification, they are all conventional technologies mastered by those skilled in the art. For example, select the controller of the controller unit, design the relevant peripheral control circuit and compile the program according to the detection control process and method of the device to realize its function; select or design the gating control unit circuit to meet the requirements of decoding gating; select Or design the multivibrator of the oscillator unit to output the sampling clock pulse CLK that meets the requirements; select the composition and circuit structure of the man-machine interface unit, connect it with the controller unit, and realize the corresponding functions; Conventional techniques mastered by technicians.
Claims (10)
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910978796.0A CN110658447B (en) | 2017-11-16 | 2017-11-16 | Relay service life detection method |
Applications Claiming Priority (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201711133937.6A CN107976626B (en) | 2017-11-16 | 2017-11-16 | Relay life detection device |
CN201910978796.0A CN110658447B (en) | 2017-11-16 | 2017-11-16 | Relay service life detection method |
Related Parent Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201711133937.6A Division CN107976626B (en) | 2017-11-16 | 2017-11-16 | Relay life detection device |
Publications (2)
Publication Number | Publication Date |
---|---|
CN110658447A true CN110658447A (en) | 2020-01-07 |
CN110658447B CN110658447B (en) | 2022-03-18 |
Family
ID=62013623
Family Applications (2)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201910978796.0A Active CN110658447B (en) | 2017-11-16 | 2017-11-16 | Relay service life detection method |
CN201711133937.6A Active CN107976626B (en) | 2017-11-16 | 2017-11-16 | Relay life detection device |
Family Applications After (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201711133937.6A Active CN107976626B (en) | 2017-11-16 | 2017-11-16 | Relay life detection device |
Country Status (1)
Country | Link |
---|---|
CN (2) | CN110658447B (en) |
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN113109704A (en) * | 2021-04-14 | 2021-07-13 | 小熊电器股份有限公司 | Relay service life monitoring method and circuit and household appliance |
CN114281060A (en) * | 2021-12-15 | 2022-04-05 | 上海平高天灵开关有限公司 | Mechanical life test device based on singlechip |
EP4488697A1 (en) * | 2023-07-06 | 2025-01-08 | Rohde & Schwarz GmbH & Co. KG | Method and system for indicating wear of a switchable component of a test and measurement equipment |
Families Citing this family (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN112444722B (en) | 2019-08-30 | 2024-04-16 | 宁德时代新能源科技股份有限公司 | Detection circuit and detection method of electric control device |
CN111965462B (en) * | 2020-08-24 | 2023-07-21 | 中国科学院微电子研究所 | Apparatus and method for testing fatigue characteristics of gating tube |
CN112285550B (en) * | 2020-10-29 | 2022-10-04 | 杭州涂鸦信息技术有限公司 | Switch power-off detection method and device, computer equipment and readable storage medium |
DE102021207633A1 (en) * | 2021-07-16 | 2023-01-19 | Robert Bosch Gesellschaft mit beschränkter Haftung | Method for monitoring short-circuit switching processes in a circuit of a control unit |
CN113960465B (en) * | 2021-09-29 | 2023-01-17 | 北汽福田汽车股份有限公司 | Relay detection method and device |
CN114217220B (en) * | 2022-02-23 | 2022-05-17 | 深圳市德兰明海科技有限公司 | Switch detection circuit and method and switch detector |
Citations (14)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101587167A (en) * | 2009-07-08 | 2009-11-25 | 天津渤海易安泰电子半导体测试有限公司 | Multi-functional integrated circuit chip testing machine |
CN201615929U (en) * | 2010-03-04 | 2010-10-27 | 济南中森机械制造有限公司 | Reed pipe detector |
EP2372736A1 (en) * | 2010-03-30 | 2011-10-05 | Yamatake Corporation | Relay-end-of-service-life forecasting device and method |
CN202600109U (en) * | 2012-03-30 | 2012-12-12 | 快捷半导体(苏州)有限公司 | Button detection circuit, filter circuit and external equipment button detection chip |
CN103163454A (en) * | 2011-12-15 | 2013-06-19 | 海洋王照明科技股份有限公司 | Press key service life test circuit |
CN103852719A (en) * | 2012-11-29 | 2014-06-11 | 海洋王(东莞)照明科技有限公司 | Key switch on-off counting circuit |
CN203643573U (en) * | 2013-11-19 | 2014-06-11 | 湖南工业大学 | A device for measuring the vibration times of button switches |
CN203759206U (en) * | 2014-01-23 | 2014-08-06 | 石家庄格力电器小家电有限公司 | Reed pipe detection equipment |
CN204065353U (en) * | 2014-08-20 | 2014-12-31 | 芜湖美的厨卫电器制造有限公司 | relay life test device |
CN105958980A (en) * | 2016-06-15 | 2016-09-21 | 湖南工业大学 | Narrow pulse filter circuit |
CN205981383U (en) * | 2016-07-19 | 2017-02-22 | 天津市炳华节能技术有限公司 | Intelligence water gauge tongue tube testing platform |
CN106772017A (en) * | 2017-01-17 | 2017-05-31 | 云南电网有限责任公司西双版纳供电局 | Actuating of relay power automatic measuring instrument |
KR20170062739A (en) * | 2015-11-30 | 2017-06-08 | 주식회사 엘지화학 | Apparatus and method for estimating life of relay |
CN107247229A (en) * | 2017-06-09 | 2017-10-13 | 湖南中车时代通信信号有限公司 | The detection method and electronic installation of the service life for the mechanical organ being easily lost |
Family Cites Families (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CA2151487A1 (en) * | 1993-10-28 | 1995-05-04 | Joshua Zhu | Remote control system, lighting system and filter |
CN102761278A (en) * | 2011-04-29 | 2012-10-31 | 韩伟 | Digital adjustable stage stepper type voltage stabilization power supply |
US9553570B1 (en) * | 2014-12-10 | 2017-01-24 | Integrated Device Technology, Inc. | Crystal-less jitter attenuator |
-
2017
- 2017-11-16 CN CN201910978796.0A patent/CN110658447B/en active Active
- 2017-11-16 CN CN201711133937.6A patent/CN107976626B/en active Active
Patent Citations (14)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101587167A (en) * | 2009-07-08 | 2009-11-25 | 天津渤海易安泰电子半导体测试有限公司 | Multi-functional integrated circuit chip testing machine |
CN201615929U (en) * | 2010-03-04 | 2010-10-27 | 济南中森机械制造有限公司 | Reed pipe detector |
EP2372736A1 (en) * | 2010-03-30 | 2011-10-05 | Yamatake Corporation | Relay-end-of-service-life forecasting device and method |
CN103163454A (en) * | 2011-12-15 | 2013-06-19 | 海洋王照明科技股份有限公司 | Press key service life test circuit |
CN202600109U (en) * | 2012-03-30 | 2012-12-12 | 快捷半导体(苏州)有限公司 | Button detection circuit, filter circuit and external equipment button detection chip |
CN103852719A (en) * | 2012-11-29 | 2014-06-11 | 海洋王(东莞)照明科技有限公司 | Key switch on-off counting circuit |
CN203643573U (en) * | 2013-11-19 | 2014-06-11 | 湖南工业大学 | A device for measuring the vibration times of button switches |
CN203759206U (en) * | 2014-01-23 | 2014-08-06 | 石家庄格力电器小家电有限公司 | Reed pipe detection equipment |
CN204065353U (en) * | 2014-08-20 | 2014-12-31 | 芜湖美的厨卫电器制造有限公司 | relay life test device |
KR20170062739A (en) * | 2015-11-30 | 2017-06-08 | 주식회사 엘지화학 | Apparatus and method for estimating life of relay |
CN105958980A (en) * | 2016-06-15 | 2016-09-21 | 湖南工业大学 | Narrow pulse filter circuit |
CN205981383U (en) * | 2016-07-19 | 2017-02-22 | 天津市炳华节能技术有限公司 | Intelligence water gauge tongue tube testing platform |
CN106772017A (en) * | 2017-01-17 | 2017-05-31 | 云南电网有限责任公司西双版纳供电局 | Actuating of relay power automatic measuring instrument |
CN107247229A (en) * | 2017-06-09 | 2017-10-13 | 湖南中车时代通信信号有限公司 | The detection method and electronic installation of the service life for the mechanical organ being easily lost |
Non-Patent Citations (2)
Title |
---|
BRIAN.J. FROST ET.AL: "A "Universal" life-test system for electromechanical relays", 《26TH INTERNATIONAL CONFERENCE ON ELECTRICAL CONTACTS》 * |
张光建 等: "基于嵌入式技术的开关寿命测试仪的设计", 《微计算机信息》 * |
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN113109704A (en) * | 2021-04-14 | 2021-07-13 | 小熊电器股份有限公司 | Relay service life monitoring method and circuit and household appliance |
CN114281060A (en) * | 2021-12-15 | 2022-04-05 | 上海平高天灵开关有限公司 | Mechanical life test device based on singlechip |
EP4488697A1 (en) * | 2023-07-06 | 2025-01-08 | Rohde & Schwarz GmbH & Co. KG | Method and system for indicating wear of a switchable component of a test and measurement equipment |
Also Published As
Publication number | Publication date |
---|---|
CN110658447B (en) | 2022-03-18 |
CN107976626B (en) | 2019-12-06 |
CN107976626A (en) | 2018-05-01 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN107976626B (en) | Relay life detection device | |
CN107991605B (en) | Relay life count measurement method | |
CN103631360B (en) | A kind of chip and method for supporting sleep pattern | |
CN106547415B (en) | A kind of Embedded capacitance touch sensing device and its implementation | |
CN101685135A (en) | Test device and test method for testing circuit board | |
CN207601198U (en) | A kind of tongue tube life detecting device | |
JP2012161107A (en) | Time difference analog comparator, and method to compare time difference analog signal | |
CN107831433B (en) | Reed Switch Life Testing Method | |
CN207787083U (en) | A kind of books automatic sorting control system | |
CN104808561A (en) | Multi-state switch state collection device and method | |
CA1043429A (en) | Digital noise discriminator | |
CN207601259U (en) | A kind of relay life count measurement device | |
CN107966655B (en) | Measuring method of reed switch life count | |
CN205427070U (en) | Based on many converters of labVIEW aging testing system | |
CN107966926B (en) | Automatic book sorting control device | |
CN109782013A (en) | Motor speed measuring method, apparatus, readable storage medium storing program for executing and electrical equipment | |
CN103869155A (en) | Method and device for electric generator frequency measurement based on PLC high-speed input | |
CN207799439U (en) | A kind of books automatic sorting control device | |
CN104360288B (en) | Switching power supply no-load detection circuit and detection method | |
CN107800407A (en) | Accumulate discriminate disturbing pulse filter method | |
CN107741727A (en) | Book Automatic Sorting Control System | |
CN112737589A (en) | CP signal amplitude sampling algorithm based on electric automobile OBC | |
CN107968640A (en) | Sample accumulation formula disturbing pulse filter method | |
CN106374913B (en) | A kind of low-power consumption automatically controls the counting device of magnetoresistive sensor sample detecting | |
CN107895491B (en) | Vehicle counting pulse generating device based on geomagnetic sensing |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |