Electromagnetic interference prevention electronic switch system

文档序号:1537810 发布日期:2020-02-14 浏览:13次 中文

阅读说明:本技术 一种防电磁干扰的电子开关系统 (Electromagnetic interference prevention electronic switch system ) 是由 刘禹 李佳欢 王新华 于 2019-10-08 设计创作,主要内容包括:本发明提供一种防电磁干扰的电子开关系统,主控器定时读取编码电路输出端的电平信号,当处于关闭状态的激光器需要开启时,开关控制器为编码电路的输入端提供电平信号,编码电路对输入端的电平信号进行编码,且编码后的电平信号与预设在主控芯片中的开启电平信号一致,则主控器利用PWM驱动模块向激光器发送PWM驱动信号,控制激光器开启;当处于工作状态的激光器需要关闭时,开关控制器为编码电路的输入端提供电平信号,编码电路对输入端的电平信号进行编码,且编码后的电平信号与预设在主控芯片中的关闭电平信号一致,则主控器利用PWM驱动模块向激光器发送PWM驱动信号,控制激光器关闭。本发明提高了设备灵敏度。(The invention provides an electromagnetic interference prevention electronic switch system.A main controller reads level signals at the output end of an encoding circuit at regular time, when a laser in a closed state needs to be started, a switch controller provides the level signals for the input end of the encoding circuit, the encoding circuit encodes the level signals at the input end, and the encoded level signals are consistent with starting level signals preset in a main control chip, so that the main controller sends PWM driving signals to the laser by utilizing a PWM driving module to control the laser to be started; when the laser in the working state needs to be turned off, the switch controller provides a level signal for the input end of the coding circuit, the coding circuit codes the level signal of the input end, and the coded level signal is consistent with a turn-off level signal preset in the main control chip, so that the main controller sends a PWM driving signal to the laser by using the PWM driving module to control the laser to be turned off. The invention improves the sensitivity of the device.)

1. An electronic switch system for preventing electromagnetic interference is applied to the on or off of a laser and is characterized by comprising an encoding circuit, a switch controller, a PWM (pulse width modulation) driving module and a main controller;

the switch controller is used for inputting an opening/closing instruction by an operator and inputting a corresponding level signal to the coding circuit according to the input instruction; the encoding circuit is used for encoding and outputting level signals input by the switching controller, the main controller reads the level signals in the encoding form output by the encoding circuit and compares the level signals with preset on/off level signals, and if the level signals are consistent with the preset on/off level signals, the PWM driving module is used for sending corresponding on/off PWM driving signals to the laser so as to control the laser to be turned on/off.

2. The electronic switch system of claim 1, wherein the master controller is configured to periodically read the level signal outputted from the encoding circuit.

3. The electronic switch system of claim 1, wherein the encoding circuit comprises a first transistor, a second transistor, a third transistor, a fourth resistor; the first triode and the fourth triode are NPN type triodes, and the second triode and the third triode are PNP type triodes;

an emitting electrode of the first triode is connected with one end of the first resistor, the other end of the first resistor is grounded, and a collector electrode of the first triode is connected with a +5V power supply; the emitter of the second triode is connected with one end of a second resistor, the other end of the second resistor is connected with a +5V power supply, and the collector of the second triode is grounded; an emitter of the third triode is connected with one end of a third resistor, the other end of the third resistor is connected with a +5V power supply, and a collector of the third triode is grounded; the emitter of the fourth triode is grounded, the collector of the fourth triode is connected with one end of a fourth resistor, and the other end of the fourth resistor is connected with a +5v power supply; the base electrodes of the first triode to the fourth triode are input ends of the coding circuit, and the emitting electrodes of the first triode to the fourth triode are output ends of the coding circuit.

