Disclosure of Invention
The invention aims to solve the technical problem of providing a motor control system based on a CAN bus, which has high control efficiency, high reliability, simple mechanism and strong practicability.
In order to solve the technical problems, the invention adopts the technical scheme that:
a motor control system based on a CAN bus comprises a controller, wherein the controller is connected to an upper computer through a USB-CAN converter and is sequentially connected with a pre-charging electric appliance, a double-open leakage switch, a rectifier and a power supply; the pre-charging circuit is connected to the controller through the main contactor; the controller is connected to a pedal potentiometer on a manual control panel; the controller is also connected to a vehicle motor, which is connected to a load.
According to the scheme, the pre-charging circuit is formed by sequentially connecting a pre-charging resistor, a diode and a pre-charging switch in series, one end of the pre-charging circuit is connected with the 19-pin aviation plug through a lead, and the other end of the pre-charging circuit is connected with the double-open leakage switch.
According to the scheme, the controller is connected with a built-in cooling fan.
According to the scheme, the controller is connected with an external cooling fan, and the external cooling fan is connected to a fan power supply through a switch.
According to the scheme, the fan power supply is 12V, and the 19-pin aviation plug inner lead of the controller is connected with the 12V fan power supply.
According to the scheme, the double-open leakage switch is also connected to the battery box.
According to the scheme, the control system externally comprises a cabinet, a vehicle motor, a controller, an upper computer and a battery box; the front surface of the cabinet is provided with an upper computer display screen, two side surfaces of the cabinet are respectively provided with an external cooling fan, and the manual control panel is arranged at the right lower part of the upper computer display screen; a coded disc is arranged on the rear side surface of the vehicle motor, and a large chain wheel and a chain are arranged on the front side surface and assembled on an output shaft of the motor; the controller is provided with a high-voltage lead and a 19-pin aviation plug and is respectively connected with the vehicle motor and the coded disc through leads; the upper computer is connected with the controller through a CAN communication line, a USB-to-CAN adapter is arranged on the CAN communication line, and a motor controller is arranged in the upper computer; the battery box is formed by connecting two 48V lithium batteries in series, and is connected with the controller through a lead, and a double-open leakage switch is also arranged on the lead.
According to the scheme, the device further comprises an underframe: the universal wheel is installed to the chassis bottom, automobile-used motor, derailleur, host computer and battery box are fixed on the chassis.
According to the scheme, the 12V fan power supply, the USB-to-CAN adapter, the pre-charging circuit and the main contactor are all fixed on the rectangular wood board.
According to the scheme, the manual control panel is provided with four buttons of starting, braking, advancing and retreating, a pre-charging switch, a pedal potentiometer and a serial port.
Compared with the prior art, the invention has the beneficial effects that: the motor, the controller, the upper computer, the battery box and various parts for the vehicle are organically coordinated and integrated, the CAN bus is used for carrying out real-time control and monitoring on the motor, various states of the normal driving process of the electric vehicle are effectively simulated, the visualization and convenience degree of the motor control for the vehicle is greatly improved, and the motor control system has higher universality, real-time performance and easy operability.
Detailed Description
The invention is described in further detail below with reference to the figures and specific examples. As shown in fig. 1, a motor control system based on a CAN bus, comprises a machine cabinet 1, a vehicle motor 22, a controller 4 an upper computer 39 and a battery box 28; the front surface of the cabinet 1 is provided with an upper computer display screen 2, two side surfaces of the cabinet are respectively provided with an external cooling fan 3, and a manual control panel 14 is arranged at the right lower part of the upper computer display screen 2; the rear side surface of the vehicle motor 22 is provided with a coded disc 29, and the front side surface is provided with a large chain wheel and a chain which are assembled on the output shaft of the motor; the controller is provided with a high-voltage lead and a 19-pin aviation plug 40 and is respectively connected with the vehicle motor 22 and the code disc 29 through leads; the upper computer 39 is connected with the controller 4 through a CAN communication line, a USB-CAN adapter 7 is arranged on the CAN communication line, and a motor controller is arranged in the upper computer 39; the battery box 28 is formed by connecting two 48V lithium batteries in series and is connected with the controller 4 through a lead, and a double-open leakage switch 13 is further arranged on the lead. The cabinet 1 is a semi-closed component carrier with a movable door 9, and provides places for placing or fixing various components. As shown in fig. 2, the front of the cabinet 1 is provided with an upper computer display screen 2 for visually controlling and monitoring the motor, and the controller 4 and the rectangular wood board 8 are placed and fixed inside the cabinet 1.
In order to make the structural arrangement coordinated and reasonable, the USB-to-CAN converter 7, the 12V power supply 11, the pre-charging circuit 41 and the main contactor 12 are all arranged on the rectangular wood board 8. The cabinet 1 is provided with a manual control panel 14 for manually controlling the start, stop, forward and reverse rotation, and acceleration and deceleration of the vehicle motor 22 when the upper computer 39 is not started.
The external cooling fans 3 are used as auxiliary cooling devices, the two external cooling fans 3 are respectively fixed on two side surfaces of the cabinet 1 through bolts, air openings of the two external cooling fans are opposite to the radiating fins of the controller 4, when the system works for a period of time, the controller 4 can generate heat, and the switch of the external cooling fan 3 is turned on, so that the heat dissipation of the controller 4 can be accelerated. Through the hinge, the fretwork dodge gate 9 still is equipped with at the rack 1 back, and the system during operation closes fretwork dodge gate 9 and plays shielding protection effect, and the fretwork design plays the ventilation effect of dispelling the heat simultaneously. When the system does not work, the hollow movable door 9 can be opened to inspect or overhaul the components in the cabinet 1.
The right side surface of the cabinet 1 is also provided with a double-open leakage switch 13, when the main current exceeds a standard value or the main current has leakage danger, the double-open leakage switch 13 automatically trips, and the double-open leakage switch 13 can control the on-off of the system connected with high voltage electricity, and also ensures the safety of equipment and personnel.
The output shaft of the vehicle motor 22 is provided with a large chain wheel and a chain, the other end of the chain is provided with a small chain wheel and a speed changer 17, the vehicle motor 22 and the speed changer 17 are mechanically connected through a chain transmission device, the load is increased, and the driving resistance of the electric vehicle in the driving process is simulated. The other end of the vehicle motor 22 is provided with a code wheel 29 and is connected with the controller 4 through two series of wires, one series of wires supplies power to the vehicle motor 22, and one series of wires receives commands from the controller 4 as a communication line. The vehicle motor 22 is also fixed with the motor fixing frame 23 through a threaded hole on the side surface.
The controller 4 is connected to the vehicle motor 22, the manual control panel 14, and the upper computer 39, respectively, as a central processing unit of the entire control system. When the manual control panel 14 and the upper computer 39 send out instructions, the instructions are analyzed and processed by the controller 4 and then transmitted to the vehicle motor 22, and the vehicle motor 22 performs corresponding actions after receiving the instructions. In addition, the controller 4 generates a certain amount of heat after working for a period of time, and the heat sink and the built-in fan provided by the controller have a certain heat dissipation effect.
The upper computer 39 is used as a terminal control and monitoring mechanism, a display screen of the upper computer is fixed on the front surface of the cabinet 1, and a host of the upper computer is fixed on the bottom frame 21. The upper computer 3 is connected with the controller 4 through a CAN communication line, sends an instruction to the controller 4, extracts working state parameters of the controller 4 and the vehicle motor 22 and displays the working state parameters on a display screen. The CAN communication line is provided with a USB-to-CAN adapter for converting the USB signal mode of the upper computer into the CAN signal mode of the controller.
The battery box 28 is a movable power supply device of the whole system, and is integrally fixed on the bottom frame 21 by connecting two 48V lithium batteries in series and installing the lithium batteries in an iron box. The battery box 28 can output 96V high voltage, and long-time power supply is carried out on the whole system, so that the continuous operation capacity and mobility are guaranteed.
The automatic ground fault detection circuit is characterized by further comprising a pre-charging circuit, wherein the pre-charging circuit is formed by sequentially connecting a pre-charging resistor 6, a diode 10 and a pre-charging switch 31 in series, is connected with a main contactor 12, and is connected with the 19-pin aviation plug 40 through one end of a lead, and is connected with the double-open leakage switch 13 through one end of the lead. When the system is started, the pre-charging circuit is connected with high voltage in a one-way mode, the key ignition button 38 is opened after no fault is ensured, the main contactor 12 is closed, the pre-charging circuit is short-circuited, and the system is started. The precharge circuit 41 can be activated at the time of system startup unidirectional energization and self-protection.
The control method of the control system comprises the following steps:
the traditional terminal control mode specifically comprises the following steps: 1) Checking whether a brake button, a forward button and a backward button on a manual control panel are in a closed state or not, otherwise, the pre-charging circuit causes the main contactor to not work due to self protection; 2) Turning on a key switch to switch on a 12V power supply; 3) The pre-charge switch is turned on and, closing a pre-charging circuit; 4) Starting a double-open leakage switch, and switching on 96V high-voltage electricity; the electric circuit is short-circuited, the main contactor is closed (the pre-charging switch is invalid), and the motor enters a work preparation state;
5) When the forward button, the backward button and the brake button are pressed respectively, the motor can be seen to correspondingly rotate forwards, reversely and stop, wherein when the motor rotates forwards or reversely, the pedal potentiometer is rotated clockwise and counterclockwise, and the motor can respectively perform acceleration and deceleration actions; 6) And closing the key switch, the double-open leakage switch and the pre-charging switch in sequence to finish the control.
The control mode based on the CAN bus specifically comprises the following steps: 1) Starting an upper computer and opening a control interface of a motor controller; 2) The brake, forward and backward buttons on the manual control panel are ensured to be in a closed state, and the key switch, the pre-charging switch and the air switch are turned on; 3) Clicking a main contactor closing command by using a mouse, and enabling the motor to enter a working state; 4) Setting values of starting, positive and negative rotation, braking and rotating speed, and enabling the motor to work; the control interface of the motor controller CAN visually present a CAN bus information message structure, visually control and monitor the working states of the motor and the controller in real time, and remind system faults; 5) And closing the switch and the upper computer, and ending the control.
The control process is realized by using the controller as a central processing mechanism. The terminal control mode is used as a traditional control method, and has the disadvantages of complex operation, low efficiency and single function. In the CAN bus control mode, the upper computer combines related control programs, two signal types are converted through the USB-CAN adapter, then the two signal types are transmitted to the motor through the motor controller to realize corresponding actions, and meanwhile, the feedback information of the motor is read through the controller and is reflected on a terminal interface, so that the aims of terminal control of the motor and monitoring of the working state of the system are fulfilled. The circuit is simple, the operation is convenient, and the suitability, the commonality and the reliability are higher.