A voltage polarity switching circuit, a drive-by-wire and a control system
By modifying the hardware of the voltage polarity switching circuit, automatic voltage polarity switching between the air conditioner main controller and the wired controller is achieved, solving the problems of microcontroller pin occupancy and software complexity, and improving the user experience.
Patent Information
- Application Number
- CN202310002168.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-01-03
- Publication Date
- 2026-02-24
- Estimated Expiration
- 2043-01-03
AI Technical Summary
In existing communication schemes between air conditioner main controllers and wired controllers, the polarity needs to be switched by a voltage polarity switching circuit controlled by a microcontroller unit, which increases the pin occupancy of the microcontroller unit and the complexity of the software.
A voltage polarity switching circuit is adopted, including a power supply module, a polarity switching module, and a control module. By modifying the hardware circuit, the polarity of the output signal is automatically switched when the voltage polarity of the communication line reverses, reducing the occupation of microcontroller port resources and program space.
Without increasing software complexity, signal polarity switching when the communication line voltage polarity reverses can be achieved simply by modifying the hardware circuit, reducing the resource and program space occupied by the microcontroller unit and improving the user experience.
Smart Images

Figure CN116203825B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The embodiment of the present application relates to the field of air conditioners, in particular to a voltage polarity switching circuit, a drive-by-wire controller and a control system. BACKGROUND
[0002] Currently, two-wire communication is used between the main controller of the air conditioner and the drive-by-wire controller, that is, two communication lines are used to realize communication. The voltage polarity of the communication line will affect the subsequent results. When the voltage polarity of the communication line is reversed after the drive-by-wire controller is powered on, the drive-by-wire controller should make corresponding adjustments. The existing scheme is that the drive-by-wire controller judges whether the voltage polarity is correct through a voltage polarity switching circuit, that is, whether the normal level (idle level) sent to the micro control unit receiving pin after power-on is correct. If the polarity is incorrect, the micro control unit control circuit switches the voltage polarity.
[0003] However, the existing scheme switches the polarity through the micro control unit control voltage polarity switching circuit. This design needs to occupy one pin of the micro control unit and needs to write corresponding software algorithm to realize voltage polarity switching, which will increase the complexity of the software and occupy certain program space. SUMMARY
[0004] The embodiment of the present application provides a voltage polarity switching circuit, a drive-by-wire controller and a control system.
[0005] A voltage polarity switching circuit comprises a power supply module, a polarity switching module and a control module.
[0006] The power supply module is connected with the polarity switching module and the control module respectively, and is used for supplying power for the polarity switching module and the control module.
[0007] The control module is connected with the polarity switching module, and is used for outputting a control signal according to a first level signal after receiving the first level signal input by the polarity switching module, wherein the first level signal is a signal obtained according to the voltage polarity of the communication line when the voltage polarity switching circuit is powered on.
[0008] The polarity switching module is used for switching the polarity of an output signal according to the control signal and a second level signal after receiving the control signal, wherein the second level signal is a signal obtained according to the voltage polarity of the communication line switched after the voltage polarity switching circuit is powered on.
[0009] Optionally, the polarity switching module comprises a fourth resistor, a fifth resistor, a sixth resistor, a seventh resistor, a fourth switch tube, a fifth switch tube, a sixth switch tube, a seventh switch tube and an eighth switch tube.
[0010] The first end of the fourth resistor, the first end of the fifth resistor, and the first end of the sixth resistor are all connected to the power supply module. The gate of the fourth switch is connected to the power supply module. The drain of the fourth switch is connected to the second end of the fourth resistor, the gate of the fifth switch, and the drain of the seventh switch, respectively. The drain of the fifth switch is connected to the control module, the second end of the fifth resistor, and the drain of the eighth switch, respectively.
[0011] The gate of the sixth switch is connected to the control module and the gate of the seventh switch. The source of the fourth switch, the source of the fifth switch, the source of the sixth switch, and the first terminal of the seventh resistor are all grounded. The second terminal of the sixth resistor is connected to the drain of the sixth switch and the gate of the eighth switch. The second terminal of the seventh resistor is connected to the source of the seventh switch and the source of the eighth switch. The voltage at the second terminal of the seventh resistor is the output voltage.
[0012] Optionally, the polarity switching module further includes: a fifth diode and a sixth diode;
[0013] The second end of the fifth resistor is connected to the drain of the eighth switch via the fifth diode; the anode of the fifth diode is connected to the second end of the fifth resistor; and the cathode of the fifth diode is connected to the drain of the eighth switch.
[0014] The drain of the fourth switching transistor is connected to the drain of the seventh switching transistor via the sixth diode. The anode of the sixth diode is connected to the drain of the fourth switching transistor, and the cathode of the sixth diode is connected to the drain of the seventh switching transistor.
[0015] Optionally, the control module includes: a first resistor, a second resistor, a third resistor, a first capacitor, a second capacitor, a third capacitor, a first switching transistor, a second switching transistor, and a third switching transistor;
[0016] The source of the first switching transistor is connected to the drain of the fifth switching transistor. The first end of the first resistor, the first end of the second resistor, and the first end of the third resistor are all connected to the power supply module. The second end of the first resistor is connected to the gate of the first switching transistor and the first end of the first capacitor. The drain of the first switching transistor is connected to the drain of the second switching transistor, the second end of the third resistor, the gate of the third switching transistor, and the first end of the third capacitor. The second end of the second resistor is connected to the gate of the sixth switching transistor, the gate of the second switching transistor, the drain of the third switching transistor, and the first end of the second capacitor. The second ends of the first capacitor, the second ends of the second capacitor, the second ends of the third capacitor, the source of the second switching transistor, and the source of the third switching transistor are all grounded.
[0017] The first time constant of the branch consisting of the second resistor and the second capacitor is different from the second time constant of the branch consisting of the third resistor and the third capacitor.
[0018] Optionally, the control module further includes: a seventh diode;
[0019] The drain of the fifth switching transistor is connected to the source of the first switching transistor via the seventh diode. The anode of the seventh diode is connected to the drain of the fifth switching transistor, and the cathode of the seventh diode is connected to the source of the first switching transistor.
[0020] Optionally, the power supply module includes: terminals, a rectifier circuit, a voltage regulator circuit, and a fourth capacitor;
[0021] The first and second pins of the terminal block are connected to the rectifier circuit, which is connected to VCC and ground respectively. The input of the voltage regulator circuit is connected to VCC. The output of the voltage regulator circuit is connected to the first terminal of the fourth capacitor. The output of the voltage regulator circuit is connected to the polarity switching module and the control module. The second terminal of the fourth capacitor and the ground terminal of the voltage regulator circuit are grounded.
[0022] Optionally, the rectifier circuit includes: a first diode, a second diode, a third diode, and a fourth diode;
[0023] The first pin of the terminal block is connected to the anode of the first diode and the cathode of the second diode, respectively. The second pin of the terminal block is connected to the anode of the third diode and the cathode of the fourth diode, respectively. The cathode of the first diode is connected to the VCC terminal and the cathode of the third diode, respectively. The anodes of the second diode and the fourth diode are both grounded.
[0024] Optionally, the voltage regulator circuit is a three-terminal voltage regulator chip or a DC-DC converter circuit.
[0025] A wired controller includes the voltage polarity switching circuit as described above, and further includes a microcontroller unit;
[0026] The output of the voltage polarity switching circuit is connected to the RX pin of the microcontroller unit.
[0027] A control system includes a wired controller as described above, and further includes a main controller;
[0028] The main controller is connected to the wired controller via two communication lines to send communication signals to the wired controller.
[0029] As can be seen from the above technical solutions, the embodiments of this application have the following advantages:
[0030] The control module outputs a control signal to the polarity switching module based on the first level signal, thereby changing the circuit characteristics of the polarity switching module. The polarity switching module then switches the polarity of the output signal accordingly based on the second level signal. This eliminates the need to increase software complexity; only hardware circuit modifications are required to change the polarity of the output signal when the communication line voltage polarity reverses. This reduces the occupation of microcontroller port resources and program space, providing a better user experience. Attached Figure Description
[0031] Figure 1 This is a schematic diagram of the control system of this application;
[0032] Figure 2 This is a schematic diagram of an embodiment of the voltage polarity switching circuit of this application;
[0033] Figure 3 This is a circuit diagram of the power supply module in the voltage polarity switching circuit of this application;
[0034] Figure 4 This is a circuit diagram of the polarity switching module and the control module in the voltage polarity switching circuit of this application;
[0035] Figure 5 This is a functional schematic diagram of the voltage polarity switching circuit of this application. Detailed Implementation
[0036] This application provides a voltage polarity switching circuit, a wired controller, and a control system.
[0037] Existing solutions for switching voltage polarity involve using a microcontroller unit to control a voltage polarity switching circuit. This occupies an additional pin on the microcontroller unit and results in high software complexity. To address these issues, this application provides a voltage polarity switching circuit, a wire controller, and a control system. By modifying only the hardware circuitry, the polarity of the output signal can be changed when the voltage polarity of the communication line flips, without increasing software complexity, thus providing a better user experience.
[0038] Please see Figure 1 The wired controller and control system of this application are shown in the figure. The wired controller includes the voltage polarity switching circuit of this application, and also includes a microcontroller unit (MCU). The output terminal of the voltage polarity switching circuit is connected to the RX pin of the MCU. The control system includes a main controller and the wired controller. The main controller is connected to the wired controller through two communication lines to send communication signals to the wired controller. Specifically, the main controller includes a microcontroller unit and a transmitting circuit. The microcontroller unit controls the transmitting circuit to the voltage polarity switching circuit through the communication lines.
[0039] The voltage polarity switching circuit of this application is described in detail below. Please refer to [link / reference]. Figure 2 One embodiment of the voltage polarity switching circuit of this application includes: a power supply module, a polarity switching module, and a control module;
[0040] The power supply module is connected to the polarity switching module and the control module respectively, and is used to supply power to the polarity switching module and the control module;
[0041] The control module is connected to the polarity switching module and is used to output a control signal according to the first level signal after receiving the first level signal input from the polarity switching module. The first level signal is a signal obtained according to the voltage polarity of the communication line when the voltage polarity switching circuit is powered on.
[0042] The polarity switching module is used to switch the polarity of the output signal according to the control signal and the second level signal after receiving the control signal. The second level signal is a signal obtained according to the communication line voltage polarity switched after the voltage polarity switching circuit is powered on.
[0043] To facilitate understanding, the working principle of this embodiment is described below. When the voltage polarity switching circuit is first powered on, the polarity switching module obtains a first-level signal based on the voltage polarity of the communication line at that time, and inputs the first-level signal to the control module. The control module feeds back the corresponding control signal. Then, after power-on, if the voltage polarity of the communication line reverses, the polarity switching module generates a second-level signal accordingly. Since the second-level signal cannot affect the control module, the control signal remains unchanged. The polarity switching module switches the polarity of the output signal according to the control signal and the second-level signal. At this time, the output signal changes from 1 to 0 or from 0 to 1, completing the reversal.
[0044] In this embodiment, the control module outputs a control signal to the polarity switching module based on a first level signal to change the circuit characteristics of the polarity switching module. The polarity switching module then switches the polarity of the output signal according to a second level signal. This eliminates the need to increase software complexity; only hardware circuit modifications are required to change the polarity of the output signal when the communication line voltage polarity reverses. This reduces the occupation of microcontroller port resources and program space, providing a better user experience.
[0045] Please see Figures 3 to 5 Another embodiment of the voltage polarity switching circuit of this application includes: a power supply module, a polarity switching module, and a control module;
[0046] The power supply module is connected to the polarity switching module and the control module respectively, and is used to supply power to the polarity switching module and the control module, and also provides terminal pin signals to the polarity switching module.
[0047] The control module is connected to the polarity switching module and is used to output a control signal according to the first level signal after receiving the first level signal input from the polarity switching module. The first level signal is a signal obtained according to the voltage polarity of the communication line when the voltage polarity switching circuit is powered on.
[0048] The polarity switching module is used to switch the polarity of the output signal according to the control signal and the second level signal after receiving the control signal. The second level signal is a signal obtained according to the communication line voltage polarity switched after the voltage polarity switching circuit is powered on.
[0049] Specifically, the power supply module includes: terminal CN1, rectifier circuit, voltage regulator circuit U1, and fourth capacitor C4;
[0050] The first pin (VIN1) and the second pin (VIN2) of terminal CN1 are connected to the rectifier circuit, which is connected to VCC and ground respectively. The input of the voltage regulator circuit U1 is connected to VCC, and the output of the voltage regulator circuit U1 is connected to the first terminal of the fourth capacitor C4. The second terminal of the fourth capacitor C4 and the ground terminal of the voltage regulator circuit U1 are grounded. The output of the voltage regulator circuit U1 is connected to the polarity switching module and the control module respectively, providing a stable 5V voltage.
[0051] The rectifier circuit includes: a first diode D1, a second diode D2, a third diode D3, and a fourth diode D4;
[0052] The first pin VIN1 of terminal CN1 is connected to the anode of the first diode D1 and the cathode of the second diode D2. The second pin VIN2 of terminal CN1 is connected to the anode of the third diode D3 and the cathode of the fourth diode D4. The cathode of the first diode D1 is connected to the VCC terminal and the cathode of the third diode D3. The anodes of the second diode D2 and the fourth diode D4 are both grounded.
[0053] In addition, the voltage regulator circuit U1 can be a three-terminal voltage regulator chip or a DC-DC converter circuit, or other circuits that can provide 5V voltage regulation. No specific limitations are made here.
[0054] Specifically, the polarity switching module includes: fourth resistor R4, fifth resistor R5, sixth resistor R6, seventh resistor R7, fourth switch Q4, fifth switch Q5, sixth switch Q6, seventh switch Q7, eighth switch Q8, fifth diode D5, and sixth diode D6;
[0055] The first terminal of the fourth resistor R4, the first terminal of the fifth resistor R5, and the first terminal of the sixth resistor R6 are all connected to the output terminal of the voltage regulator circuit U1. The gate of the fourth switch Q4 is connected to the first pin VIN1. The drain of the fourth switch Q4 is connected to the second terminal of the fourth resistor R4, the gate of the fifth switch Q5, and the drain of the seventh switch Q7. The drain of the fifth switch Q5 is connected to the control module, the second terminal of the fifth resistor R5, and the drain of the eighth switch Q8.
[0056] The gate of the sixth switch Q6 is connected to the control module and the gate of the seventh switch Q7. The source of the fourth switch Q4, the source of the fifth switch Q5, the source of the sixth switch Q6, and the first terminal of the seventh resistor R7 are all grounded. The second terminal of the sixth resistor R6 is connected to the drain of the sixth switch Q6 and the gate of the eighth switch Q8. The second terminal of the seventh resistor R7 is connected to the source of the seventh switch Q7 and the source of the eighth switch Q8. The voltage at the second terminal of the seventh resistor R7 is the output voltage.
[0057] The second end of the fifth resistor R5 is connected to the drain of the eighth switch Q8 via the fifth diode. The anode of the fifth diode D5 is connected to the second end of the fifth resistor R5, and the cathode of the fifth diode D5 is connected to the drain of the eighth switch Q8.
[0058] The drain of the fourth switch Q4 is connected to the drain of the seventh switch Q7 via the sixth diode D6. The anode of the sixth diode D6 is connected to the drain of the fourth switch Q4, and the cathode of the sixth diode D6 is connected to the drain of the seventh switch Q7.
[0059] Specifically, the control module includes: a first resistor R1, a second resistor R2, a third resistor R3, a first capacitor C1, a second capacitor C2, a third capacitor C3, a first switch Q1, a second switch Q2, a third switch Q3, and a seventh diode D7;
[0060] The source of the first switch Q1 is connected to the drain of the fifth switch Q5. The first end of the first resistor R1, the first end of the second resistor R2, and the first end of the third resistor R3 are all connected to the output of the voltage regulator circuit U1. The second end of the first resistor R1 is connected to the gate of the first switch Q1 and the first end of the first capacitor C1. The drain of the first switch Q1 is connected to the drain of the second switch Q2, the second end of the third resistor R3, the gate of the third switch Q3, and the first end of the third capacitor C3. The second end of the second resistor R2 is connected to the gate of the sixth switch Q6, the gate of the second switch Q2, the drain of the third switch Q3, and the first end of the second capacitor C2. The second ends of the first capacitor C1, the second ends of the second capacitor C2, the second ends of the third capacitor C3, the source of the second switch Q2, and the source of the third switch Q3 are all grounded.
[0061] The first time constant of the branch composed of the second resistor R2 and the second capacitor C2 is different from the second time constant of the branch composed of the third resistor R3 and the third capacitor C3. Specifically, in this embodiment, the resistance value of the fifth resistor R5 is less than the resistance value of the second resistor R2, which is less than the resistance value of the third resistor R3, and the parameters of the second capacitor C2 are the same as those of the third capacitor C3.
[0062] The drain of the fifth switch Q5 is connected to the source of the first switch Q1 via the seventh diode. The anode of the seventh diode D7 is connected to the drain of the fifth switch Q5, and the cathode of the seventh diode D7 is connected to the source of the first switch Q1.
[0063] The switching transistors mentioned in this embodiment can be MOSFETs, transistors, or J-type field-effect transistors, etc., and can be selected according to requirements. This embodiment uses MOSFETs as an example, where all switching transistors except the first switching transistor Q1 (P-type MOSFET) are N-type MOSFETs. Furthermore, when none of the mentioned switching transistors have internal freewheeling diodes, the fifth diode D5, the sixth diode D6, and the seventh diode D7 can be shorted; when all the mentioned switching transistors have internal freewheeling diodes, then the fifth diode D5, the sixth diode D6, and the seventh diode D7 are mandatory.
[0064] The working principle of this embodiment is described below.
[0065] When the voltage polarity switching circuit is first powered on and communication line 1 is positive and communication line 2 is negative, the first pin VIN1 is positive and the second pin VIN2 is negative. The voltage at the first pin VIN1 is greater than the conduction threshold voltage of the fourth switch Q4, so the fourth switch Q4 conducts. The drain of the fourth switch Q4... Figure 4 The VO1 node is low, and the gate of the fifth switch Q5 is also low, so the fifth switch Q5 is off. Therefore, the drain of the fifth switch Q5 is... Figure 4 The VO2 node is high. The 5V terminal charges the first capacitor C1 through the first resistor R1. The voltage across the first capacitor C1 starts from 0V upon power-on and rises. The difference between the source voltage and gate voltage of the first switching transistor Q1 is greater than the turn-on threshold voltage of Q1, so Q1 turns on. The 5V terminal then charges the third capacitor C3 through the fifth resistor R5, the seventh diode D7, and the first switching transistor Q1. Simultaneously, the 5V terminal charges the second capacitor C2 through the second resistor R2. Since the resistance of the fifth resistor R5 is less than that of the second resistor R2, and the capacitance of the second capacitor C2 is the same as that of the third capacitor C3, the time constant of the branch corresponding to the third capacitor C3 is smaller than that of the branch corresponding to the second capacitor C2. This means that the charging speed of the third capacitor C3 is faster than that of the second capacitor C2, and the voltage of the third capacitor C3 rises more quickly. Therefore, the third switching transistor Q3 turns on before the second switching transistor Q2. After the third switch Q3 is turned on, it short-circuits the second capacitor C2, causing the voltage across C2 to drop to approximately 0V, and the second switch Q2 to turn off. The turn-on of the third switch Q3 turns off the sixth and seventh switches Q6 and Q7. Simultaneously, the gate voltage of the eighth switch Q8 is pulled up to 5V by the sixth resistor R6. Since the source voltage of the eighth switch Q8 is close to 0V, Q8 turns on. The 5V terminal provides voltage to the seventh capacitor through the fifth resistor R5, the fifth diode D5, and the eighth switch Q8. The voltage at the second terminal of the seventh resistor R7, i.e., the output voltage, is high.
[0066] When the voltage polarity switching circuit is powered on and communication line 1 is positive and communication line 2 is negative, the voltage polarity of the communication lines does not reverse. Node VO1 remains low and node VO2 remains high. According to the above, the third switch Q3 is already turned on, shorting the second capacitor C2. The second switch Q2 remains off. Therefore, the sixth switch Q6 and the seventh switch Q7 remain off, and the eighth switch Q8 is turned on. The output voltage is the voltage at the second end of the seventh resistor R7, which is high.
[0067] After the voltage polarity switching circuit is powered on, and communication line 1 changes from positive to negative while communication line 2 changes from negative to positive, the fourth switch Q4 is turned off. Node VO1 is pulled high by the fourth resistor R4, and the gate of the fifth switch Q5 is high, so Q5 is turned on. Since there is a 5V terminal to ground via the fifth resistor R5 and the fifth switch Q5, node VO2 is low. Because there is already a certain voltage across the first capacitor C1 after power-on, the source voltage of the first switch Q1 is not greater than the gate voltage, so Q1 is turned off. After power-on, the third switch Q3 is turned on, shorting the second capacitor C2, and the second switch Q2 remains off. Therefore, the sixth and seventh switches Q6 and Q7 remain off, and the eighth switch Q8 is turned on. Node VO2 is low. Since the voltage across the fifth diode D5 does not reach the conduction threshold voltage of the fifth diode D5, node VO2 is turned off by the fifth diode D5, and the output voltage is pulled low by the seventh resistor R7.
[0068] When the voltage polarity switching circuit is powered on and communication line 1 is negative and communication line 2 is positive, the first pin VIN1 is negative and the second pin VIN2 is positive. The voltage at the first pin VIN1 is lower than the source voltage of the fourth switch Q4, so the fourth switch Q4 is off. The VO1 node is pulled up to a high level by the fourth resistor R4, and the gate voltage of the fifth switch Q5 is high, so the fifth switch Q5 is turned on, and the VO2 node is low. Since the VO2 node is low, the source of the first switch Q1 is low, and the difference between the source voltage and the gate voltage of the first switch Q1 does not reach the turn-on threshold voltage of the first switch Q1, so the first switch Q1 is off. At this time, the 5V terminal charges the second capacitor C2 through the second resistor R2, and the 5V terminal also charges the third capacitor C3 through the third resistor R3. Since the resistance of the second resistor R2 is less than that of the third resistor R3, and the capacitance of the second capacitor C2 is the same as that of the third capacitor C3, the time constant of the branch corresponding to the second capacitor C2 is smaller than that of the branch corresponding to the third capacitor C3. This means that the charging speed of the second capacitor C2 is faster than that of the third capacitor C3, and the voltage of the second capacitor C2 rises faster. Therefore, the second switch Q2 turns on before the third switch Q3. After the second switch Q2 turns on, it shorts the third capacitor C3, and the voltage across the third capacitor C3 drops to about 0V, causing the third switch Q3 to turn off. The voltage rise across the second capacitor C2 causes the sixth switch Q6 and the seventh switch Q7 to turn on. Because there is a 5V terminal to ground through the sixth resistor R6 and the sixth switch Q6, the gate voltage of the eighth switch Q8 is pulled down to a low level, and the eighth switch Q8 turns off. The 5V terminal provides voltage to the seventh resistor R7 through the fourth resistor R4, the sixth diode D6, and the seventh switch Q7. The voltage at the second end of the seventh resistor R7, i.e., the output voltage, is high.
[0069] When the voltage polarity switching circuit is powered on and communication line 1 is negative and communication line 2 is positive, the voltage polarity of the communication lines has not reversed. Node VO1 is still at a high level and node VO2 is still at a low level. According to the above, the second switch Q2 is already turned on, shorting the third capacitor C3. The third switch Q3 remains in the off state. Therefore, the sixth switch Q6 and the seventh switch Q7 remain on, and the eighth switch Q8 is off. The output voltage is the voltage at the second end of the seventh resistor R7, which is a high level.
[0070] After the voltage polarity switching circuit is powered on, and communication line 1 changes from negative to positive while communication line 2 changes from positive to negative, the fourth switch Q4 is turned on, node VO1 is low, the gate voltage of the fifth switch Q5 is low, and Q5 is turned off, resulting in node VO2 being high. Regardless of whether the first switch Q1 is on or off, the second switch Q2 is already turned on after power-on, shorting the third capacitor C3, keeping the third switch Q3 off. Based on the voltage of the second capacitor C2, the sixth and seventh switches Q6 and Q7 remain on, while the eighth switch Q8 remains off. Node VO1 is low. Since the voltage across the sixth diode D6 does not reach the conduction threshold voltage of the sixth diode D6, node VO1 is turned off by the sixth diode D6, and the output voltage is pulled down to a low level by the seventh resistor R7.
[0071] In this embodiment, upon power-on, the polarity of the communication line voltage determines whether the seventh switch Q7 or the eighth switch Q8 is on, and only one can be on while the other is off. After power-on, if the seventh switch Q7 is on, it will remain on, and correspondingly, the eighth switch Q8 will remain off. If the eighth switch Q8 is on, it will remain on, and correspondingly, the seventh switch Q7 will remain off. If the polarity of the communication line voltage reverses after power-on, the output voltage will change. This eliminates the need to increase software complexity; only hardware modifications are required to change the polarity of the output signal when the communication line voltage reverses. This reduces the occupation of microcontroller port resources and program space, providing a better user experience.
[0072] The voltage polarity switching circuit, wire controller, and control system provided in this application have been described in detail above. For those skilled in the art, based on the ideas of the embodiments of this invention, there will be changes in the specific implementation methods and application scope. Therefore, the content of this specification should not be construed as a limitation of this invention.
Claims
1. A voltage polarity switching circuit, characterized in that, include: Power supply module, polarity switching module, and control module; The power supply module is connected to the polarity switching module and the control module respectively, and is used to supply power to the polarity switching module and the control module; The control module is connected to the polarity switching module and is used to output a control signal according to the first level signal after receiving the first level signal input by the polarity switching module. The first level signal is a signal obtained according to the communication line voltage polarity when the voltage polarity switching circuit is powered on. The polarity switching module is used to switch the polarity of the output signal according to the control signal and the second level signal after receiving the control signal. The second level signal is a signal obtained according to the communication line voltage polarity switched after the voltage polarity switching circuit is powered on. The polarity switching module includes: a fourth switch, a fifth switch, a sixth switch, a seventh switch, and an eighth switch; the control module includes: a first switch, a second switch, and a third switch. The gate of the fourth switch is connected to the first pin of the power supply module, the drain of the fourth switch is connected to the gate of the fifth switch, the drain of the fourth switch is connected to the drain of the seventh switch through a diode, and the drain of the fifth switch is connected to the source of the first switch and the drain of the eighth switch through diodes respectively. The gate of the sixth switch is connected to the gate of the second switch, the drain of the third switch, and the gate of the seventh switch; the drain of the sixth switch is connected to the gate of the eighth switch. The drain of the first switching transistor is connected to the drain of the second switching transistor and the gate of the third switching transistor, respectively. The gates of the first switch, the second switch, and the third switch are all grounded via capacitors and connected to the output terminal of the power supply module via resistors. The drains of the fourth, fifth, and sixth switching transistors are all connected to the output terminal of the power supply module via resistors. The sources of the fourth, fifth, and sixth switching transistors are all grounded. The source of the sixth switching transistor is connected to the sources of the seventh and eighth switching transistors via a resistor. The voltage at the source of the eighth switching transistor is the output voltage.
2. The voltage polarity switching circuit according to claim 1, characterized in that, The polarity switching module further includes: a fourth resistor, a fifth resistor, a sixth resistor, and a seventh resistor; The first end of the fourth resistor, the first end of the fifth resistor, and the first end of the sixth resistor are all connected to the power supply module. The drain of the fourth switching transistor is connected to the second end of the fourth resistor, and the drain of the fifth switching transistor is connected to the second end of the fifth resistor. The first terminal of the seventh resistor is grounded, the second terminal of the sixth resistor is connected to the drain of the sixth switching transistor, the second terminal of the seventh resistor is connected to the source of the seventh switching transistor and the source of the eighth switching transistor, and the voltage at the second terminal of the seventh resistor is the output voltage.
3. The voltage polarity switching circuit according to claim 2, characterized in that, The polarity switching module further includes: a fifth diode and a sixth diode; The second end of the fifth resistor is connected to the drain of the eighth switch via the fifth diode; the anode of the fifth diode is connected to the second end of the fifth resistor; and the cathode of the fifth diode is connected to the drain of the eighth switch. The drain of the fourth switching transistor is connected to the drain of the seventh switching transistor via the sixth diode. The anode of the sixth diode is connected to the drain of the fourth switching transistor, and the cathode of the sixth diode is connected to the drain of the seventh switching transistor.
4. The voltage polarity switching circuit according to any one of claims 2 to 3, characterized in that, The control module includes: a first resistor, a second resistor, a third resistor, a first capacitor, a second capacitor, and a third capacitor; The first end of the first resistor, the first end of the second resistor, and the first end of the third resistor are all connected to the power supply module. The second end of the first resistor is connected to the gate of the first switching transistor and the first end of the first capacitor, respectively. The drain of the first switching transistor is connected to the second end of the third resistor and the first end of the third capacitor, respectively. The second end of the second resistor is connected to the gate of the sixth switching transistor and the first end of the second capacitor, respectively. The second ends of the first capacitor, the second end of the second capacitor, and the second end of the third capacitor are all grounded. The first time constant of the branch consisting of the second resistor and the second capacitor is different from the second time constant of the branch consisting of the third resistor and the third capacitor.
5. The voltage polarity switching circuit according to claim 4, characterized in that, The control module also includes: a seventh diode; The drain of the fifth switching transistor is connected to the source of the first switching transistor via the seventh diode. The anode of the seventh diode is connected to the drain of the fifth switching transistor, and the cathode of the seventh diode is connected to the source of the first switching transistor.
6. The voltage polarity switching circuit according to claim 5, characterized in that, The power supply module includes: terminals, a rectifier circuit, a voltage regulator circuit, and a fourth capacitor; The first and second pins of the terminal block are connected to the rectifier circuit, which is connected to VCC and ground respectively. The input of the voltage regulator circuit is connected to VCC. The output of the voltage regulator circuit is connected to the first terminal of the fourth capacitor. The output of the voltage regulator circuit is connected to the polarity switching module and the control module. The second terminal of the fourth capacitor and the ground terminal of the voltage regulator circuit are grounded.
7. The voltage polarity switching circuit according to claim 6, characterized in that, The rectifier circuit includes: a first diode, a second diode, a third diode, and a fourth diode; The first pin of the terminal block is connected to the anode of the first diode and the cathode of the second diode, respectively. The second pin of the terminal block is connected to the anode of the third diode and the cathode of the fourth diode, respectively. The cathode of the first diode is connected to the VCC terminal and the cathode of the third diode, respectively. The anodes of the second diode and the fourth diode are both grounded.
8. The voltage polarity switching circuit according to claim 6, characterized in that, The voltage regulator circuit is a three-terminal voltage regulator chip or a DC-DC converter circuit.
9. A wired controller, characterized in that, The circuit includes the voltage polarity switching circuit as described in any one of claims 1 to 8, and further includes: a microcontroller unit; The output of the voltage polarity switching circuit is connected to the RX pin of the microcontroller unit.
10. A control system, characterized in that, Including the wired controller as described in claim 9, it further includes: a main controller; The main controller is connected to the wired controller via two communication lines to send communication signals to the wired controller.
Citation Information
Patent Citations
Polarity switching circuit
CN104283451A
DC motor power supply
CN201319574Y