4. An EMI resistant electronic switch system as claimed in claim 3, further including a first terminal; the first connecting terminal is provided with 6 ports, one port is grounded, one port is connected with a +5V power supply, and the other four ports are respectively connected with the base electrodes of the first triode to the fourth triode; the switch controller provides level signals for the base electrodes of the first to fourth triodes through the first wiring terminal.

5. The electronic switch system of claim 3, further comprising a second terminal having 4 ports, the four ports being connected to the emitters of the first to fourth triodes, respectively, and the master controller reading the level signals of the emitters of the first to fourth triodes through the second terminal.

6. An electromagnetic interference prevention electronic switch system as claimed in claim 1, wherein the main controller adopts STM32F407, and the output end of the encoding circuit and the PWM driving module are connected to the corresponding i/o port of the chip.

7. An electromagnetic interference prevention electronic switch system as claimed in claim 6, characterized in that the system further comprises a display, the STM32F407 is used for periodically reading level signals of the i/o port connected with the output end of the coding circuit, and if the level signals are all low level, the STM32F407 identifies the i/o port as failed and sends a 'failed' word to the display; and if the level of the i/o port connected with the output end of the coding circuit continuously jumps, the electrostatic influence is judged to be caused.

Technical Field

The invention belongs to the technical field of switch circuits, and particularly relates to an electromagnetic interference prevention electronic switch system.

Background

With the progress of electronic technology and the popularization of computer technology and artificial intelligence, a large number of circuits are controlled by logic chips, the control voltage is lower and lower, the power consumption is smaller and smaller, the logic scale is larger and larger, the requirement on the electromagnetic environment is higher and higher, and a large amount of electromagnetic interference is generated around people by more and more electric products along with the improvement of the automation degree. At present, electronic switches are mostly adopted for controlling emission switches of carbon dioxide lasers and radio frequency lasers for medical laser surgery in China, and as long as a working power supply is switched on, a set high level or low level signal is input at a control end, a control system sends out a PWM signal to start a laser to send out strong laser to cut human skin or be used for medical cosmetology. Under the influence of electromagnetic interference, the probability of laser misoperation caused by a traditional electronic switch such as a single high-low level controlled electronic switch is continuously increased, and more cases of human body injury are caused. Such instruments, devices, and critical components controlled by a single electronic switch are similarly situated.

The method for preventing interference by combining software and hardware commonly adopted at present is as follows: when the software recognizes that the start signal is high or low, a time determination is added to the program to avoid the emi signal, for example: when the program judges that the switching signal is greater than 30ms, the signal is confirmed to be the starting signal, and the signal less than 30ms is considered to be the interference signal. Therefore, the probability of electromagnetic interference misoperation can be reduced to a certain extent, but the uncertainty of the environment of electromagnetic interference can also cause software anti-shake failure and simultaneously reduce the sensitivity of equipment. Whether a method is adopted to avoid the electronic switch misoperation caused by electromagnetic interference can be realized, the sensitivity of the equipment is kept, and the probability of electromagnetic interference misoperation is greatly reduced. In the prior art, anti-jitter time is mostly added to software for a single electronic switch port to avoid electromagnetic interference, that is, the software finds that a port is in a startup state of 0 or 1(0V or +5V) and can confirm that the port is a startup signal after keeping for a certain time. But this method of determination reduces the sensitivity of the device.

Disclosure of Invention

The purpose of the invention is as follows: in order to solve the problems of low sensitivity and the like in the prior art, the invention provides an electromagnetic interference prevention electronic switch system;

the technical scheme is as follows: the invention provides an electromagnetic interference prevention electronic switch system, which is applied to the on or off of a laser and comprises an encoding circuit, a switch controller, a PWM (pulse width modulation) driving module and a main controller, wherein the encoding circuit is connected with the switch controller;

the switch controller is used for inputting an opening/closing instruction by an operator and inputting a corresponding level signal to the coding circuit according to the input instruction; the encoding circuit is used for encoding and outputting level signals input by the switching controller, the main controller reads the level signals in the encoding form output by the encoding circuit and compares the level signals with preset on/off level signals, and if the level signals are consistent with the preset on/off level signals, the PWM driving module is used for sending corresponding on/off PWM driving signals to the laser so as to control the laser to be turned on/off.

