Disclosure of Invention
The invention aims to provide a motor matrix cascade control circuit which is used for solving at least one technical problem in the prior art.
In order to achieve the purpose, the invention adopts the following technical scheme:
the invention provides a motor matrix cascade control circuit, which comprises a power supply circuit and a controller circuit, wherein the power supply circuit is connected with the controller circuit;
the power supply circuit comprises a working power supply input interface, a system power supply load switch, a motor power supply load switch, a sensor power supply load switch, a CAN transceiver power supply load switch, a first voltage stabilizing circuit, a second voltage stabilizing circuit and a third voltage stabilizing circuit; the working power supply input interface is respectively connected with a first end of the system power supply load switch and a first end of the motor power supply load switch, a second end of the system power supply load switch is respectively connected with a first end of the first voltage stabilizing circuit and a first end of the second voltage stabilizing circuit, a second end of the first voltage stabilizing circuit is connected with a first end of the sensor power supply load switch, and a second end of the second voltage stabilizing circuit is respectively and electrically connected with a first end of the third voltage stabilizing circuit and a first end of the CAN transceiver power supply load switch;
the controller circuit comprises a main controller, a sensor interface circuit, an isolated CAN transceiving interface circuit and a motor interface circuit, wherein the main controller is respectively connected with the second end of the third voltage stabilizing circuit, the first end of the sensor interface circuit, the first end of the isolated CAN transceiving interface circuit and the first end of the motor interface circuit; the second end of the sensor interface circuit is electrically connected with the second end of the sensor power supply load switch, the second end of the isolation CAN transceiving interface circuit is electrically connected with the second end of the CAN transceiving power supply load switch, and the second end of the motor interface circuit is electrically connected with the motor power supply load switch;
the master controller is connected with a plurality of slave controllers through the isolated CAN transceiving interface circuit.
In a possible design, the control circuit further comprises a USB interface circuit and a USB power load switch, one end of the USB interface circuit is connected to a first end of the USB power load switch, and a second end of the USB power load switch is connected to a first end of the first voltage stabilizing circuit and a first end of the second voltage stabilizing circuit respectively;
when the low level enable pin of the USB power load switch detects the voltage of the working power supply, the USB power supply connected to the USB interface circuit is closed.
In one possible design, the controller circuit further includes a serial communication interface circuit, and the serial communication interface circuit is connected to the main controller.
In one possible design, the controller circuit further includes a CAN hardware ID circuit, which is connected to the master controller.
In one possible design, the first voltage stabilizing circuit adopts an output voltage with the precision of 0.5% and a power supply rejection ratio of 50dB, the second voltage stabilizing circuit adopts a 5V LDO power supply circuit, and the third voltage stabilizing circuit adopts a 3.3V LDO power supply circuit.
IN a possible design, the system power load switch includes a first load switch chip of a model U201, a GND pin of the first load switch chip is connected to a first end of a first capacitor C201 and a first end of a second capacitor C202, an SS pin of the first load switch chip is connected to a second end of the first capacitor C201 and a second end of the second capacitor C202, an ENUV pin of the first load switch chip is connected to a first end of a first resistor R208, an IN pin of the first load switch chip, a second end of the first resistor R208, and a first end of a third capacitor C210 are connected to a first end of a first magnetic bead FB202, a second end of the first magnetic bead FB202, a first end of a first TVS diode D204, and a first end of a fourth capacitor C209 are connected to a previous stage, respectively, and a second end of the first TVS diode D204, a second end of the fourth capacitor C209, and a second end of the third capacitor C210 are grounded;
an OVP pin of the first load switch chip is connected to a first end of a second resistor R202 and a first end of a third resistor R205, a second end of the second resistor R202 is grounded, a second end of the third resistor R205 is connected to an ENUV pin of the first load switch chip, an ILIM pin of the first load switch chip is connected to a first end of a fourth resistor R207, a second end of the fourth resistor R207 is connected to a first end of a fifth resistor R206, a second end of the fifth resistor R206 is grounded, an FLT pin of the first load switch chip is connected to a cathode of a first light emitting diode D202 and a first end of a sixth resistor R209, an anode of the first light emitting diode D202 is connected to a first end of a seventh resistor R210, a second end of the seventh resistor R210 and a second end of the sixth resistor R209 are connected to a pre-stage power supply, and an OUT pin of the first load switch chip is connected to the main controller, a first end of the fifth capacitor C205, a second end of the sixth resistor R206, a cathode of the schottky diode D205, a cathode of the schottky diode C205, and a cathode of the schottky diode 206 are connected to a ground.
In one possible design, the sensor interface circuit includes a fifteenth resistor R301, a first end of the fifteenth resistor R301 is connected to the input pin ADC1 of the sensor, a second end of the fifteenth resistor R301 is connected to the ADC sampling input pin AIN0 of the host controller, a first end of a seventh capacitor C301, and a first end of a bidirectional ESD diode D301, respectively, and a second end of the seventh capacitor C301 and a second end of the bidirectional ESD diode D301 are connected to the analog ground.
In a possible design, the isolated CAN transceiver interface circuit includes two CAN interface circuits, each CAN interface circuit includes a dual PNP triode, a first collector C1 of the dual PNP triode is connected to an eighth resistor R307 and a second light emitting diode D305 in sequence and then is connected to a system ground SGND, a first base B1 of the dual PNP triode is connected to a CAN1 TX pin of the main controller after being connected to an eighth resistor R305, a first emitter E1 of the dual PNP triode is connected to a 3.3VCAN pin of the main controller, a second collector C2 of the dual PNP triode is connected to a ninth resistor R304 and a third light emitting diode in sequence and then is connected to a system ground SGND, a second base B2 of the dual PNP triode is connected to a tenth resistor R306 and then is connected to a CAN1 RX pin of the main controller, and a second emitter E2 of the dual PNP triode is connected to the 3.3VCAN pin of the main controller;
each path of CAN interface circuit also comprises an isolation CAN transceiver U301, two grounding pins GND1 of the isolation CAN transceiver U301 are respectively connected with a system ground SGND and a first end of a second TVS diode D306, a VDD2SENSE pin of the isolation CAN transceiver U301 and a second end of the second TVS diode D306 are connected with a CAN1 PG pin of the main controller, an RXD pin of the isolation CAN transceiver U301 is respectively connected with a first end of a third TVS diode D313 and a CAN1 RX pin of the main controller, a TXD pin of the isolation CAN transceiver U301 is respectively connected with a first end of a fourth TVS diode D314 and a CAN1 pin TX of the main controller, a VDD1 pin of the isolation CAN transceiver U301 is respectively connected with a first end of a tenth capacitor C308 and a 3.3V pin of the CAN controller, a GND1 pin of the isolation CAN transceiver U301, a second end of the third TVS diode D313, a second end of the fourth TVS diode D314, and a second end of the tenth capacitor C308 are connected to a system ground SGND, a VDD2 pin of the isolation CAN transceiver U301 is connected to a first end of an eighth capacitor C307 and a 5V power input terminal, a second end of the eighth capacitor C307 and a GND2 pin of the isolation CAN transceiver U301 are grounded, a CANH pin of the isolation CAN transceiver U301 is connected to an eleventh resistor R311 and then connected to a first end of a twelfth resistor R316 and a slave controller, a CANL pin of the isolation CAN transceiver U301 is connected to a thirteenth resistor R315 and then connected to a fourteenth resistor R317 and the slave controller, a second end of the twelfth resistor R316 and a second end of the fourteenth resistor R317 are connected to a ninth capacitor C and then connected to a CAN signal ground, and a 2 pin of the isolation CAN transceiver U301 is connected to a CAN signal ground.
In a possible design, the isolated CAN transceiver interface circuit further includes a power isolation circuit, the power isolation circuit includes a second magnetic bead FB301, and two ends of the second magnetic bead FB301 are respectively connected to the 3.3V system power supply and the 3.3VCAN power supply.
In one possible design, the main controller is a microcontroller packaged by a BGA, and the microcontroller includes 24 ADC pins, 24 PWM pins, 2 CAN pins, 7 IO input pins, and 1 serial port pin;
and 24 paths of ADC pins are connected to the sensor interface circuit, 24 paths of PWM pins are connected to the motor interface circuit, 2 paths of CAN pins are connected to the CAN transceiving interface circuit, 7 IO input pins are connected to the CAN hardware ID circuit, and 1 path of serial port pin is connected to the serial port communication interface circuit.
Has the beneficial effects that:
according to the invention, the highly integrated motor matrix cascade control circuit is arranged, so that the controller circuit can be matched with an external device with high flexibility, namely, a motor (such as a PWM (pulse-width modulation) controlled driving motor) and a sensor (such as a magnetic encoder) with the same control mode can be suitable for the control circuit; in addition, each power supply is distributed with a power supply isolation protection circuit (namely a load switch), so that the power supply input is divided into a plurality of paths through the load switch for isolation, thereby increasing the stability of the system work, for example, the large load can be avoided when the motor works, the interference which affects the system power supply can be generated, meanwhile, the rear-stage circuit can be effectively protected, and when the motor power supply fails, the motor power supply can be automatically switched off without affecting other circuits; in addition, the voltage reduction and noise reduction of the front-stage power supply are realized by arranging the plurality of voltage stabilizing circuits, and the circuit safety is improved.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present disclosure more clear, the technical solutions in the embodiments of the present disclosure will be clearly and completely described below with reference to the drawings in the embodiments of the present disclosure, and it is obvious that the described embodiments are some, but not all embodiments of the present disclosure. All other embodiments, which can be obtained by a person skilled in the art without inventive step based on the embodiments in the present description, belong to the protection scope of the present invention.
Examples
As shown in fig. 1 to fig. 5, the present embodiment provides a motor matrix cascade control circuit, which includes a power circuit and a controller circuit, where the power circuit is connected to the controller circuit;
the power supply circuit comprises a working power supply input interface, a system power supply load switch, a motor power supply load switch, a sensor power supply load switch, a CAN transceiver power supply load switch, a first voltage stabilizing circuit, a second voltage stabilizing circuit and a third voltage stabilizing circuit; the working power supply input interface is respectively connected with a first end of the system power supply load switch and a first end of the motor power supply load switch, a second end of the system power supply load switch is respectively connected with a first end of the first voltage stabilizing circuit and a first end of the second voltage stabilizing circuit, a second end of the first voltage stabilizing circuit is connected with a first end of the sensor power supply load switch, and a second end of the second voltage stabilizing circuit is respectively and electrically connected with a first end of the third voltage stabilizing circuit and a first end of the CAN transceiver power supply load switch;
the controller circuit comprises a main controller, a sensor interface circuit, an isolated CAN transceiving interface circuit and a motor interface circuit, wherein the main controller is respectively connected with the second end of the third voltage stabilizing circuit, the first end of the sensor interface circuit, the first end of the isolated CAN transceiving interface circuit and the first end of the motor interface circuit; the second end of the sensor interface circuit is electrically connected with the second end of the sensor power supply load switch, the second end of the isolated CAN transceiving interface circuit is electrically connected with the second end of the CAN transceiving power supply load switch, and the second end of the motor interface circuit is electrically connected with the motor power supply load switch;
the master controller is connected with a plurality of slave controllers through the isolated CAN transceiving interface circuit.
It should be noted that the working power supply input interface is used for accessing a working power supply, and the working power supply is used for respectively supplying power to the system and the motor interface circuit through the system power supply load switch and the motor power supply load switch.
It should be noted that both the system power load switch and the motor power load switch have multiple circuit programming functions such as highly integrated circuit protection, fast response short circuit protection, overcurrent protection, overvoltage protection, undervoltage protection and the like, and the two load switches also provide fault flag output for power state monitoring and downstream loads, and in addition, provide surge current control protection for hot plugging, so that the total working power input can be divided into two paths for isolation through the two load switches, thereby not only increasing the stability of system operation and avoiding the influence of the interference generated by overlarge load during the motor operation on the system power supply, but also effectively protecting a rear-stage circuit, and automatically turning off the motor power supply without influencing other circuits when the motor power supply fails.
The sensor interface is an analog circuit, preferably, the first voltage stabilizing circuit adopts a Low-noise high-precision LDO (Low Dropout Regulator) power circuit to supply power to the sensor alone, and specifically, the first voltage stabilizing circuit adopts an output voltage with precision of 0.5% and a power supply rejection ratio of 50dB, where the output voltage may be selected according to a working voltage of the sensor, for example, the first voltage stabilizing circuit adopts an output voltage of 5V, and the first voltage stabilizing circuit has a Low-noise output voltage of 30uV and a power supply rejection ratio of 50dB, so that internal noise and external noise may be well suppressed, and further, signal integrity of a sensitive analog circuit such as an analog-to-digital converter may be maintained, and the high-precision output power supply may increase stability of the power supply, and reduce influence of a conversion error caused by a voltage fluctuation change on precision of the entire system.
Preferably, the second voltage stabilizing circuit adopts a 5V LDO power supply circuit, so that a front-stage power supply can be stabilized to 5V, and power is supplied to the rear two circuits; preferably, the third voltage stabilizing circuit adopts a 3.3V LDO power supply circuit, so that a front-stage 5V power supply can be stabilized to 3.3V, and power is supplied to the main controller.
It should be noted that the power load switch of the CAN transceiver is used for realizing low-cost CAN bus power isolation protection.
It should be noted that the system power load switch, the motor power load switch, the sensor power load switch and the CAN transceiver power load switch are all integrated load switches.
In a specific embodiment, the control circuit further includes a USB interface circuit and a USB power load switch, one end of the USB interface circuit is connected to a first end of the USB power load switch, and a second end of the USB power load switch is connected to a first end of the first voltage stabilizing circuit and a first end of the second voltage stabilizing circuit respectively; when the low level enable pin of the USB power load switch detects the voltage of a working power supply, the USB power supply connected with the USB interface circuit is closed, and the USB power supply is used for supplying power in the debugging and upgrading processes of the sensor interface circuit and the main controller.
In a specific embodiment, the controller circuit further includes a serial communication interface circuit, and the serial communication interface circuit is connected to the main controller.
In a specific embodiment, the controller circuit further includes a CAN hardware ID circuit, and the CAN hardware ID circuit is connected to the main controller.
In a specific embodiment, the main controller is a microcontroller packaged by a BGA, and the microcontroller includes 24 ADC pins, 24 PWM pins, 2 CAN pins, 7 IO input pins, and 1 serial port pin;
and 24 paths of ADC pins are connected to the sensor interface circuit, 24 paths of PWM pins are connected to the motor interface circuit, 2 paths of CAN pins are connected to the CAN transceiving interface circuit, 7 IO input pins are connected to the CAN hardware ID circuit, and 1 path of serial port pin is connected to the serial port communication interface circuit.
Wherein, the sensor interface circuit comprises 24 ports which can be connected to external sensors, such as magnetic encoders, and has ESD (Electro-Static discharge) and hot plug protection functions; the motor interface circuit comprises 24 ports which can be connected to an external motor and has ESD and hot plug protection functions; the isolated CAN transmitting and receiving interface circuit comprises an integrated isolated CAN transceiver which CAN be in cascade connection with each slave controller for CAN bus communication and has the advantage of high signal isolation protection level; the CAN hardware ID circuit CAN configure the ID number of the slave controller for CAN bus communication through the dial switch circuit, and certainly, the ID number of the slave controller CAN also be configured through software in the upper computer, which is not limited here; the serial port communication interface circuit is used for communication between the main controller and the upper computer.
IN a specific embodiment, the system power load switch includes a first load switch chip of type U201, a GND pin of the first load switch chip is connected to a first terminal of a first capacitor C201 and a first terminal of a second capacitor C202, respectively, an SS pin of the first load switch chip is connected to a second terminal of the first capacitor C201 and a second terminal of the second capacitor C202, respectively, so as to set a slope of an output voltage when the device is turned on (i.e. soft start), an ENUV pin of the first load switch chip is connected to a first terminal of a first resistor R208, wherein, the ENUV pin is used for controlling the switching state of the FET inside the chip, the IN pin of the first load switch chip, the second end of the first resistor R208, and the first end of the third capacitor C210 are respectively connected to the first end of the first magnetic bead FB202, the second end of the first magnetic bead FB202, the first end of the first TVS diode D204, and the first end of the fourth capacitor C209 are respectively connected to the front-stage power supply VIN, wherein the first TVS diode D204 is used for placing the transient voltage exceeding the absolute maximum rating of the device, and the second end of the first TVS diode D204, the second end of the fourth capacitor C209, and the second end of the third capacitor C210 are grounded;
the OVP pin of the first load switch chip is connected to the first end of the second resistor R202 and the first end of the third resistor R205, respectively, the second end of the second resistor R202 is grounded, the second end of the third resistor R205 is connected to the ENUV pin of the first load switch chip, the ILIM pin of the first load switch chip is connected to the first end of the fourth resistor R207, the second end of the fourth resistor R207 is connected to the first end of the fifth resistor R206, the second end of the fifth resistor R206 is grounded, the FLT pin of the first load switch chip is connected to the cathode of the first light emitting diode D202 and the first end of the sixth resistor R209, respectively, the anode of the first light emitting diode D202 is connected to the first end of the seventh resistor R210, the second end of the seventh resistor R210 and the second end of the sixth resistor R209 are connected to the front-stage power supply, the OUT pin of the first load switch chip is connected to the main controller, the first end of the fifth capacitor C205, the second end of the sixth resistor R206, and the cathode of the schottky capacitor C205, the schottky diode is connected to the ground, and the schottky diode is connected to the schottky diode 205, and the schottky diode is connected to the schottky diode.
It should be noted that, the ENUV pin and the OVP pin are configured with an undervoltage threshold and an overvoltage threshold through the first resistor R208, the second resistor R202, and the third resistor R205, and when the voltage on the ENUV pin is lower than the undervoltage threshold or the voltage on the OVP pin is higher than the overvoltage threshold, the internal FET is turned off, thereby disconnecting the input and the output.
The front-stage power supply VIN is a stable and safe power supply obtained by passing through a CLC power filter circuit formed by a first TVS diode D204, a fourth capacitor C209, a first magnetic bead FB202, and a third capacitor C210, and is input to the IN pin.
The ILIM pin is connected to the fourth resistor R207 and the fifth resistor R206 connected in series and then connected to PGND, and the load current induces a voltage through the two resistors to monitor the voltage. Two different overcurrent protection levels can be distinguished: current limit (ILIMIT) and fast trip threshold (I (fastip)), the thresholds being configured by resistance values. In overcurrent protection, the current limit is within the current limit (ILIMIT) programmed by an R (ILIM) resistor, tripping open the load switch when a short circuit occurs.
The FLT pin is used for outputting a fault mark, is pulled up to VIN through a connecting R209 resistor and is connected with a light-emitting diode D202 and a current-limiting resistor R210, and when a circuit fault occurs, the FLT outputs a low level, the diode is lightened, and the maintenance and the repair are convenient.
In a specific embodiment, the sensor interface circuit includes a fifteenth resistor R301, a first end of the fifteenth resistor R301 is connected to the input pin ADC1 of the sensor, a second end of the fifteenth resistor R301 is respectively connected to the ADC sampling input pin AIN0 of the main controller, a first end of a seventh capacitor C301, and a first end of a bidirectional ESD diode D301, and a second end of the seventh capacitor C301 and a second end of the bidirectional ESD diode D301 are connected to the analog ground.
The fifteenth resistor R301 and the seventh capacitor C301 form a first-order RC low-pass filter circuit for filtering high-frequency resonance and noise and reducing interference of signal sampling and fluctuation of voltage and current; the bi-directional ESD diode D301 is used to protect the ADC input from overvoltage events such as certain static electricity.
In a specific embodiment, the isolated CAN transceiver interface circuit includes two CAN interface circuits, one of which is a standby circuit for connecting to more slave controllers, and each of which includes a dual PNP transistor for driving a CAN signal LED indicator, wherein a first collector C1 of the dual PNP transistor is connected to an eighth resistor R307 and a second light emitting diode D305 in sequence and then connected to a system ground SGND, a first base B1 of the dual PNP transistor is connected to an eighth resistor R305 and then connected to a CAN1 TX pin of the master controller, a first emitter E1 of the dual PNP transistor is connected to a 3.3VCAN pin of the master controller, a second collector C2 of the dual PNP transistor is connected to a ninth resistor R304 and a third light emitting diode in sequence and then connected to a system ground SGND, a second base B2 of the dual PNP transistor is connected to a tenth resistor R306 and then connected to a CAN1 RX pin of the master controller, and a second emitter E2 of the dual PNP transistor is connected to a 3.3VCAN pin of the master controller;
each path of CAN interface circuit further comprises an isolation CAN transceiver U301, the isolation CAN transceiver U301 has short-circuit protection, over-temperature protection and bus dominant overtime protection, thereby preventing the bus line from being driven to a permanent dominant state and blocking the network communication, wherein two grounding pins GND1 of the isolation CAN transceiver U301 are respectively connected with a system ground SGND and a first end of a second TVS diode D306, a VDD2SENSE pin of the isolation CAN transceiver U301 and a second end of the second TVS diode D306 are connected into a CAN1 PG pin of the main controller, wherein the VDD2SENSE pin is a feedback pin of a VDD2 power supply and is connected to an IO port of the main controller for monitoring whether the power supply connected with the CAN transceiver is working normally, and a RXD pin of the isolation CAN transceiver U301 is respectively connected with a first end of a third TVS diode D313 and a CAN1 RX pin of the main controller, the TXD pin of the isolated CAN transceiver U301 is connected to the first terminal of the fourth TVS diode D314 and the CAN1 TX pin of the host controller, respectively, the VDD1 pin of the isolated CAN transceiver U301 is connected to the first terminal of the tenth capacitor C308 and the 3.3V CAN pin of the host controller, respectively, wherein the tenth capacitor C308 is a filter capacitor, the GND1 pin of the isolated CAN transceiver U301, the second terminal of the third TVS diode D313, the second terminal of the fourth TVS diode D314, and the second terminal of the tenth capacitor C308 are connected to the system ground SGND, the VDD2 pin of the isolated CAN transceiver U301 is connected to the first terminal of the eighth capacitor C307 and the 5V power input terminal, the second terminal of the eighth capacitor C307 and the GND2 pin of the isolated CAN transceiver U301 are grounded, the CANH pin of the isolated CAN transceiver U301 is connected to the eleventh resistor R311 and then to the first terminal of the twelfth resistor R316 and the slave controller resistor R316, a CANL pin of the isolated CAN transceiver U301 is connected to the thirteenth resistor R315, and then connected to the fourteenth resistor R317 and the slave controller, a second end of the twelfth resistor R316 and a second end of the fourteenth resistor R317 are connected to the ninth capacitor C312 and then connected to the CAN signal ground, and a GND2 pin of the isolated CAN transceiver U301 is connected to the CAN signal ground.
In a specific implementation manner, the isolated CAN transceiver interface circuit further includes a power isolation circuit, the power isolation circuit includes a second magnetic bead FB301, and two ends of the second magnetic bead FB301 are respectively connected to a 3.3V system power supply and a 3.3VCAN power supply, so as to isolate the system power supply from the CAN power supply.
Based on the disclosure, the controller circuit can be matched with an external device to have high flexibility by arranging the highly integrated motor matrix cascade control circuit, that is, both the motor (such as a PWM-controlled driving motor) and the sensor (such as a magnetic encoder) with the same control mode can be applied to the control circuit of the present invention; in addition, each power supply is distributed with a power supply isolation protection circuit (namely a load switch), so that the power supply input is divided into a plurality of paths through the load switch for isolation, thereby increasing the stability of the system work, for example, the large load can be avoided when the motor works, the interference which affects the system power supply can be generated, meanwhile, the rear-stage circuit can be effectively protected, and when the motor power supply fails, the motor power supply can be automatically switched off without affecting other circuits; in addition, the voltage reduction and noise reduction of the front-stage power supply are realized by arranging the plurality of voltage stabilizing circuits, and the circuit safety is improved.
Finally, it should be noted that: the above description is only a preferred embodiment of the present invention, and is not intended to limit the scope of the present invention. Any modification, equivalent replacement, or improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention.