CN110716135A - Effective capturing circuit and capturing method for impact type mechanical switch signal - Google Patents

Effective capturing circuit and capturing method for impact type mechanical switch signal Download PDF

Info

Publication number
CN110716135A
CN110716135A CN201911029153.8A CN201911029153A CN110716135A CN 110716135 A CN110716135 A CN 110716135A CN 201911029153 A CN201911029153 A CN 201911029153A CN 110716135 A CN110716135 A CN 110716135A
Authority
CN
China
Prior art keywords
mechanical switch
programmable processor
signals
signal
input signal
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.)
Pending
Application number
CN201911029153.8A
Other languages
Chinese (zh)
Inventor
姜峰
张君利
薛海英
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
China North Industries Group Corp No 214 Research Institute Suzhou R&D Center
Original Assignee
China North Industries Group Corp No 214 Research Institute Suzhou R&D Center
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
Application filed by China North Industries Group Corp No 214 Research Institute Suzhou R&D Center filed Critical China North Industries Group Corp No 214 Research Institute Suzhou R&D Center
Priority to CN201911029153.8A priority Critical patent/CN110716135A/en
Publication of CN110716135A publication Critical patent/CN110716135A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G01MEASURING; TESTING
    • G01RMEASURING ELECTRIC VARIABLES; MEASURING MAGNETIC VARIABLES
    • G01R31/00Arrangements for testing electric properties; Arrangements for locating electric faults; Arrangements for electrical testing characterised by what is being tested not provided for elsewhere
    • G01R31/327Testing of circuit interrupters, switches or circuit-breakers
    • GPHYSICS
    • G05CONTROLLING; REGULATING
    • G05BCONTROL OR REGULATING SYSTEMS IN GENERAL; FUNCTIONAL ELEMENTS OF SUCH SYSTEMS; MONITORING OR TESTING ARRANGEMENTS FOR SUCH SYSTEMS OR ELEMENTS
    • G05B19/00Programme-control systems
    • G05B19/02Programme-control systems electric
    • G05B19/04Programme control other than numerical control, i.e. in sequence controllers or logic controllers
    • G05B19/05Programmable logic controllers, e.g. simulating logic interconnections of signals according to ladder diagrams or function charts

Landscapes

  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Engineering & Computer Science (AREA)
  • Automation & Control Theory (AREA)
  • Electronic Switches (AREA)

Abstract

The invention relates to an effective capturing circuit and a capturing method of an impact type mechanical switch signal, which comprises a programmable processor, a power supply voltage capable of supplying power to the programmable processor, a mechanical switch and a conversion circuit, wherein the mechanical switch is connected with the programmable processor through the power supply voltage; the switching circuit converts a closing signal of the mechanical switch into a pulse signal as an input signal of the programmable processor, the programmable processor detects the validity of the input signal and controls the output of the rear stage. The invention can accurately capture the effective signal of the mechanical switch, eliminate the interference signal and prevent the false triggering; the circuit has simple structure, small volume, easy realization and low cost.

Description