Furthermore, the master controller reads the level signal output by the encoding circuit at regular time.

Furthermore, the coding circuit comprises a first triode, a second triode, a third triode, a fourth triode and a first resistor, a second resistor and a fourth resistor; the first triode and the fourth triode are NPN type triodes, and the second triode and the third triode are PNP type triodes;

an emitting electrode of the first triode is connected with one end of the first resistor, the other end of the first resistor is grounded, and a collector electrode of the first triode is connected with a +5V power supply; the emitter of the second triode is connected with one end of a second resistor, the other end of the second resistor is connected with a +5V power supply, and the collector of the second triode is grounded; an emitter of the third triode is connected with one end of a third resistor, the other end of the third resistor is connected with a +5V power supply, and a collector of the third triode is grounded; the emitter of the fourth triode is grounded, the collector of the fourth triode is connected with one end of a fourth resistor, and the other end of the fourth resistor is connected with a +5v power supply; the base electrodes of the first triode to the fourth triode are input ends of the coding circuit, and the emitting electrodes of the first triode to the fourth triode are output ends of the coding circuit.

Further, the system also comprises a first connecting terminal; the first connecting terminal is provided with 6 ports, one port is grounded, one port is connected with a +5V power supply, and the other four ports are respectively connected with the base electrodes of the first triode to the fourth triode; the switch controller provides level signals for the base electrodes of the first to fourth triodes through the first wiring terminal.

Furthermore, the system also comprises a second wiring terminal, wherein the second wiring terminal is provided with 4 ports, the four ports are respectively connected with the emitting electrodes of the first triode to the fourth triode, and the master controller reads level signals of the emitting electrodes of the first triode to the fourth triode through the second wiring terminal.

Furthermore, the main controller adopts STM32F407, and the output end of the coding circuit and the PWM driving module are connected with the corresponding i/o port of the chip.

Further, the system also comprises a display, the STM32F407 reads level signals of an i/o port connected with the output end of the coding circuit at regular time, if the level signals are all low level, the STM32F407 identifies the i/o port fault and sends a word of 'fault' to the display; and if the level of the i/o port connected with the output end of the coding circuit continuously jumps, the electrostatic influence is judged to be caused.

Has the advantages that: the invention has simple structure, low cost and easy realization, adopts four-way triodes to form a coding circuit, does not need software for anti-shake and saves time; and the circuit reduces the probability of false touch caused by electromagnetic interference.

Drawings

FIG. 1 is a schematic diagram of the operation of the present invention;

FIG. 2 is a circuit diagram of the encoding circuit of the present invention;

fig. 3 is a flow chart of the method of the present invention.

Detailed Description

The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate an embodiment of the invention and, together with the description, serve to explain the invention and not to limit the invention.

As shown in fig. 1-2, the present embodiment provides an electronic switch system for preventing electromagnetic interference; the system comprises an encoding circuit, a switch controller, a PWM driving module, a main controller, a first connecting terminal J1 and a second terminal J2; the main controller adopts an STM32F407 chip which comprises a DSP, an FPGA, an RAM, a FLASH, an IO port and a bus.

The coding circuit comprises first to fourth triodes and first to fourth resistors; the first triode and the fourth triode are NPN type triodes, and the second triode and the third triode are PNP type triodes.

An emitter of the first triode Q1 is connected with one end of a first resistor R1, the other end of the first resistor is grounded, and a collector of the first triode is connected with a +5V power supply; an emitter of the second triode Q2 is connected with one end of a second resistor R2, the other end of the second resistor is connected with a +5V power supply, and a collector of the second triode is grounded; an emitter of the third triode Q3 is connected with one end of a third resistor R3, the other end of the third resistor is connected with a +5V power supply, a collector of the third triode is grounded, an emitter of the fourth triode Q4 is grounded, a collector is connected with one end of a fourth resistor R4, and the other end of the fourth resistor is connected with the +5V power supply; the base electrodes of the first triode to the fourth triode are input ends of the coding circuit, and the emitting electrodes of the first triode to the fourth triode are output ends of the coding circuit.

