CN106681943A - Device for preventing motor operation interference on data acquisition and serial port transmission - Google Patents
Device for preventing motor operation interference on data acquisition and serial port transmission Download PDFInfo
- Publication number
- CN106681943A CN106681943A CN201611157785.9A CN201611157785A CN106681943A CN 106681943 A CN106681943 A CN 106681943A CN 201611157785 A CN201611157785 A CN 201611157785A CN 106681943 A CN106681943 A CN 106681943A
- Authority
- CN
- China
- Prior art keywords
- serial port
- motor
- relay
- usb
- power supply
- 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
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F13/00—Interconnection of, or transfer of information or other signals between, memories, input/output devices or central processing units
- G06F13/38—Information transfer, e.g. on bus
- G06F13/40—Bus structure
- G06F13/4063—Device-to-bus coupling
- G06F13/4068—Electrical coupling
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F13/00—Interconnection of, or transfer of information or other signals between, memories, input/output devices or central processing units
- G06F13/10—Program control for peripheral devices
- G06F13/102—Program control for peripheral devices where the programme performs an interfacing function, e.g. device driver
-
- Y—GENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
- Y02—TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
- Y02D—CLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
- Y02D10/00—Energy efficient computing, e.g. low power processors, power management or thermal management
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- General Engineering & Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Computer Hardware Design (AREA)
- Control Of Electric Motors In General (AREA)
- Information Transfer Systems (AREA)
Abstract
本发明的一种防止电机运行干扰数据采集串口传输的装置,包括继电器、USB转串口芯片、电机以及微控制器;所述继电器的输入回路分别与电源以及电机的正极连接,所述微控制器用于控制所述电源的开闭;所述继电器的输出回路包括动触点以及第一静触点和第二静触点,所述动触点通过电阻接地,所述第一静触点与所述USB转串口芯片的接地端连接,所述第二静触点与所述电机的负极连接,所述继电器的动触点与所述第一静触点常闭。该电路结构简单,能够从物理层面避免当上位机还未与电控设备分离,电控设备即已运转启动下位机,下位机运作后产生不确定信号并通过连接上位机的USB转串口影响上位机运行的情况。
A device for preventing motor operation from interfering with data acquisition and serial port transmission of the present invention comprises a relay, a USB-to-serial port chip, a motor and a microcontroller; the input circuit of the relay is connected to the positive pole of the power supply and the motor respectively, and the microcontroller It is used to control the opening and closing of the power supply; the output circuit of the relay includes a moving contact, a first static contact and a second static contact, the moving contact is grounded through a resistance, the first static contact and the The ground terminal of the USB-to-serial port chip is connected, the second static contact is connected to the negative pole of the motor, and the movable contact of the relay is normally closed to the first static contact. The circuit structure is simple, which can prevent from the physical level that when the upper computer is not separated from the electronic control equipment, the electronic control equipment is already running and starts the lower computer. After the lower computer operates, an uncertain signal will be generated and affect the upper computer by connecting the USB to serial port of the upper computer. machine operation.
Description
技术领域technical field
本发明涉及一种防止电机运行干扰数据采集串口传输的装置。The invention relates to a device for preventing motor operation from interfering with serial port transmission of data collection.
背景技术Background technique
带有电机的电控设备已经越来越普及,而这些设备通常需要通过USB转串口与电脑、手机等上位机连接以对其进行设置。在实际工程中,当上位机还未与电控设备分离,设备即已运转启动下位机时,下位机运作后往往会产生不确定信号并通过连接上位机的USB转串口影响上位机的运行,严重时会导致上位机产生死机等后果。Electronic control devices with motors have become more and more popular, and these devices usually need to be connected to a host computer such as a computer or a mobile phone through a USB-to-serial port to configure them. In actual engineering, when the upper computer is not separated from the electronic control equipment, and the equipment is already running to start the lower computer, the lower computer will often generate uncertain signals after the operation and affect the operation of the upper computer through the USB to serial port connected to the upper computer. In severe cases, it will cause the host computer to crash and other consequences.
发明内容Contents of the invention
发明目的:针对上述现有技术,提出一种防止电机运行干扰数据采集串口传输的装置,从物理层面防止上位机未及时与电控设备分离时,下位机运行对上位机产生的影响。Purpose of the invention: Aiming at the above-mentioned prior art, a device is proposed to prevent motor operation from interfering with serial port transmission of data collection, so as to prevent the impact of the operation of the lower computer on the upper computer from the physical level when the upper computer is not separated from the electronic control equipment in time.
技术方案:一种防止电机运行干扰数据采集串口传输的装置,包括继电器、USB转串口芯片、电机以及微控制器;所述继电器的输入回路分别与电源以及电机的正极连接,所述微控制器用于控制所述电源的开闭;所述继电器的输出回路包括动触点以及第一静触点和第二静触点,所述动触点通过电阻接地,所述第一静触点与所述USB转串口芯片的接地端连接,所述第二静触点与所述电机的负极连接,所述继电器的动触点与所述第一静触点常闭。Technical solution: A device for preventing motor operation from interfering with data acquisition and serial port transmission, including a relay, a USB-to-serial port chip, a motor, and a microcontroller; the input circuits of the relay are respectively connected to the power supply and the positive pole of the motor, and the microcontroller uses It is used to control the opening and closing of the power supply; the output circuit of the relay includes a moving contact, a first static contact and a second static contact, the moving contact is grounded through a resistance, the first static contact and the The ground terminal of the USB-to-serial port chip is connected, the second static contact is connected to the negative pole of the motor, and the movable contact of the relay is normally closed to the first static contact.
进一步的,还包括一个二极管,所述二极管的正极连接所述电机的正极,所述二极管的负极连接所述电源。Further, a diode is further included, the anode of the diode is connected to the anode of the motor, and the cathode of the diode is connected to the power supply.
有益效果:本发明的一种防止电机运行干扰数据采集串口传输的装置,结构简单,能够从物理层面避免当上位机还未与电控设备分离,电控设备即已运转启动下位机,下位机运作后产生不确定信号并通过连接上位机的USB转串口影响上位机运行的情况。Beneficial effects: The device for preventing motor operation from interfering with data acquisition and serial port transmission in the present invention has a simple structure and can prevent from the physical level that when the upper computer is not separated from the electronic control equipment, the electronic control equipment has already started the operation of the lower computer, and the lower computer Uncertain signals are generated after operation and affect the operation of the host computer through the USB-to-serial port connected to the host computer.
附图说明Description of drawings
图1为本发明的结构示意图。Fig. 1 is a structural schematic diagram of the present invention.
具体实施方式detailed description
下面结合附图对本发明做更进一步的解释。The present invention will be further explained below in conjunction with the accompanying drawings.
如图1所示,一种防止电机运行干扰数据采集串口传输的装置,包括继电器HK4100、USB转串口芯片CH340G、水泵电机M以及微控制器,微控制器可以是单片机等处理器。继电器HK4100的输入回路一端通过限流电阻R1连接外部电源,输入回路的另一端连接水泵电机M的电源正极。微控制器连接外部电源,用于控制外部电源的开闭。继电器HK4100的输出回路包括动触点以及第一静触点和第二静触点,动触点通过接地电阻R2接地,第一静触点与USB转串口芯片CH340G的接地端GND连接,其第二静触点与水泵电机M的电源负极连接,并且继电器HK4100的动触点与第一静触点常闭。As shown in Figure 1, a device for preventing motor operation from interfering with data acquisition serial port transmission includes a relay HK4100, a USB-to-serial port chip CH340G, a water pump motor M, and a microcontroller. The microcontroller can be a processor such as a single-chip microcomputer. One end of the input circuit of the relay HK4100 is connected to the external power supply through the current limiting resistor R1, and the other end of the input circuit is connected to the positive pole of the power supply of the water pump motor M. The microcontroller is connected to the external power supply and is used to control the opening and closing of the external power supply. The output circuit of the relay HK4100 includes a moving contact, a first static contact and a second static contact. The moving contact is grounded through the grounding resistor R2, and the first static contact is connected to the ground terminal GND of the USB-to-serial chip CH340G. The two static contacts are connected to the negative pole of the power supply of the water pump motor M, and the moving contact of the relay HK4100 is normally closed to the first static contact.
此外,电路部分还包括一个二极管IN4007,二极管的正极连接电机的正极,二极管的负极连接外部电源。该二极管是指继电器续流二极管,它在电路中用来保护其他元件不被感应电压击穿或烧坏,以并联的方式接到继电器产生感应电动势的元件两端,并与其形成回路,使其产生的高电动势在回路以续电流方式消耗,从而起到保护电路中的元件不被损坏的作用。In addition, the circuit part also includes a diode IN4007, the positive pole of the diode is connected to the positive pole of the motor, and the negative pole of the diode is connected to the external power supply. The diode refers to the freewheeling diode of the relay. It is used in the circuit to protect other components from being broken down or burned by the induced voltage. The generated high electromotive force is consumed in the loop in the form of continuous current, thereby protecting the components in the circuit from being damaged.
本电路中,微控制器作为电机的电控设备的组成部分,微控制器通过USB转串口芯片能够与上位机,如手机、电脑等设备进行通讯连接,以便上位机对电机控制进行设置。本发明的电路工作时,根据上位机的设置,微控制器控制外部电源的开启和关闭时间,使电机按设定的要求进行运行。In this circuit, the microcontroller is an integral part of the electric control equipment of the motor. The microcontroller can communicate with the host computer, such as mobile phone, computer and other equipment through the USB-to-serial chip, so that the host computer can set the motor control. When the circuit of the present invention works, according to the settings of the upper computer, the microcontroller controls the opening and closing time of the external power supply, so that the motor operates according to the set requirements.
当外部电源关断时,继电器HK4100的动触点与第一静触点常闭,即USB转串口芯片CH340G的接地端GND通过接地电阻R2接地,此时微控制器才能够正常与上位机进行数据通讯,而水泵电机M处于停止运行状态。When the external power supply is turned off, the moving contact and the first static contact of the relay HK4100 are normally closed, that is, the ground terminal GND of the USB-to-serial chip CH340G is grounded through the grounding resistor R2, and the microcontroller can communicate with the host computer normally. Data communication, while the water pump motor M is in a stopped state.
当微控制器控制外部电源输出电能时,电流经过继电器的输入回路时,继电器的动触点动作,其与第一静触点断开,并与第二静触点闭合;外部电源通过继电器HK4100的输入回路到电机的电源正极,再通过继电器HK4100动触点与第二静触点的连接后接地,形成电路回路,电机开始正常运转。此时,由于继电器的动触点与第一静触点断开,USB转串口芯片CH340G的接地端GND没有接地,USB转串口芯片CH340G即不能正常工作,此时为控制器就无法与上位机进行数据通讯;因此电机运行时产生的不确定信号就不能通过微控制器以及USB转串口芯片传回上位机了,因而避免下位机的运行对上位机产生的影响。When the microcontroller controls the external power supply to output electric energy, when the current passes through the input circuit of the relay, the movable contact of the relay acts, which is disconnected from the first static contact and closed with the second static contact; the external power passes through the relay HK4100 The input loop of the motor is connected to the positive pole of the power supply of the motor, and then grounded through the connection between the movable contact of the relay HK4100 and the second static contact to form a circuit loop, and the motor starts to run normally. At this time, because the moving contact of the relay is disconnected from the first static contact, the ground terminal GND of the USB-to-serial chip CH340G is not grounded, and the USB-to-serial chip CH340G cannot work normally. At this time, the controller cannot communicate with the host computer. Carry out data communication; therefore, the uncertain signal generated when the motor is running cannot be transmitted back to the host computer through the microcontroller and the USB-to-serial chip, thus avoiding the impact of the operation of the lower computer on the upper computer.
以上所述仅是本发明的优选实施方式,应当指出,对于本技术领域的普通技术人员来说,在不脱离本发明原理的前提下,还可以做出若干改进和润饰,这些改进和润饰也应视为本发明的保护范围。The above is only a preferred embodiment of the present invention, and it should be pointed out that for those of ordinary skill in the art, some improvements and modifications can be made without departing from the principle of the present invention. It should be regarded as the protection scope of the present invention.
Claims (2)
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201611157785.9A CN106681943B (en) | 2016-12-15 | 2016-12-15 | A device for preventing motor operation from interfering with serial port transmission of data collection |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201611157785.9A CN106681943B (en) | 2016-12-15 | 2016-12-15 | A device for preventing motor operation from interfering with serial port transmission of data collection |
Publications (2)
Publication Number | Publication Date |
---|---|
CN106681943A true CN106681943A (en) | 2017-05-17 |
CN106681943B CN106681943B (en) | 2023-06-09 |
Family
ID=58869304
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201611157785.9A Active CN106681943B (en) | 2016-12-15 | 2016-12-15 | A device for preventing motor operation from interfering with serial port transmission of data collection |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN106681943B (en) |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US5418678A (en) * | 1993-09-02 | 1995-05-23 | Hubbell Incorporated | Manually set ground fault circuit interrupter |
WO2005074241A1 (en) * | 2004-01-29 | 2005-08-11 | Tyco Electronics Argentina Sa | Overvoltage protection in telephone/data lines, suitable for installations with low-quality earth connections |
CN101276488A (en) * | 2008-03-26 | 2008-10-01 | 中国科学院电工研究所 | A vehicle recorder capable of realizing intelligent CAN bus communication |
CN101520764A (en) * | 2008-02-25 | 2009-09-02 | 福建星网锐捷通讯股份有限公司 | System for directly using serial signal control device |
CN206322156U (en) * | 2016-12-15 | 2017-07-11 | 南京航空航天大学 | A kind of device for preventing motor operation from disturbing data acquisition Serial Port Transmission |
-
2016
- 2016-12-15 CN CN201611157785.9A patent/CN106681943B/en active Active
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US5418678A (en) * | 1993-09-02 | 1995-05-23 | Hubbell Incorporated | Manually set ground fault circuit interrupter |
WO2005074241A1 (en) * | 2004-01-29 | 2005-08-11 | Tyco Electronics Argentina Sa | Overvoltage protection in telephone/data lines, suitable for installations with low-quality earth connections |
CN101520764A (en) * | 2008-02-25 | 2009-09-02 | 福建星网锐捷通讯股份有限公司 | System for directly using serial signal control device |
CN101276488A (en) * | 2008-03-26 | 2008-10-01 | 中国科学院电工研究所 | A vehicle recorder capable of realizing intelligent CAN bus communication |
CN206322156U (en) * | 2016-12-15 | 2017-07-11 | 南京航空航天大学 | A kind of device for preventing motor operation from disturbing data acquisition Serial Port Transmission |
Also Published As
Publication number | Publication date |
---|---|
CN106681943B (en) | 2023-06-09 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
JP5941135B2 (en) | Electronic device having USB interface and USB communication activation method | |
CN102223439B (en) | Electronic equipment with USB interface and USB communication starting method thereof | |
CN103166166B (en) | Hot plug controller protective circuit | |
CN206322156U (en) | A kind of device for preventing motor operation from disturbing data acquisition Serial Port Transmission | |
CN101783503B (en) | overvoltage protection circuit | |
TW201509043A (en) | Protection circuit and electronic device with the same | |
CN106505725A (en) | Power source automatic switching system and automatic switching method | |
CN104767505A (en) | Switching circuit with circuit protection function | |
CN203926092U (en) | Fan control circuitry | |
CN103051325A (en) | Pull-up resistance circuit for preventing reverse current filling | |
CN106681943B (en) | A device for preventing motor operation from interfering with serial port transmission of data collection | |
US20140347775A1 (en) | Battery protection circuit | |
CN104159359A (en) | Electric torch drive circuit and mobile terminal | |
CN104104058A (en) | Temperature protection device of power management chip and mobile terminal | |
CN104159358A (en) | Electric torch drive circuit and mobile terminal | |
CN207835053U (en) | Attachment interface short-circuit preventing device, terminal and system | |
CN215120097U (en) | Short-circuit protection circuit and portable power source | |
CN105302249A (en) | Laptop power button trigger prevention structure used in screen closing process | |
CN107168908A (en) | A kind of expansion interface and its communication means | |
CN203813714U (en) | Motor driving device and frequency-conversion household electrical appliance | |
CN208922095U (en) | A kind of control device and electronic equipment | |
CN202602269U (en) | Protection circuit of elevator system communication interface | |
CN207571695U (en) | Tablet charging base short-circuit protection circuit | |
CN201887463U (en) | Sensor protection unit control circuit | |
CN102394623A (en) | Electronic-type touch switch |
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 |