Effective capturing circuit and capturing method for impact type mechanical switch signal
Technical Field
The invention belongs to the technical field of electronic circuits, and particularly relates to an effective capturing method of an impact type mechanical switch signal.
Background
Impact type mechanical switch obtains sending wide the application because of simple structure, convenient to use in electronic circuit, but mechanical switch can produce the maloperation because of self mechanical structure's characteristics in the use, and then brings serious consequence, especially uses in the circuit in the aspect of triggering fuze etc. and needs the closed effective signal of effectual catching mechanical switch, and the influence of eliminating interfering signal, otherwise can cause the false triggering, and then detonate the explosive, harm seriously.
Disclosure of Invention
In order to solve the problems, an effective capturing method of an impact type mechanical switch signal is designed, which can effectively capture a closed effective signal of the mechanical switch signal, eliminate an interference signal and accurately control the rear-stage output.
The technical solution for realizing the purpose of the invention is as follows:
an effective capture circuit of impact type mechanical switch signals comprises a power supply voltage, a programmable processor, a mechanical switch and a conversion circuit;
a supply voltage that can power the programmable processor;
the switching circuit converts a closing signal of the mechanical switch into a pulse signal as an input signal of the programmable processor, the programmable processor detects the validity of the input signal and controls the output of the rear stage.
Further, the conversion circuit includes a resistor and a capacitor;
one end of the resistor and one end of the capacitor are connected with one end of the mechanical switch in common to a signal input end of the programmable processor, the other end of the capacitor is grounded with the other end of the mechanical switch, and the other end of the resistor is connected with power supply voltage.
Further, an impact closing simulation test is carried out on the mechanical switch, and an oscilloscope is adopted to monitor an output signal of the mechanical switch; when the mechanical switch is disconnected, the input signal of the programmable processor is at a high level; when the mechanical switch is closed, the input signal of the programmable processor is at low level, and the time for which the input signal of the programmable processor lasts at low level is measured by the oscilloscope.
Furthermore, when the mechanical switch is turned off, the input end of the programmable processor is connected with the power supply voltage and is at a high level, and when the mechanical switch is turned on, the input end of the programmable processor is connected with the ground and is at a low level, and a falling edge is generated when the high level is converted into the low level.
Further, the programmable processor adopts an external interrupt mode to judge whether the input signal has a falling edge.
A method for effectively capturing impact type mechanical switch signals includes converting closing signals of a mechanical switch into pulse signals by a conversion circuit to be used as input signals of a programmable processor, detecting the input signals by the programmable processor, judging whether falling edges of the input signals occur or not by adopting an external interruption mode, entering an interruption program if the falling edges occur, judging whether the closing signals of the mechanical switch are effective signals or not through time delay, controlling rear-stage output if the closing signals of the mechanical switch are effective signals, judging the closing signals to be invalid signals (namely interference signals) if the closing signals are not the effective signals, returning to a main program, continuously waiting for next external interruption and circulating the same until the effective signals occur.
Furthermore, when the mechanical switch is turned off, the input end of the programmable processor is connected with the power supply voltage and is at a high level, and when the mechanical switch is turned on, the input end of the programmable processor is connected with the ground and is at a low level, and a falling edge is generated when the high level is converted into the low level.
Further, performing an impact closing simulation test on the mechanical switch, and monitoring an output signal of the mechanical switch by using an oscilloscope; when the mechanical switch is disconnected, the input signal of the programmable processor is at a high level; when the mechanical switch is closed, the input signal of the programmable processor is at low level, and the time of the input signal of the programmable processor lasting at low level is measured by the oscilloscope.
Further, the time of the delay is that the mechanical switch is active for a low level time.
Each impact type mechanical switch has different closing characteristics, the switching circuit is utilized to carry out a switch impact closing simulation test, and the oscilloscope monitors the output signal of the switch, so that the closing characteristics of the mechanical switch can be displayed as the time of the pulse signal lasting low level. And on the basis of sufficient experiments, obtaining the time distribution of the continuous low level when the switch is closed, and taking a proper continuous low level time value on the basis of less than the minimum time to judge the time value as an effective signal of the mechanical switch.
The programmable processor is a singlechip processor.
The invention has the advantages that:
1. the closing signal of the mechanical switch is converted into a pulse signal, the effective signal of the mechanical switch is accurately captured by utilizing the accurate timing of the single chip microcomputer, the interference signal is eliminated, and the false triggering is prevented.
2. Simple structure, small volume, easy realization and low cost.
Drawings
Fig. 1 is a schematic block diagram of an efficient capture circuit for a slam-strike mechanical switch signal of the present invention.
Fig. 2 is a conversion circuit diagram of an effective capture circuit of a slam-type mechanical switch signal according to the present invention.
Fig. 3 is a circuit diagram of the programmable processor of the present invention connected to a mechanical switch.
Fig. 4 is a flow chart of an effective capturing method of the impact type mechanical switch signal according to the invention.
Detailed Description
Embodiments of the present invention will be described in detail below with reference to the accompanying drawings.
Referring to fig. 1, the circuit for effectively capturing signals of an impact type mechanical switch of the invention comprises a power supply voltage, a programmable processor, a mechanical switch, a conversion circuit and the like.
As shown in fig. 2, the conversion circuit includes a resistor R and a capacitor C; one end of the resistor R and one end of the capacitor C are connected with the output end together with one end of the mechanical switch K, the other end of the capacitor C and the other end of the mechanical switch K are grounded GND, the other end of the resistor R is connected with 3.3V power voltage, and the switching circuit mainly converts a closing signal of the mechanical switch K into a pulse signal OUT1 through circuit design to serve as an input signal of the programmable processor. When the switch impact closing simulation test is carried out, the oscilloscope monitors the output signal of the mechanical switch, and when the mechanical switch is opened, the input signal of the programmable processor is at a high level; when the mechanical switch is closed, the input signal of the programmable processor is changed into low level, each impact experiment generates a pulse signal, and the oscilloscope measures the time of the low level of the input signal of the programmable processor.
As shown in fig. 3, the programmable processor is a single chip microcomputer PIC, and receives a pulse signal transmitted by the mechanical switch K, and the single chip microcomputer judges whether a falling edge occurs in an input signal by adopting an external interrupt mode. When the mechanical switch K is switched off, the input end of the single chip microcomputer is connected with the power supply voltage 3.3V and is in a high level, when the mechanical switch K is switched on, the input end of the single chip microcomputer is grounded, namely GND (ground) is in a low level, and a falling edge is generated when the high level is converted into the low level. When the input end of the single chip microcomputer detects a falling edge, an interruption program is entered, a mechanical switch effective signal is delayed for a low level time, then an input signal is detected, if the input signal is at a low level, the input signal is judged to be a mechanical switch K effective signal, the subsequent stage output is controlled, if the input signal is not at a low level, the input signal is judged to be an invalid signal (namely an interference signal), the main program is returned, the next falling edge is continuously waited for, the cycle is carried out, until an effective signal appears, and the judgment process is shown in fig. 4.

