A motor drive device
By outputting the expected operating state of the motor to the driver chip, the problem of excessive processor resource occupation is solved, efficient control of motor drive is achieved, and system operation efficiency is improved.
Patent Information
- Application Number
- CN202110453813.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-04-26
- Publication Date
- 2025-01-07
- Estimated Expiration
- 2041-04-26
AI Technical Summary
In the prior art, the processor needs to continuously output control instructions when the motor is running, resulting in too large resource usage and cannot meet the interrupt needs of all algorithms, affecting the system operation.
A motor driving device is designed, and the processor outputs the desired operating state of the motor to the driver chip. The driver chip drives the motor to operate according to the expected state, and the processor can continue to process other events and reduce resource usage.
This reduces the use of processor resources and improves system operation efficiency. The processor no longer needs to continuously output control instructions when the motor is running.
Smart Images

Figure CN113037153B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of motor control, and in particular to a motor driving device. Background Art
[0002] A pan / tilt head is a supporting device for installing and fixing a camera. After the camera is installed on the pan / tilt head, the horizontal and pitch angles of the camera can be changed by driving the motor inside the pan / tilt head, thereby ensuring the stability of the picture taken by the camera.
[0003] In the prior art, when driving the motor of the gimbal, a Darlington tube is usually set between the processor and the motor. The processor controls the Darlington tube to be turned on and off accordingly by outputting Darlington tube control instructions corresponding to the desired operating state of the motor, so that the Darlington tube drives the motor and the motor rotates forward or reverse at the speed and frequency corresponding to the desired operating state. However, in addition to sending the corresponding Darlington tube control instructions to the Darlington tube to drive the motor, the processor also needs to handle other events, such as calculating how the motor should operate based on the changes in the gyroscope measurement values. However, the processor needs to keep sending Darlington tube control instructions to the Darlington tube when the motor is running, which results in a large amount of processor resources being occupied, and the processor performance cannot meet the interrupt requirements of all algorithms, thereby affecting system operation. Summary of the invention
[0004] The purpose of the present invention is to provide a motor driving device, in which the processor does not need to continuously output control instructions when the motor is running, but only needs to output the expected running state of the motor to the driving chip, and the driving chip can control the motor accordingly according to the expected running state. After outputting the expected running state of the motor, the processor can continue to process other events, reducing the occupation of processor resources.
[0005] In order to solve the above technical problems, the present invention provides a motor driving device, comprising:
[0006] A processor, configured to output a desired operating state of the motor;
[0007] The communication terminal is connected to the signal output terminal of the processor, and the driving chip whose control signal output terminal is connected to the control terminal of the motor is used to drive the motor to perform corresponding operation after receiving the expected operating state of the motor.
[0008] Preferably, the driving chip comprises:
[0009] The communication end is the communication end of the driver chip, and the control module whose signal output end is connected to the pre-driver module is used to convert the expected running state of the motor into a logic control signal after receiving the expected running state of the motor;
[0010] The pre-driving module, whose output end is connected to the control end of the bridge circuit, is used to convert the logic control signal into a driving signal to drive the on and off of each switch tube in the bridge circuit;
[0011] The bridge circuit, whose output end is the control signal output end of the driving chip, is used to drive the motor to perform corresponding operation based on the conduction and shutdown of its own switch tube.
[0012] Preferably, the control module comprises:
[0013] The communication end is a communication module of the communication end of the control module, and is used to receive the expected operating state of the motor and store the configuration value corresponding to the expected operating state of the motor into its own register;
[0014] The input end is connected to the configuration value output end of the communication module, and the output end is the motor control channel of the signal output end of the control module, which is used to convert the configuration value stored in the communication module into the logic control signal.
[0015] Preferably, the motor control channel includes a DC motor control channel and a stepper motor control channel;
[0016] The input end of the DC motor control channel is connected to the configuration value output end of the communication module, and is used to convert the configuration value stored in the communication module into a logic control signal of the DC motor;
[0017] The input end of the stepper motor control channel is connected to the configuration value output end of the communication module, and is used to convert the configuration value stored in the communication module into a logic control signal of the stepper motor.
[0018] Preferably, the stepper motor control channel includes a position information search module, a cache state machine, a current control state output module, and a step number cache and control module, a frequency cache and control module, a subdivision cache and control module, a forward and reverse cache and control module, a brake control module, and an output enable cache and control module, which are connected to the input end and are the input end of the stepper motor control channel; the output end of the frequency cache and control module is connected to the step number cache and control module, the output end of the step number cache and control module, the output end of the subdivision cache and control module, and the output end of the forward and reverse cache and control module are all connected to the position information search module, and the output end of the brake control module is connected to the state cache machine; the output end of the current control state output module is connected to the communication module; the output end of the output enable cache and control module is connected to the enable end of the bridge circuit;
[0019] The frequency buffering and control module is used to buffer the frequency configuration value received from the communication module, and output a corresponding frequency signal based on the frequency configuration value;
[0020] The step number buffer and control module is used to buffer the step number configuration value received from the communication module, and output a pulse signal with a corresponding frequency and step number based on the frequency signal and the step number configuration value;
[0021] The subdivision cache and control module is used to cache the subdivision mode configuration value received from the communication module, and output a corresponding subdivision mode signal based on the subdivision mode configuration value;
[0022] The forward and reverse cache and control module is used to cache the forward and reverse configuration values received from the communication module, and output corresponding forward and reverse signals based on the forward and reverse configuration values;
[0023] The brake control module is used to output a corresponding brake signal based on the brake configuration value in the communication module;
[0024] The output enable cache and control module is used to cache the output enable configuration value received from the communication module, and output a corresponding output enable signal based on the output enable configuration value;
[0025] The mode input end of the position information search module is the input end of the stepper motor control channel, and the output end is connected to the control end of the bridge circuit, and is used to search for the corresponding signal for controlling the switch tube of the bridge circuit to turn on and off based on the motor control mode configuration value, frequency signal, step number signal, subdivision mode signal and forward and reverse signal in the configuration value, so as to output the corresponding logic control signal of the stepper motor;
[0026] The input end of the state cache machine is connected to the frequency cache and control module, the step number cache and control module, the forward and reverse cache and control module and the output enable cache and control module, and is used to cache and output a corresponding state indication pulse based on the frequency configuration value, the step number configuration value, the forward and reverse configuration value, the output enable configuration value and the brake signal;
[0027] The input end of the current control state output module is connected to the output end of the state cache machine, and is used to output the state indication pulse to the processor through the communication module.
[0028] Preferably, the control module further includes:
[0029] A pulse width modulation (PWM) generating device whose input end is connected to the configuration value output end of the communication module, and is used to generate a PWM signal of corresponding frequency and duty cycle based on the configuration value stored in the communication module;
[0030] The signal input end of the DC motor control channel is connected to the first signal output end of the PWM generating device, and is also used to determine whether to receive the PWM signal output by the PWM generating device based on the configuration value stored in the communication module, and output a logic control signal with adjustable frequency and duty cycle corresponding to the PWM signal when it is determined to be received.
[0031] Preferably, the pulse signal input end of the PWM generating signal is connected to the pulse signal output end of the stepper motor control channel, and the second signal output end is connected to the communication module, and is also used to send the pulse signal corresponding to the completion status of the configuration value sent by the stepper motor control channel to the processor through the communication module when the DC motor control channel determines that the PWM signal is not received.
[0032] Preferably, the driver chip further includes:
[0033] A temperature detection module, used for collecting the temperature inside the driver chip and outputting an over-temperature signal when the temperature inside the driver chip reaches a preset temperature value;
[0034] The protection module, whose input end is connected to the output end of the temperature detection module and whose output end is connected to the control module, is used to control the control module to stop output when receiving the over-temperature signal, thereby controlling the driving chip to stop output.
[0035] Preferably, the driver chip further includes:
[0036] A voltage detection module having an input end connected to the power input end of the driver chip and an output end connected to the protection module, for detecting the power supply voltage of the driver chip and outputting an undervoltage signal when the power supply voltage of the driver chip is less than a preset voltage value;
[0037] The protection module is also used to control the control module to stop outputting when receiving the undervoltage signal, thereby controlling the driving chip to stop outputting, and resetting the register in the communication module to an initial value.
[0038] Preferably, the input end of the protection module is connected to the communication module, and is also used to reset the register in the communication module to an initial value when the driving chip is powered on, and stop resetting the register when the communication module receives the expected operating state of the motor.
[0039] The present application provides a motor drive device, including a processor and a driver chip, wherein the processor can output the expected operating state of the motor to the driver chip, so that the driver chip drives the motor to perform corresponding operations based on the expected operating state of the motor. It can be seen that the processor does not need to continuously output control instructions when the motor is running, but only needs to output the expected operating state of the motor to the driver chip, and the driver chip can control the motor accordingly according to the expected operating state. After outputting the expected operating state of the motor, the processor can continue to process other events, reducing the occupation of processor resources. BRIEF DESCRIPTION OF THE DRAWINGS
[0040] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the prior art and the drawings required for use in the embodiments are briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.
[0041] Figure 1 A schematic diagram of the structure of a motor drive device provided by the present invention;
[0042] Figure 2 It is a circuit connection diagram for driving a motor in the prior art;
[0043] Figure 3 A schematic diagram of the structure of specific connections inside a motor drive device provided by the present invention;
[0044] Figure 4 A schematic diagram of the internal structure of a driver chip provided by the present invention;
[0045] Figure 5 A schematic diagram of the structure of a driving module provided by the present invention;
[0046] Figure 6 A schematic diagram of the structure of a control channel of a stepping motor provided by the present invention;
[0047] Figure 7 A schematic diagram of a control state of a motor during operation provided by the present invention. DETAILED DESCRIPTION
[0048] The core of the present invention is to provide a motor drive device. The processor does not need to continuously output control instructions when the motor is running. It only needs to output the expected running state of the motor to the driver chip, and the driver chip can control the motor accordingly according to the expected running state. After outputting the expected running state of the motor, the processor can continue to process other events, reducing the occupation of processor resources.
[0049] In order to make the purpose, technical solution and advantages of the embodiments of the present invention clearer, the technical solution in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0050] Please refer to Figure 1 , Figure 1 A schematic diagram of the structure of a motor drive device provided by the present invention, the device comprises:
[0051] Processor 1, used for outputting the expected operating state of motor 3;
[0052] The communication terminal is connected to the signal output terminal of the processor 1 , and the driving chip 2 whose control signal output terminal is connected to the control terminal of the motor 3 is used to drive the motor 3 to perform corresponding operation after receiving the expected operation state of the motor 3 .
[0053] In this embodiment, the applicant considers that in the prior art, when driving the motor 3 of the pan / tilt, a Darlington tube is usually set between the MCU (Microcontroller Unit) and the motor 3. Figure 2 , Figure 2 The circuit connection diagram of the prior art for driving a motor, in which M is the motor 3, is shown. The MCU generates a Darlington control instruction corresponding to the desired operating state of the motor 3 to the Darlington, so that the Darlington is turned on and off accordingly, thereby driving the motor 3. However, when the motor 3 is in the operating state, the MCU needs to continuously generate control instructions to the Darlington, so as to continuously control the on and off of the Darlington, and continuously drive the motor 3. However, in addition to sending instructions to the Darlington, the MCU also needs to execute other algorithms, that is, to process other events, which occupies a large amount of processor resources, and may cause the processor performance to be unable to meet the interrupt requirements of all algorithms and affect the system operation.
[0054] In order to solve the above technical problems, the present application sets a driver chip 2 between the processor 1 and the motor 3. The processor 1 only needs to send the expected operating state of the motor 3 to the driver chip 2, and the driver chip 2 converts the received expected operating state of the motor 3 accordingly, thereby driving the motor 3 accordingly. When the motor 3 rotates, the processor 1 does not need to send instructions all the time, and the processor 1 can continue to execute other algorithms, reducing the occupation of the processor 1 resources. Please refer to Figure 3 , Figure 3This is a schematic diagram of the specific connection structure of a motor drive device provided by the present invention. The processor 1 and the driver chip 2 in the figure are connected via an I2C bus, and the processor 1 sends the desired operating state of the motor 3, that is, SDA in the figure, to the driver chip 2 via the I2C bus; and sends the clock signal to the driver chip 2 via the I2C bus, that is, SCL in the figure.
[0055] In addition, the driving chip 2 in the present application is an integrated chip, and the processor 1 only needs to send the desired operating state of the motor 3 through the I2C bus to enable the driving chip 2 to drive the motor 3, and the processor 1 can execute other algorithms.
[0056] The driving chip 2 in the present application can integrate a driving switch tube, and can adopt a very small QFN (QuadFlat No-leads Package) or QFP (Plastic Quad Flat Package) packaging form, and the PCB (Printed Circuit Board) area is small and the configuration is simple.
[0057] The driver chip 2 in the present application may be integrated with an undervoltage protection module and an overtemperature protection module, thereby ensuring the normal operation of the driver chip 2 and improving the reliability of the driver chip 2 .
[0058] The driving chip 2 in the present application can integrate a subdivision control module of the stepper motor, so that the number of subdivisions of the stepper motor per circle is increased, so that the rotation of the stepper motor is smoother, the vibration is smaller, and the noise is lower.
[0059] In summary, the processor 1 does not need to continuously output control instructions when the motor 3 is running, but only needs to output the expected running state of the motor 3 to the driver chip 2, and the driver chip 2 can control the motor 3 accordingly according to the expected running state. After outputting the expected running state of the motor 3, the processor 1 can continue to process other events, reducing the occupation of the processor 1's resources.
[0060] Based on the above embodiments:
[0061] As a preferred embodiment, the driver chip 2 includes:
[0062] The communication end is the communication end of the driver chip 2, and the control module whose signal output end is connected to the pre-driver module is used to convert the expected running state of the motor 3 into a logic control signal after receiving the expected running state of the motor 3;
[0063] A pre-driver module whose output end is connected to the control end of the bridge circuit is used to convert the logic control signal into a drive signal to drive the on and off of each switch tube in the bridge circuit;
[0064] The output end is a bridge circuit of a control signal output end of the driver chip 2, and is used to realize corresponding operation of the drive motor 3 based on the on and off of its own switch tube.
[0065] In this embodiment, the driver chip 2 is provided with a control module, a pre-driver module and a bridge circuit. Figure 4 , Figure 4 This is a schematic diagram of the structure inside a driver chip provided by the present invention. The control module can realize the logic control of multiple motors. After the control module converts the desired operating state of the motor 3 into a logic control signal, the logic control signal is sent to the pre-driving module. The pre-driving module converts the logic control signal into a driving signal that can drive the switch tube in the bridge circuit, thereby controlling the motor 3 by controlling the switch tube in the bridge circuit, so that the motor 3 reaches the desired operating state.
[0066] also, Figure 4 The DGND port connected to the control module is the ground port, AVDD is the power port, OSC is the port connected to the external crystal oscillator, and the external crystal oscillator can provide a clock signal for the control module, SCL connected to the I2C bus is the port for receiving the clock signal output by the processor 1, and SDA is the port for receiving the expected operating state of the motor 3 sent by the processor 1. MVCC12, MVCC5 and MVCC34 connected to the bridge circuit are the power ports of the bridge circuit, MGEND12, MGEND5 and MGEND34 are the ground terminals, and OUT1A, OUT1B, OUT2A, OUT2B, OUT3A, OUT3B, OUT4A, OUT4B, OUT5A and OUT5B are the output terminals of the bridge circuit respectively.
[0067] It should be noted that the driver chip 2 in the present application is compatible with the standard industrial interface of 3.3V / 5V. The bridge circuit in the present application has an ampere-level driving capability, that is, the bridge circuit can withstand a current of 1 ampere or more, so as to drive the motor 3, making the motor 3 rotate faster, and further meeting the needs of users.
[0068] As a preferred embodiment, the control module includes:
[0069] The communication end is a communication module of the communication end of the control module, which is used to receive the expected operating state of the motor 3 and store the configuration value corresponding to the expected operating state of the motor 3 into its own register;
[0070] The input end is connected to the configuration value output end of the communication module, and the output end is the motor control channel of the signal output end of the control module, which is used to convert the configuration value stored in the communication module into a logic control signal;
[0071] The communication module in this embodiment can store the configuration value corresponding to the desired operating state of the motor 3, so that the motor control channel converts the configuration value into a logic control signal. Figure 5 , Figure 5 A schematic structural diagram of a driving module provided by the present invention.
[0072] In addition, the communication end of the communication module in the present application adopts an 8-bit I2C communication protocol. The communication module receives a set of expected operating states of the motor sent by the processor, including: an 8-bit chip address, an 8-bit register address and an 8-bit configuration value, wherein the communication module stores the 8-bit configuration value in the address of the corresponding register, and sets a self-increment function in the highest bit of the register address, that is, when the register stores the configuration value, its own address can be automatically increased by 1, so that after the register stores the configuration value in its own address, it can continue to store the configuration value of the next address, for example, store the 8-bit chip address, 8-bit register address, 8-bit configuration value, 8-bit configuration value, 8-bit configuration value, ... If the highest bit of the register is not set with a self-increment function, after the configuration value is stored in the current register address, if you want to continue to store the configuration value in other addresses of the register, the processor needs to resend the expected operating state of the motor and the address corresponding to the state to the driver chip, and the register is: 8-bit chip address, 8-bit register address, 8-bit configuration value, 8-bit chip address, 8-bit register address, 8-bit configuration value, ... when storing the configuration value.
[0073] As a preferred embodiment, the motor 3 control channel includes a DC motor control channel and a stepper motor control channel;
[0074] The input end of the DC motor control channel is connected to the configuration value output end of the communication module, and is used to convert the configuration value stored in the communication module into a logic control signal of the DC motor;
[0075] The input end of the stepper motor control channel is connected to the configuration value output end of the communication module, and is used to convert the configuration value stored in the communication module into a logic control signal of the stepper motor.
[0076] In this embodiment, the applicant takes into account that a DC motor or a stepper motor is provided in the gimbal. Therefore, in order to control different motors 3 separately, the present application sets up a DC motor control channel for controlling the DC motor and a stepper motor control channel for controlling the stepper motor, thereby achieving precise control of different motors 3 respectively.
[0077] In addition, from Figure 4 It can be seen that Figure 4 The control module in the device is connected to a plurality of bridge circuits, so that the driving of multiple motors can be realized. Among them, two bridge circuits are required to drive the stepper motor, and one bridge circuit is required to drive the stepper motor.
[0078] As a preferred embodiment, the stepper motor control channel includes a position information search module, a cache state machine, a current control state output module, and a step number cache and control module, a frequency cache and control module, a subdivision cache and control module, a forward and reverse cache and control module, a brake control module, and an output enable cache and control module, which are connected to the input end and are the input end of the stepper motor control channel; the output end of the frequency cache and control module is connected to the step number cache and control module, the output end of the step number cache and control module, the output end of the subdivision cache and control module, and the output end of the forward and reverse cache and control module are all connected to the position information search module, and the output end of the brake control module is connected to the state cache machine; the output end of the current control state output module is connected to the communication module; the output end of the output enable cache and control module is connected to the enable end of the bridge circuit;
[0079] The frequency buffering and control module is used to buffer the frequency configuration value received in the communication module and output a corresponding frequency signal based on the frequency configuration value;
[0080] The step number buffer and control module is used to buffer the step number configuration value received from the communication module, and output a pulse signal with a corresponding frequency and step number based on the frequency signal and the step number configuration value;
[0081] The subdivision cache and control module is used to cache the subdivision mode configuration value received from the communication module, and output a corresponding subdivision mode signal based on the subdivision mode configuration value;
[0082] The forward and reverse cache and control module is used to cache the forward and reverse configuration values received from the communication module, and output corresponding forward and reverse signals based on the forward and reverse configuration values;
[0083] The brake control module is used to output a corresponding brake signal based on the brake configuration value in the communication module;
[0084] The output enable cache and control module is used to cache the output enable configuration value received from the communication module, and output a corresponding output enable signal based on the output enable configuration value;
[0085] The mode input end of the position information search module is the input end of the stepper motor control channel, and the output end is connected to the control end of the bridge circuit, and is used to search for the corresponding signal for turning on and off the switch tube of the control bridge circuit based on the motor control mode configuration value, frequency signal, step number signal, subdivision mode signal and forward and reverse signal in the configuration value, so as to output the corresponding logic control signal of the stepper motor;
[0086] The input end of the state buffer machine is connected to the frequency buffer and control module, the step number buffer and control module, the forward and reverse buffer and control module, and the output enable buffer and control module, and is used to buffer and output corresponding state indication pulses based on the frequency configuration value, the step number configuration value, the forward and reverse configuration value, the output enable configuration value, and the brake signal;
[0087] The input end of the current control state output module is connected to the output end of the state cache machine, and is used to output the state indication pulse to the processor 1 through the communication module.
[0088] Please refer to Figure 6 , Figure 6 A schematic diagram of the structure of a control channel of a stepper motor provided by the present invention. The step number cache and control module, frequency cache and control module, subdivision cache and control module, forward and reverse cache and control module, brake control module and output enable cache and control module in this embodiment can all obtain corresponding configuration values, and the configuration values include frequency configuration value, step number configuration value, subdivision mode configuration value, forward and reverse configuration value, output tube enable configuration value, motor control mode configuration value, brake configuration value and start signal configuration value. According to different register address allocations, the configuration of multi-channel stepper motor control channels can be realized, thereby driving multi-channel stepper motors at the same time.
[0089] Among them, the frequency configuration value, the step configuration value, the subdivision mode configuration value, the forward and reverse configuration value and the output tube enable configuration value are a set of necessary configuration values that can enable one stepper motor to operate. After the configuration value of one stepper motor control channel is stored and cached, it is necessary to send a start signal to the corresponding stepper motor control channel to start it running. At this time, the position information search module searches for the corresponding control bridge circuit switch tube conduction and shutdown signal based on the motor control mode configuration value, frequency signal, step signal, subdivision mode signal and forward and reverse signal in the configuration value to output the corresponding stepper motor logic control signal.
[0090] In addition, the number of steps is associated with the subdivision mode. For example, when the configuration value is X subdivision mode, one step is equivalent to walking 1 / X steps.
[0091] In addition, the output enable buffer and control module can directly control the enablement of the bridge circuit. When the output enable buffer and control module stops outputting, the output end of the output enable buffer and control module is in a high impedance state.
[0092] It should be noted that, according to the configuration of the motor 3 mode, the driver chip 2 will select the 2-phase 4-wire or 4-phase 5-wire output mode based on the expected operating state of the motor 3. When a brake signal is sent to the bridge circuit during the operation of the motor 3, the motor 3 control channel will stop outputting and clear the current configuration value and cached content of the motor 3 control channel. If you want to restore the output of the motor 3 control channel, you need to first send a control signal to cancel the brake signal.
[0093] For details, please refer to Figure 7 , Figure 7 A schematic diagram of a control state of a motor during operation provided by the present invention, when the motor is not in the operating state, the configuration in the cache is 0, and the value of the state cache machine is 00, point A is when the processor sends the expected operating state of the motor, and the configuration value is A, and the configuration value of the current operation of the motor is A, because the processor 1 does not input a new expected operating state of the motor when the configuration value of the operation of the motor 3 is A, the configuration in the cache is still 0, the state in the cache register is still at a low level, and the value cached by the state cache machine is 01; at point B, the processor sends the expected operating state of the motor again, and the configuration value is B, but because the configuration value A has not yet finished running, the configuration value A needs to be run first at this time, and the configuration value B is cached first, that is, the configuration in the cache is still B, and the state of the cache register is at a high level at this time, and the value in the state cache machine is 10; however, because the configuration A has not yet finished running, the processor sends the expected operating state of the motor again, and the configuration value is C, and at this time, the configuration value C is also cached, but when the configuration value A finishes running, the configuration value B is no longer run, but the configuration value C is run, and the configuration value D and the configuration value E are the same as the above-mentioned running process.
[0094] In addition, in order to facilitate the processor 1 to obtain the running status of the motor 3 in time, the driver chip 2 is designed with a read-only register and an optional feedback function. The processor 1 can obtain the current subdivision mode, cache status, overtemperature, whether it is running, and the number of running steps of a stepper motor control channel by reading the read-only register.
[0095] As a preferred embodiment, the control module further includes:
[0096] A PWM (Pulse Width Modulation) generating device whose input end is connected to the configuration value output end of the communication module, and is used to generate a PWM signal of corresponding frequency and duty cycle based on the configuration value stored in the communication module;
[0097] The signal input end of the DC motor control channel is connected to the first signal output end of the PWM generating device, and is also used to determine whether to receive the PWM signal output by the PWM generating device based on the configuration value stored in the communication module, and output a logic control signal with adjustable frequency and duty cycle corresponding to the PWM signal when it is determined to be received.
[0098] The PWM generating device in this embodiment can receive the configuration value of the communication module and generate a PWM signal with a corresponding frequency and duty cycle. At the same time, according to the configuration value, the DC motor control channel will choose to use PWM for the DC motor control channel or directly output the PWM signal.
[0099] In addition, the configuration values that can be used by the DC motor control channel include the forward configuration value, reverse configuration value, high resistance configuration value and brake configuration value of the motor 3.
[0100] also, Figure 5 The control module is also provided with a clock module, which can pass clock signals to the motor control channel, PWM generating device and protection module.
[0101] As a preferred embodiment, the pulse signal input end of the PWM generating signal is connected to the pulse signal output end of the stepper motor control channel, and the second signal output end is connected to the communication module, and is also used to send the pulse signal corresponding to the completion status of the configuration value sent by the stepper motor control channel to the processor 1 through the communication module when the DC motor control channel determines that the PWM signal is not received.
[0102] When the DC motor control channel needs the PWM signal output by the PWM generating device in this embodiment, the PWM generating device normally sends the control signal to the DC motor control channel; otherwise, the state of the stepper motor control channel controlling the motor 3 is sent to the processor 1 in the form of high and low levels so that the user can know the operating state of the motor 3 at this time.
[0103] In addition, when the motor 3 runs to the expected running state and the processor 1 does not send the expected running state of the motor again, the PWM generating device sends a pulse signal to the processor 1.
[0104] As a preferred embodiment, the driver chip 2 further includes:
[0105] The temperature detection module is used to collect the temperature inside the driver chip 2 and output an over-temperature signal when the temperature inside the driver chip 2 reaches a preset temperature value;
[0106] The protection module, whose input end is connected to the output end of the temperature detection module and whose output end is connected to the control module, is used to control the control module to stop output when receiving an over-temperature signal, thereby controlling the driving chip 2 to stop output.
[0107] The temperature detection module in this embodiment detects the temperature of the driver chip 2. When the operating temperature of the driver chip 2 reaches a certain value, such as 150 degrees, the driver chip 2 is controlled to shut down the output to prevent overheating and damage.
[0108] Once over-temperature occurs, after the over-temperature signal is sent from the analog part to the protection module, all output pins of the driver chip 2 are turned off, but the registers are not set to the initial value, which means that the current state is suspended.
[0109] As a preferred embodiment, the driver chip 2 further includes:
[0110] A voltage detection module whose input end is connected to the power input end of the driver chip 2 and whose output end is connected to the protection module is used to detect the power supply voltage of the driver chip 2 and output an undervoltage signal when the power supply voltage of the driver chip 2 is less than a preset voltage value;
[0111] The protection module is also used to control the control module to stop outputting when receiving an undervoltage signal, thereby controlling the driving chip 2 to stop outputting, and resetting the register in the communication module to an initial value.
[0112] The voltage detection module in this embodiment detects the power supply voltage of the driver chip 2 . When the power supply voltage of the driver chip 2 decreases to a certain value, the driver chip 2 shuts off the output to prevent the motor 3 from running abnormally.
[0113] Once the driver chip 2 is under-voltage and the supply voltage is lower than the preset voltage value, after the under-voltage signal is input into the protection module, all output pins of the driver chip 2 are turned off and all registers are set to initial values.
[0114] As a preferred embodiment, the input end of the protection module is connected to the communication module, and is also used to reset the registers in the communication module to initial values when the driver chip 2 is powered on, and stop resetting the registers when the communication module receives the expected operating state of the motor 3.
[0115] The protection module in this embodiment accesses the configuration value, power-on signal and over-temperature signal of the communication module. After power-on, the protection module will set all registers to initial values. The configuration value can only be written into the register after it is configured to a non-reset state through the communication module, that is, after the processor 1 sends the expected operating state of the motor.
[0116] It should also be noted that, in this specification, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "comprise", "include" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, an element defined by the statement "comprises a ..." does not exclude the presence of other identical elements in the process, method, article or device including the element.
[0117] The above description of the disclosed embodiments enables those skilled in the art to implement or use the present invention. Various modifications to these embodiments will be apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present invention. Therefore, the present invention will not be limited to the embodiments shown herein, but rather to the widest scope consistent with the principles and novel features disclosed herein.
Claims
1. A motor drive device, characterized in that: include: A processor, configured to output a desired operating state of the motor; A driving chip having a communication terminal connected to a signal output terminal of the processor and a control signal output terminal connected to a control terminal of the motor, and configured to drive the motor to perform corresponding operation after receiving a desired operation state of the motor; The driver chip comprises: The communication end is the communication end of the driver chip, and the control module whose signal output end is connected to the pre-driver module is used to convert the expected running state of the motor into a logic control signal after receiving the expected running state of the motor; The pre-driving module, whose output end is connected to the control end of the bridge circuit, is used to convert the logic control signal into a driving signal to drive the on and off of each switch tube in the bridge circuit; The bridge circuit, whose output end is the control signal output end of the driving chip, is used to drive the motor to perform corresponding operation based on the on and off of its own switch tube; The control module comprises: The communication end is a communication module of the communication end of the control module, and is used to receive the expected operating state of the motor and store the configuration value corresponding to the expected operating state of the motor into its own register; The input end is connected to the configuration value output end of the communication module, and the output end is the motor control channel of the signal output end of the control module, which is used to convert the configuration value stored in the communication module into the logic control signal; The motor control channel includes a DC motor control channel and a stepper motor control channel; The input end of the DC motor control channel is connected to the configuration value output end of the communication module, and is used to convert the configuration value stored in the communication module into a logic control signal of the DC motor; The input end of the stepper motor control channel is connected to the configuration value output end of the communication module, and is used to convert the configuration value stored in the communication module into a logic control signal of the stepper motor; The control module also includes: A pulse width modulation (PWM) generating device whose input end is connected to the configuration value output end of the communication module, and is used to generate a PWM signal of corresponding frequency and duty cycle based on the configuration value stored in the communication module; The signal input end of the DC motor control channel is connected to the first signal output end of the PWM generating device, and is also used to determine whether to receive the PWM signal output by the PWM generating device based on the configuration value stored in the communication module, and output a logic control signal with adjustable frequency and duty cycle corresponding to the PWM signal when it is determined to be received; The pulse signal input end of the PWM generating device is connected to the pulse signal output end of the stepper motor control channel, and the second signal output end is connected to the communication module, and is also used to send the pulse signal corresponding to the completion status of the configuration value sent by the stepper motor control channel to the processor through the communication module when the DC motor control channel determines that the PWM signal is not received.
2. The motor drive device according to claim 1, characterized in that: The stepper motor control channel includes a position information search module, a cache state machine, a current control state output module, and a step number cache and control module, a frequency cache and control module, a subdivision cache and control module, a forward and reverse cache and control module, a brake control module, and an output enable cache and control module, which are connected to the input end and are the input end of the stepper motor control channel; the output end of the frequency cache and control module is connected to the step number cache and control module, the output end of the step number cache and control module, the output end of the subdivision cache and control module, and the output end of the forward and reverse cache and control module are all connected to the position information search module, and the output end of the brake control module is connected to the state cache machine; the output end of the current control state output module is connected to the communication module; the output end of the output enable cache and control module is connected to the enable end of the bridge circuit; The frequency buffering and control module is used to buffer the frequency configuration value received from the communication module, and output a corresponding frequency signal based on the frequency configuration value; The step number buffer and control module is used to buffer the step number configuration value received from the communication module, and output a pulse signal with a corresponding frequency and step number based on the frequency signal and the step number configuration value; The subdivision cache and control module is used to cache the subdivision mode configuration value received from the communication module, and output a corresponding subdivision mode signal based on the subdivision mode configuration value; The forward and reverse cache and control module is used to cache the forward and reverse configuration values received from the communication module, and output corresponding forward and reverse signals based on the forward and reverse configuration values; The brake control module is used to output a corresponding brake signal based on the brake configuration value in the communication module; The output enable cache and control module is used to cache the output enable configuration value received from the communication module, and output a corresponding output enable signal based on the output enable configuration value; The mode input end of the position information search module is the input end of the stepper motor control channel, and the output end is connected to the control end of the bridge circuit, and is used to search for the corresponding signal for controlling the switch tube of the bridge circuit to turn on and off based on the motor control mode configuration value, frequency signal, step number signal, subdivision mode signal and forward and reverse signal in the configuration value, so as to output the corresponding logic control signal of the stepper motor; The input end of the state cache machine is connected to the frequency cache and control module, the step number cache and control module, the forward and reverse cache and control module and the output enable cache and control module, and is used to cache and output a corresponding state indication pulse based on the frequency configuration value, the step number configuration value, the forward and reverse configuration value, the output enable configuration value and the brake signal; The input end of the current control state output module is connected to the output end of the state cache machine, and is used to output the state indication pulse to the processor through the communication module.
3. The motor drive device according to claim 1, characterized in that: The driver chip also includes: A temperature detection module, used for collecting the temperature inside the driver chip and outputting an over-temperature signal when the temperature inside the driver chip reaches a preset temperature value; The protection module, whose input end is connected to the output end of the temperature detection module and whose output end is connected to the control module, is used to control the control module to stop output when receiving the over-temperature signal, thereby controlling the driving chip to stop output.
4. The motor drive device according to claim 3, characterized in that: The driver chip also includes: A voltage detection module having an input end connected to the power input end of the driver chip and an output end connected to the protection module, for detecting the power supply voltage of the driver chip and outputting an undervoltage signal when the power supply voltage of the driver chip is less than a preset voltage value; The protection module is also used to control the control module to stop outputting when receiving the undervoltage signal, thereby controlling the driving chip to stop outputting, and resetting the register in the communication module to an initial value.
5. The motor drive device according to claim 4, characterized in that: The input end of the protection module is connected to the communication module, and is also used to reset the register in the communication module to an initial value when the driving chip is powered on, and stop resetting the register when the communication module receives the expected operating state of the motor.
Citation Information
Patent Citations
Motor driving device
CN216016753U