The switch controller is used for inputting an opening/closing instruction by an operator and inputting a corresponding level signal to the coding circuit according to the input instruction; the encoding circuit is used for encoding and outputting level signals input by the switching controller, the main controller reads the level signals in the encoding form output by the encoding circuit and compares the level signals with preset on/off level signals, and if the level signals are consistent with the preset on/off level signals, the PWM driving module is used for sending corresponding on/off PWM driving signals to the laser so as to control the laser to be turned on/off.

The first connecting terminal is provided with 6 ports IN-1-IN-6, wherein one port IN-1 is grounded, IN-6 is connected with a +5V power supply, and the other four ports IN-5-IN-2 are respectively connected with the base electrodes of the first triode to the fourth triode; the switch controller provides level signals for the base electrodes of the first to fourth triodes through the first wiring terminal.

The second connecting terminal is provided with 4 ports OUT-1-OUT 4, the OUT-1-OUT 4 are respectively connected with emitting electrodes of the first triode, the second triode and the third triode, and the main controller reads level signals of the emitting electrodes of the first triode, the second triode and the third triode through the second connecting terminal.

As shown in fig. 3, the specific process of the present invention when applied to a laser generator is as follows:

step 1: the whole circuit is powered on, the circuit is reset, and the whole circuit is initialized to be in a standby state;

step 2: the master detects the level values of the i/o ports connected to the second connection terminals OUT1, OUT2, OUT3 and OUT4 at regular time (every 100 μ s to 200 μ s);

and step 3: if the level of the i/o port is 0, the i/o port is determined to be in fault, and a character of 'fault' is sent to a display, and the system is manually closed for detection; if the level of the i/o port continuously jumps, the static influence is judged to be caused, and the step 3 is carried out until the static influence is eliminated; if the system is not faulty and not affected by static electricity, go to step 4,

and 4, step 4: when the laser in the working state needs to be closed, the level signal is provided for the input end of the coding circuit through the switch controller, the coding circuit codes the level signal of the input end, the coded level signal is consistent with a preset opening level signal in the main controller, when the level signal read by the main controller is consistent with the preset opening level signal, the main controller sends a PWM driving signal to the laser through the PWM driving module so as to control the laser to be opened, when the laser in the working state needs to be closed, the level signal is provided for the input end of the coding circuit through the switch controller, the coding circuit codes the level signal of the input end, the coded level signal is consistent with a preset closing level signal in the main controller, when the level signal read by the main controller is consistent with a preset closing level signal, the main controller sends a PWM driving signal to the laser by using the PWM driving module, so that the laser is controlled to be turned off. If the laser is in a working state, but the level signal read by the main controller is consistent with the preset opening level signal, and the laser is in a closing state but the level signal read by the main controller is consistent with the preset closing level signal, the laser keeps the current state unchanged.

In the embodiment, the opening level value and the closing level value are respectively 1011 and 0100; when the laser needs to be started, the switch controller provides a level signal of 1010 for the input end of the encoding circuit; when the laser needs to be closed, the switch controller provides a level signal 0101 for the input end of the encoding circuit;

it should be noted that the various features described in the above embodiments may be combined in any suitable manner without departing from the scope of the invention. The invention is not described in detail in order to avoid unnecessary repetition.

7页详细技术资料下载
上一篇:一种医用注射器针头装配设备
下一篇:一种常闭直流固态继电器

网友询问留言

已有0条留言

还没有人留言评论。精彩留言会获得点赞!

精彩留言,会给你点赞!

技术分类