Claims (9)

1. An effective capture circuit of impact type mechanical switch signals is characterized by comprising a programmable processor, a power supply voltage capable of supplying power to the programmable processor, a mechanical switch and a conversion circuit;
the switching circuit converts a closing signal of the mechanical switch into a pulse signal as an input signal of the programmable processor, the programmable processor detects the validity of the input signal and controls the output of the rear stage.
2. The circuit of claim 1, wherein the switching circuit comprises a resistor and a capacitor;
one end of the resistor and one end of the capacitor are connected with one end of the mechanical switch in common to a signal input end of the programmable processor, the other end of the capacitor is grounded with the other end of the mechanical switch, and the other end of the resistor is connected with power supply voltage.
3. The circuit for effectively capturing signals of an impact type mechanical switch according to claim 2, wherein the mechanical switch output signals are monitored by an oscilloscope through an impact closing simulation test on the mechanical switch; when the mechanical switch is disconnected, the input signal of the programmable processor is at a high level; when the mechanical switch is closed, the input signal of the programmable processor is at low level, and the time for which the input signal of the programmable processor lasts at low level is measured by the oscilloscope.
4. The circuit of claim 2, wherein the programmable processor input is connected to the power supply voltage at a high level when the mechanical switch is turned off, and is connected to the ground at a low level when the mechanical switch is turned off, and the falling edge is generated when the mechanical switch is turned from the high level to the low level.
5. The circuit of claim 2 or 4, wherein the programmable processor determines whether the input signal has a falling edge by means of an external interrupt.
6. A method for effectively capturing impact type mechanical switch signals is characterized in that a conversion circuit converts closing signals of a mechanical switch into pulse signals serving as input signals of a programmable processor, the programmable processor detects the input signals, whether falling edges of the input signals occur or not is judged in an external interruption mode, if the falling edges occur, an interruption program is started, a set time is delayed to judge whether the closing signals of the mechanical switch are effective signals or not, if the falling edges occur, the subsequent stage output is controlled, and if the falling edges do not occur, the next external interruption is returned to continue to wait until the effective signals occur, so that the cycle is carried out until the effective signals occur.
7. The method as claimed in claim 6, wherein the programmable processor input is connected to the power voltage at a high level when the mechanical switch is turned off, and is connected to a low level when the mechanical switch is turned off, and a falling edge is generated when the mechanical switch is turned from the high level to the low level.
8. The method of claim 6, wherein the delay is set to a time when the input signal of the programmable processor measured in the impact closure simulation test of the mechanical switch lasts for a low time.
9. The method for effectively capturing signals of an impact type mechanical switch according to claim 8, wherein the step of performing the impact closing simulation test on the mechanical switch comprises: monitoring an output signal of the mechanical switch by using an oscilloscope; when the mechanical switch is disconnected, the input signal of the programmable processor is at a high level; when the mechanical switch is closed, the input signal of the programmable processor is at low level, and the time of the input signal of the programmable processor lasting at low level is measured by the oscilloscope.
CN201911029153.8A 2019-10-28 2019-10-28 Effective capturing circuit and capturing method for impact type mechanical switch signal Pending CN110716135A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201911029153.8A CN110716135A (en) 2019-10-28 2019-10-28 Effective capturing circuit and capturing method for impact type mechanical switch signal

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201911029153.8A CN110716135A (en) 2019-10-28 2019-10-28 Effective capturing circuit and capturing method for impact type mechanical switch signal

Publications (1)

