A control circuit, method, device and medium based on pulse width modulation signal
By adjusting the duty cycle of the pulse width modulation signal in real time using a sampling resistor and a differential amplifier circuit, the problem of unexpected relay disconnection in the PWM driving method is solved, ensuring the stability and reliability of the system.
Patent Information
- Application Number
- CN202410779079.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-17
- Publication Date
- 2024-11-05
- Estimated Expiration
- 2044-06-17
AI Technical Summary
Existing PWM driving methods lack real-time monitoring of relay coil current and voltage in complex electromagnetic environments or under voltage fluctuation conditions, leading to current fluctuations that may cause the relay to disconnect unexpectedly, affecting system stability and reliability.
The current of the controlled component's coil is collected by a sampling resistor, and the differential amplifier circuit outputs it to a pulse width modulation circuit. The duty cycle of the pulse width modulation signal is adjusted to control the relay's operating state in real time and prevent current fluctuations.
It enables stable control of relays under complex electromagnetic environments or voltage fluctuations, preventing unexpected disconnection and improving the stability and reliability of the system.
Smart Images

Figure CN118337192B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of electric energy control, and in particular to a control circuit and method, device and medium based on a pulse width modulation signal. Background Art
[0002] With the rapid development of the new energy industry and the energy storage industry, electric vehicles and hybrid vehicles have flourished, resulting in the widespread use of relays in high-voltage power control devices for these intelligent electric vehicles and energy storage systems. In order to meet the needs of energy conservation and emission reduction, conventional direct voltage-driven relays in the prior art have the problem of high energy consumption. In contrast, relays controlled by pulse width modulation signals (PWM) have lower energy consumption, about 25% of direct voltage drive, so PWM-controlled relays have been increasingly recognized.
[0003] In the related technology, the common PWM driving method is that the ECU microcontroller outputs a PWM signal with a fixed frequency and duty cycle, and controls the driving current by adjusting the duty cycle. However, this method lacks monitoring of the relay coil current and the voltage at both ends. In a complex electromagnetic environment or voltage fluctuation, the current may decrease and the relay may be disconnected unexpectedly. Summary of the invention
[0004] The present application aims to solve at least one of the technical problems existing in the prior art. To this end, the present application provides a control circuit and method, device and medium based on a pulse width modulation signal, which can prevent the current fluctuation caused by a complex electromagnetic environment or voltage fluctuation from causing an unexpected disconnection of a relay.
[0005] In a first aspect, an embodiment of the present application provides a control circuit based on a pulse width modulation signal, comprising:
[0006] A pulse width modulation power circuit, the pulse width modulation power circuit comprising a first diode, a filter circuit, a first transistor, a second diode, a sampling resistor and a second transistor connected in sequence; wherein the anode of the first diode is connected to the positive electrode of the power supply, and the source of the second transistor is grounded;
[0007] A differential amplifier circuit, wherein a first port and a second port of the differential amplifier circuit are respectively connected to two ends of the sampling resistor;
[0008] A pulse width signal modulation circuit, wherein the third port of the pulse width signal modulation circuit is connected to the gate of the first transistor, the fourth port of the pulse width signal modulation circuit is connected to the sixth port of the differential amplifier circuit, and the fifth port of the pulse width signal modulation circuit is connected to the gate of the second transistor.
[0009] In some embodiments, the pulse width signal modulation circuit includes a microcontroller chip, a latch circuit, a timing circuit, a pulse width modulation control circuit, and a pulse width modulation synchronization circuit;
[0010] The latch circuit is connected to the seventh port of the microcontroller chip;
[0011] The timing circuit is connected to the eighth port of the microcontroller chip, and the timing circuit is connected to the latch circuit;
[0012] The pulse width modulation synchronization circuit is connected to the ninth port of the microcontroller chip;
[0013] The pulse width modulation control circuit is connected to the pulse width modulation synchronization circuit, and the timing circuit is connected to the pulse width modulation control circuit. The pulse width modulation control circuit is connected to the gate of the second transistor, and the latch circuit is connected to the gate of the first transistor.
[0014] In some embodiments, the pulse width signal modulation circuit further includes a switch edge adjustment circuit, which is connected to the tenth port of the microcontroller chip and is connected between the pulse width modulation control circuit and the gate of the second transistor.
[0015] In some embodiments, two ends of the second diode are connected to two ends of the controlled electronic component through a twisted shielded wire harness.
[0016] In a second aspect, an embodiment of the present application provides a control method based on a pulse width modulation signal, comprising:
[0017] Controlling the pulse width signal modulation circuit to send a closing signal to the first transistor to close the first transistor;
[0018] Controlling the pulse width signal modulation circuit to continuously output a pulse width signal with a preset duty cycle for a first preset time, so as to close the second transistor, and after the first transistor and the second transistor are closed, the relay coil is energized and closed;
[0019] Obtaining the coil current value flowing through the sampling resistor, and adjusting the duty cycle of the pulse width signal until the coil current value meets a preset coil current value range;
[0020] The pulse width signal modulation circuit is controlled to send a disconnection signal to the first transistor and the second transistor, so that the first transistor and the second transistor are disconnected.
[0021] In some embodiments, the coil current value range includes a first coil current value and a second coil current value, wherein the first coil current value is greater than the second coil current value, and adjusting the duty cycle of the pulse width signal according to the coil current value until the coil current value satisfies a preset coil current value range includes:
[0022] When the coil current value is greater than the preset first coil current value, reducing the duty cycle of the pulse width signal to make the coil current value less than the first coil current value;
[0023] When the coil current value is less than the preset second coil current value, the duty cycle of the pulse width signal is increased to make the coil current value greater than the second coil current value.
[0024] In some embodiments, after adjusting the duty cycle of the pulse width signal until the coil current value meets a preset coil current range value, the method further includes:
[0025] Outputting the same synchronous pulse width signal according to the pulse width signal, and transmitting the synchronous pulse width signal to the pulse width modulation synchronization circuit of the control circuit;
[0026] The pulse width modulation synchronization circuit sends the synchronization pulse width signal to the pulse width modulation control circuit of the control circuit, so that the pulse width modulation control circuit maintains the output of the pulse width signal.
[0027] In some embodiments, the controlling the pulse width signal modulation circuit to send a disconnection signal to the first transistor and the second transistor so as to disconnect the first transistor and the second transistor comprises:
[0028] Controlling the microcontroller chip to send a reset signal to the timing circuit of the control circuit, and starting timing when the timing circuit detects the disconnection signal to obtain timing data;
[0029] When the timing data exceeds a first preset time, outputting the disconnection signal to the latch circuit of the control circuit and the pulse width modulation control circuit;
[0030] After receiving the disconnection signal, the latch circuit turns off the output, and the first transistor is turned off. After receiving the disconnection signal, the pulse width modulation control circuit turns off the output of the pulse width signal, and the second transistor is turned off.
[0031] In a third aspect, an embodiment of the present application provides an electronic device, comprising: a memory and a processor, wherein the memory stores a computer program, and when the processor executes the computer program, it implements the control method based on a pulse width modulation signal as described in any one of the embodiments of the second aspect of the present application.
[0032] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, wherein the storage medium stores a program, and the program is executed by a processor to implement a control method based on a pulse width modulation signal as described in any one of the embodiments of the second aspect of the present application.
[0033] The control circuit based on the pulse width modulation signal according to the embodiment of the present application has at least the following beneficial effects:
[0034] According to the control circuit based on pulse width modulation signal of the embodiment of the present application, it includes: a pulse width modulation power circuit, the pulse width modulation power circuit includes a first diode, a filter circuit, a first transistor, a second diode, a sampling resistor and a second transistor connected in sequence; wherein the anode of the first diode is connected to the positive pole of the power supply, and the source of the second transistor is grounded; a differential amplifier circuit, the first port and the second port of the differential amplifier circuit are respectively connected to the two ends of the sampling resistor; a pulse width signal modulation circuit, the third port of the pulse width signal modulation circuit is connected to the gate of the first transistor, the fourth port of the pulse width signal modulation circuit is connected to the sixth port of the differential amplifier circuit, and the fifth port of the pulse width signal modulation circuit is connected to the gate of the second transistor. The present application collects the current at both ends of the coil of the controlled element through the sampling resistor, and outputs it to the pulse width signal modulation circuit through the differential amplifier circuit, and then the pulse width signal modulation circuit adjusts the duty cycle of the pulse width modulation signal according to the current, thereby preventing the current fluctuation caused by the complex electromagnetic environment or voltage fluctuation from causing the relay to disconnect unexpectedly.
[0035] Additional aspects and advantages of the present application will be given in part in the description below, and in part will become apparent from the description below, or will be learned through the practice of the present application. BRIEF DESCRIPTION OF THE DRAWINGS
[0036] The above and / or additional aspects and advantages of the present application will become apparent and easily understood from the description of the embodiments in conjunction with the following drawings, in which:
[0037] Figure 1 A schematic diagram of a control circuit based on a pulse width modulation signal provided in an embodiment of the present application;
[0038] Figure 2 A schematic diagram of another control circuit based on a pulse width modulation signal provided in an embodiment of the present application;
[0039] Figure 3 A flow chart of an optional control method based on a pulse width modulation signal provided in an embodiment of the present application;
[0040] Figure 4 Another optional control method flow chart based on pulse width modulation signal provided in the embodiment of the present application;
[0041] Figure 5 Another optional control method flow chart based on pulse width modulation signal provided in the embodiment of the present application;
[0042] Figure 6 Another optional control method flow chart based on pulse width modulation signal provided in the embodiment of the present application;
[0043] Figure 7 An optional specific implementation flow chart of controlling a relay based on a pulse width modulation signal provided in an embodiment of the present application;
[0044] Figure 8 It is a schematic diagram of the hardware structure of the electronic device provided in the embodiment of the present application. DETAILED DESCRIPTION
[0045] The embodiments of the present application are described in detail below, and examples of the embodiments are shown in the accompanying drawings, wherein the same or similar reference numerals throughout represent the same or similar elements or elements having the same or similar functions. The embodiments described below with reference to the accompanying drawings are exemplary and are only used to explain the present application, and cannot be understood as limiting the present application.
[0046] In the description of this application, "several" means one or more, "more" means more than two, "greater than", "less than", "exceed", etc. are understood to exclude the number itself, and "above", "below", "within", etc. are understood to include the number itself. If there is a description of "first", "second", it is only used to distinguish the technical features, and cannot be understood as indicating or implying relative importance or implicitly indicating the number of the indicated technical features or implicitly indicating the order of the indicated technical features.
[0047] In the description of the present application, it should be understood that descriptions involving orientation, such as up, down, left, right, front, back, etc., indicating orientations or positional relationships, are based on the orientations or positional relationships shown in the accompanying drawings, and are only for the convenience of describing the present application and simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation, and therefore should not be understood as a limitation on the present application.
[0048] In the description of this specification, the description with reference to the terms "one embodiment", "some embodiments", "illustrative embodiments", "examples", "specific examples" or "some examples" means that the specific features, structures, materials or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the present application. In this specification, the schematic representation of the above terms does not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described may be combined in any one or more embodiments or examples in a suitable manner.
[0049] In the description of this application, it should be noted that, unless otherwise clearly defined, the terms such as setting, installing, connecting, etc. should be understood in a broad sense, and technicians in the relevant technical field can reasonably determine the specific meanings of the above terms in this application in combination with the specific content of the technical solution. In addition, the identification of specific steps below does not represent a limitation on the order of steps and execution logic. The execution order and execution logic between each step should be understood and inferred with reference to the contents described in the embodiment.
[0050] As the world pays more and more attention to new energy technologies and sustainable development strategies, the new energy industry and energy storage industry have ushered in an unprecedented period of rapid development, especially in the fields of electric vehicles (EV) and hybrid electric vehicles (HEV). At the same time, higher requirements are placed on the control of high-voltage electric energy. Relays, as a key electrical switch component, can quickly open and close high-voltage circuits under the command of the electronic control unit (ECU), which is an important basis for achieving efficient and safe control of electric energy.
[0051] Faced with the global pressure of energy conservation and emission reduction, the traditional direct voltage driven relays, due to their inherent high energy consumption characteristics, have gradually exposed the shortcomings of not adapting to modern energy requirements. In this context, the relay technology based on pulse width modulation signal (PWM) control has emerged and developed rapidly. This technology has won wide recognition and favor in the industry with its significant low energy consumption advantage (energy consumption is only about 25% of the traditional direct voltage drive method). PWM technology achieves precise control of the relay drive current by effectively modulating the voltage signal, which not only improves energy efficiency but also optimizes the performance of the equipment.
[0052] Among the many PWM control technologies, the most common method is to use the microcontroller in the electronic control unit (ECU) to generate a PWM signal with a fixed frequency and duty cycle. By fine-tuning the duty cycle of the PWM signal, the current passing through the relay coil can be finely controlled, thereby achieving precise control of the relay action. The advantage of this method is that it is simple and efficient, and can meet the needs of most application scenarios. However, this method also has certain limitations in practical applications. Especially in the case of complex electromagnetic environment or large voltage fluctuations, the lack of real-time monitoring and adjustment of the relay coil current and voltage may cause unexpected current fluctuations, which in turn causes the relay to disconnect at unexpected times, affecting the stability and reliability of the entire system.
[0053] Based on this, the present invention constructs a control circuit based on a pulse width modulation signal, which collects the current at both ends of the coil of the controlled element through a sampling resistor and outputs it to the pulse width signal modulation circuit through a differential amplifier circuit. Then the pulse width signal modulation circuit adjusts the duty cycle of the pulse width modulation signal according to the current, thereby preventing the current fluctuation caused by complex electromagnetic environment or voltage fluctuation from causing unexpected disconnection of the relay.
[0054] See also Figure 1 , Figure 1 A schematic diagram of a control circuit based on a pulse width modulation signal provided in an embodiment of the present application is shown in the figure. The control circuit 1000 includes:
[0055] A pulse width modulation power circuit 1100, the pulse width modulation power circuit 1100 comprises a first diode 1110, a filter circuit 1120, a first transistor 1130, a second diode 1140, a sampling resistor 1150 and a second transistor 1160 connected in sequence; wherein the anode of the first diode 1110 is connected to the positive electrode of the power supply, and the source of the second transistor 1160 is grounded;
[0056] A differential amplifier circuit 1200, wherein a first port and a second port of the differential amplifier circuit 1200 are respectively connected to two ends of the sampling resistor 1150;
[0057] The pulse width signal modulation circuit 1300, the third port of the pulse width signal modulation circuit 1300 is connected to the gate of the first transistor 1130, the fourth port of the pulse width signal modulation circuit 1300 is connected to the sixth port of the differential amplifier circuit 1200, and the fifth port of the pulse width signal modulation circuit 1300 is connected to the gate of the second transistor 1160.
[0058] Among them, the cathode of the first diode 1110 is connected to the input end of the filter circuit 1120, the output end of the filter circuit 1120 is connected to the drain of the first transistor 1130, the source of the first transistor 1130 is connected to the cathode of the second diode 1140, the anode of the second diode 1140 is connected to one end of the sampling resistor 1150, the other end of the sampling resistor 1150 is connected to the drain of the second transistor 1160, and the source of the second transistor 1160 is grounded.
[0059] The first diode 1110 acts as a reverse protection diode to prevent the unexpected closing operation of the controlled electronic component 2000 (such as a relay) caused by the accidental reverse connection of the external power supply. When the polarity of the external power supply is wrong, the first diode 1110 can prevent the current from passing through the circuit, effectively preventing sensitive components such as the controlled electronic component 2000 from being damaged or abnormally operated. By ensuring that the current can only flow in a specific direction, the first diode 1110 ensures the safety of the entire circuit system and avoids circuit failure or damage that may be caused by the reverse connection of the power supply.
[0060] The filter circuit 1120 can maintain the stability of the power supply voltage by filtering out high-frequency noise and mutations in the power supply, prevent sudden power supply voltage fluctuations from affecting the circuit, and ensure the stability of the power supply during the signal driving process. Through the filtering effect, the filter circuit 1120 can effectively reduce the electromagnetic interference transmitted by the pulse width signal (PWM signal) along the power line, improve the electromagnetic compatibility (EMC) performance of the product, reduce the interference caused by the circuit to external equipment and systems, and ensure the stability and reliability of the system.
[0061] The second diode 1140 acts as a freewheeling diode, and the second diode 1140 can provide the freewheeling current required by the coil of the controlled electronic component 2000 during the low level of the pulse width signal. In the relay coil, when the control signal is at a low level, a continuous current may be required in the coil to keep the relay in a working state or ensure correct operation. The freewheeling current provided by the second diode 1140 can ensure that the current in the coil of the controlled electronic component 2000 will not be interrupted when the control signal is switched, thereby ensuring the normal operation of the controlled electronic component 2000, thereby avoiding failure or unstable operation of the controlled electronic component 2000 due to current discontinuity.
[0062] The first transistor 1130 is used to deal with the short circuit failure of the second transistor 1160. Once the second transistor 1160 is short-circuited, it may cause the coil of the controlled electronic component 2000 to be continuously powered on or to produce abnormal operation. The first transistor 1130 can intervene and control in this case. By controlling the first transistor 1130, the current supply of the controlled electronic component 2000 can be disconnected, thereby avoiding the situation where the controlled electronic component 2000 is unexpectedly operated or continuously powered on. This helps to protect the controlled electronic component 2000 from the impact of short circuit failure.
[0063] The sampling resistor 1150 is used to collect the current at both ends of the coil of the controlled electronic component 2000. The current signal collected by the sampling resistor 1150 is amplified and processed by the differential amplifier circuit 1200. The signal output by the differential amplifier circuit 1200 enters the pulse width signal modulation circuit 1300, so that the analog-to-digital conversion port (ADC) in the pulse width signal modulation circuit 1300 adjusts the duty cycle of the pulse width signal according to the collected coil current of the controlled electronic component 2000. The pulse width signal modulation circuit 1300 adjusts the pulse width signal in real time according to the current situation to ensure the normal operation and stability of the controlled electronic component 2000, and outputs it to the gate of the second transistor 1160, thereby controlling the working state of the second transistor 1160, and then controlling the working state of the coil of the controlled electronic component 2000, and realizing precise control of the controlled electronic component 2000. In general, the sampling resistor 1150 helps the system to obtain the coil current information of the controlled electronic component 2000 in real time, and adjusts the pulse width signal through the differential amplifier circuit 1200 and the pulse width signal modulation circuit 1300, which ultimately affects the working state of the second transistor 1160 and realizes accurate control of the controlled electronic component 2000.
[0064] In some embodiments, the pulse width signal modulation circuit 1300 includes a microcontroller chip 1310, a latch circuit 1320, a timing circuit 1330, a pulse width modulation control circuit 1340 and a pulse width modulation synchronization circuit 1350;
[0065] Wherein, the latch circuit 1320 is connected to the seventh port of the microcontroller chip 1310;
[0066] The timing circuit 1330 is connected to the eighth port of the microcontroller chip 1310 , and the timing circuit 1330 is connected to the latch circuit 1320 ;
[0067] The pulse width modulation synchronization circuit 1350 is connected to the ninth port of the microcontroller chip 1310;
[0068] The PWM control circuit 1340 is connected to the PWM synchronization circuit 1350 , and the timing circuit 1330 is connected to the PWM control circuit 1340 . The PWM control circuit 1340 is connected to the gate of the second transistor 1160 , and the latch circuit 1320 is connected to the gate of the first transistor 1130 .
[0069] Among them, the seventh port of the microcontroller chip 1310 is an I / O port, connected to the input end of the latch circuit 1320, and the eighth port is a reset trigger signal port, connected to the input end of the timing circuit 1330, and the input end of the timing circuit 1330 is connected to the input end of the latch circuit 1320. The timing circuit 1330 starts timing after receiving the reset signal of the microcontroller chip 1310. After the timer times out, the timing circuit 1330 will send a signal, which will disconnect the input signal of the latch circuit 1320, so that the output state of the latch circuit 1320 changes. The change of the output state of the latch circuit 1320 will affect the working state of the first transistor 1130 and the second transistor 1160, and finally cause the controlled electronic component 2000 to disconnect the operation. The design of the latch circuit 1320 can maintain the original state after receiving the signal of the timing circuit 1330 until the next valid signal appears. Through such a design, the system can effectively avoid unexpected operation of the relay when the microcontroller chip 1310 is reset, and ensure the stable state of the controlled electronic component 2000. The synergistic effect of the timing protection mechanism and the latch circuit 1320 can ensure that the controlled electronic component 2000 is controllably disconnected when a reset occurs, thereby enhancing the reliability and safety of the circuit.
[0070] Among them, the pulse width modulation synchronization circuit 1350 is used to transmit the same pulse width signal to the pulse width modulation control circuit 1340 in real time according to the pulse width signal output by the micro-control chip 1310 to the second transistor 1160, so as to ensure that the pulse width modulation control circuit 1340 tracks the changes of the output of the micro-control chip 1310. The pulse width modulation control circuit 1340 maintains the output of the pulse width signal through the received pulse width signal, and is responsible for maintaining a specific pulse width signal output state in the circuit. Through the coordinated work of the pulse width modulation synchronization circuit 1350 and the pulse width modulation control circuit 1340, the continuity and stability of the pulse width signal in the circuit can be ensured, the accuracy of the pulse width signal output can be maintained, and the changes of the micro-control chip 1310 can be tracked in real time, thereby meeting the precise control requirements for the pulse width signal.
[0071] See also Figure 2 In some embodiments, the pulse width signal modulation circuit 1300 further includes a switch edge adjustment circuit 1360 , which is connected to the tenth port of the microcontroller chip 1310 and is connected between the pulse width modulation control circuit 1340 and the gate of the second transistor 1160 .
[0072] The switch edge adjustment circuit 1360 is used to adjust the time of the rising edge and the falling edge of the pulse width signal. By adjusting the edge of the pulse width signal, electromagnetic interference can be reduced, electromagnetic compatibility (EMC performance) can be improved, and the stability and anti-interference ability of the system in the electromagnetic environment can be improved.
[0073] In some embodiments, two ends of the second diode 1140 are connected to two ends of the controlled electronic component 2000 through a twisted shielded wire harness 1400. Using the twisted shielded wire harness 1400 to connect can effectively reduce the spatial radiation generated by the pulse width signal through the wire harness, resulting in a decrease in product EMC performance.
[0074] In some embodiments, the controlled electronic component 2000 can be a relay, and the twisted pair shielded wiring harness 1400 is responsible for transmitting the control signal to the relay, thereby achieving control over its operation. Since the relay may generate electromagnetic noise and interference during operation, the use of a twisted pair shielded wiring harness can reduce the impact of these interferences on the surrounding environment and the system.
[0075] See also Figure 3 A control method based on a pulse width modulation signal provided by an embodiment of the present invention is applied to the above-mentioned control circuit based on a pulse width modulation signal, and may include, but is not limited to, the following steps 310 to 340:
[0076] Step 310, controlling the pulse width signal modulation circuit to send a closing signal to the first transistor to close the first transistor;
[0077] Step 320, controlling the pulse width signal modulation circuit to continuously output a pulse width signal with a preset duty cycle for a first preset time, so that the second transistor is closed, and after the first transistor and the second transistor are closed, the relay coil is energized and closed;
[0078] Step 330, obtaining the coil current value flowing through the sampling resistor, and adjusting the duty cycle of the pulse width signal until the coil current value meets the preset coil current value range;
[0079] Step 340: Control the pulse width signal modulation circuit to send a disconnection signal to the first transistor and the second transistor, so that the first transistor and the second transistor are disconnected.
[0080] In step 310 of some embodiments, the pulse width signal modulation circuit sends a closing signal to the first transistor to control the state of the first transistor. When the first transistor is closed, it is turned on and allows current to pass; conversely, when it is disconnected, the current will be blocked. By controlling the on and off state of the first transistor, the function or performance of the entire circuit can be affected, and the circuit can be controlled and adjusted.
[0081] In step 320 of some embodiments, the pulse width signal modulation circuit will continuously output a pulse width signal of a preset time and ensure that the signal has a preset duty cycle. This signal will be used to control the state of the second transistor to close it. When the first transistor and the second transistor are closed at the same time, the relay coil in the circuit will be energized and closed. This operation sequence may be to implement a specific control logic or action, such as establishing a specific connection or path in the circuit to perform more complex functions or operations later. Through this step, it can be ensured that the second transistor is closed according to the predetermined signal parameters, which ultimately causes the relay coil to be energized and closed, completing the required control action.
[0082] In some embodiments, the closing action of the second transistor can be controlled by outputting a pulse width signal with a 100% duty cycle for 100 milliseconds. When the second transistor receives such a pulse width signal with a 100% duty cycle, the closing operation is completed. The duration of the pulse width signal can be adjusted according to actual needs and system design, and according to the specifications and performance requirements of the relay to ensure that the system operates normally and meets the required functions and performance indicators, which is not limited in this embodiment.
[0083] In step 330 of some embodiments, by detecting the coil current value of the sampling resistor, the current condition of the coil can be understood in real time. According to the detected current value, the duty cycle of the pulse width signal is adjusted, and the current of the coil can be controlled to reach a preset coil current value range. This control system can ensure that the coil current remains within the set range, thereby achieving the purpose of accurately regulating and controlling the coil current. By continuously detecting the current value and adjusting the control signal, the coil current can be kept stable within the required range.
[0084] In step 340 of some embodiments, the pulse width signal modulation circuit sends a disconnect signal to the first transistor and the second transistor, causing them to be disconnected. Through this operation, the first transistor and the second transistor will stop conducting current, completing the disconnection process of the circuit part controlled by them.
[0085] See also Figure 4 According to some embodiments of the present invention, the coil current value range includes a first coil current value and a second coil current value, wherein the first coil current value is greater than the second coil current value, and step 330 adjusts the duty cycle of the pulse width signal until the coil current value satisfies the preset coil current value range, which may include, but is not limited to, the following steps:
[0086] Step 410, when the coil current value is greater than a preset first coil current value, reducing the duty cycle of the pulse width signal to make the coil current value less than the first coil current value;
[0087] Step 420: When the coil current value is less than a preset second coil current value, increase the duty cycle of the pulse width signal to make the coil current value greater than the second coil current value.
[0088] In step 410 of some embodiments, when the coil current value exceeds the preset first coil current value, the pulse width signal modulation circuit can reduce the current value by reducing the duty cycle of the pulse width signal to ensure that the coil current remains below the first coil current value. This process is to avoid system damage or performance degradation caused by excessive current. By dynamically adjusting the duty cycle of the pulse width signal, the system can effectively control the coil current to keep it within a safe range.
[0089] In step 420 of some embodiments, when the coil current value is lower than a preset second coil current value, the pulse width signal modulation circuit can increase the duty cycle of the pulse width signal to increase the coil current and ensure that the current value reaches or exceeds the second coil current value. This step is intended to maintain the coil current within a set range to ensure that the system operates normally and meets performance requirements. By dynamically adjusting the duty cycle of the pulse width signal, the system can accurately control the coil current to keep it at a set ideal level, thereby preventing the controlled relay from unexpectedly disconnecting due to too little current.
[0090] See also Figure 5 According to some embodiments of the present invention, after adjusting the duty cycle of the pulse width signal until the coil current value meets the preset coil current range value in step 330, the following steps may also be included, but are not limited to:
[0091] Step 510, outputting the same synchronous pulse width signal according to the pulse width signal, and transmitting the synchronous pulse width signal to the pulse width modulation synchronization circuit of the control circuit;
[0092] Step 520: The pulse width modulation synchronization circuit sends the synchronization pulse width signal to the pulse width modulation control circuit of the control circuit, so that the pulse width modulation control circuit maintains the output of the pulse width signal.
[0093] In steps 510 to 520 of some embodiments, after the frequency and duty cycle of the pulse width signal are determined, the microcontroller chip can generate the same synchronous pulse width signal according to the frequency and duty cycle and transmit it to the pulse width modulation synchronization circuit. This circuit receives the synchronous pulse width signal output by the microcontroller chip, dynamically tracks the changes of these signals, and generates a pulse width signal with the same frequency and duty cycle and sends it to the pulse width modulation control circuit to maintain continuous output of the pulse width signal.
[0094] The pulse width modulation synchronization circuit monitors and dynamically tracks the synchronous pulse width signal output from the microcontroller chip in real time to ensure that the output pulse width signal is always synchronized with the synchronous pulse width signal of the microcontroller chip, and transmits this information to the pulse width modulation control circuit to maintain the continuity and stability of the pulse width signal.
[0095] See also Figure 6 According to some embodiments of the present invention, step 340 of controlling the pulse width signal modulation circuit to send a disconnection signal to the first transistor and the second transistor so as to disconnect the first transistor and the second transistor may include, but is not limited to, the following steps:
[0096] Step 610, controlling the microcontroller chip to send a reset signal to the timing circuit of the control circuit, and starting timing when the timing circuit detects the disconnection signal to obtain timing data;
[0097] Step 620, when the timing data exceeds the first preset time, output a disconnection signal to the latch circuit and the pulse width modulation control circuit of the control circuit;
[0098] Step 630: After receiving the disconnection signal, the latch circuit turns off the output, the first transistor turns off, and after receiving the disconnection signal, the pulse width modulation control circuit turns off the output of the pulse width signal, and the second transistor turns off.
[0099] In steps 610-630 of some embodiments, during the closing process of the first transistor and the second transistor, when the timing circuit detects the reset signal sent by the microcontroller chip, the timing circuit starts timing. When the timing circuit times out, it outputs a disconnection signal to the latch circuit and the pulse width modulation control circuit. After the latch circuit and the pulse width modulation control circuit turn off the output, the first transistor and the second transistor are disconnected, and the controlled electronic component disconnects the output. Among them, by triggering the reset signal, the system can reliably disconnect the connection of the electronic component according to a specific process when needed, ensuring that the system operation is performed in a controlled state and providing the necessary safety and stability.
[0100] See also Figure 7In some embodiments, after power-on, the microcontroller chip (MCU) starts to work, and after the MCU starts to work, the timing circuit starts to work; the MCU receives the instruction to close the relay, and after the output signal is transmitted to the latch circuit, the latch circuit outputs a hold-close signal to the first transistor, and the first transistor receives the hold signal and remains closed. The MCU outputs a 100% duty cycle signal for 100ms, and the switch edge circuit outputs it to the second transistor after receiving the 100% duty cycle signal, and the second transistor closes after receiving the signal. At this time, the relay coil is energized and closed, and after 100ms, the MCU outputs a pulse width signal. At this time, the second transistor receives the pulse width signal through the edge adjustment circuit, and the second transistor maintains the output of the pulse width signal. The coil is in the energized state and the relay continues to close. At this time, the MCU measures the current flowing through the sampling resistor (the average current on the coil) by measuring the voltage value of the differential op amp. When the MCU detects that the current flowing through the sampling resistor exceeds the coil current allowed by the relay, it gradually reduces the duty cycle of the pulse width signal until the MCU detects that the relay coil current is within a reasonable range. Similarly, when the MCU detects that the current flowing through the sampling resistor is less than the current that keeps the relay closed, the duty cycle of the pulse width signal is gradually increased until the MCU detects that the current of the relay coil is within a reasonable range. When the frequency and duty cycle of the pulse width signal output by the MCU are determined, the MCU outputs a pulse width signal with the same frequency and duty cycle to the pulse width modulation synchronization circuit, and the pulse width modulation synchronization circuit outputs the same pulse width signal to the pulse width modulation control circuit. The pulse width modulation synchronization circuit dynamically tracks the pulse width signal of the MCU in real time and transmits it to the pulse width modulation control circuit. The pulse width modulation control circuit maintains the output of the pulse width signal.
[0101] Reference Figure 8 , Figure 8 The hardware structure of an electronic device of another embodiment is illustrated, and the electronic device includes:
[0102] The processor 801 may be implemented by a general-purpose CPU (Central Processing Unit), a microprocessor, an application-specific integrated circuit (Application Specific Integrated Circuit, ASIC), or one or more integrated circuits, and is used to execute relevant programs to implement the technical solutions provided in the embodiments of the present application;
[0103] The memory 802 can be implemented in the form of a read-only memory (ROM), a static storage device, a dynamic storage device or a random access memory (RAM). The memory 802 can store an operating system and other application programs. When the technical solution provided in the embodiment of this specification is implemented by software or firmware, the relevant program code is stored in the memory 802, and the processor 801 calls and executes the control method based on the pulse width modulation signal of the embodiment of the present application;
[0104] Input / output interface 803, used to implement information input and output;
[0105] The communication interface 804 is used to realize the communication interaction between the device and other devices. The communication can be realized through wired means (such as USB, network cable, etc.) or wireless means (such as mobile network, WIFI, Bluetooth, etc.);
[0106] A bus 805 that transmits information between various components of the device (e.g., the processor 801, the memory 802, the input / output interface 803, and the communication interface 804);
[0107] The processor 801 , the memory 802 , the input / output interface 803 and the communication interface 804 are connected to each other in communication within the device via a bus 805 .
[0108] The embodiment of the present application further provides a computer program product, which includes a computer program. A processor of a computer device reads and executes the computer program, so that the computer device executes and implements the above-mentioned control method based on a pulse width modulation signal.
[0109] The terms "first", "second", "third", "fourth", etc. (if any) in the specification of the present disclosure and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments of the present disclosure described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "comprises" and "comprising" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0110] It should be understood that in the present disclosure, "at least one (item)" means one or more, and "plurality" means two or more. "And / or" is used to describe the association relationship of associated objects, indicating that three relationships may exist. For example, "A and / or B" can mean: only A exists, only B exists, and A and B exist at the same time, where A and B can be singular or plural. The character " / " generally indicates that the objects associated before and after are in an "or" relationship. "At least one of the following" or similar expressions refers to any combination of these items, including any combination of single items or plural items. For example, at least one of a, b or c can mean: a, b, c, "a and b", "a and c", "b and c", or "a and b and c", where a, b, c can be single or multiple.
[0111] It should be understood that in the description of the embodiments of the present application, the meaning of multiple (or multiple items) is more than two, greater than, less than, exceed, etc. are understood to not include the number, and above, below, within, etc. are understood to include the number.
[0112] In the several embodiments provided in the present disclosure, it should be understood that the disclosed systems, devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of units is only a logical function division. There may be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be an indirect coupling or communication connection through some interfaces, devices or units, which can be electrical, mechanical or other forms.
[0113] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0114] In addition, each functional unit in each embodiment of the present disclosure may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.
[0115] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present disclosure, or the part that contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the various embodiments of the present disclosure. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (Read-Only Memory, referred to as ROM), random access memory (Random Access Memory, referred to as RAM), disk or optical disk and other media that can store program codes.
[0116] It should also be understood that the various implementations provided in the embodiments of the present application can be combined arbitrarily to achieve different technical effects.
[0117] The above is a specific description of the implementation methods of the present disclosure, but the present disclosure is not limited to the above implementation methods. Technical personnel familiar with the art can also make various equivalent modifications or substitutions without violating the spirit of the present disclosure. These equivalent modifications or substitutions are all included in the scope defined by the claims of the present disclosure.
Claims
1. A control circuit based on a pulse width modulation signal, characterized in that: Applied to the automated testing phase of battery modules, including: A pulse width modulation power circuit, the pulse width modulation power circuit comprising a first diode, a filter circuit, a first transistor, a second diode, a sampling resistor and a second transistor connected in sequence; wherein the anode of the first diode is connected to the positive electrode of a power supply, the cathode of the first diode is connected to the input end of the filter circuit, the output end of the filter circuit is connected to the drain of the first transistor, the source of the first transistor is connected to the cathode of the second diode, the anode of the second diode is connected to one end of the sampling resistor, the other end of the sampling resistor is connected to the drain of the second transistor, and the source of the second transistor is grounded; A differential amplifier circuit, wherein two input ports of the differential amplifier circuit are respectively connected to two ends of the sampling resistor; a pulse width signal modulation circuit, wherein a third port of the pulse width signal modulation circuit is connected to the gate of the first transistor, a fourth port of the pulse width signal modulation circuit is connected to the output port of the differential amplifier circuit, and a fifth port of the pulse width signal modulation circuit is connected to the gate of the second transistor; wherein the pulse width signal modulation circuit sends a signal for controlling the first transistor to be closed to the gate through the third port, receives a signal amplified by the differential amplifier circuit through the fourth port, and outputs a pulse width signal to the gate of the second transistor through the fifth port; The pulse width signal modulation circuit also includes a microcontroller chip, a latch circuit, a timing circuit, a pulse width modulation control circuit and a pulse width modulation synchronization circuit; The latch circuit is connected to the seventh port of the microcontroller chip; wherein the seventh port is an I / O port, and the microcontroller chip outputs a signal for controlling the first transistor to be closed to the latch circuit through the seventh port; The timing circuit is connected to the eighth port of the microcontroller chip, and the timing circuit is connected to the latch circuit; wherein the eighth port is a reset trigger signal port, and the microcontroller chip sends a reset signal to the timing circuit through the eighth port, so that the timing circuit performs timing; The pulse width modulation synchronization circuit is connected to the ninth port of the microcontroller chip; wherein the microcontroller chip transmits the same pulse width signal to the pulse width modulation synchronization circuit through the ninth port according to the pulse width signal output to the second transistor; The pulse width modulation control circuit is connected to the pulse width modulation synchronization circuit, and the timing circuit is connected to the pulse width modulation control circuit. The pulse width modulation control circuit is connected to the gate of the second transistor, and the latch circuit is connected to the gate of the first transistor.
2. The control circuit according to claim 1, characterized in that: The pulse width signal modulation circuit also includes a switch edge adjustment circuit, which is connected to the tenth port of the microcontroller chip and connected between the pulse width modulation control circuit and the gate of the second transistor.
3. The control circuit according to claim 1, characterized in that: Two ends of the second diode are connected to two ends of the controlled electronic component through a twisted shielded wire harness.
4. A control method based on a pulse width modulation signal, applied to a control circuit based on a pulse width modulation signal as claimed in any one of claims 1 to 3, characterized in that: include: Controlling the pulse width signal modulation circuit to send a closing signal to the first transistor to close the first transistor; Controlling the pulse width signal modulation circuit to continuously output a pulse width signal with a preset duty cycle for a first preset time, so as to close the second transistor, and after the first transistor and the second transistor are closed, the relay coil is energized and closed; Obtaining the coil current value flowing through the sampling resistor, and adjusting the duty cycle of the pulse width signal until the coil current value meets a preset coil current value range; The pulse width signal modulation circuit is controlled to send a disconnection signal to the first transistor and the second transistor, so that the first transistor and the second transistor are disconnected.
5. The control method according to claim 4, characterized in that: The coil current value range includes a first coil current value and a second coil current value, wherein the first coil current value is greater than the second coil current value, and the step of adjusting the duty cycle of the pulse width signal until the coil current value satisfies a preset coil current value range includes: When the coil current value is greater than the preset first coil current value, reducing the duty cycle of the pulse width signal to make the coil current value less than the first coil current value; When the coil current value is less than the preset second coil current value, the duty cycle of the pulse width signal is increased to make the coil current value greater than the second coil current value.
6. The control method according to claim 4, characterized in that: After adjusting the duty cycle of the pulse width signal until the coil current value satisfies a preset coil current range value, the method further includes: Outputting the same synchronous pulse width signal according to the pulse width signal, and transmitting the synchronous pulse width signal to the pulse width modulation synchronization circuit of the control circuit; The pulse width modulation synchronization circuit sends the synchronization pulse width signal to the pulse width modulation control circuit of the control circuit, so that the pulse width modulation control circuit maintains the output of the pulse width signal.
7. The control method according to claim 4, characterized in that: The controlling the pulse width signal modulation circuit to send a disconnection signal to the first transistor and the second transistor so as to disconnect the first transistor and the second transistor comprises: Controlling the microcontroller chip to send a reset signal to the timing circuit of the control circuit, and starting timing when the timing circuit detects the disconnection signal to obtain timing data; When the timing data exceeds a first preset time, outputting the disconnection signal to the latch circuit of the control circuit and the pulse width modulation control circuit; After receiving the disconnection signal, the latch circuit turns off the output, and the first transistor is turned off. After receiving the disconnection signal, the pulse width modulation control circuit turns off the output of the pulse width signal, and the second transistor is turned off.
8. An electronic device, characterized in that: include: A memory and a processor, wherein the memory stores a computer program, and when the processor executes the computer program, the control method based on the pulse width modulation signal as claimed in any one of claims 4 to 7 is implemented.
9. A computer-readable storage medium, characterized in that: The storage medium stores a program, and the program is executed by a processor to implement the control method based on a pulse width modulation signal as described in any one of claims 4 to 7.
Citation Information
Patent Citations
Lithium battery charging control circuit
CN103151824A
Switching power supply over-current protection circuit
CN103683204A
Current limiting control circuit for charging circuit and charger comprising same
CN114079303A
ACOT control circuit and chip applied to voltage converter
CN116846189A
Programmable displacement signal conditioning method and system for electro-hydraulic control valve
CN118009865A
