Port function switching circuit
By introducing a port function switching circuit for the control module and signal branch into the motor controller, the problem of cumbersome modification of port signal types in the prior art is solved, enabling flexible adaptation to different signal types and improving the convenience and signal reliability of the motor controller.
Patent Information
- Application Number
- CN202520629243.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Utility models(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-03
- Publication Date
- 2026-02-17
- Estimated Expiration
- 2035-04-03
AI Technical Summary
Changing the port signal type of the existing motor controller is cumbersome and requires modification of the surface mount, making maintenance inconvenient.
By employing control modules, digital signal branches, and analog signal branches, and configuring port function switching circuits through software, the controller's external ports can adapt to different signal types, avoiding physical modifications.
This allows for flexible changes to the controller's external port signal type without altering the external circuitry, improving convenience and practicality, and enhancing signal anti-interference capabilities and signal integrity.
Smart Images

Figure CN223926777U_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The utility model relates to the technical field of motor controller especially relates to a port function switching circuit. BACKGROUND
[0002] At present, most motor controllers adopt the mode of connector for external connection, and the same external port may have different signal types on different vehicle models, which may be analog signals or digital signals. The original technology is to adapt to different signal types by different patching methods, but when changing the external signal type after the controller hardware is completed, the patching needs to be modified to complete the modification of the signal type, which makes the signal type of the controller port more complicated to modify, and needs to be improved. SUMMARY
[0003] The utility model discloses a port function switching circuit, which is provided to solve the problem of the prior art that the signal type of the port is modified by modifying the patch on the controller port, which is complicated to operate and inconvenient to maintain.
[0004] To solve the above technical problems, the utility model realizes the following technical scheme:
[0005] A port function switching circuit, comprising a control module, a digital signal branch and an analog signal branch, one end of the digital signal branch and the analog signal branch is electrically connected with the port on the control module, the other end of the digital signal branch and the analog signal branch is electrically connected with the controller external port CDL, the control module configures the port type corresponding to the digital signal branch and the analog signal branch according to the received external signal type, so that the controller external port CDL forms a path with the corresponding digital signal branch and analog signal branch.
[0006] The control module, the digital signal branch and the analog signal branch can change the signal type of the controller external port CDL by modifying the software, so that the controller external port CDL can adapt to different signal types without changing the external circuit, improving the convenience of changing the type of the controller external port CDL and the practicality of the motor controller.
[0007] As a preferred, the digital signal branch of the port function switching circuit comprises a resistor R24 and a capacitor C24, one end of the resistor R24 is electrically connected with the controller external port CDL, the other end of the resistor R24 is electrically connected with the control module, one end of the capacitor C24 is grounded, and the other end of the capacitor C24 is electrically connected between the resistor R24 and the control module.
[0008] The digital signal branch comprises a resistor R24 and a capacitor C24, has the advantages of low cost and easy realization, and improves the anti-interference capability of the signal, and can limit the current and the voltage division to protect the port of the control module electrically connected with the digital signal.
[0009] As preferred, the analog signal branch of the port function switching circuit comprises a resistor R23, a resistor R69 and a capacitor C21, one end of the resistor R23 is electrically connected to the external port CDL of the controller, the other end of the resistor R23 is electrically connected to the control module, the resistor R69 and the capacitor C21 are in parallel, one end of the resistor R69 and the capacitor C21 is electrically connected between the resistor R23 and the control module, and the other end of the resistor R69 and the capacitor C21 is grounded.
[0010] The analog signal branch is composed of the resistor R23, the resistor R69 and the capacitor C21, has the advantages of low cost and easy realization, and improves the signal integrity and the anti-interference capability, and can protect the control module.
[0011] As preferred, the control module of the port function switching circuit is a single-chip microcomputer.
[0012] The control module is a single-chip microcomputer, has the advantages of mature technology, flexible use and easy integration.
[0013] As preferred, the digital signal branch of the port function switching circuit is electrically connected to the MCU_HBD port of the control module, the analog signal branch is electrically connected to the MCU_CDL port of the control module, when the external port CDL of the controller receives the digital signal, the control module configures the MCU_HBD port as a digital input port without an internal pull-up state, and configures the MCU_CDL port as a digital output port in a push-pull output mode and always outputs +5V; when the external port CDL of the controller receives the analog signal, the control module configures the MCU_HBD port as a digital input port without an internal pull-up state, and configures the MCU_CDL port as an analog input port without an internal pull-up state.
[0014] By reasonably configuring the port mode of the MCU_HBD port and the MCU_CDL port when receiving the digital signal or the analog signal, the static power consumption and unnecessary signal interference of the MCU_HBD port and the MCU_CDL port can be reduced, the anti-interference capability is improved, and the reliability of signal transmission is improved. BRIEF DESCRIPTION OF DRAWINGS
[0015] Figure 1 It is the circuit diagram of the utility model.
[0016] Explanation of reference numerals in the attached diagram: 1. Control module; 2. Digital signal branch; 3. Analog signal branch. Detailed Implementation
[0017] The following is in conjunction with the appendix Figure 1 The present invention will be further described in detail with reference to specific embodiments, but these are not intended to limit the present invention:
[0018] Example 1
[0019] like Figure 1 As shown, a port function switching circuit includes a control module 1, a digital signal branch 2, and an analog signal branch 3. One end of the digital signal branch 2 and the analog signal branch 3 are electrically connected to a port on the control module 1, and the other end of the digital signal branch 2 and the analog signal branch 3 are electrically connected to the controller's external port CDL. The control module 1 configures the port type corresponding to the digital signal branch 2 and the analog signal branch 3 according to the type of the received external signal, so that the controller's external port CDL forms a path with the corresponding digital signal branch 2 and the analog signal branch 3.
[0020] Preferably, the digital signal branch 2 includes a resistor R24 and a capacitor C24. One end of the resistor R24 is electrically connected to the external port CDL of the controller, and the other end of the resistor R24 is electrically connected to the control module 1. One end of the capacitor C24 is grounded, and the other end of the capacitor C24 is electrically connected between the resistor R24 and the control module 1.
[0021] Preferably, the analog signal branch 3 includes a resistor R23, a resistor R69, and a capacitor C21. One end of the resistor R23 is electrically connected to the external port CDL of the controller, and the other end of the resistor R23 is electrically connected to the control module 1. The resistor R69 and the capacitor C21 are connected in parallel. One end of the resistor R69 and the capacitor C21 is electrically connected between the resistor R23 and the control module 1, and the other end of the resistor R69 and the capacitor C21 is grounded.
[0022] Preferably, the control module 1 is a single-chip microcomputer.
[0023] Preferably, the digital signal branch 2 is electrically connected to the MCU_HBD port of the control module 1, and the analog signal branch 3 is electrically connected to the MCU_CDL port of the control module 1. When the controller's external port CDL receives a digital signal, the control module 1 configures the MCU_HBD port as a digital input port with no internal pull-up, and configures the MCU_CDL port as a digital output port. The MCU_CDL port is in push-pull output mode and constantly outputs +5V. When the controller's external port CDL receives an analog signal, the control module 1 configures the MCU_HBD port as a digital input port with no internal pull-up, and configures the MCU_CDL port as an analog input port with no internal pull-up.
[0024] Specifically, in the embodiments of this application, the resistance value of resistor R23 is 10K / %1, the resistance value of resistor R69 is 20K / %1, the capacitance value of capacitor C21 is 100nF / 50V, the resistance value of resistor R24 is 1K, and the capacitance value of capacitor C24 is 10nF / 50V.
[0025] When the external signal is a digital signal, the external signal line is connected to the controller's external port CDL via a connector. Control module 1 configures the MCU_HBD port corresponding to digital signal branch 2 as a digital input port with no internal pull-up. Simultaneously, control module 1 configures the MCU_CDL port corresponding to analog signal branch 3 as a digital output port, and it is in push-pull output mode, constantly outputting +5V. At this time, the MCU_HBD port of control module 1 can acquire the digital signal at the controller's external port CDL through digital signal branch 2.
[0026] When the external signal is an analog signal, the external signal line is connected to the controller's external port CDL via a connector. Control module 1 configures the MCU_HBD port corresponding to digital signal branch 2 as a digital input port with no internal pull-up. Simultaneously, control module 1 configures the MCU_CDL port corresponding to analog signal branch 3 as an analog input port with no internal pull-up. At this time, the MCU_CDL port of control module 1 can acquire the analog signal value at the controller's external port CDL through analog signal branch 3. This allows the controller's external port CDL to adapt to different signal types without changing the external circuitry, only modifying the internal program of control module 1, thus improving the practicality of the motor controller.
[0027] In summary, the above description is only a preferred embodiment of the present utility model. All equivalent changes and modifications made within the scope of the patent application of the present utility model shall be covered by the present utility model.
Claims
1. A port function switching circuit, characterized in that: The system includes a control module (1), a digital signal branch (2), and an analog signal branch (3). One end of the digital signal branch (2) and the analog signal branch (3) are electrically connected to a port on the control module (1), and the other end of the digital signal branch (2) and the analog signal branch (3) are electrically connected to the external port CDL of the controller. The control module (1) configures the port type corresponding to the digital signal branch (2) and the analog signal branch (3) according to the type of the received external signal, so that the external port CDL of the controller forms a path with the corresponding digital signal branch (2) and the analog signal branch (3).
2. The port function switching circuit according to claim 1, characterized in that: The digital signal branch (2) includes a resistor R24 and a capacitor C24. One end of the resistor R24 is electrically connected to the external port CDL of the controller, and the other end of the resistor R24 is electrically connected to the control module (1). One end of the capacitor C24 is grounded, and the other end of the capacitor C24 is electrically connected between the resistor R24 and the control module (1).
3. The port function switching circuit according to claim 1, characterized in that: The analog signal branch (3) includes resistor R23, resistor R69 and capacitor C21. One end of resistor R23 is electrically connected to the external port CDL of the controller, and the other end of resistor R23 is electrically connected to the control module (1). Resistor R69 and capacitor C21 are connected in parallel. One end of resistor R69 and capacitor C21 is electrically connected between resistor R23 and control module (1), and the other end of resistor R69 and capacitor C21 is grounded.
4. The port function switching circuit according to claim 1, characterized in that: The control module (1) uses a microcontroller.
5. A port function switching circuit according to claim 4, characterized in that: The digital signal branch (2) is electrically connected to the MCU_HBD port of the control module (1), and the analog signal branch (3) is electrically connected to the MCU_CDL port of the control module (1). When the controller's external port CDL receives a digital signal, the control module (1) configures the MCU_HBD port as a digital input port with no internal pull-up state, and configures the MCU_CDL port as a digital output port. The MCU_CDL port is in push-pull output mode and constantly outputs +5V. When the controller's external port CDL receives an analog signal, the control module (1) configures the MCU_HBD port as a digital input port with no internal pull-up state, and configures the MCU_CDL port as an analog input port with no internal pull-up state.