Publication Number Publication Date
CN110716135A true CN110716135A (en) 2020-01-21

Family

ID=69213358

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201911029153.8A Pending CN110716135A (en) 2019-10-28 2019-10-28 Effective capturing circuit and capturing method for impact type mechanical switch signal

Country Status (1)

Country Link
CN (1) CN110716135A (en)

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103954906A (en) * 2014-04-03 2014-07-30 武汉点线科技有限公司 Device and method for relay state inspection
CN107204765A (en) * 2015-05-21 2017-09-26 四川大学 A kind of three end touch-switch
CN208461792U (en) * 2018-08-07 2019-02-01 贵州浪潮英信科技有限公司 A kind of key applied to FPGA/CPLD, which disappears, trembles logic circuit
CN109521342A (en) * 2018-12-29 2019-03-26 云南电网有限责任公司电力科学研究院 A kind of method and system optically recording and diagnose switch breakdown
CN109766014A (en) * 2018-12-28 2019-05-17 惠州市蓝微电子有限公司 A kind of single-chip microcontroller key range is by the method for hitting operation
CN109932647A (en) * 2019-03-29 2019-06-25 四川虹美智能科技有限公司 A kind of toggle switch state detection circuit, method and device
CN110221709A (en) * 2019-05-28 2019-09-10 深圳超酷科技有限公司 A kind of key detecting method, keyboard and key system

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103954906A (en) * 2014-04-03 2014-07-30 武汉点线科技有限公司 Device and method for relay state inspection
CN107204765A (en) * 2015-05-21 2017-09-26 四川大学 A kind of three end touch-switch
CN208461792U (en) * 2018-08-07 2019-02-01 贵州浪潮英信科技有限公司 A kind of key applied to FPGA/CPLD, which disappears, trembles logic circuit
CN109766014A (en) * 2018-12-28 2019-05-17 惠州市蓝微电子有限公司 A kind of single-chip microcontroller key range is by the method for hitting operation
CN109521342A (en) * 2018-12-29 2019-03-26 云南电网有限责任公司电力科学研究院 A kind of method and system optically recording and diagnose switch breakdown
CN109932647A (en) * 2019-03-29 2019-06-25 四川虹美智能科技有限公司 A kind of toggle switch state detection circuit, method and device
CN110221709A (en) * 2019-05-28 2019-09-10 深圳超酷科技有限公司 A kind of key detecting method, keyboard and key system

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
于忠得: "《单片机原理与系统设计 第1版》", 30 November 2013 *
杨艳 等: "《从零开启大学生电子设计之路 基于MSP430 Launch Pad口袋实验平台 第1版》", 31 August 2014 *

Similar Documents

Publication Publication Date Title
CN105790754B (en) Digital isolation circuit and control method thereof
CN109066579B (en) Overvoltage protection method and device
CN107123969B (en) Output protection circuit and method
CN210005908U (en) Electronic cigarette plug detection control mechanism and electronic cigarette
US9720874B2 (en) Auto-detection and mode switching for digital interface
CN103727625A (en) Method and device for controlling starting of variable-frequency fan of condensing unit
CN103543344A (en) Method for solving failure of capacitive screen and capacitive screen anomaly detection circuit
US11011905B2 (en) Fall-off protection and reverse-connection protection system and method for connecting clamp of automobile starting power supply
CN207115391U (en) A kind of automatic reset circuit
US9236852B2 (en) Input capture peripheral with gating logic
CN110716135A (en) Effective capturing circuit and capturing method for impact type mechanical switch signal
CN111884498B (en) Power-down time sequence control circuit and method for multi-channel power supply of indoor distribution system
CN107528309B (en) The circuit of Anti-surging electric current
CN109579943A (en) A kind of liquid detection device and method
JP2593915B2 (en) Double microcomputer system runaway prevention circuit
US9599644B2 (en) Semiconductor device
TWI410124B (en) An image recording apparatus and control method thereof
CN105223880B (en) A kind of programme-control box net synchronization capability detection method and device
CN106339106A (en) Terminal approach detection method and device and mobile terminal
US8552766B2 (en) Threshold comparator with hysteresis and method for performing threshold comparison with hysteresis
US10340957B2 (en) Methods and devices for monitoring optical signals
CN207459711U (en) Output protection circuit
US9606604B1 (en) Energy efficient high-speed link and method to maximize energy savings on the energy efficient high-speed link
JP4047466B2 (en) Capacitance sensor circuit
US11693515B2 (en) Touch module and touch circuit thereof

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
RJ01 Rejection of invention patent application after publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20200121