A brushless DC motor control system for a two-wheeled robot
By introducing the sampling detection unit and real -time monitoring function in the DC brushless motor control system, the problem of overcurrent damage to the motor in the existing system is solved, and the stability of the motor and the stability of the robot mobility.
Patent Information
- Application Number
- CN201811427615.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2018-11-27
- Publication Date
- 2025-01-28
- Estimated Expiration
- 2038-11-27
AI Technical Summary
The existing brushless DC motor control system lacks line overcurrent detection function, which causes too much current in the line when the motor is blocked, which may cause the line to heat up, damage the robot's mobility performance or burn the motor.
Design a DC brushless motor control system including STM32F103VCT6 single -chip microcomputer, driver unit, sampling detection unit, and power supply unit. The sampling detection unit monitors the phase current and the bus current by the actual -time monitoring of the motor by the sampling circuit and the comparison circuit. The single -chip microcomputer has timely cutting the motor to rotate the motor in time to prevent overcurrent.
Effectively prevent the damage of the motor overcurrent, ensure the stability of the robot's movement performance, and extend the service life of the motor.
Smart Images

Figure CN109510172B_ABST
Abstract
Description
Technical Field
[0001] The invention belongs to the technical field of mobile robot control, and in particular relates to a direct current brushless motor control system of a two-wheeled robot. Background Art
[0002] A mobile robot is a mechanical device that can perform work automatically. It can be divided into wheeled robots, walking robots, tracked robots, crawling robots, peristaltic robots and swimming robots according to the way they move. Among them, wheeled mobile robots, especially two-wheeled robots, are usually driven by brushless DC motors. They have the advantages of flexible and smooth movement, long service life, low transmission noise and a wide speed range.
[0003] The existing brushless DC motor control system does not have a line overcurrent detection function. When the motor is stalled, it is easy to cause excessive current in the line, which in turn causes the line to heat up. At the very least, it will destroy the robot's mobility performance, and at worst, it will burn the motor and damage the robot. Summary of the invention
[0004] In view of this, the present invention aims to provide a brushless DC motor control system for a two-wheeled robot to prevent the motor from being damaged by overcurrent.
[0005] To achieve the above object, the technical solution created by the present invention is implemented as follows:
[0006] A brushless DC motor control system for a two-wheeled robot, comprising:
[0007] STM32F103VCT6 microcontroller, used to output PWM three-phase control signals;
[0008] A driving unit, used for receiving a PWM three-phase control signal of the single-chip microcomputer and driving the DC brushless motor to rotate, including a left wheel driving circuit and a right wheel driving circuit with the same structure;
[0009] The left wheel drive circuit comprises: a U phase drive circuit, whose input end is connected to the 67th and 52th pins of the single chip microcomputer, and is used to control the conduction and cut-off of two MOS tubes on the U phase of the left wheel motor; a V phase drive circuit, whose input end is connected to the 68th and 53th pins of the single chip microcomputer, and is used to control the conduction and cut-off of two MOS tubes on the V phase of the left wheel motor; a W phase drive circuit, whose input end is connected to the 69th and 54th pins of the single chip microcomputer, and is used to control the conduction and cut-off of two MOS tubes on the W phase of the left wheel motor;
[0010] The right wheel drive circuit includes: a U-phase drive circuit, whose input end is connected to the 63rd and 32nd pins of the single-chip microcomputer, and is used to control the conduction and cutoff of two MOS tubes on the U-phase of the right wheel motor; a V-phase drive circuit, whose input end is connected to the 64th and 35th pins of the single-chip microcomputer, and is used to control the conduction and cutoff of two MOS tubes on the V-phase of the right wheel motor; a W-phase drive circuit, whose input end is connected to the 65th and 36th pins of the single-chip microcomputer, and is used to control the conduction and cutoff of two MOS tubes on the W-phase of the right wheel motor;
[0011] The sampling detection unit includes a sampling circuit and a comparison circuit. The sampling circuit is used to collect motor phase current and bus current signals and perform fidelity processing on them, including a phase current circuit and a bus current circuit;
[0012] The input end of the phase current circuit is connected to the single-phase sampling resistor of each phase drive circuit of the motor, wherein the output end of the U, V, W phase current circuit of the left wheel motor is respectively connected to the 15th, 16th, and 17th pins of the single-chip microcomputer, and the output end of the U, V, and W phase current circuit of the right wheel motor is respectively connected to the 26th, 29th, and 30th pins of the single-chip microcomputer; the input end of the bus current circuit is connected to the bus sampling resistor, wherein the output end of the bus current circuit of the left wheel motor is connected to the 18th pin of the single-chip microcomputer, and the output end of the bus current circuit of the right wheel motor is connected to the 31st pin of the single-chip microcomputer;
[0013] The comparison circuit is used to compare the output signal of the bus current circuit with a preset value, wherein the input end of the left wheel comparison circuit is connected to the 18th pin of the single-chip microcomputer, and the output end is connected to the 51st pin of the single-chip microcomputer, and the input end of the right wheel comparison circuit is connected to the 31st pin of the single-chip microcomputer, and the output end is connected to the 91st pin of the single-chip microcomputer;
[0014] The power supply unit is used to transform the power supply and supply it to each unit in the system.
[0015] Furthermore, the driving circuit includes:
[0016] IR2101S power driver is used to drive the three-phase MOS tube on the motor. Pins 2 and 3 of the driver receive PWM signals, and pins 7 and 6 are connected to the gates of the MOS tubes of the upper bridge arm and the lower bridge arm respectively.
[0017] The bootstrap boost module is used to boost the voltage of the upper bridge arm MOS tube, including a boost diode and a boost capacitor. The positive electrode of the boost diode is connected to the power supply voltage, and the negative electrode thereof is connected to the 8-pin of the driver. The positive electrode of the boost capacitor is connected to the negative electrode of the boost diode, and the negative electrode of the boost capacitor is connected to the source of the upper bridge arm MOS tube.
[0018] Furthermore, a first end of the single-phase sampling resistor is connected to the drain of the lower bridge arm MOS tube, a second end is connected to a first end of a bus sampling resistor, and a second end of the bus sampling resistor is grounded.
[0019] Furthermore, the sampling detection unit also includes a reference circuit, and the reference circuit is used to generate a reference voltage, and the reference voltage is used to supply the sampling circuit.
[0020] Further, the reference circuit includes a first operational amplifier, a first voltage-dividing resistor, a second voltage-dividing resistor, a first protection capacitor, and a second protection capacitor;
[0021] The first end of the first voltage-dividing resistor is connected to the power supply voltage, the second end is connected to the first end of the second voltage-dividing resistor, and the second end of the second voltage-dividing resistor is grounded; the positive input end of the first operational amplifier is connected to the second end of the first voltage-dividing resistor, its reverse input end is connected to its own output end, and its output end outputs a reference voltage; the positive electrode of the first protection capacitor is connected to the positive power supply end of the first operational amplifier, and the negative electrode is grounded; the negative power supply end of the first operational amplifier is grounded; the positive electrode of the second protection capacitor is connected to the output end of the first operational amplifier, and the negative electrode is grounded.
[0022] Further, the sampling circuit includes a second operational amplifier, a first resistor, a second resistor, a third resistor, a fourth resistor, a fifth resistor, a sixth resistor, a seventh resistor, a first capacitor and a second capacitor;
[0023] The first end of the first resistor is connected to the single-phase sampling resistor, and the second end is connected to the first end of the second resistor; the second end of the second resistor is connected to the positive input end of the second operational amplifier; the first end of the third resistor is connected to the second end of the second resistor, and the second end thereof is connected to the output end of the reference circuit, for introducing a reference voltage into the sampling circuit and stabilizing the reference voltage; the positive electrode of the first capacitor is connected to the second end of the first resistor, and the negative electrode is connected to the first end of the fourth resistor, for reducing signal interference; the second end of the fourth resistor is grounded, for preventing the sampling circuit signal from being distorted; the output of the second operational amplifier is connected to the first end of the seventh resistor, and the second end of the seventh resistor is connected to the single-chip microcomputer; the reverse output end of the second operational amplifier is connected to the first end of the sixth resistor, and the second end of the sixth resistor is connected to the first end of the seventh resistor; the first end of the fifth resistor is connected to the first end of the fourth resistor, and the second end thereof is connected to the first end of the sixth resistor; the positive electrode of the second capacitor is connected to the second end of the seventh resistor, and the negative electrode thereof is grounded.
[0024] Further, the comparison circuit includes a third operational amplifier, an eighth resistor, a ninth resistor, a tenth resistor, an eleventh resistor, a twelfth resistor, a third capacitor, a fourth capacitor and a fifth capacitor;
[0025] The first end of the eighth resistor is connected to the output end of the bus sampling circuit, and the second end is connected to the reverse input end of the third operational amplifier; the first end of the ninth resistor is connected to the power supply voltage, and the second end is connected to the positive input end of the third operational amplifier; the output end of the third operational amplifier is connected to the first end of the tenth resistor, and the second end of the tenth resistor is connected to the single-chip microcomputer; the first end of the eleventh resistor is connected to the second end of the ninth resistor, and the second end thereof is grounded; the positive electrode of the third capacitor is connected to the second end of the eighth resistor, and the negative electrode thereof is grounded; the first end of the twelfth resistor is connected to the second end of the tenth resistor, and the second end thereof is connected to the power supply voltage; the positive electrode of the fourth capacitor is connected to the second end of the tenth resistor, and the negative electrode thereof is grounded; the positive electrode of the fifth capacitor is connected to the positive power supply end of the third operational amplifier, and the negative electrode thereof is grounded, and the negative power supply end of the third operational amplifier is grounded.
[0026] Further, the driving circuit also includes a PWM shaping module, which is used to shape the PWM three-phase signal generated by the single-chip microcomputer into a form that satisfies the operation of the motor, including: a 74LV244APW chip, a first buffer resistor, a second buffer resistor, a first fidelity capacitor and a second fidelity capacitor;
[0027] The first end of the first buffer resistor is connected to the power supply voltage, and the second end is connected to the first end of the second buffer resistor, and the second end of the second buffer resistor is respectively connected to pin 1 and pin 19 of the 74LV244APW chip; the positive electrode of the first fidelity capacitor is connected to the second end of the second buffer resistor, and the negative electrode thereof is grounded; the first end of the first buffer resistor is connected to the power supply voltage, and the second end is connected to the first end of the second buffer resistor;
[0028] Pin 20 of the 74LV244APW chip is connected to the power supply voltage, and pins 8, 10, and 17 are grounded; pins 2 and 11 of the 74LV244APW chip receive the PWM signal of the U phase of the microcontroller, which is shaped by the 74LV244APW chip and output at pins 18 and 9; pins 4 and 13 receive the PWM signal of the V phase of the microcontroller, which is shaped by the 74LV244APW chip and output at pins 16 and 7; pins 6 and 15 receive the PWM signal of the W phase of the microcontroller, which is shaped by the 74LV244APW chip and output at pins 14 and 5.
[0029] Furthermore, the control system also includes a Hall detection unit for receiving signals from the motor Hall sensor and transmitting the results to the single-chip microcomputer, wherein the Hall detection unit of the left wheel motor is connected to pins 92, 93, and 95 of the single-chip microcomputer, and the Hall detection unit of the right wheel motor is connected to pins 23, 24, and 25 of the single-chip microcomputer.
[0030] Further, the Hall detection unit includes a five-pin connector, a first filter module, a 74AHC14D chip and a second filter module;
[0031] The five-pin connector is used to transmit the signal on the motor Hall sensor to the inside of the Hall detection unit, wherein pin 1 is connected to the power supply voltage, pin 5 is grounded, and pins 2, 3, and 4 are respectively connected to the input end of a first filter module;
[0032] The output ends of the three first filter modules are respectively connected to the 1st, 2nd and 5th pins of the 74AHC14D chip, and the 2nd, 4th and 6th pins of the 74AHC14D chip are respectively connected to the input end of a second filter module;
[0033] The output end of the second filtering module is connected to the single chip microcomputer.
[0034] Furthermore, the first filtering module includes a first filtering resistor, a second filtering resistor and a first filtering capacitor; the first end of the first filtering resistor is connected to a five-pin connector, and the second end is connected to a 74AHC14D chip; the first end of the second filtering resistor is connected to a working voltage, and the second end is connected to the first end of the first filtering resistor; the positive electrode of the first filtering capacitor is connected to the second end of the first filtering resistor, and the negative electrode is grounded.
[0035] Furthermore, the second filtering module includes a third filtering resistor and a second filtering capacitor; the first end of the third filtering resistor is connected to the 74AHC14D chip, and the second end is connected to the single-chip microcomputer; the positive electrode of the second filtering capacitor is connected to the second end of the third filtering resistor, and the negative electrode is grounded.
[0036] Furthermore, the control system also includes a communication unit for realizing signal exchange between the single-chip microcomputer and the host computer, wherein the signal output end is connected to the 79th pin of the single-chip microcomputer, and the signal input end is connected to the 78th pin of the single-chip microcomputer.
[0037] Further, the communication unit includes an SP3232EEN chip and a protection module;
[0038] The protection module includes a first suppression diode, a second suppression diode, a first suppression capacitor, a second suppression capacitor, a first protection resistor and a second protection resistor;
[0039] The first end of the first suppression diode is grounded, the second end is connected to the first end of the first protection resistor, the second end of the first protection resistor is connected to pin 13 of the SP3232EEN chip, the positive electrode of the first suppression capacitor is connected to the first end of the first protection resistor, and the negative electrode thereof is grounded; the first end of the second suppression diode is connected to the first end of the first suppression diode, the second end is connected to the first end of the second protection resistor, the second end of the second protection resistor is connected to pin 14 of the SP3232EEN chip, the positive electrode of the second suppression capacitor is connected to the first end of the second protection capacitor, and the negative electrode thereof is grounded;
[0040] The SP3232EEN chip is used to realize the conversion of signals between RS232 and TTL formats, and its pin 11 receives the microcontroller signal and the pin 12 transmits the signal to the microcontroller.
[0041] Further, the power supply unit includes a first conversion circuit, a second conversion circuit and a third conversion circuit;
[0042] The first conversion circuit is used to convert the 24V power supply voltage into a 15V power supply voltage, and includes an LM2596-ADJ chip, a first diode, a second diode, a first energy storage capacitor, a second energy storage capacitor, a third energy storage capacitor, a fourth energy storage capacitor, a first inductor, a first buffer capacitor, and a second buffer capacitor;
[0043] The positive electrode of the first diode is connected to the 24V working voltage, and the negative electrode is connected to the 1 pin of the LM2596-ADJ chip; the positive electrodes of the first energy storage capacitor and the second energy storage capacitor are both connected to the positive electrode of the first diode, and the negative electrodes are both grounded; the positive electrodes of the third energy storage capacitor and the fourth energy storage capacitor are both connected to the negative electrode of the first diode, and their negative electrodes are both grounded; the 2 pins of the LM2596-ADJ chip are connected to the first end of the first inductor, and the second end of the first inductor outputs a 15V power supply voltage; the negative electrode of the second diode is connected to the first end of the first inductor, and its negative electrode is grounded; the positive electrodes of the first buffer capacitor and the second buffer capacitor are both connected to the second end of the first inductor, and their negative electrodes are both grounded;
[0044] The second conversion circuit is used to convert the 15V power supply voltage into a 5V power supply voltage, and includes an LM2596-5 chip, a third diode, a fifth energy storage capacitor, a sixth energy storage capacitor, a second inductor, a fourth buffer capacitor and a fifth buffer capacitor;
[0045] Pin 1 of the LM2596-5 chip is connected to a 15V power supply voltage, and pin 2 is connected to a first end of a second inductor, and a second end of the second inductor outputs a 5V power supply voltage; a cathode of the third diode is connected to a first end of the second inductor, and a positive electrode thereof is grounded; a positive electrode of the fourth buffer capacitor and a positive electrode of the fifth buffer capacitor are both connected to a second end of the second inductor, and a negative electrode thereof is grounded;
[0046] The third conversion circuit is used to convert the 5V power supply voltage into a 3.3V power supply voltage, and includes an LM1117-3V3 chip, a seventh energy storage capacitor, an eighth energy storage capacitor, a sixth buffer capacitor, and a seventh buffer capacitor;
[0047] Pin 1 of the LM1117-3V3 chip is connected to a 5V power supply voltage, and pin 2 outputs a 3.3V power supply voltage; the positive electrodes of the seventh energy storage capacitor and the eighth energy storage capacitor are both connected to pin 1 of the LM1117-3V3 chip, and their negative electrodes are both grounded; the positive electrodes of the sixth buffer capacitor and the seventh buffer capacitor are both connected to pin 2 of the LM1117-3V3 chip, and their negative electrodes are both grounded.
[0048] Further, the first conversion circuit includes a first sampling feedback module, which is used to feed back the output voltage to the LM2596-ADJ chip, and includes a first feedback resistor, a second feedback resistor and a third buffer capacitor;
[0049] The positive electrode of the third buffer capacitor is connected to the second end of the first inductor, and the negative electrode is connected to pin 4 of the LM2596-ADJ chip; the first end of the first feedback resistor is connected to the positive electrode of the third buffer capacitor, and the second end is connected to the first end of the second feedback resistor, and the second end of the second feedback resistor is grounded.
[0050] Furthermore, the second conversion circuit includes a second sampling feedback module for feeding back the output voltage to the LM2596-5 chip, including a third feedback resistor; the first end of the third feedback resistor is connected to the second end of the second inductor, and the second end thereof is connected to pin 4 of the LM2596-5 chip.
[0051] Compared with the prior art, the brushless DC motor control system of a two-wheeled robot created by the present invention has the following advantages:
[0052] (1) The present invention creates a DC brushless motor control system for a two-wheeled robot, which samples the phase current and bus current of the motor through a sampling detection unit, wherein the phase current is transmitted to a single-chip microcomputer for comparison, and the bus current is transmitted to a comparison circuit for comparison. The line status is monitored in real time based on the comparison result, so that the single-chip microcomputer can cut off the rotation of the motor in time when an overcurrent occurs, thereby preventing the line from damaging the motor due to overcurrent.
[0053] (2) The brushless DC motor control system of the two-wheeled robot created by the present invention can monitor the rotation speed of the motor in real time through the Hall sensor, which is convenient for controlling the travel speed of the robot. In addition, its Hall detection unit can eliminate interference during signal transmission and ensure the accuracy of signal transmission.
[0054] (3) The DC brushless motor control system of a two-wheeled robot described in this embodiment has a communication unit with an anti-shock function, which protects the normal operation of the communication chip through a transient suppression diode to ensure the accurate transmission of the control signal.
[0055] (4) The DC brushless motor control system of a two-wheeled robot described in this embodiment has a power supply unit that can convert the 24V power supply voltage into 15V to supply the drive unit, then convert the 15V voltage into 5V to supply the Hall detection unit, and finally convert the 5V voltage into 3.3V to supply the microcontroller, sampling detection unit and communication unit, so that the power supply circuit in the system is more reasonable without the need to add multiple power supplies. BRIEF DESCRIPTION OF THE DRAWINGS
[0056] The drawings constituting part of the present invention are used to provide a further understanding of the present invention. The exemplary embodiments and descriptions of the present invention are used to explain the present invention and do not constitute an improper limitation on the present invention. In the drawings:
[0057] Figure 1 A control principle block diagram of a brushless DC motor control system for a two-wheeled robot according to an embodiment of the present invention;
[0058] Figure 2 A circuit connection diagram of a single-phase drive circuit according to an embodiment of the present invention;
[0059] Figure 3 A schematic diagram of the circuit connection of the PWM shaping module described in the embodiment of the present invention;
[0060] Figure 4 A circuit connection diagram of a sampling circuit according to an embodiment of the present invention;
[0061] Figure 5 A circuit connection diagram of a reference circuit according to an embodiment of the present invention;
[0062] Figure 6 A circuit connection diagram of a comparison circuit according to an embodiment of the present invention;
[0063] Figure 7 A schematic diagram of the circuit connection of the Hall detection unit described in the embodiment of the present invention;
[0064] Figure 8 A schematic diagram of circuit connections of a communication unit according to an embodiment of the present invention;
[0065] Fig. 9 A circuit connection diagram of the first conversion circuit according to an embodiment of the present invention;
[0066] Fig.10 A circuit connection diagram of the second conversion circuit described in an embodiment of the present invention;
[0067] Fig.11 A circuit connection diagram of the third conversion circuit described in an embodiment of the present invention.
[0068] Description of reference numerals:
[0069] 1-single-chip microcomputer; 2-drive unit; 21-single-phase sampling resistor; 22-bus sampling resistor; 23-boost diode; 24-boost capacitor; 25-upper bridge arm MOS tube; 26-lower bridge arm MOS tube; 27-driver; 28-74LV244APW chip; 29-first buffer resistor; 210-second buffer resistor; 211-first fidelity capacitor; 212-second fidelity capacitor; 3-sampling detection unit; 31-first voltage-dividing resistor; 32-second voltage-dividing resistor; 33-first protection capacitor; 34-second protection capacitor; 35-first operational amplifier; 36-first resistor; 37 - second resistor; 38 - third resistor; 39 - fourth resistor; 310 - fifth resistor; 311 - sixth resistor; 312 - seventh resistor; 313 - first capacitor; 314 - second capacitor; 315 - second operational amplifier; 316 - eighth resistor; 317 - ninth resistor; 318 - tenth resistor; 319 - eleventh resistor; 320 - twelfth resistor; 321 - third capacitor; 322 - fourth capacitor; 323 - fifth capacitor; 324 - third operational amplifier; 4 - power supply unit; 41 - LM2596-ADJ chip; 42 - first diode; 43 - second diode; 44 -first energy storage capacitor; 45-second energy storage capacitor; 46-third energy storage capacitor; 47-fourth energy storage capacitor; 48-first feedback resistor; 49-second feedback resistor; 410-first inductor; 411-first buffer capacitor; 412-second buffer capacitor; 413-third buffer capacitor; 414-LM2596-5 chip; 415-third diode; 416-fifth energy storage capacitor; 417-sixth energy storage capacitor; 418-third feedback resistor; 419-second inductor; 420-fourth buffer capacitor; 421-fifth buffer capacitor; 422-LM1117-3V3 chip; 42 3-the seventh energy storage capacitor; 424-the eighth energy storage capacitor; 425-the sixth buffer capacitor; 426-the seventh buffer capacitor; 5-the Hall detection unit; 51-the first filter resistor; 52-the second filter resistor; 53-the first filter capacitor; 54-the third filter resistor; 55-the second filter capacitor; 56-the five-pin connector; 57-the 74AHC14D chip; 6-the communication unit; 61-the SP3232EEN chip; 62-the first protection resistor; 63-the second protection resistor; 64-the first suppression capacitor; 65-the second suppression capacitor; 66-the first suppression diode; 67-the second suppression diode. DETAILED DESCRIPTION
[0070] It should be noted that, in the absence of conflict, the embodiments of the present invention and the features in the embodiments may be combined with each other.
[0071] In the description of the present invention, it should be understood that the terms "center", "longitudinal", "lateral", "up", "down", "front", "back", "left", "right", "vertical", "horizontal", "top", "bottom", "inside", "outside" and the like indicate positions or positional relationships based on the positions or positional relationships shown in the accompanying drawings, and are only for the convenience of describing the present invention and simplifying the description, rather than indicating or implying that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation, and therefore cannot be understood as a limitation on the present invention. In addition, the terms "first", "second", etc. are only used for descriptive purposes, and cannot be understood as indicating or implying relative importance or implicitly indicating the number of technical features indicated. Thus, features defined as "first", "second", etc. may explicitly or implicitly include one or more of the features. In the description of the present invention, unless otherwise specified, "multiple" means two or more.
[0072] In the description of the invention, it should be noted that, unless otherwise clearly specified and limited, the terms "installation", "connection" and "connection" should be understood in a broad sense, for example, it can be a fixed connection, a detachable connection, or an integral connection; it can be a mechanical connection or an electrical connection; it can be a direct connection, or it can be indirectly connected through an intermediate medium, or it can be the internal communication of two components. For ordinary technicians in this field, the specific meanings of the above terms in the invention can be understood according to specific circumstances.
[0073] The present invention will be described in detail below with reference to the accompanying drawings and in combination with embodiments.
[0074] A brushless DC motor control system for a two-wheeled robot comprises: an STM32F103VCT6 single chip microcomputer 1, a drive unit 2, a sampling detection unit 3, a power supply unit 4, a communication unit 6 and a Hall detection unit 5, such as Figure 1 Shown is the control principle block diagram of this control system.
[0075] The power supply of each electrical component of the system comes from the power supply unit 4. The power supply 4 can convert 24V DC power into the voltage required for each unit to work. The power supply 4 includes: a first conversion circuit, a second conversion circuit and a third conversion circuit.
[0076] As attached Fig. 9 As shown, it is a circuit diagram of the first conversion circuit, which can convert 24V direct current into 15V direct current through DC / DC. Specifically, the circuit includes: LM2596-ADJ chip 41, a first diode 42, a second diode 43, a first energy storage capacitor 44, a second energy storage capacitor 45, a third energy storage capacitor 46, a fourth energy storage capacitor 47, a first inductor 410, a first buffer capacitor 411 and a second buffer capacitor 412.
[0077] Among them, the first energy storage capacitor 44, the second energy storage capacitor 45, the third energy storage capacitor 46 and the fourth energy storage capacitor 47 can play the role of energy storage filtering, the first diode 42 can prevent the third energy storage capacitor 46 and the fourth energy storage capacitor 47 from reverse current during discharge, and the second diode 43 is a freewheeling diode. This element can weaken the fluctuation when the load current of the first inductor 410 suddenly changes, thereby avoiding damage to other components in the circuit.
[0078] The positive electrode of the first diode 42 is connected to the 24V working voltage, and the negative electrode is connected to pin 1 of the LM2596-ADJ chip 41; the positive electrodes of the first energy storage capacitor 44 and the second energy storage capacitor 45 are both connected to the positive electrode of the first diode 42, and the negative electrodes are both grounded; the positive electrodes of the third energy storage capacitor 46 and the fourth energy storage capacitor 47 are both connected to the negative electrode of the first diode 42, and their negative electrodes are both grounded; pin 2 of the LM2596-ADJ chip 41 is connected to the first end of the first inductor 410, and the second end of the first inductor 410 outputs a 15V power supply voltage; the negative electrode of the second diode 43 is connected to the first end of the first inductor 410, and its negative electrode is grounded; the positive electrodes of the first buffer capacitor 411 and the second buffer capacitor 412 are both connected to the second end of the first inductor 410, and their negative electrodes are both grounded.
[0079] In addition, pins 3 and 5 of the LM2596-ADJ chip 41 are grounded to provide ground protection for the chip.
[0080] Preferably, a first sampling feedback module for stabilizing the output voltage is provided in the first conversion circuit, comprising: a first feedback resistor 48 , a second feedback resistor 49 and a third buffer capacitor 413 .
[0081] The positive electrode of the third buffer capacitor 413 is connected to the second end of the first inductor 410, and the negative electrode is connected to pin 4 of the LM2596-ADJ chip 41; the first end of the first feedback resistor 48 is connected to the positive electrode of the third buffer capacitor, and the second end is connected to the first end of the second feedback resistor 49, and the second end of the second feedback resistor 49 is grounded.
[0082] As attached Fig.10 As shown, it is a circuit diagram of the second conversion circuit, which can convert 15V direct current into 5V direct current through DC / DC. Specifically, the circuit includes: LM2596-5 chip 414, a third diode 415, a fifth energy storage capacitor 416, a sixth energy storage capacitor 417, a second inductor 419, a fourth buffer capacitor 420 and a fifth buffer capacitor 421.
[0083] The fifth energy storage capacitor 416 and the sixth energy storage capacitor 417 can play the role of energy storage filtering, and the third diode 415 is a freewheeling diode.
[0084] Pin 1 of the LM2596-5 chip 414 is connected to a 15V power supply voltage, and pin 2 is connected to a first end of a second inductor 419, and a second end of the second inductor 419 outputs a 5V power supply voltage; a cathode of the third diode 415 is connected to a first end of the second inductor 419, and a positive electrode thereof is grounded; a positive electrode of the fourth buffer capacitor 420 and a fifth buffer capacitor 421 are both connected to a second end of the second inductor 419, and a negative electrode thereof is both grounded.
[0085] In addition, pins 3 and 5 of the LM2596-5 chip 414 are grounded to provide grounding protection for the chip.
[0086] Preferably, a third feedback resistor 418 for stabilizing the output voltage is provided in the second conversion circuit, a first end of the third feedback resistor 418 is connected to the second end of the second inductor 419 , and a second end thereof is connected to pin 4 of the LM2596-5 chip 414 .
[0087] Optionally, the third feedback resistor 418 may be used to replace the first sampling feedback module to achieve stability of the output voltage of the first conversion circuit.
[0088] As attached Fig.11 As shown, it is a circuit diagram of the third conversion circuit, which can convert 5V DC power into 3.3V DC power. Specifically, the circuit includes: LM1117-3V3 chip 422, the seventh energy storage capacitor 423, the eighth energy storage capacitor 424, the sixth buffer capacitor 425 and the seventh buffer capacitor 426.
[0089] Pin 1 of the LM1117-3V3 chip 422 is connected to a 5V power supply voltage, and pin 2 outputs a 3.3V power supply voltage; the positive electrodes of the seventh energy storage capacitor 423 and the eighth energy storage capacitor 424 are both connected to pin 1 of the LM1117-3V3 chip 422, and their negative electrodes are both grounded; the positive electrodes of the sixth buffer capacitor 425 and the seventh buffer capacitor 426 are both connected to pin 2 of the LM1117-3V3 chip 422, and their negative electrodes are both grounded.
[0090] In addition, pin 3 of the LM1117-3V3 chip 422 is grounded, providing grounding protection for the chip.
[0091] The core control component of this system is the STM32F103VCT6 single-chip microcomputer 1, which can receive external control signals and control the two DC motors of the robot. The process of driving the robot to move is realized by PWM signals. Specifically, the two advanced timers (timer 1 and timer 8) on the single-chip microcomputer 1 can output U, V, W three-phase PWM signals. After sending the PWM signals to the drive unit 2, the drive unit 2 will drive the left and right wheels of the robot to rotate respectively, thereby controlling the robot to move.
[0092] The driving unit 2 includes a left wheel driving circuit and a right wheel driving circuit with the same structure. The driving circuits are divided into three types according to the PWM signal: U-phase driving circuit, V-phase driving circuit and W-phase driving circuit. The components of the three-phase driving circuits are connected in the same way. Specifically, in the left wheel motor driving circuit, the input end of the U-phase driving circuit is connected to the 67th and 52th pins of the single chip microcomputer 1, the input end of the V-phase driving circuit is connected to the 68th and 53th pins of the single chip microcomputer 1; the input end of the W-phase driving circuit is connected to the 69th and 54th pins of the single chip microcomputer 1. In the right wheel motor driving circuit, the input end of the U-phase driving circuit is connected to the 63rd and 32th pins of the single chip microcomputer 1; the input end of the V-phase driving circuit is connected to the 64th and 35th pins of the single chip microcomputer 1; the input end of the W-phase driving circuit is connected to the 65th and 36th pins of the single chip microcomputer 1.
[0093] Attached Figure 2 It is a connection diagram of a single-phase drive circuit. As can be seen from the figure, the single-phase drive circuit includes: an IR2101S power driver 27, an upper bridge arm MOS tube 25, a lower bridge arm MOS tube 26 and a bootstrap boost module.
[0094] Among them, the IR2101S power driver 27 receives the PWM signal and switches the on or off state of the MOS tube. Specifically, the driver 27 is provided with 8 pins, of which pin 1 is connected to the 15V power supply voltage to provide working power for the driver 27, and pin 4 is grounded to protect the driver 27. Pins 2 and 3 of the driver 27 are PWM signal input pins. The PWM-P type signal generated by the single-chip microcomputer enters the driver 27 from pin 2 and is guided to the upper bridge arm MOS tube 25 through pin 7, while the PWM-N type signal generated by the single-chip microcomputer enters the driver 27 from pin 3 and is guided to the lower bridge arm MOS tube 26 through pin 6.
[0095] Optionally, to reduce the impact of the signal entering the IR2101S power driver 27, a buffer resistor can be set on the wires of pins 2 and 3 respectively. Similarly, a buffer resistor can also be set on the wire between the driver 27 and the MOS tube to reduce the impact of the signal on the MOS tube. Exemplarily, the buffer resistor in the single-phase drive circuit has a resistance of 100Ω±1%.
[0096] In order to avoid the driving failure of the upper bridge arm MOS tube 25 due to insufficient working voltage, a bootstrap boost module is provided in the single-phase driving circuit to increase the voltage outputted by the driver 27 to the upper bridge arm MOS tube 25. Specifically, the bootstrap boost module includes a boost diode 23 and a boost capacitor 24, the positive electrode of the boost diode 23 is connected to the 15V voltage, and the negative electrode thereof is connected to the 8-pin of the driver 27, the positive electrode of the boost capacitor 24 is connected to the negative electrode of the boost diode 23, and the negative electrode of the boost capacitor 24 is connected to the source of the upper bridge arm MOS tube 25.
[0097] The upper bridge arm MOS tube and the lower bridge arm MOS tube described in this embodiment are both N-channel MOS tubes, so the power supply for the MOS tube to operate is connected from the drain of the upper bridge arm MOS tube 25, the drain of the lower bridge arm MOS tube 26 is connected to the source of the upper bridge arm MOS tube 25, and the source of the lower bridge arm MOS tube 26 is connected to the unidirectional sampling resistor 21, and the signal driving the MOS tube to operate is connected from the gate of the MOS tube.
[0098] When the driving circuit drives the motor to rotate, the MOS tubes in different phases are turned on alternately. Specifically, there are six conduction modes: the upper bridge arm of the U phase is turned on with the lower bridge arm of the V phase; the upper bridge arm of the U phase is turned on with the lower bridge arm of the W phase; the upper bridge arm of the V phase is turned on with the lower bridge arm of the U phase; the upper bridge arm of the V phase is turned on with the lower bridge arm of the W phase; the upper bridge arm of the W phase is turned on with the lower bridge arm of the U phase; and the upper bridge arm of the W phase is turned on with the lower bridge arm of the V phase.
[0099] Preferably, in order to improve the smoothness of motor rotation and reduce impact, the drive circuit also includes a PWM shaping module, which can optimize the PWM waveform generated by the single-chip microcomputer 1 and guide the optimized PWM signal to the IR2101S power driver 27. Exemplarily, it can be shaped into a rectangular pulse sequence of equal amplitude and width or equal amplitude and unequal width to improve the running smoothness of the DC brushless motor.
[0100] Attached Figure 3 This is a circuit connection diagram of the PWM shaping module. As shown in the figure, the PWM shaping module includes: a 74LV244APW chip 28, a first buffer resistor 29, a second buffer resistor 210, a first fidelity capacitor 211 and a second fidelity capacitor 212.
[0101] The first buffer resistor 29 and the second buffer resistor 210 can reduce the impact of the signal input and ensure the stability of the signal; the first guarantee capacitor 211 and the second guarantee capacitor 212 can prevent the signal from being distorted during the shaping process.
[0102] The first end of the first buffer resistor 29 is connected to a 3.3V voltage, and the second end is connected to a first end of a second buffer resistor 210, and the second end of the second buffer resistor 210 is respectively connected to pin 1 and pin 19 of the 74LV244APW chip 28; the positive electrode of the first fidelity capacitor 211 is connected to the second end of the second buffer resistor 210, and the negative electrode thereof is grounded; the first end of the first buffer resistor 29 is connected to a 3.3V voltage, and the second end is connected to the first end of the second buffer resistor 210.
[0103] The 74LV244APW chip 28 has a total of 20 pins, of which pin 20 is connected to the 3.3V voltage supplied to the chip, and pins 8, 17 and 10 are grounded. Pin 2 of the chip receives the U-phase P-type PWM signal of the single-chip microcomputer, and pin 11 receives the U-phase N-type PWM signal of the single-chip microcomputer; pin 4 of the chip receives the V-phase P-type PWM signal of the single-chip microcomputer, and pin 13 receives the V-phase N-type PWM signal of the single-chip microcomputer; pin 6 of the chip receives the W-phase P-type PWM signal of the single-chip microcomputer, and pin 15 receives the W-phase N-type PWM signal of the single-chip microcomputer. After shaping, pin 18 of the chip outputs the U-phase P-type signal, and pin 9 outputs the U-phase N-type signal; pin 16 of the chip outputs the V-phase P-type signal, and pin 7 outputs the V-phase N-type signal; pin 14 of the chip outputs the W-phase P-type signal, and pin 5 outputs the W-phase N-type signal.
[0104] In order to prevent the robot's motor from burning due to overcurrent during operation, the present embodiment provides a sampling detection unit 3. The sampling detection unit 3 includes a sampling circuit and a comparison circuit. The sampling circuit includes a phase current circuit and a bus current circuit. Both the phase current circuit and the bus current circuit are 1:1 synchronous amplification circuits, which can transmit the collected current signal with fidelity to ensure the accuracy of the signal.
[0105] The phase current circuit is used to collect the current information of the single-phase PWM signal branch of the motor. Its input end is connected to the single-phase sampling resistor 21 set on the drive circuit, and its output end is connected to the receiving pin on the single-chip computer 1. Specifically, the output end of the phase current circuit for detecting the U phase of the left wheel is connected to the 15th pin of the single-chip computer 1, the output end of the phase current circuit for the V phase is connected to the 16th pin of the single-chip computer 1, and the output end of the phase current circuit for the W phase is connected to the 17th pin of the single-chip computer 1; the output end of the phase current circuit for detecting the U phase of the right wheel is connected to the 26th pin of the single-chip computer 1, the output end of the phase current circuit for the V phase is connected to the 29th pin of the single-chip computer 1, and the output end of the phase current circuit for the W phase is connected to the 30th pin of the single-chip computer 1.
[0106] The bus current circuit is used to collect the current information of the motor PWM signal bus, and its input end is connected to the bus sampling resistor 22 arranged on the drive circuit, and its output end is connected to the comparison circuit.
[0107] One end of the bus sampling resistor 22 is connected to the single-phase sampling resistors 21 of the U phase, V phase and W phase respectively, and the other end of the bus sampling resistor 22 is grounded. Since the current passing through the PWM bus of the motor is relatively large, the bus is most likely to be overcurrent and burnt. The bus sampling resistor 22 can be arranged to cooperate with the single-phase sampling resistor 21 to display the current load of each circuit of the motor in real time. When overcurrent occurs in any circuit, the working process of the motor is cut off in time to protect the motor to the greatest extent.
[0108] like Figure 4The schematic diagram of the sampling circuit is shown. As shown in the figure, the circuit includes: a second operational amplifier 315, a first resistor 36, a second resistor 37, a third resistor 38, a fourth resistor 39, a fifth resistor 310, a sixth resistor 311, a seventh resistor 312, a first capacitor 313 and a second capacitor 314.
[0109] Among them, the first resistor 36 and the second resistor 37 are used to buffer the collected current signal, the third resistor 38 is used to stabilize and buffer the reference voltage, the fourth resistor 39 and the second capacitor 314 are used to prevent the signal from being distorted in the circuit, the fifth resistor 310, the sixth resistor 311 and the seventh resistor 312 are used for current limiting, and the first capacitor 313 is used to reduce signal interference.
[0110] The first end of the first resistor 36 is connected to the single-phase sampling resistor 21, and the second end is connected to the first end of the second resistor 37; the second end of the second resistor 37 is connected to the positive input terminal of the second operational amplifier 315; the first end of the third resistor 38 is connected to the second end of the second resistor 37, and the second end thereof is connected to the reference voltage; the positive electrode of the first capacitor 313 is connected to the second end of the first resistor 36, and the negative electrode is connected to the first end of the fourth resistor 39, and the second end of the fourth resistor 39 is grounded.
[0111] The output of the second operational amplifier 315 is connected to the first end of the seventh resistor 312, and the second end of the seventh resistor 312 is connected to the single-chip computer 1; the reverse output end of the second operational amplifier 315 is connected to the seventh resistor 312 set at its own output end to form a negative feedback loop to ensure that the second operational amplifier 315 is in a linear working area.
[0112] The first end of the fifth resistor 310 is connected to the first end of the fourth resistor 39 , and the second end thereof is connected to the first end of the sixth resistor 311 ; the positive electrode of the second capacitor 314 is connected to the second end of the seventh resistor 312 , and the negative electrode thereof is grounded.
[0113] Preferably, in this embodiment, the reference voltage is generated by a reference circuit. Figure 5 As shown in the figure, the reference circuit includes: a first operational amplifier 35, a first voltage-dividing resistor 31, a second voltage-dividing resistor 32, a first protection capacitor 33 and a second protection capacitor 34.
[0114] The first voltage-dividing resistor 31 and the second voltage-dividing resistor 32 have equal resistance values and are used to divide the 3.3V voltage of the input reference circuit; the first protection capacitor 33 and the second protection capacitor 34 can ensure the normal operation of the first operational amplifier 35 and provide a stable and reliable reference voltage.
[0115] The first end of the first voltage-dividing resistor 31 is connected to a 3.3V voltage, the second end is connected to a first end of the second voltage-dividing resistor 32 , and the second end of the second voltage-dividing resistor 32 is grounded.
[0116] The positive input terminal of the first operational amplifier 35 is connected to the second terminal of the first voltage-dividing resistor 31 , and the negative input terminal thereof is connected to its own output terminal to form a negative feedback loop, and its output terminal outputs a reference voltage to the sampling circuit.
[0117] The positive electrode of the first protection capacitor 33 is connected to the positive power supply terminal of the first operational amplifier 35, and the negative electrode is grounded; the negative power supply terminal of the first operational amplifier 35 is grounded; the positive electrode of the second protection capacitor 34 is connected to the output terminal of the first operational amplifier 35, and the negative electrode is grounded.
[0118] Since the two voltage-dividing resistors in the reference circuit have equal resistance values and the reference circuit is a 1:1 synchronous amplifier circuit, the reference voltage output is 1.65 V. The reference voltage can provide a reference for the output value of the sampling circuit during the operation of the sampling circuit. Based on this reference, the sampling circuit can change the output signal according to the change of the input signal.
[0119] The comparison circuit can compare the value output by the bus current circuit with the expected value, and feed back the comparison result to the single chip computer 1 in the form of a level signal. As an example but not a limitation, the expected value of the bus current is 11.9A. When the actual value is greater than the expected value, the comparison circuit outputs a low level, and the single chip computer 1 cuts off the working process of the motor; when the actual value is less than the expected value, the comparison circuit outputs a high level, and the single chip computer 1 continues to drive the motor to work. Specifically, the output end of the comparison circuit for left wheel bus current detection is connected to pin 18 of the single chip computer 1, and the output end of the comparison circuit for right wheel bus current detection is connected to pin 31 of the single chip computer 1.
[0120] Attached Figure 6 Schematic diagram of a comparison circuit. As can be seen from the figure, the comparison circuit includes: a third operational amplifier 324, an eighth resistor 316, a ninth resistor 317, a tenth resistor 318, an eleventh resistor 319, a twelfth resistor 320, a third capacitor 321, a fourth capacitor 322 and a fifth capacitor 323.
[0121] Among them, the third capacitor 321, the fourth capacitor 322 and the fifth capacitor 323 can stabilize the operation of the third operational amplifier 324 and improve the accuracy of the comparison result; the eighth resistor 316, the ninth resistor 317, the tenth resistor 318, and the eleventh resistor 319 can enhance the stability of the signal in the comparison circuit.
[0122] The first end of the eighth resistor 316 is connected to the output end of the bus sampling circuit, and the second end is connected to the reverse input end of the third operational amplifier 324; the first end of the ninth resistor 317 is connected to the power supply voltage, and the second end is connected to the positive input end of the third operational amplifier 324; the output end of the third operational amplifier 324 is connected to the first end of the tenth resistor 318, and the second end of the tenth resistor 318 is connected to the single-chip computer 1; the first end of the eleventh resistor 319 is connected to the second end of the ninth resistor 317, and the second end thereof is grounded; the positive electrode of the third capacitor 321 is connected to the second end of the eighth resistor 316, and the negative electrode thereof is grounded; the first end of the twelfth resistor 320 is connected to the second end of the tenth resistor 318, and the second end thereof is connected to the power supply voltage; the positive electrode of the fourth capacitor 322 is connected to the second end of the tenth resistor 318, and the negative electrode thereof is grounded; the positive electrode of the fifth capacitor 323 is connected to the positive power supply end of the third operational amplifier 324, and the negative electrode thereof is grounded, and the negative power supply end of the third operational amplifier 324 is grounded.
[0123] In addition, the system also includes a Hall detection unit 5, which can receive the signal sent by the Hall sensor on the motor, determine the real-time speed and internal rotor position of the motor, and facilitate the single-chip microcomputer 1 to drive the brushless DC motor.
[0124] Attached Figure 7 FIG. 5 is a circuit connection diagram of the Hall detection unit 5. As can be seen from the figure, the Hall detection unit includes a five-pin connector 56, a first filter module, a 74AHC14D chip 57 and a second filter module. The five-pin connector 56 is used to connect the Hall sensor and the first filter module, wherein pin 1 is connected to a 5V voltage, pin 5 is grounded, and the remaining pins 2, 3 and 4 are respectively connected to a first filter module.
[0125] The first filter module is used to filter and maintain the fidelity of the signal entering the Hall detection unit, and includes: a first filter resistor 51, a second filter resistor 52 and a first filter capacitor 53. The first end of the first filter resistor 51 is connected to a five-pin connector 56, and the second end is connected to a 74AHC14D chip 57; the first end of the second filter resistor 52 is connected to a 5V voltage, and the second end is connected to the first end of the first filter resistor 51; the positive electrode of the first filter capacitor 53 is connected to the second end of the first filter resistor 52, and the negative electrode is grounded.
[0126] The signal processed by the first filtering module enters the 74AHC14D chip 57, which is a NOT gate shaping IC that can shape the slow pulse wave emitted by the Hall sensor into a rectangular pulse suitable for a digital circuit.
[0127] Specifically, pins 1, 3, and 5 of the 74AHC14D chip 57 receive signals from the first filter module, and the signals are sent to the second filter module from pins 2, 4, and 6. Pins 7, 9, 11, and 13 of the chip are grounded, and pin 14 is connected to a 3.3V voltage. In addition, a grounded filter capacitor can be added to pin 14 to reduce the influence of the 3.3V voltage on pulse shaping.
[0128] The second filtering module is used to filter the shaped signal, and includes: a third filtering resistor 54 and a second filtering capacitor 55. The first end of the third filtering resistor 54 is connected to the 74AHC14D chip 57, and the second end is connected to the single chip computer 1; the positive electrode of the second filtering capacitor 55 is connected to the second end of the third filtering resistor 54, and the negative electrode is grounded.
[0129] The signal passing through the second filter module will be sent to the inside of the single-chip microcomputer 1. Pins 92, 93, and 95 of the single-chip microcomputer 1 are used to receive signals from the left wheel motor, and pins 23, 24, and 25 receive signals from the right wheel motor.
[0130] In addition, the control system further includes a communication unit 6, which is used to realize signal communication between the single chip computer 1 and the host computer. Figure 8 Schematic diagram of circuit connection of the communication unit 6 . As shown in the figure, the communication unit 6 includes a protection module and an SP3232EEN chip 61 .
[0131] The protection module is used to reduce the impact and interference of the signal on the communication unit 6, and includes: a first suppression diode 66, a second suppression diode 67, a first suppression capacitor 64, a second suppression capacitor 65, a first protection resistor 62 and a second protection resistor 63.
[0132] The first suppression diode 66 and the second suppression diode 67 are transient suppression diodes, which can suppress the communication unit 6 by 10 -12 The high impedance between the two poles is changed to low impedance at a speed of seconds, absorbing surge power of up to several kilowatts and preventing the communication unit 6 from being damaged by the surge.
[0133] The first end of the first suppression diode 66 is grounded, and the second end is connected to the first end of the first protection resistor 62. The second end of the first protection resistor 62 is connected to pin 13 of the SP3232EEN chip 61. The positive electrode of the first suppression capacitor 64 is connected to the first end of the first protection resistor 62, and its negative electrode is grounded; the first end of the second suppression diode 67 is connected to the first end of the first suppression diode 66, and the second end is connected to the first end of the second protection resistor 63. The second end of the second protection resistor 63 is connected to pin 14 of the SP3232EEN chip 61. The positive electrode of the second suppression capacitor 65 is connected to the first end of the second protection capacitor 34, and its negative electrode is grounded.
[0134] The SP3232EEN chip 61 is used to realize the conversion of signals between RS232 and TTL formats, and its pin 11 receives the signal from the pin 78 of the single-chip computer 1, and the pin 12 transmits the signal to the pin 79 of the single-chip computer 1. In addition, the pins 4 and 5, and the pins 1 and 3 of the SP3232EEN chip 61 are connected through capacitors, and the pins 2, 6, and 12 are grounded through a capacitor respectively, and the pin 16 is also connected to the 3.3V power supply for the chip to work.
[0135] The following is a description of the effects of the above scheme:
[0136] This embodiment provides a brushless DC motor control system for a two-wheeled robot, which realizes the rotation of the left and right wheel motors by driving the MOS tubes to conduct alternately through PWM signals. In the driving circuit of the motor, the values of each phase current are collected through single-phase sampling resistors, the values of the bus current are collected through bus sampling resistors, and the above values are detected. When the bus current exceeds a predetermined value, the system can cut off the rotation of the motor in time to avoid overcurrent and burning of the motor.
[0137] This embodiment can receive the signal of the motor Hall sensor through the Hall detection unit, monitor the rotation of the motor in real time, and provide a PWM waveform suitable for the motor operation in time, so that the movement of the robot is smoother.
[0138] The communication unit of this embodiment can eliminate the influence of signal surge and ensure smooth communication between the control system and the upper position.
[0139] The power supply unit in this embodiment can convert the 24V power supply voltage into 15V, 5V, and 3.3V, eliminating the need to add power supplies of multiple specifications, thereby streamlining the circuit structure.
[0140] The first operational amplifier, the second operational amplifier and the third operational amplifier described in this embodiment can be LM324 operational amplifiers; the first suppression diode and the second suppression diode can be P6SMB16CAT3G transient suppression diodes; the upper bridge MOS tube and the lower bridge arm MOS tube can be IRF540N MOS tubes; the remaining chips or single-chip microcomputers can find corresponding products based on the above content, and the internal structure of the above components is well known to the public, so they will not be repeated in this application.
[0141] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principle of the present invention should be included in the protection scope of the present invention.
Claims
1. A brushless DC motor control system for a two-wheeled robot, characterized in that: The invention comprises an STM32F103VCT6 single chip microcomputer (1), which is used for outputting a PWM three-phase control signal; A drive unit (2) is used to receive a PWM three-phase control signal from the single-chip computer (1) and drive the DC brushless motor to rotate, and includes a left wheel drive circuit and a right wheel drive circuit with the same structure; The left wheel drive circuit comprises: a U phase drive circuit, whose input end is connected to pins 67 and 52 of the single chip microcomputer (1) and is used to control the conduction and cut-off of two MOS tubes on the U phase of the left wheel motor; a V phase drive circuit, whose input end is connected to pins 68 and 53 of the single chip microcomputer (1) and is used to control the conduction and cut-off of two MOS tubes on the V phase of the left wheel motor; and a W phase drive circuit, whose input end is connected to pins 69 and 54 of the single chip microcomputer (1) and is used to control the conduction and cut-off of two MOS tubes on the W phase of the left wheel motor. The right wheel drive circuit comprises: a U-phase drive circuit, whose input end is connected to the 63rd and 32nd pins of the single chip microcomputer (1) and is used to control the conduction and cut-off of two MOS tubes on the U-phase of the right wheel motor; a V-phase drive circuit, whose input end is connected to the 64th and 35th pins of the single chip microcomputer (1) and is used to control the conduction and cut-off of two MOS tubes on the V-phase of the right wheel motor; and a W-phase drive circuit, whose input end is connected to the 65th and 36th pins of the single chip microcomputer (1) and is used to control the conduction and cut-off of two MOS tubes on the W-phase of the right wheel motor. A sampling detection unit (3) comprises a sampling circuit and a comparison circuit, wherein the sampling circuit is used to collect motor phase current and bus current signals and perform fidelity processing on them, and comprises a phase current circuit and a bus current circuit; the sampling detection unit also comprises a reference circuit, wherein the reference circuit is used to generate a reference voltage, and the reference voltage is used to supply the sampling circuit; The input end of the phase current circuit is connected to the single-phase sampling resistor (21) of each phase drive circuit of the motor, wherein the output end of the U, V, W phase current circuit of the left wheel motor is respectively connected to the 15th, 16th, and 17th pins of the single chip (1), and the output end of the U, V, and W phase current circuit of the right wheel motor is respectively connected to the 26th, 29th, and 30th pins of the single chip (1); the input end of the bus current circuit is connected to the bus sampling resistor (22), wherein the output end of the bus current circuit of the left wheel motor is connected to the 18th pin of the single chip (1), and the output end of the bus current circuit of the right wheel motor is connected to the 31st pin of the single chip (1); The comparison circuit is used to compare the output signal of the bus current circuit with a preset value, wherein the input end of the left wheel comparison circuit is connected to pin 18 of the single chip computer (1), and the output end is connected to pin 51 of the single chip computer (1), and the input end of the right wheel comparison circuit is connected to pin 31 of the single chip computer (1), and the output end is connected to pin 91 of the single chip computer (1); A power supply unit (4), used for transforming the power supply and supplying it to each unit in the system; The driving circuit comprises: The IR2101S power driver (27) is used to drive the three-phase MOS tube on the motor. Pins 2 and 3 of the driver (27) receive PWM signals, and pins 7 and 6 of the driver (27) are connected to the gates of the MOS tubes of the upper bridge arm and the lower bridge arm respectively. A bootstrap boost module, used for boosting the voltage of an upper bridge arm MOS tube (25), comprising a boost diode (23) and a boost capacitor (24), wherein the positive electrode of the boost diode (23) is connected to the power supply voltage, and the negative electrode thereof is connected to the 8-pin of the driver (27), the positive electrode of the boost capacitor (24) is connected to the negative electrode of the boost diode (23), and the negative electrode of the boost capacitor (24) is connected to the source electrode of the upper bridge arm MOS tube (25); The first end of the single-phase sampling resistor (21) is connected to the drain of the lower bridge arm MOS tube (26), the second end is connected to the first end of the bus sampling resistor (22), and the second end of the bus sampling resistor (22) is grounded; The sampling circuit comprises a second operational amplifier (315), a first resistor (36), a second resistor (37), a third resistor (38), a fourth resistor (39), a fifth resistor (310), a sixth resistor (311), a seventh resistor (312), a first capacitor (313) and a second capacitor (314); The first end of the first resistor (36) is connected to the single-phase sampling resistor (21), and the second end is connected to the first end of the second resistor (37); the second end of the second resistor (37) is connected to the positive input end of the second operational amplifier (315); the first end of the third resistor (38) is connected to the second end of the second resistor (37), and the second end is connected to the output end of the reference circuit, for introducing a reference voltage into the sampling circuit and stabilizing the reference voltage; the positive electrode of the first capacitor (313) is connected to the second end of the first resistor (36), and the negative electrode is connected to the first end of the fourth resistor (39), for reducing signal interference; the second end of the fourth resistor (39) is connected to the positive end of the first resistor (36), and the negative electrode is connected to the first end of the fourth resistor (39), for reducing signal interference; the second end of the fourth resistor (39) is connected to the positive end of the third resistor (38), and the negative electrode is connected to the first end of the fourth resistor (39), for reducing signal interference; the second end of the fourth resistor (39) is connected to the positive end of the third resistor (38), and the negative electrode is connected to the first end of the fourth resistor (39), for reducing signal interference; the second end of the third resistor (38) is connected to the positive end of the first resistor (36), and the negative electrode is connected to the first end of the fourth resistor (39), for reducing signal interference; the second end of the third resistor (38) is connected to the positive end of the third resistor (38 ... The first end of the second operational amplifier (315) is connected to the ground, which is used to prevent the sampling circuit signal from being distorted; the output of the second operational amplifier (315) is connected to the first end of the seventh resistor (312), and the second end of the seventh resistor (312) is connected to the single-chip computer (1); the reverse output end of the second operational amplifier (315) is connected to the first end of the sixth resistor (311), and the second end of the sixth resistor (311) is connected to the first end of the seventh resistor (312); the first end of the fifth resistor (310) is connected to the first end of the fourth resistor (39), and the second end of the fifth resistor (310) is connected to the first end of the sixth resistor (311); the positive electrode of the second capacitor (314) is connected to the second end of the seventh resistor (312), and the negative electrode of the second capacitor (314) is grounded.
2. A brushless DC motor control system for a two-wheeled robot according to claim 1, characterized in that: The reference circuit comprises a first operational amplifier (35), a first voltage-dividing resistor (31), a second voltage-dividing resistor (32), a first protection capacitor (33) and a second protection capacitor (34); The first end of the first voltage-dividing resistor (31) is connected to the power supply voltage, the second end is connected to the first end of the second voltage-dividing resistor (32), and the second end of the second voltage-dividing resistor (32) is grounded; the positive input end of the first operational amplifier (35) is connected to the second end of the first voltage-dividing resistor (31), the reverse input end is connected to its own output end, and the output end outputs a reference voltage; the positive electrode of the first protection capacitor (33) is connected to the positive power supply end of the first operational amplifier (35), and the negative electrode is grounded; the negative power supply end of the first operational amplifier (35) is grounded; the positive electrode of the second protection capacitor (34) is connected to the output end of the first operational amplifier (35), and the negative electrode is grounded.
3. The brushless DC motor control system of a two-wheeled robot according to claim 1, characterized in that: The comparison circuit comprises a third operational amplifier (326), an eighth resistor (316), a ninth resistor (317), a tenth resistor (318), an eleventh resistor (319), a twelfth resistor (320), a third capacitor (321), a fourth capacitor (322) and a fifth capacitor (325); The first end of the eighth resistor (316) is connected to the output end of the bus sampling circuit, and the second end is connected to the reverse input end of the third operational amplifier (326); the first end of the ninth resistor (317) is connected to the power supply voltage, and the second end is connected to the positive input end of the third operational amplifier (326); the output end of the third operational amplifier (326) is connected to the first end of the tenth resistor (318), and the second end of the tenth resistor (318) is connected to the single chip computer (1); the first end of the eleventh resistor (319) is connected to the second end of the ninth resistor (317). The positive electrode of the third capacitor (321) is connected to the second end of the eighth resistor (316), and the negative electrode thereof is grounded; the first end of the twelfth resistor (320) is connected to the second end of the tenth resistor (318), and the second end thereof is connected to the power supply voltage; the positive electrode of the fourth capacitor (322) is connected to the second end of the tenth resistor (318), and the negative electrode thereof is grounded; the positive electrode of the fifth capacitor (325) is connected to the positive power supply terminal of the third operational amplifier (326), and the negative electrode thereof is grounded; the negative power supply terminal of the third operational amplifier (326) is grounded.
4. The brushless DC motor control system of a two-wheeled robot according to claim 1, characterized in that: The control system further comprises a Hall detection unit (5) for receiving a signal sent by a Hall sensor of the motor and transmitting the result to the single chip computer (1), wherein the Hall detection unit (5) of the left wheel motor is connected to pins 92, 93, and 95 of the single chip computer (1), and the Hall detection unit (5) of the right wheel motor is connected to pins 23, 24, and 25 of the single chip computer (1).
5. The brushless DC motor control system of a two-wheeled robot according to claim 1, characterized in that: The control system further comprises a communication unit (6) for realizing signal exchange between the single chip microcomputer (1) and the host computer, wherein the signal output end is connected to pin 79 of the single chip microcomputer (1), and the signal input end is connected to pin 78 of the single chip microcomputer (1).
6. The brushless DC motor control system of a two-wheeled robot according to claim 1, characterized in that: The power supply unit (4) comprises a first conversion circuit, a second conversion circuit and a third conversion circuit; The first conversion circuit is used to convert a 24V power supply voltage into a 15V power supply voltage, and comprises an LM2596-ADJ chip (41), a first diode (42), a second diode (43), a first energy storage capacitor (44), a second energy storage capacitor (45), a third energy storage capacitor (46), a fourth energy storage capacitor (47), a first inductor (410), a first buffer capacitor (411) and a second buffer capacitor (412); The positive electrode of the first diode (42) is connected to a 24V working voltage, and the negative electrode is connected to pin 1 of the LM2596-ADJ chip (41); the positive electrodes of the first energy storage capacitor (44) and the second energy storage capacitor (45) are both connected to the positive electrode of the first diode (42), and the negative electrodes are both grounded; the positive electrodes of the third energy storage capacitor (46) and the fourth energy storage capacitor (47) are both connected to the negative electrode of the first diode (42), and the negative electrodes are both grounded; pin 2 of the LM2596-ADJ chip (41) is connected to the first end of the first inductor (410), and the second end of the first inductor (410) outputs a 15V power supply voltage; the negative electrode of the second diode (43) is connected to the first end of the first inductor (410), and the negative electrode is grounded; the positive electrodes of the first buffer capacitor (411) and the second buffer capacitor (412) are both connected to the second end of the first inductor (410), and the negative electrodes are both grounded; The second conversion circuit is used to convert a 15V power supply voltage into a 5V power supply voltage, and comprises an LM2596-5 chip (414), a third diode (415), a fifth energy storage capacitor (416), a sixth energy storage capacitor (417), a second inductor (419), a fourth buffer capacitor (420) and a fifth buffer capacitor (421); Pin 1 of the LM2596-5 chip (414) is connected to a 15V power supply voltage, and pin 2 is connected to a first end of a second inductor (419), and a second end of the second inductor (419) outputs a 5V power supply voltage; a cathode of the third diode (415) is connected to a first end of the second inductor (419), and a positive electrode thereof is grounded; a positive electrode of the fourth buffer capacitor (420) and a fifth buffer capacitor (421) are both connected to a second end of the second inductor (419), and a negative electrode thereof is both grounded; The third conversion circuit is used to convert a 5V power supply voltage into a 3.3V power supply voltage, and comprises an LM1117-3V3 chip (422), a seventh energy storage capacitor (423), an eighth energy storage capacitor (424), a sixth buffer capacitor (425) and a seventh buffer capacitor (426); Pin 1 of the LM1117-3V3 chip (422) is connected to a 5V power supply voltage, and pin 2 outputs a 3.3V power supply voltage; the positive electrodes of the seventh energy storage capacitor (423) and the eighth energy storage capacitor (424) are both connected to pin 1 of the LM1117-3V3 chip (422), and their negative electrodes are both grounded; the positive electrodes of the sixth buffer capacitor (425) and the seventh buffer capacitor (426) are both connected to pin 2 of the LM1117-3V3 chip (422), and their negative electrodes are both grounded.
Citation Information
Patent Citations
Robot hub brushless DC motor controller and control method thereof
CN106208827A
Brushless direct-current motor controller for dust collector
CN201656883U
Direct-current brushless motor control system of two-wheeled robot
CN209419197U