Method and system for controlling stable operation of an isolation device
By acquiring the sampled values from the sampling port and adjusting the duty cycle of the pulse width signal, the problem of power consumption waste caused by continuous high levels in passive low-voltage equipment is solved, and the stable operation and energy-saving effect of the isolation device are achieved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- ZHEJIANG HUAXIAO TECH CO LTD
- Filing Date
- 2023-02-20
- Publication Date
- 2026-05-01
AI Technical Summary
In existing technologies, passive low-voltage electrical equipment requires a continuous high-level input to maintain the stable operation of the relay, resulting in wasted power consumption.
By acquiring the sampled value from the sampling port, the duty cycle of the pulse width signal output from the control port is adjusted to control the stable operation of the isolation device, including sampled value processing and pulse width signal adjustment in normally open and normally closed modes.
Stable operation of the isolation device was achieved, while power consumption was reduced, avoiding energy waste caused by continuous high-level signals.
Smart Images

Figure CN116111999B_ABST
Abstract
Description
Methods and systems for controlling the stable operation of isolation devices Technical Field
[0001] The present invention relates to the field of communications, and more specifically, to a method and system for controlling the stable operation of an isolation device. Background Technology
[0002] In applications of low-voltage electrical systems, the start and stop of high-voltage equipment can be indirectly controlled by controlling the controlled load through low-voltage equipment. This achieves the goal of isolating low-voltage and high-voltage systems and controlling the working status of high-voltage systems through remote control of low-voltage equipment.
[0003] In field applications, passive low-voltage electrical equipment only has normally open or normally closed terminals, limiting its applicability to many scenarios. This necessitates replacing it with active low-voltage equipment, using external relays to achieve the normally open / normally closed state. To maintain stable relay operation, current technology requires a continuous supply of high-voltage power, resulting in significant power waste.
[0004] There is currently no effective solution to the above problems. Summary of the Invention
[0005] This invention provides a method and system for controlling the stable operation of an isolation device, thereby at least solving the problem of power consumption waste caused by the need for a continuous high level in weak devices in related technologies.
[0006] According to an embodiment of the present invention, a method for controlling the stable operation of an isolation device is provided, comprising: acquiring a sampled value of a sampling port, wherein the sampling port is connected to an optocoupler, and the optocoupler is connected to a terminal and a common port; adjusting the duty cycle of a pulse width signal output by a control port according to the sampled value to obtain a target pulse width signal, wherein the control port is connected to the isolation device, and the isolation device is connected to the terminal and the common port; and controlling the stable operation of the isolation device through the target pulse width signal.
[0007] In an exemplary embodiment, before acquiring the sampled value of the sampling port, the method further includes: acquiring wiring mode parameters; determining the wiring mode of the isolation device based on the wiring mode parameters, wherein the wiring mode includes: normally open mode and normally closed mode.
[0008] In an exemplary embodiment, obtaining a sampled value from a sampling port includes: when the wiring mode is the normally open mode, obtaining a first sampled value from a first sampling port, wherein the first sampling port is connected to a first optocoupler, the first optocoupler is connected to a normally open terminal and the common port, the sampling port includes the first sampling port, the optocoupler includes the first optocoupler, the terminal includes the normally open terminal, and the sampled value includes the first sampled value; and when the wiring mode is the normally closed mode, obtaining a second sampled value from a second sampling port, wherein the second sampling port is connected to a second optocoupler, the second optocoupler is connected to a normally closed terminal and the common port, the sampling port includes the second sampling port, the optocoupler includes the second optocoupler, the terminal includes the normally closed terminal, and the sampled value includes the second sampled value.
[0009] In an exemplary embodiment, adjusting the duty cycle of the pulse width signal output by the control port according to the sampled value to obtain the target pulse width signal includes: when the wiring mode is the normally open mode, if the difference between the first sampled value and the first parameter value is greater than or equal to a first preset threshold, performing stability error hysteresis processing on the duty cycle of the pulse width signal output by the control port this time and the duty cycle of the pulse width signal output last time, until the target pulse width signal is obtained.
[0010] In an exemplary embodiment, adjusting the duty cycle of the pulse width signal output by the control port according to the sampled value to obtain the target pulse width signal further includes: when the wiring mode is the normally closed mode, if the difference between the second sampled value and the second parameter value is less than or equal to a second preset threshold, performing stability error hysteresis processing on the duty cycle of the pulse width signal output by the control port this time and the duty cycle of the pulse width signal output last time, until the target pulse width signal is obtained.
[0011] In an exemplary embodiment, the optocoupler is connected to one end of the current limiting device, and the other end of the current limiting device is connected to the terminal; the control port is connected to the first pin of the MOS field-effect transistor, the isolation device is connected to the second pin of the MOS field-effect transistor, the third pin of the MOS field-effect transistor is connected to one end of the anti-reverse diode, and the other end of the anti-reverse diode is connected to the bus power supply.
[0012] In one exemplary embodiment, when the terminal is a normally open terminal, the optocoupler is a first optocoupler, the current limiting device is a first current limiting device, the first optocoupler is connected to one end of the first current limiting device, and the other end of the first current limiting device is connected to the normally open terminal; when the terminal is a normally closed terminal, the optocoupler is a second optocoupler, the current limiting device is a second current limiting device, the second optocoupler is connected to one end of the second current limiting device, and the other end of the second current limiting device is connected to the normally closed terminal.
[0013] According to another embodiment of the present invention, an isolated output system is provided, comprising: an isolation device, a normally open terminal, a normally closed terminal, a common port, a bus power supply, a MOSFET, and a control port anti-reverse diode. The isolation device includes a first port, a second port, a third port, a fourth port, and a fifth port, wherein the first port is connected to the normally open terminal, the second port is connected to the normally closed terminal, the third port is connected to the common port, the fourth port is connected to the bus power supply, and the fifth port is connected to the MOSFET. The MOSFET includes a first pin, a second pin, and a third pin. The first pin is connected to the control port, the second pin is connected to the fifth port of the isolation device, and the third pin is connected to one end of the anti-reverse diode. The other end of the anti-reverse diode is connected to the bus power supply.
[0014] In one exemplary embodiment, the isolated output system further includes: a first current limiting device, a second current limiting device, a first optocoupler, a second optocoupler, a first sampling port, and a second sampling port, wherein one end of the first current limiting device is connected to the normally open terminal, and the other end of the first current limiting device is also connected to the first optocoupler; one end of the second current limiting device is connected to the normally closed terminal, and the other end of the second current limiting device is also connected to the second optocoupler; the first optocoupler is also connected to the first sampling port and the common port respectively; the second optocoupler is also connected to the second sampling port and the common port respectively.
[0015] According to another embodiment of the present invention, an apparatus for controlling the stable operation of an isolation device is provided, comprising: an acquisition module for acquiring a sampled value of a sampling port, wherein the sampling port is connected to an optocoupler, and the optocoupler is connected to a terminal and a common port; an adjustment module for adjusting the duty cycle of a pulse width signal output from a control port according to the sampled value to obtain a target pulse width signal, wherein the control port is connected to the isolation device, and the isolation device is connected to the terminal and the common port; and a control module for controlling the stable operation of the isolation device through the target pulse width signal.
[0016] According to yet another embodiment of the present invention, a computer-readable storage medium is also provided, wherein a computer program is stored therein, wherein the computer program, when executed by a processor, implements the steps of the method described in any of the preceding claims.
[0017] According to yet another embodiment of the present invention, an electronic device is also provided, including a memory and a processor, wherein the memory stores a computer program and the processor is configured to run the computer program to perform the steps in any of the above method embodiments.
[0018] This invention controls the duty cycle of the output pulse width signal by acquiring the sampled value from the sampling port, thereby ensuring the stable operation of the isolation device. This avoids the power consumption waste caused by continuously outputting a high-level signal in existing technologies. It achieves power saving while ensuring stable operation of the isolation device. Attached Figure Description
[0019] Figure 1 is a hardware structure block diagram of a mobile terminal for a method of controlling the stable operation of an isolation device according to an embodiment of the present invention.
[0020] Figure 2 is a flowchart of a method for controlling the stable operation of an isolation device according to an embodiment of the present invention;
[0021] Figure 3 is a schematic diagram of an isolation output system according to an embodiment of the present invention;
[0022] Figure 4 is a flowchart of a method for controlling the stable operation of an isolation device according to an embodiment of the present invention;
[0023] Figure 5 is a flowchart of the system according to an embodiment of the present invention;
[0024] Figure 6 is a structural block diagram of a device for controlling the stable operation of an isolation device according to an embodiment of the present invention. Detailed Implementation
[0025] The embodiments of the present invention will be described in detail below with reference to the accompanying drawings and examples.
[0026] It should be noted that the terms "first," "second," etc., in the specification, claims, and drawings of this invention are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence.
[0027] The method embodiments provided in this application can be executed in a mobile terminal, computer terminal, or similar computing device. Taking a mobile terminal as an example, FIG1 is a hardware structure block diagram of a mobile terminal for a method of controlling the stable operation of an isolation device according to an embodiment of the present invention. As shown in FIG1, the mobile terminal may include one or more (only one is shown in FIG1) processors 102 (processors 102 may include, but are not limited to, microprocessors MCUs or programmable logic devices FPGAs, etc.) and a memory 104 for storing data. The mobile terminal may also include a transmission device 106 for communication functions and an input / output device 108. Those skilled in the art will understand that the structure shown in FIG1 is only illustrative and does not limit the structure of the mobile terminal. For example, the mobile terminal may also include more or fewer components than shown in FIG1, or have a different configuration than shown in FIG1.
[0028] The memory 104 can be used to store computer programs, such as application software programs and modules, like the computer program corresponding to the method for controlling the stable operation of the isolation device in this embodiment of the invention. The processor 102 executes various functional applications and data processing by running the computer program stored in the memory 104, thereby implementing the above-described method. The memory 104 may include high-speed random access memory, and may also include non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some instances, the memory 104 may further include memory remotely located relative to the processor 102, and these remote memories can be connected to the mobile terminal via a network. Examples of such networks include, but are not limited to, the Internet, corporate intranets, local area networks, mobile communication networks, and combinations thereof.
[0029] The transmission device 106 is used to receive or send data via a network. Specific examples of the network described above may include a wireless network provided by the mobile terminal's communication provider. In one example, the transmission device 106 includes a Network Interface Controller (NIC), which can connect to other network devices via a base station to communicate with the Internet. In another example, the transmission device 106 may be a Radio Frequency (RF) module used for wireless communication with the Internet.
[0030] This embodiment provides an isolated output system, which mainly includes a microcontroller control unit, an AD sampling unit, an isolation device, and a current limiting device. As shown in Figure 2, the isolation device 1 can be an isolation device relay, and the isolation device 2 can be an isolation device optocoupler.
[0031] The isolated output system is shown in detail in Figure 3, including: an isolation device, a normally open terminal, a normally closed terminal, a common port, a bus power supply, a MOSFET, a control port, and a reverse protection diode. The isolation device includes a first port, a second port, a third port, a fourth port, and a fifth port. The first port is connected to the normally open terminal, the second port is connected to the normally closed terminal, the third port is connected to the common port, the fourth port is connected to the bus power supply, and the fifth port is connected to the MOSFET. The MOSFET includes a first pin, a second pin, and a third pin. The first pin is connected to the control port, the second pin is connected to the fifth port of the isolation device, and the third pin is connected to one end of the reverse protection diode. The other end of the reverse protection diode is connected to the bus power supply.
[0032] The first and second sampling ports mentioned above can be microcontroller AD ports, and the control ports mentioned above can be microcontroller control ports.
[0033] In one exemplary embodiment, the isolated output system further includes: a first current limiting device, a second current limiting device, a first optocoupler, a second optocoupler, a first sampling port, and a second sampling port, wherein one end of the first current limiting device is connected to the normally open terminal, and the other end of the first current limiting device is also connected to the first optocoupler; one end of the second current limiting device is connected to the normally closed terminal, and the other end of the second current limiting device is also connected to the second optocoupler; the first optocoupler is also connected to the first sampling port and the common port respectively; the second optocoupler is also connected to the second sampling port and the common port respectively.
[0034] The isolation device can be a relay, and the first and second optocouplers are optical couplers. The isolation device and optocouplers isolate the system from external inputs. The control port (microcontroller control port) can continuously output a high level or a pulse width modulation (PWM) signal to control the on / off state of the MOSFET, indirectly controlling the isolation device's operation. A reverse protection diode prevents the bus power supply from being directly connected to the MOSFET. When the control port (microcontroller control port) is open, the MOSFET is grounded; without the reverse protection diode, the bus power supply is directly grounded, causing it to be pulled low and the relay to malfunction. Current limiting devices (including the first and second current limiting devices) prevent damage to the optocoupler when an external power supply is connected. Furthermore, current limiting controls the on / off state of the optocoupler, making it easier for the AD sampling to distinguish whether an external power supply is connected. Normally open wires connect to normally open terminals and the common port (common COM port), and normally closed wires connect to normally closed terminals and the common port (common COM port).
[0035] This embodiment provides a method for the stable operation of a control isolation device running on the aforementioned mobile terminal. Figure 4 is a flowchart of the method for the stable operation of a control isolation device according to an embodiment of the present invention. As shown in Figure 4, the process includes the following steps:
[0036] Step S402: Obtain the sampled value of the sampling port, wherein the sampling port is connected to the optocoupler, and the optocoupler is connected to the terminal and the common port;
[0037] The sampling port mentioned above can be either the first or second sampling port in the system shown in Figure 3, and the sampling port can be the microcontroller's AD port. The optocoupler mentioned above can also be either the first or second optocoupler in the system shown in Figure 3. The terminals mentioned above can be either normally open or normally closed terminals as shown in Figure 3. The common port mentioned above can be a common COM port.
[0038] Step S404: Adjust the duty cycle of the pulse width signal output by the control port according to the sampled value to obtain the target pulse width signal, wherein the control port is connected to the isolation device, and the isolation device is connected to the terminal and the common port;
[0039] The aforementioned control port can be a microcontroller control port. Assuming the period of the pulse width signal output by the control port is Period and the high-level time is Duty, then the duty cycle of the pulse width signal is: Ratio = Duty / Period.
[0040] Step S406: Control the isolation device to operate stably using the target pulse width signal.
[0041] Optionally, the entity performing the above steps may be a background processor or other devices with similar processing capabilities, or a machine that integrates at least an image acquisition device and a data processing device. The image acquisition device may include an image acquisition module such as a camera, and the data processing device may include a terminal such as a computer or a mobile phone, but is not limited thereto.
[0042] By controlling the duty cycle of the output pulse width signal through the sampled values obtained from the sampling port, the stable operation of the isolation device is thus controlled. This avoids the power consumption waste caused by the need for continuous high-level signal output in existing technologies. Power saving is achieved while ensuring stable operation of the isolation device.
[0043] In an exemplary embodiment, before acquiring the sampled value of the sampling port, the method further includes: acquiring wiring mode parameters; determining the wiring mode of the isolation device based on the wiring mode parameters, wherein the wiring mode includes: normally open mode and normally closed mode.
[0044] As an optional implementation, Figure 5 shows the system's workflow. When the microcontroller receives the output control command, it controls the control port to output a pulse width modulation signal, which controls the relay's operation by controlling the on / off state of the MOS field-effect transistor.
[0045] Normally open (NO) and normally closed (NO) modes refer to whether the wiring is normally open or normally closed in practical applications. The host computer can configure the wiring mode parameter OutputMode and store the mode parameter in the microcontroller's FLASH. The microcontroller determines whether the output wiring is normally open or normally closed by judging the value of the OutputMode parameter. For example, OutputMode = 0 indicates normally open mode; OutputMode = 1 indicates normally closed mode.
[0046] When the system is determined to be in normally open mode, the first sampling port is started for sampling; when the system is determined to be in normally closed mode, the second sampling port is started for sampling. The sampling ports are turned off when not in use to reduce unnecessary power consumption.
[0047] In an exemplary embodiment, obtaining a sampled value from a sampling port includes: when the wiring mode is the normally open mode, obtaining a first sampled value from a first sampling port, wherein the first sampling port is connected to a first optocoupler, the first optocoupler is connected to a normally open terminal and the common port, the sampling port includes the first sampling port, the optocoupler includes the first optocoupler, the terminal includes the normally open terminal, and the sampled value includes the first sampled value; and when the wiring mode is the normally closed mode, obtaining a second sampled value from a second sampling port, wherein the second sampling port is connected to a second optocoupler, the second optocoupler is connected to a normally closed terminal and the common port, the sampling port includes the second sampling port, the optocoupler includes the second optocoupler, the terminal includes the normally closed terminal, and the sampled value includes the second sampled value.
[0048] In an exemplary embodiment, adjusting the duty cycle of the pulse width signal output by the control port according to the sampled value to obtain the target pulse width signal includes: when the wiring mode is the normally open mode, if the difference between the first sampled value and the first parameter value is greater than or equal to a first preset threshold, performing stability error hysteresis processing on the duty cycle of the pulse width signal output by the control port this time and the duty cycle of the pulse width signal output last time, until the target pulse width signal is obtained.
[0049] As an alternative implementation method, let's first explain the working principle of the relay. When the microcontroller controls the output port, it can be directly set high, the MOSFET will remain on, and the relay will operate. This method consumes the most power because the relay operation has voltage and current requirements. The relay shown in Table 1 below is an example.
[0050] Table 1
[0051]
[0052] The operating voltage range of the relays in Table 1 above is 9.6V-18V. Assuming the bus power supply is 18V, if the microcontroller output port continuously outputs a high level, the power consumption of the relay during operation will be 18V / 720Ω = 25mA. This results in a significant waste of power consumption; the higher the voltage, the greater the current.
[0053] The relay requires a minimum operating voltage of 9.6V. This can be achieved by controlling the pulse width modulation (PWM) signal output from the control port, which intermittently supplies power to the relay coil via the bus voltage, resulting in an effective voltage greater than 9.6V. However, 9.6V is only the relay's starting voltage; it does not mean that the relay must maintain an effective voltage greater than 9.6V after starting. The relay's release voltage is 1.20V, so it is not necessary to maintain an effective voltage greater than 9.6V after starting.
[0054] To address the above issues, this application proposes a low-power operation algorithm that can both ensure stable relay startup and significantly reduce relay operating power consumption.
[0055] Assuming the bus voltage is 24V, the duty cycle of the modulation signal (PWM) output at the control port must not be lower than 2:5 at startup. Upon receiving the start command, the initial PWM period is Period0, and the high-level time is Duty0, i.e., the initial duty cycle Ratio0 = Duty0 / Period0, ensuring the relay can operate. After the relay operates, the PWM period is increased every certain period of time t to learn the relay's startup status, thereby reducing the duty cycle and the effective voltage. Before each increase in the PWM period, sampling and judgment are required.
[0056] When it is determined to be in normally open mode, the first sampling port is opened for sampling. When the relay is started, the normally open terminal and the COM common port are short-circuited. At this time, no current flows through the first optocoupler. At this time, the first sampling value is close to the first parameter value (the first parameter value is the preset value of the first sampling port, which can be set according to the actual situation, for example, it can be 3.3 volts).
[0057] When the duty cycle is too small to maintain the continuous operation of the relay, the relay returns to its pre-operation state. At this time, current flows through the first optocoupler. The first sampled value deviates significantly from the sampled value at startup (deviates significantly from the first parameter value). When it is greater than or equal to the first preset threshold, it is determined that the duty cycle is too small (the first preset threshold can be determined according to the actual situation, for example, it can be 1 volt or 1.2 volts). Then, this learning is complete.
[0058] Record the duty cycle parameters of the pulse width signal output from the control port in the previous operation. Perform stability hysteresis processing on the duty cycle of the previous pulse width signal and the current pulse width signal. Start the relay again according to the initial duty cycle parameters Period0 and Duty0. After a period of stable operation, modify the PWM parameters (period of the pulse width modulation signal) to the PWM parameters (period of the pulse width modulation signal) after the previous learning and stability error hysteresis processing. Do not adjust the PWM parameters further; simply continue to operate stably according to these learned parameters. This ensures stable relay operation while significantly reducing power consumption.
[0059] In an exemplary embodiment, adjusting the duty cycle of the pulse width signal output by the control port according to the sampled value to obtain the target pulse width signal further includes: when the wiring mode is the normally closed mode, if the difference between the second sampled value and the second parameter value is less than or equal to a second preset threshold, performing stability error hysteresis processing on the duty cycle of the pulse width signal output by the control port this time and the duty cycle of the pulse width signal output last time, until the target pulse width signal is obtained.
[0060] As an optional implementation, when it is determined to be in normally closed mode, the second sampling port is opened for sampling. When the relay is activated, the normally closed terminal and the COM common port are "open". The "open" mentioned here is not a true open circuit. The "normally open" mentioned in fire protection applications is not a true open circuit either. Normally open means that a large resistor is added to the circuit to limit the current of the controlled equipment. As a result, when normally open, the controlled equipment cannot work because the current is too small, thus achieving the effect of a true open circuit.
[0061] When the relay starts, current flows through the second optocoupler. At this time, the second sampled value deviates significantly from the second parameter value (the second parameter value is a preset value of the second sampling port and can be set according to actual conditions; it can be the same value as the first parameter value, for example, 3.3 volts, or other values, such as 4V). When the duty cycle is too small to maintain the relay's continuous operation, the relay returns to its pre-operation state. At this point, no current flows through the second optocoupler, and the second sampled value is close to the second parameter value. This indicates that the adjusted duty cycle is now small, and the learning is complete.
[0062] Record the duty cycle parameters of the pulse width signal output from the control port in the previous operation. Perform stability hysteresis processing on the duty cycle of the previous pulse width signal and the current pulse width signal. Start the relay again according to the initial duty cycle parameters Period0 and Duty0. After a period of stable operation, modify the PWM parameters (period of the pulse width modulation signal) to the PWM parameters (period of the pulse width modulation signal) after the previous learning and stability error hysteresis processing. Do not adjust the PWM parameters further; simply continue to operate stably according to these learned parameters. This ensures stable relay operation while significantly reducing power consumption.
[0063] The normally open and normally closed combined passive isolation output system of this application can be used for both passive normally open wiring and passive normally closed wiring, and is isolated from the outside world. Through software algorithms, the power consumption during startup and operation is greatly reduced, making it more suitable for field applications.
[0064] Through the above description of the embodiments, those skilled in the art can clearly understand that the methods according to the above embodiments can be implemented by means of software plus necessary general-purpose hardware platforms. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk) and includes several instructions to cause a terminal device (which may be a mobile phone, computer, server, or network device, etc.) to execute the methods described in the various embodiments of the present invention.
[0065] This embodiment also provides a device for controlling the stable operation of an isolation device. This device is used to implement the above embodiments and preferred embodiments, and details already described will not be repeated. As used below, the term "module" can refer to a combination of software and / or hardware that implements a predetermined function. Although the device described in the following embodiments is preferably implemented in software, hardware implementation, or a combination of software and hardware, is also possible and contemplated.
[0066] Figure 6 is a structural block diagram of a device for controlling the stable operation of an isolation device according to an embodiment of the present invention. As shown in Figure 6, the device includes: an acquisition module 62, used to acquire the sampled value of a sampling port, wherein the sampling port is connected to an optocoupler, and the optocoupler is connected to a terminal and a common port; an adjustment module 64, used to adjust the duty cycle of a pulse width signal output from a control port according to the sampled value to obtain a target pulse width signal, wherein the control port is connected to an isolation device, and the isolation device is connected to the terminal and the common port; and a control module 66, used to control the stable operation of the isolation device through the target pulse width signal.
[0067] Optionally, the above-mentioned device is further configured to acquire wiring mode parameters before acquiring the sampling value of the sampling port; and determine the wiring mode of the isolation device according to the wiring mode parameters, wherein the wiring mode includes: normally open mode and normally closed mode.
[0068] Optionally, the above-described device is further configured to, when the wiring mode is the normally open mode, acquire a first sampled value of a first sampling port, wherein the first sampling port is connected to a first optocoupler, the first optocoupler is connected to a normally open terminal and the common port, the sampling port includes the first sampling port, the optocoupler includes the first optocoupler, the terminal includes the normally open terminal, and the sampled value includes the first sampled value; and when the wiring mode is the normally closed mode, acquire a second sampled value of a second sampling port, wherein the second sampling port is connected to a second optocoupler, the second optocoupler is connected to a normally closed terminal and the common port, the sampling port includes the second sampling port, the optocoupler includes the second optocoupler, the terminal includes the normally closed terminal, and the sampled value includes the second sampled value.
[0069] Optionally, the above-mentioned device is further configured to, when the wiring mode is the normally open mode, if the difference between the first sampled value and the first parameter value is greater than or equal to a first preset threshold, perform stability error hysteresis processing on the duty cycle of the pulse width signal output by the control port this time and the duty cycle of the pulse width signal output last time, until the target pulse width signal is obtained.
[0070] Optionally, the above-mentioned device is further configured to, when the wiring mode is the normally closed mode, if the difference between the second sampled value and the second parameter value is less than or equal to a second preset threshold, perform stability error hysteresis processing on the duty cycle of the pulse width signal output by the control port this time and the duty cycle of the pulse width signal output last time, until the target pulse width signal is obtained.
[0071] Optionally, the optocoupler is connected to one end of the current limiting device, and the other end of the current limiting device is connected to the terminal; the control port is connected to the first pin of the MOS field-effect transistor, the isolation device is connected to the second pin of the MOS field-effect transistor, the third pin of the MOS field-effect transistor is connected to one end of the anti-reverse diode, and the other end of the anti-reverse diode is connected to the bus power supply.
[0072] Optionally, when the terminal is a normally open terminal, the optocoupler is a first optocoupler, the current limiting device is a first current limiting device, the first optocoupler is connected to one end of the first current limiting device, and the other end of the first current limiting device is connected to the normally open terminal; when the terminal is a normally closed terminal, the optocoupler is a second optocoupler, the current limiting device is a second current limiting device, the second optocoupler is connected to one end of the second current limiting device, and the other end of the second current limiting device is connected to the normally closed terminal. The other end of the anti-reverse diode is connected to the bus power supply.
[0073] It should be noted that the above modules can be implemented by software or hardware. For the latter, they can be implemented in the following ways, but are not limited to: all the above modules are located in the same processor; or, the above modules are located in different processors in any combination.
[0074] Embodiments of the present invention also provide a computer-readable storage medium storing a computer program, wherein the computer program, when executed by a processor, implements the steps of the method described in any of the preceding claims.
[0075] In one exemplary embodiment, the aforementioned computer-readable storage medium may include, but is not limited to, various media capable of storing computer programs, such as a USB flash drive, read-only memory (ROM), random access memory (RAM), portable hard disk, magnetic disk, or optical disk.
[0076] Embodiments of the present invention also provide an electronic device including a memory and a processor, the memory storing a computer program and the processor being configured to run the computer program to perform the steps in any of the above method embodiments.
[0077] In one exemplary embodiment, the electronic device may further include a transmission device and an input / output device, wherein the transmission device is connected to the processor and the input / output device is connected to the processor.
[0078] Specific examples in this embodiment can be found in the examples described in the above embodiments and exemplary implementations, and will not be repeated here.
[0079] It is obvious to those skilled in the art that the modules or steps of the present invention described above can be implemented using general-purpose computing devices. They can be centralized on a single computing device or distributed across a network of multiple computing devices. They can be implemented using computer-executable program code, and thus can be stored in a storage device for execution by a computing device. In some cases, the steps shown or described can be performed in a different order than those described herein, or they can be fabricated as separate integrated circuit modules, or multiple modules or steps can be fabricated as a single integrated circuit module. Thus, the present invention is not limited to any particular combination of hardware and software.
[0080] The above description is merely a preferred embodiment of the present invention and is not intended to limit the invention. Various modifications and variations can be made to the present invention by those skilled in the art. Any modifications, equivalent substitutions, or improvements made within the principles of the present invention should be included within the scope of protection of the present invention.
Claims
1. A method for controlling the stable operation of an isolation device, characterized in that, include: The method involves: acquiring a sampled value from a sampling port, wherein the sampling port is connected to an optocoupler, and the optocoupler is connected to a terminal and a common port; adjusting the duty cycle of a pulse width signal output from a control port based on the sampled value to obtain a target pulse width signal, wherein the control port is connected to an isolation device, and the isolation device is connected to the terminal and the common port; controlling the isolation device to operate stably using the target pulse width signal; wherein, before acquiring the sampled value from the sampling port, the method further includes: acquiring wiring mode parameters; determining the wiring mode of the isolation device based on the wiring mode parameters, wherein the wiring mode includes: normally open mode and normally closed mode; and acquiring the sampled value from the sampling port includes: when the wiring mode is the normally open mode... In the case where the wiring mode is the normally closed mode, a first sampling value is obtained from the first sampling port, wherein the first sampling port is connected to the first optocoupler, the first optocoupler is connected to the normally open terminal and the common port, the sampling port includes the first sampling port, the optocoupler includes the first optocoupler, the terminal includes the normally open terminal, and the sampling value includes the first sampling value; in the case where the wiring mode is the normally closed mode, a second sampling value is obtained from the second sampling port, wherein the second sampling port is connected to the second optocoupler, the second optocoupler is connected to the normally closed terminal and the common port, the sampling port includes the second sampling port, the optocoupler includes the second optocoupler, the terminal includes the normally closed terminal, and the sampling value includes the second sampling value.
2. The method according to claim 1, characterized in that, Adjusting the duty cycle of the pulse width signal output by the control port according to the sampled value to obtain the target pulse width signal includes: when the wiring mode is the normally open mode, if the difference between the first sampled value and the first parameter value is greater than or equal to a first preset threshold, performing stability error hysteresis processing on the duty cycle of the pulse width signal output by the control port this time and the duty cycle of the pulse width signal output last time, until the target pulse width signal is obtained.
3. The method according to claim 1, characterized in that, The method further includes adjusting the duty cycle of the pulse width signal output by the control port according to the sampled value to obtain the target pulse width signal, and further includes: if the difference between the second sampled value and the second parameter value is less than or equal to a second preset threshold when the wiring mode is the normally closed mode, performing stability error hysteresis processing on the duty cycle of the pulse width signal output by the control port this time and the duty cycle of the pulse width signal output last time, until the target pulse width signal is obtained.
4. The method according to claim 1, characterized in that, The optocoupler is connected to one end of the current limiting device, and the other end of the current limiting device is connected to the terminal; the control port is connected to the first pin of the MOS field-effect transistor, the isolation device is connected to the second pin of the MOS field-effect transistor, the third pin of the MOS field-effect transistor is connected to one end of the anti-reverse diode, and the other end of the anti-reverse diode is connected to the bus power supply.
5. The method according to claim 4, characterized in that, When the terminal is a normally open terminal, the optocoupler is a first optocoupler, the current limiting device is a first current limiting device, the first optocoupler is connected to one end of the first current limiting device, and the other end of the first current limiting device is connected to the normally open terminal; when the terminal is a normally closed terminal, the optocoupler is a second optocoupler, the current limiting device is a second current limiting device, the second optocoupler is connected to one end of the second current limiting device, and the other end of the second current limiting device is connected to the normally closed terminal.
6. An isolated output system, comprising: An isolation device, normally open terminal, normally closed terminal, common port, bus power supply, MOSFET, control port, and reverse protection diode are disclosed. The isolation device includes a first port, a second port, a third port, a fourth port, and a fifth port. The first port is connected to the normally open terminal, the second port is connected to the normally closed terminal, the third port is connected to the common port, the fourth port is connected to the bus power supply, and the fifth port is connected to the MOSFET. The MOSFET includes a first pin, a second pin, and a third pin. The first pin is connected to the control port, and the second pin is connected to the fifth port of the isolation device. The third pin is connected to one end of the anti-reverse diode; the other end of the anti-reverse diode is connected to the bus power supply; the isolated output system further includes: a first current limiting device, a second current limiting device, a first optocoupler, a second optocoupler, a first sampling port, and a second sampling port, wherein one end of the first current limiting device is connected to the normally open terminal, and the other end of the first current limiting device is also connected to the first optocoupler; one end of the second current limiting device is connected to the normally closed terminal, and the other end of the second current limiting device is also connected to the second optocoupler; the first optocoupler is also connected to the first sampling port and the common port respectively; the second optocoupler is also connected to the second sampling port and the common port respectively.
7. A device for controlling the stable operation of an isolation device, characterized in that, include: An acquisition module is used to acquire the sampled value of a sampling port, wherein the sampling port is connected to an optocoupler, and the optocoupler is connected to a terminal and a common port; an adjustment module is used to adjust the duty cycle of the pulse width signal output by the control port according to the sampled value to obtain a target pulse width signal, wherein the control port is connected to an isolation device, and the isolation device is connected to the terminal and the common port; a control module is used to control the stable operation of the isolation device through the target pulse width signal; the device is also used to acquire wiring mode parameters before acquiring the sampled value of the sampling port; determine the wiring mode of the isolation device according to the wiring mode parameters, wherein the wiring mode includes: normally open mode and normally closed mode; the device is also used to acquire the sampled value of the sampling port in the following way: in the When the wiring mode is the normally open mode, a first sampling value is obtained from the first sampling port, wherein the first sampling port is connected to the first optocoupler, the first optocoupler is connected to the normally open terminal and the common port, the sampling port includes the first sampling port, the optocoupler includes the first optocoupler, the terminal includes the normally open terminal, and the sampling value includes the first sampling value; when the wiring mode is the normally closed mode, a second sampling value is obtained from the second sampling port, wherein the second sampling port is connected to the second optocoupler, the second optocoupler is connected to the normally closed terminal and the common port, the sampling port includes the second sampling port, the optocoupler includes the second optocoupler, the terminal includes the normally closed terminal, and the sampling value includes the second sampling value.
8. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program, wherein the computer program, when executed by a processor, implements the steps of the method described in any one of claims 1 to 5.
9. An electronic device comprising a memory and a processor, characterized in that, The memory stores a computer program, and the processor is configured to run the computer program to perform the method as described in any one of claims 1 to 5.
Citation Information
Patent Citations
Microcontroller controlled altimeter
US20180364039A1
Duty cycle for inductive position sensors
US20210239494A1