Motor control device, system, method and storage medium

文档序号:553619 发布日期:2021-05-14 浏览:12次 中文

阅读说明:本技术 电机控制装置、系统、方法及存储介质 (Motor control device, system, method and storage medium ) 是由 李振 常泓洁 车立建 程昊天 于 2021-02-02 设计创作,主要内容包括:本发明公开了一种电机控制装置、系统、方法及存储介质,该装置包括:控制器、第一全桥电路以及第一继电器;控制器的第一控制端口与第一全桥电路的控制端口连接;控制器的第一输入端口与第一电机连接,控制器的第二输入端口与第二电机连接;控制器的第二控制端口、第三控制端口分别与第一继电器的第一控制线圈引脚及第二控制线圈引脚连接;第一全桥电路的第一输出端口分别与第一电机及第二电机的第一电源电极端口连接,第一全桥电路的第二输出端口与继电器的第一输出引脚连接;第一继电器的第二输出引脚与第二电机的第二电源电极端口连接,第一继电器的第三输出引脚与第一电机的第二电源电极端口连接。本实施例提供的电机控制装置的成本较低。(The invention discloses a motor control device, a system, a method and a storage medium, wherein the device comprises: the relay comprises a controller, a first full-bridge circuit and a first relay; a first control port of the controller is connected with a control port of the first full-bridge circuit; a first input port of the controller is connected with the first motor, and a second input port of the controller is connected with the second motor; a second control port and a third control port of the controller are respectively connected with a first control coil pin and a second control coil pin of the first relay; a first output port of the first full-bridge circuit is connected with first power electrode ports of the first motor and the second motor respectively, and a second output port of the first full-bridge circuit is connected with a first output pin of the relay; and a second output pin of the first relay is connected with a second power supply electrode port of the second motor, and a third output pin of the first relay is connected with a second power supply electrode port of the first motor. The motor control device provided by the embodiment has lower cost.)

1. A motor control apparatus, comprising: the relay comprises a controller, a first full-bridge circuit and a first relay;

wherein a first control port of the controller is connected with a control port of the first full-bridge circuit; a first input port of the controller is connected with a position output port of the first motor, and a second input port of the controller is connected with a position output port of the second motor; a second control port of the controller is connected with a first control coil pin of the first relay, and a third control port of the controller is connected with a second control coil pin of the first relay;

a first output port of the first full-bridge circuit is connected with a first power electrode port of the first motor and a first power electrode port of the second motor respectively, and a second output port of the first full-bridge circuit is connected with a first output pin of the relay;

and a second output pin of the first relay is connected with a second power supply electrode port of the second motor, and a third output pin of the first relay is connected with a second power supply electrode port of the first motor.

2. The apparatus of claim 1, further comprising: a first encoder and a second encoder;

a first input port of the controller is connected with a position output port of the first motor through the first encoder, and the first encoder is used for acquiring rotation information of the first motor;

and a second input port of the controller is connected with a position output port of the second motor through the second encoder, and the second encoder is used for acquiring the rotation information of the second motor.

3. The apparatus of claim 1, further comprising: a second full bridge circuit and a second relay;

wherein a fourth control port of the controller is connected with the control port of the second full-bridge circuit; a third input port of the controller is connected with a position output port of a third motor, and a fourth input port of the controller is connected with a position output port of a fourth motor; a fifth control port of the controller is connected with a first control coil pin of the second relay, and a sixth control port of the controller is connected with a second control coil pin of the second relay;

a first output port of the second full-bridge circuit is connected with a first power electrode port of the third motor and a first power electrode port of the fourth motor respectively, and a second output port of the second full-bridge circuit is connected with a first output pin of the second relay;

and a second output pin of the second relay is connected with a second power supply electrode port of the fourth motor, and a third output pin of the second relay is connected with a second power supply electrode port of the third motor.

4. The apparatus of any one of claims 1 to 3, further comprising: a transformer;

and a power supply port of the controller is connected with an output port of the transformer, and an input port of the transformer is connected with a power supply of the motor control device.

5. A motor control system comprising a first motor, a second motor and a motor control device according to any one of claims 1 to 4.

6. A motor control method applied to a controller of a motor control apparatus according to any one of claims 1 to 4, the method comprising:

acquiring position information of a first motor and position information of a second motor;

when the position information of the first motor and the position information of the second motor are determined to meet a first preset condition, controlling a first relay to be powered on;

when the first relay is electrified, controlling the output polarities of a first output port of a first full-bridge circuit and a second output port of the first full-bridge circuit so as to control the rotation direction of the first motor;

when the position information of the first motor and the position information of the second motor meet a second preset condition, controlling a first relay to lose power;

when the first relay is in power failure, the output polarities of the first output port of the first full-bridge circuit and the second output port of the first full-bridge circuit are controlled, so that the rotation direction of the second motor is controlled.

7. The method of claim 6, wherein obtaining the position information of the first motor and the position information of the second motor comprises:

acquiring rotation information of the first motor sent by a first encoder;

acquiring rotation information of the second motor sent by a second encoder;

determining position information of the first motor according to the rotation information of the first motor;

and determining the position information of the second motor according to the rotation information of the second motor.

8. The method of claim 6, wherein controlling the polarity of the output from the first output port of the first full-bridge circuit and the second output port of the first full-bridge circuit to control the direction of rotation of the first motor comprises:

controlling the voltage output by a first output port of the first full-bridge circuit to be a first polarity, and controlling the voltage output by a second output port of the first full-bridge circuit to be a second polarity so as to control the forward rotation of the first motor;

and controlling the voltage output by the first output port of the first full-bridge circuit to be in a second polarity, and controlling the voltage output by the second output port of the first full-bridge circuit to be in a first polarity so as to control the first motor to rotate reversely.

9. The method according to any one of claims 6 to 8, further comprising:

acquiring position information of a third motor and position information of a fourth motor;

when the position information of the third motor and the position information of the fourth motor are determined to meet a third preset condition, controlling a second relay to be electrified;

when the second relay is electrified, controlling the output polarities of a first output port of a second full-bridge circuit and a second output port of the second full-bridge circuit so as to control the rotation direction of the third motor;

when the position information of the third motor and the position information of the fourth motor meet a fourth preset condition, controlling a second relay to lose power;

when the second relay is in power failure, the output polarities of the first output port of the second full-bridge circuit and the second output port of the first full-bridge circuit are controlled, so that the rotation direction of the fourth motor is controlled.

10. A computer-readable storage medium, on which a computer program is stored, which program, when being executed by a processor, is adapted to carry out a method of controlling a motor according to any one of claims 6 to 9.

Technical Field

The embodiment of the invention relates to the technical field of motors, in particular to a motor control device, a motor control system, a motor control method and a storage medium.

Background

Electric motors play an important role in modern industrial production. By controlling the steering of the motor, different functions can be achieved with the motor.

At present, the steering control device of the motor may include a full-bridge circuit, and the steering of the motor is controlled according to the output of the full-bridge circuit.

However, in a scenario where two motors need to be controlled, two full-bridge circuits are provided in the control device to control the motors respectively, which results in high control cost.

Disclosure of Invention

The invention provides a motor control device, a motor control system, a motor control method and a storage medium, which aim to solve the technical problem of high motor control cost in the prior art.

In a first aspect, an embodiment of the present invention provides a motor control apparatus, including: the relay comprises a controller, a first full-bridge circuit and a first relay;

wherein a first control port of the controller is connected with a control port of the first full-bridge circuit; a first input port of the controller is connected with a position output port of the first motor, and a second input port of the controller is connected with a position output port of the second motor; a second control port of the controller is connected with a first control coil pin of the first relay, and a third control port of the controller is connected with a second control coil pin of the first relay;

a first output port of the first full-bridge circuit is connected with a first power electrode port of the first motor and a first power electrode port of the second motor respectively, and a second output port of the first full-bridge circuit is connected with a first output pin of the relay;

and a second output pin of the first relay is connected with a second power supply electrode port of the second motor, and a third output pin of the first relay is connected with a second power supply electrode port of the first motor.

In the apparatus as described above, the apparatus further comprises: a first encoder and a second encoder;

a first input port of the controller is connected with a position output port of the first motor through the first encoder, and the first encoder is used for acquiring rotation information of the first motor;

and a second input port of the controller is connected with a position output port of the second motor through the second encoder, and the second encoder is used for acquiring the rotation information of the second motor.

In the implementation manner, the first encoder is arranged to acquire the position information of the first motor and the second encoder is arranged to acquire the position information of the second motor, so that the motor steering control device can be suitable for steering control of a motor without a built-in encoder, and the application scene is wider.

In the apparatus as described above, the apparatus further comprises: a second full bridge circuit and a second relay;

wherein a fourth control port of the controller is connected with the control port of the second full-bridge circuit; a third input port of the controller is connected with a position output port of a third motor, and a fourth input port of the controller is connected with a position output port of a fourth motor; a fifth control port of the controller is connected with a first control coil pin of the second relay, and a sixth control port of the controller is connected with a second control coil pin of the second relay;

a first output port of the second full-bridge circuit is connected with a first power electrode port of the third motor and a first power electrode port of the fourth motor respectively, and a second output port of the second full-bridge circuit is connected with a first output pin of the second relay;

and a second output pin of the second relay is connected with a second power supply electrode port of the fourth motor, and a third output pin of the second relay is connected with a second power supply electrode port of the third motor.

In the implementation manner, the steering of the four-way motor can be controlled by setting one full-bridge circuit and one relay, and compared with the current method that the four full-bridge circuits are required to be set to control the motor in the scene where the four motors are required to be controlled, the motor control device provided by the embodiment has lower cost.

In the apparatus as described above, the apparatus further comprises: a transformer;

and a power supply port of the controller is connected with an output port of the transformer, and an input port of the transformer is connected with a power supply of the motor control device.

In the implementation mode, the transformer is arranged, so that the purpose of supplying power to different parts by using the same power supply is achieved, and the cost of the motor control device is further reduced.

In a second aspect, an embodiment of the present invention provides a motor control system, including: a first motor, a second motor, and a motor control device as described in the first aspect.

The system as described above further includes: a third motor and a fourth motor.

In a third aspect, an embodiment of the present invention provides a motor control method, applied to a controller of the motor control apparatus according to the first aspect, including:

acquiring position information of a first motor and position information of a second motor;

when the position information of the first motor and the position information of the second motor are determined to meet a first preset condition, controlling a first relay to be powered on;

when the first relay is electrified, controlling the output polarities of a first output port of a first full-bridge circuit and a second output port of the first full-bridge circuit so as to control the rotation direction of the first motor;

when the position information of the first motor and the position information of the second motor meet a second preset condition, controlling a first relay to lose power;

when the first relay is in power failure, the output polarities of the first output port of the first full-bridge circuit and the second output port of the first full-bridge circuit are controlled, so that the rotation direction of the second motor is controlled.

In the method as shown above, the acquiring the position information of the first motor and the position information of the second motor includes:

acquiring rotation information of the first motor sent by a first encoder;

acquiring rotation information of the second motor sent by a second encoder;

determining position information of the first motor according to the rotation information of the first motor;

and determining the position information of the second motor according to the rotation information of the second motor.

In the method as described above, the controlling the output polarities of the first output port of the first full-bridge circuit and the second output port of the first full-bridge circuit to control the rotation direction of the first motor includes:

controlling the voltage output by a first output port of the first full-bridge circuit to be a first polarity, and controlling the voltage output by a second output port of the first full-bridge circuit to be a second polarity so as to control the forward rotation of the first motor;

and controlling the voltage output by the first output port of the first full-bridge circuit to be in a second polarity, and controlling the voltage output by the second output port of the first full-bridge circuit to be in a first polarity so as to control the first motor to rotate reversely.

In the method as shown above, the method further comprises: acquiring position information of a third motor and position information of a fourth motor;

when the position information of the third motor and the position information of the fourth motor are determined to meet a third preset condition, controlling a second relay to be electrified;

when the second relay is electrified, controlling the output polarities of a first output port of a second full-bridge circuit and a second output port of the second full-bridge circuit so as to control the rotation direction of the third motor;

when the position information of the third motor and the position information of the fourth motor meet a fourth preset condition, controlling a second relay to lose power;

when the second relay is in power failure, the output polarities of the first output port of the second full-bridge circuit and the second output port of the first full-bridge circuit are controlled, so that the rotation direction of the fourth motor is controlled.

In a fourth aspect, the present invention further provides a computer-readable storage medium, on which a computer program is stored, which when executed by a processor implements the motor control method provided in the third aspect.

The embodiment of the invention provides a motor control device, a system, a method and a storage medium, wherein the device comprises: the relay comprises a controller, a first full-bridge circuit and a first relay; the first control port of the controller is connected with the control port of the first full-bridge circuit; a first input port of the controller is connected with a position output port of the first motor, and a second input port of the controller is connected with a position output port of the second motor; a second control port of the controller is connected with a first control coil pin of the first relay, and a third control port of the controller is connected with a second control coil pin of the first relay; a first output port of the first full-bridge circuit is connected with a first power electrode port of the first motor and a first power electrode port of the second motor respectively, and a second output port of the first full-bridge circuit is connected with a first output pin of the relay; and a second output pin of the first relay is connected with a second power supply electrode port of the second motor, and a third output pin of the first relay is connected with a second power supply electrode port of the first motor. The motor control device that this embodiment provided can realize controlling turning to of two way motors through full-bridge circuit and relay all the way, compares in setting up two way full-bridge circuits in the scene that needs control two way motors at present and carries out the mode controlled to the motor respectively, and the motor control device that this embodiment provided's cost is lower.

Drawings

Fig. 1 is a schematic structural diagram of a motor control device according to an embodiment of the present invention;

fig. 2A is a schematic diagram of a connection relationship between a first full-bridge circuit and a first motor when a first relay is powered;

fig. 2B is a schematic diagram of a connection relationship between the first full-bridge circuit and the second motor when the first relay is de-energized;

fig. 3 is a schematic structural diagram of a motor control device according to another embodiment of the present invention;

fig. 4 is a schematic structural diagram of a motor control device according to another embodiment of the present invention;

fig. 5 is a schematic structural diagram of a motor control device according to still another embodiment of the present invention;

fig. 6 is a schematic structural diagram of a motor control system according to an embodiment of the present invention;

fig. 7 is a schematic structural diagram of a motor control system according to another embodiment of the present invention;

fig. 8 is a schematic flowchart of a motor control method according to an embodiment of the present invention;

fig. 9 is a schematic flow chart of a motor control method according to another embodiment of the present invention;

fig. 10 is a schematic structural diagram of a controller according to an embodiment of the present invention;

fig. 11 is a schematic structural diagram of a computer-readable storage medium according to an embodiment of the present invention.

Detailed Description

The present invention will be described in further detail with reference to the accompanying drawings and examples. It is to be understood that the specific embodiments described herein are merely illustrative of the invention and are not limiting of the invention. It should be further noted that, for the convenience of description, only some of the structures related to the present invention are shown in the drawings, not all of the structures.

Fig. 1 is a schematic structural diagram of a motor control device according to an embodiment of the present invention. As shown in fig. 1, the motor control device provided in this embodiment includes: a controller 11, a first full bridge circuit 12 and a first relay 13.

Wherein, a first control port of the controller 11 is connected with a control port of the first full-bridge circuit 12. A first input port of the controller 11 is connected to a position output port of the first electric machine 14. A second input port of the controller 11 is connected to a position output port of the second electric machine 15. A second control port of the controller 11 is connected to a first control coil pin of the first relay 13, and a third control port of the controller 11 is connected to a second control coil pin of the first relay 13.

A first output port of the first full-bridge circuit 12 is connected to a first power supply electrode port of the first motor 14 and a first power supply electrode port of the second motor 15, respectively. A second output port of the first full-bridge circuit 12 is connected to a first output pin of the first relay 13.

A second output pin of the first relay 13 is connected to a second power supply electrode port of the second motor 15. A third output pin of the first relay 13 is connected to a second power supply electrode port of the first motor 14.

Specifically, the first motor 14 and the second motor 15 in this embodiment may be dc motors. The first full bridge circuit 12 in this embodiment may be a circuit in which 4 diodes are connected in a bridge configuration. Under the control of the controller 11, the output polarities of the first output port and the second output port of the first full-bridge circuit 12 can be switched. In one scenario, the first output port of the first full-bridge circuit 12 may be a positive electrode, and the second output port of the first full-bridge circuit 12 may be a negative electrode. In another scenario, the first output port of the first full-bridge circuit 12 may be a negative electrode, and the second output port of the first full-bridge circuit 12 may be a positive electrode.

In addition, in this embodiment, the polarities of the first output port and the second output port of the first full-bridge circuit 12 refer to the polarities of the voltages output by the first full-bridge circuit 12.

In this embodiment, the first power electrode ports of the first motor 14 and the second motor 15 may be positive ports of the power terminals of the first motor 14 and the second motor 15, and the second power electrode ports of the first motor 14 and the second motor 15 may be negative ports of the power terminals of the first motor 14 and the second motor 15. Alternatively, the first power electrode ports of the first motor 14 and the second motor 15 may be negative terminals of the power terminals of the first motor 14 and the second motor 15, and the second power electrode ports of the first motor 14 and the second motor 15 may be positive terminals of the power terminals of the first motor 14 and the second motor 15.

The controller 11 in this embodiment can control the power on and power off of the first relay 13 by supplying power to the first control coil pin and the second control coil pin of the first relay 13 through the second control port and the third control port. When the first control coil pin and the second control coil pin of the first relay 13 are powered on, that is, the first relay 13 is powered on, the first output pin and the third output pin of the first relay 13 are connected, and the first output pin and the second output pin of the first relay 13 are disconnected. When the first control coil pin and the second control coil pin of the first relay 13 lose power, that is, the first relay 13 loses power, the first output pin and the second output pin of the first relay 13 are connected, and the first output pin and the third output pin of the first relay 13 are disconnected.

Fig. 2A is a schematic diagram of a connection relationship between the first full-bridge circuit and the first motor when the first relay is powered on. As shown in fig. 2A, when the first relay 13 is powered on, the first output pin of the first relay 13 is connected to the third output pin, the first output pin of the first relay 13 is disconnected from the second output pin, the second power electrode port of the first motor 14 is connected to the second output port of the first full-bridge circuit 12, and the first power electrode port of the first motor 14 is connected to the first output port of the first full-bridge circuit 12, that is, the first motor 14 may form a complete power supply loop. The second power supply electrode port of the second motor 15 is disconnected from the first full bridge circuit, and a complete power supply loop cannot be formed. Therefore, when the first relay 13 is powered, the controller 11 can control the rotation direction of the first motor 14 by controlling the output polarity of the first full-bridge circuit 12.

The controller 11 can control the voltage output from the first output port of the first full-bridge circuit 12 to have a first polarity, and the voltage output from the second output port of the first full-bridge circuit 12 to have a second polarity, so as to control the first motor 14 to rotate in the forward direction. The controller 11 controls the voltage output from the first output port of the first full-bridge circuit 12 to have the second polarity, and controls the voltage output from the second output port of the first full-bridge circuit 12 to have the first polarity, so as to control the first motor 14 to rotate in the reverse direction.

In one scenario, when the first output port of the first full-bridge circuit 12 is a positive electrode and the second output port is a negative electrode, the first motor 14 rotates forward. Then, when the first output port of the first full-bridge circuit 12 is a negative electrode and the second output port is a positive electrode, the first motor 14 rotates reversely.

In another scenario, when the first output port of the first full-bridge circuit 12 is a positive electrode and the second output port is a negative electrode, the first motor 14 rotates reversely. Then, when the first output port of the first full-bridge circuit 12 is a negative electrode and the second output port is a positive electrode, the first motor 14 rotates forward.

In summary, in the above two scenarios, the controller 11 can control the output polarities of the first output port of the first full-bridge circuit 12 and the second output port of the first full-bridge circuit 12 to control the rotation direction of the first motor 14.

Fig. 2B is a schematic diagram of a connection relationship between the first full-bridge circuit and the second motor when the first relay is de-energized. As shown in fig. 2B, when the first relay 13 loses power, the first output pin of the first relay 13 is connected to the second output pin, the first output pin of the first relay 13 is disconnected from the third output pin, the second power electrode port of the second motor 15 is connected to the second output port of the first full-bridge circuit 12, and the first power electrode port of the second motor 15 is connected to the first output port of the first full-bridge circuit 12, that is, the second motor 15 may form a complete power supply loop. The second power supply electrode port of the first motor 14 is disconnected from the first full bridge circuit and cannot form a complete power supply loop. Therefore, when the first relay 13 is de-energized, the controller 11 may control the rotation direction of the second motor 15 by controlling the output polarity of the first full-bridge circuit 12.

In one scenario, when the first output port of the first full-bridge circuit 12 is a positive electrode and the second output port is a negative electrode, the second motor 15 rotates forward. Then, when the first output port of the first full-bridge circuit 12 is a negative electrode and the second output port is a positive electrode, the second motor 15 rotates reversely.

In another scenario, when the first output port of the first full-bridge circuit 12 is a positive electrode and the second output port is a negative electrode, the second motor 15 rotates reversely. Then, when the first output port of the first full-bridge circuit 12 is a negative electrode and the second output port is a positive electrode, the second motor 15 rotates forward.

In summary, in the above two scenarios, the controller 11 can control the output polarities of the first output port of the first full-bridge circuit 12 and the second output port of the first full-bridge circuit 12 to control the rotation direction of the second motor 15.

In addition, in the present embodiment, the forward rotation of the first motor 14 and the second motor 15 refers to a rotation direction same as the preset direction, and the reverse rotation of the first motor 14 and the second motor 15 refers to a rotation direction opposite to the preset direction. Illustratively, the preset direction here may be a clockwise direction.

Since the first input port of the controller 11 is connected to the position output port of the first motor 14 and the second input port of the controller 11 is connected to the position output port of the second motor 15, the controller 11 can acquire the position information of the first motor 14 and the position information of the second motor 15. Alternatively, the position information of the first motor 14 and the position information of the second motor 15 in the present embodiment may be determined according to the number of pulses passing through the first motor 14 and the second motor 15.

The following describes the operation of the motor control device provided in the present embodiment. The controller 11 acquires position information of the first motor 14 through the first input port and position information of the second motor 15 through the second input port.

When the controller 11 determines that the position information of the first motor 14 and the position information of the second motor 15 satisfy the first preset condition, the first relay 13 is controlled to be powered on.

When the first relay 13 is powered, the first motor 14 may form a complete power supply loop, and the second motor 15 may not form a complete power supply loop. Therefore, the controller 11 can control the output polarities of the first output port of the first full-bridge circuit 12 and the second output port of the first full-bridge circuit 12 to control the rotation direction of the first motor 14.

When the controller 11 determines that the position information of the first motor 14 and the position information of the second motor 15 satisfy the second preset condition, the first relay 13 is controlled to be de-energized.

When the first relay 13 is de-energized, the second motor 15 can form a complete power supply loop, and the first motor 14 cannot form a complete power supply loop. Therefore, the controller 11 can control the output polarities of the first output port of the first full-bridge circuit 12 and the second output port of the first full-bridge circuit 12 to control the rotation direction of the second motor 15.

Therefore, the motor control device provided by this embodiment can realize the steering of the two motors by one way of the full-bridge circuit and the relay, and compared with the current mode that the two full-bridge circuits are required to be arranged to control the motors in the scene that the two motors need to be controlled, the motor control device provided by this embodiment has lower cost.

The following describes the operation of the motor control device according to the present embodiment with a specific example. In an automatic dumping scenario, the first motor 14 is the motor that controls the lifting and falling of the bin: when the first motor 14 rotates forwards, the garbage can is controlled to lift; when the first motor 14 rotates reversely, the garbage can is controlled to fall back. The second motor 15 is a motor for controlling the opening and closing of the dustbin cover: when the second motor 15 rotates forwards, the garbage bin cover is controlled to be opened and garbage is dumped; when the second motor 15 rotates reversely, the dustbin cover is controlled to be closed.

When the controller 11 determines that the position information of the first motor and the position information of the second motor satisfy the first preset condition, the first relay 13 is controlled to be energized, so as to control the rotation direction of the first motor 14 by controlling the output polarities of the first output port of the first full-bridge circuit 12 and the second output port of the first full-bridge circuit 12. The first preset condition here includes: the position information of the first motor 14 meets the requirement that the dustbin is in the falling position and the position information of the second motor 15 meets the requirement that the dustbin cover is closed, or the position information of the first motor 14 meets the requirement that the dustbin is in the lifting position and the position information of the second motor 15 meets the requirement that the dustbin cover is closed after being opened. When the position information of the first motor is determined to meet the requirement that the dustbin is located at the falling position and the position information of the second motor 15 meets the requirement that the dustbin cover is closed, the first relay 13 is controlled to be powered on, the output polarities of the first output port of the first full-bridge circuit 12 and the second output port of the first full-bridge circuit 12 are controlled, and the first motor 14 is enabled to rotate forwards to lift the dustbin. When the position information of the first motor is determined to meet the requirement that the dustbin is in the lifting position and the position information of the second motor 15 meets the requirement that the dustbin cover is closed after being opened, the first relay 13 is controlled to be powered on, the output polarities of the first output port of the first full-bridge circuit 12 and the second output port of the first full-bridge circuit 12 are controlled, and the first motor 14 is controlled to be reversely rotated so as to control the dustbin to fall back.

When the controller 11 determines that the position information of the first motor and the position information of the second motor satisfy the second preset condition, the first relay 13 is controlled to be de-energized to control the rotation direction of the second motor 15 by controlling the output polarities of the first output port of the first full-bridge circuit 12 and the second output port of the first full-bridge circuit 12. The second preset condition here includes: the position information of the first motor 14 is satisfied that the dustbin is in the lifting position and the position information of the second motor 15 is satisfied that the dustbin cover is closed, or the position information of the first motor 14 is satisfied that the dustbin is in the lifting position and the position information of the second motor 15 is satisfied that the dustbin cover is opened. When the position information of the first motor 14 is determined to satisfy that the dustbin is at the lifting position and the position information of the second motor 15 is determined to satisfy that the dustbin cover is closed, the output polarities of the first output port of the first full-bridge circuit 12 and the second output port of the first full-bridge circuit 12 are controlled, the second motor 15 rotates forwards, and therefore the dustbin cover is controlled to be opened and rubbish is dumped. When the position information of the first motor 14 is determined to be satisfied to enable the dustbin to be in the lifting position and the position information of the second motor 15 is determined to be satisfied to enable the dustbin cover to be opened, the output polarities of the first output port of the first full-bridge circuit 12 and the second output port of the first full-bridge circuit 12 are controlled to enable the second motor 15 to be reversely rotated to control the dustbin cover to be closed.

The present embodiment provides a motor control device including: the relay comprises a controller, a first full-bridge circuit and a first relay; the first control port of the controller is connected with the control port of the first full-bridge circuit; a first input port of the controller is connected with a position output port of the first motor, and a second input port of the controller is connected with a position output port of the second motor; a second control port of the controller is connected with a first control coil pin of the first relay, and a third control port of the controller is connected with a second control coil pin of the first relay; a first output port of the first full-bridge circuit is connected with a first power electrode port of the first motor and a first power electrode port of the second motor respectively, and a second output port of the first full-bridge circuit is connected with a first output pin of the relay; and a second output pin of the first relay is connected with a second power supply electrode port of the second motor, and a third output pin of the first relay is connected with a second power supply electrode port of the first motor. The motor control device that this embodiment provided can realize controlling turning to of two way motors through full-bridge circuit and relay all the way, compares in setting up two way full-bridge circuits in the scene that needs control two way motors at present and carries out the mode controlled to the motor respectively, and the motor control device that this embodiment provided's cost is lower.

Fig. 3 is a schematic structural diagram of a motor control device according to another embodiment of the present invention. In this embodiment, on the basis of the embodiment shown in fig. 1 and various alternative implementations, a detailed description is made on other components included in the motor control device. As shown in fig. 3, the motor control device provided in this embodiment further includes: a first encoder 16 and a second encoder 17.

Wherein a first input port of the controller 11 is connected to a position output port of the first motor 14 via a first encoder 16. The first encoder 16 is used to acquire rotation information of the first motor 14.

A second input port of the controller 11 is connected to a position output port of the second motor 15 via a second encoder 17. The second encoder 17 is used to acquire rotation information of the second motor 15.

Alternatively, the rotation information of the first motor 14 in the present embodiment includes the number of pulses passing through the first motor 14. The rotation information of the second motor 15 includes the number of pulses passing through the second motor 15.

The first encoder 16 may be provided on an output shaft of the first motor 14. A second encoder 17 may be provided on the output shaft of the second motor 15. The first input port of the controller 11 may also be implemented to supply the first encoder 16. A second input port of the controller 11 may also be implemented to supply power to the second encoder 17.

In the apparatus provided in this embodiment, the process of the controller 11 acquiring the position information of the first motor 14 may be: acquiring rotation information of the first motor 14 sent by the first encoder 16; position information of the first motor 14 is determined based on the rotation information of the first motor 14. The process of the controller 11 acquiring the position information of the second motor 15 may be: acquiring rotation information of the second motor 15 sent by the second encoder 17; position information of the second motor 15 is determined based on the rotation information of the second motor 15.

In a specific implementation, unit position information of the motor when passing a pulse number in the motor may be stored in the controller 11. The controller 11 may obtain the position information of the motor by multiplying the unit position information of the motor by the number of pulses of the motor in the rotation information.

The motor control device provided by the embodiment can be suitable for steering control of a motor without a built-in encoder by setting the first encoder to acquire the position information of the first motor and setting the second encoder to acquire the position information of the second motor, and the application scene is wider.

Fig. 4 is a schematic structural diagram of a motor control device according to another embodiment of the present invention. In this embodiment, on the basis of the embodiment shown in fig. 1 and fig. 3 and various alternative implementations, a detailed description is made on other components included in the motor control device. As shown in fig. 4, the motor control device provided in this embodiment further includes: a second full bridge circuit 41 and a second relay 42.

Wherein the fourth control port of the controller 11 is connected to the control port of the second full-bridge circuit 41. A third input port of the controller 11 is connected to a position output port of the third motor 43. A fourth input port of the controller 11 is connected to a position output port of the fourth motor 44. A fifth control port of the controller 11 is connected to a first control coil pin of the second relay 42, and a sixth control port of the controller 11 is connected to a second control coil pin of the second relay 42.

A first output port of the second full-bridge circuit 41 is connected to a first power supply electrode port of the third motor 43 and a first power supply electrode port of the fourth motor 44, respectively. A second output port of the second full-bridge circuit 41 is connected to a first output pin of the second relay 42.

A second output pin of the second relay 42 is connected to a second power supply electrode port of the fourth motor 44. A third output pin of the second relay 42 is connected to a second power supply electrode port of the third motor 43.

Specifically, the third motor 43 and the fourth motor 44 in the present embodiment may be dc motors. The process of the controller 11 controlling the second relay 42 is similar to the process of the controller 11 controlling the first relay 13, and is not described herein again. The operation of the second relay 42 is similar to that of the first relay 13, and will not be described herein.

The controller 11 in this embodiment may control the power on and power off of the second relay 42 by supplying power to the first control coil pin and the second control coil pin of the second relay 42 through the fifth control port and the sixth control port. When the first control coil pin and the second control coil pin of the second relay 42 are powered, that is, the second relay 42 is powered, the first output pin and the third output pin of the second relay 42 are connected, and the first output pin and the second output pin of the second relay 42 are disconnected. When the first control coil pin and the second control coil pin of the second relay 42 lose power, that is, the second relay 42 loses power, the first output pin and the second output pin of the second relay 42 are connected, and the first output pin and the third output pin of the second relay 42 are disconnected.

When the second relay 42 is energized, the controller 11 may control the rotation direction of the third motor 43 by controlling the output polarity of the second full-bridge circuit 41.

When the second relay 42 is de-energized, the controller 11 may control the rotation direction of the fourth motor 44 by controlling the output polarity of the second full-bridge circuit 41.

The controller 11 acquires position information of the third motor 43 through the third input port and position information of the fourth motor 44 through the fourth input port.

When the controller 11 determines that the position information of the third motor 43 and the position information of the fourth motor 44 satisfy the third preset condition, the second relay 42 is controlled to be powered on.

When the second relay 42 is powered, the third motor 43 may form a complete power supply loop, and the fourth motor 44 may not form a complete power supply loop. Therefore, the controller 11 can control the output polarities of the first output port of the second full-bridge circuit 41 and the second output port of the second full-bridge circuit 41 to control the rotation direction of the third motor 43.

When the controller 11 determines that the position information of the third motor 43 and the position information of the fourth motor 44 satisfy the fourth preset condition, the second relay 42 is controlled to be de-energized.

When the second relay 42 is de-energized, the fourth motor 44 may form a complete power supply loop, and the third motor 43 may not form a complete power supply loop. Therefore, the controller 11 can control the output polarities of the first output port of the second full-bridge circuit 41 and the second output port of the second full-bridge circuit 41 to control the rotation direction of the fourth motor 44.

Therefore, the motor control device provided in this embodiment can control the steering of the four-way motor by further setting one way of the full-bridge circuit and the relay, and compared with the current mode that the four-way full-bridge circuit is required to be set to control the motor in the scene where the four-way motor needs to be controlled, the motor control device provided in this embodiment has a lower cost.

It can be understood that, in this implementation, the steering of the 2 n-path motor can be controlled by arranging n full-bridge circuits and relays, and the cost is low. Wherein n is an integer greater than or equal to 1.

Fig. 5 is a schematic structural diagram of a motor control device according to still another embodiment of the present invention. In this embodiment, on the basis of the embodiments shown in fig. 1, fig. 3 and fig. 4 and various alternative implementations, other components included in the motor control device are described in detail. As shown in fig. 5, the motor control device provided in this embodiment further includes: a transformer 52.

The power supply port of the controller 11 is connected to the output port of the transformer 52. The input port of the transformer 52 is connected to the power supply 51 of the motor control device. Alternatively, the power supply 51 in this embodiment may be a 24 volt power supply.

The transformer 52 may reduce the voltage of the power supply 51 and output the reduced voltage to the power supply terminal of the controller 11. Illustratively, transformer 52 may enable stepping down a 24 volt power supply to 12 volts to power controller 11.

Further, the power supply 51 may also be connected to the power supply terminals of the first full-bridge circuit 12.

The motor control device provided by the embodiment realizes the purpose of supplying power to different parts by using the same power supply through the transformer, and further reduces the cost of the motor control device.

Fig. 6 is a schematic structural diagram of a motor control system according to an embodiment of the present invention. As shown in fig. 6, the motor control system provided in the present embodiment includes: a first motor 62, a second motor 63 and a motor control device 61 provided in any of the above embodiments.

The working process of the motor control system provided by the embodiment of the invention is similar to that of the motor control device, and has corresponding beneficial effects, and the details are not repeated here.

Fig. 7 is a schematic structural diagram of a motor control system according to another embodiment of the present invention. This embodiment is based on the embodiment shown in fig. 6, and a description is given of other components included in the motor control system. As shown in fig. 7, the motor control system provided in this embodiment further includes: a third motor 71 and a fourth motor 72.

The working process of the motor control system provided by the embodiment of the invention is similar to that of the motor control device, and has corresponding beneficial effects, and the details are not repeated here.

Fig. 8 is a flowchart illustrating a motor control method according to an embodiment of the present invention. The method is applied to the controller of the motor control device provided by any one of the above embodiments. As shown in fig. 8, the motor control method provided in this embodiment includes the following steps:

step 801: position information of the first motor and position information of the second motor are acquired.

Optionally, step 801 may include the steps of: acquiring rotation information of a first motor sent by a first encoder; acquiring rotation information of a second motor sent by a second encoder; determining position information of the first motor according to the rotation information of the first motor; and determining the position information of the second motor according to the rotation information of the second motor.

Step 802: and when the position information of the first motor and the position information of the second motor meet the first preset condition, controlling the first relay to be electrified.

Step 803: when the first relay is electrified, the output polarities of the first output port of the first full-bridge circuit and the second output port of the first full-bridge circuit are controlled, so that the rotation direction of the first motor is controlled.

Optionally, the controller controls the voltage output from the first output port of the first full-bridge circuit to have a first polarity, and controls the voltage output from the second output port of the first full-bridge circuit to have a second polarity, so as to control the forward rotation of the first motor. The controller controls the voltage output by the first output port of the first full-bridge circuit to be in the second polarity, and controls the voltage output by the second output port of the first full-bridge circuit to be in the first polarity, so as to control the first motor to rotate reversely.

Step 804: and when the position information of the first motor and the position information of the second motor meet a second preset condition, controlling the first relay to lose power.

Step 805: when the first relay is in power failure, the output polarities of the first output port of the first full-bridge circuit and the second output port of the first full-bridge circuit are controlled, so that the rotation direction of the second motor is controlled.

Optionally, the controller controls the voltage output from the first output port of the first full-bridge circuit to have a first polarity, and controls the voltage output from the second output port of the first full-bridge circuit to have a second polarity, so as to control the second motor to rotate in the forward direction. The controller controls the voltage output by the first output port of the first full-bridge circuit to be in the second polarity, and controls the voltage output by the second output port of the first full-bridge circuit to be in the first polarity, so as to control the second motor to rotate reversely.

The embodiment provides a motor control method, which can control the steering of two motors through one full-bridge circuit and one relay, and compared with a mode that two full-bridge circuits are arranged in a scene where two motors need to be controlled to respectively control the motors at present, the motor control method provided by the embodiment has lower cost.

Fig. 9 is a schematic flow chart of a motor control method according to another embodiment of the present invention. In this embodiment, based on the embodiment shown in fig. 8 and various alternative implementations, other steps included in the motor control method are described in detail. As shown in fig. 9, the motor control method provided in this embodiment further includes the following steps:

step 901: position information of the third motor and position information of the fourth motor are acquired.

Step 902: and when the position information of the third motor and the position information of the fourth motor meet a third preset condition, controlling the second relay to be electrified.

Step 903: when the second relay is electrified, the output polarities of the first output port of the second full-bridge circuit and the second output port of the second full-bridge circuit are controlled, so that the rotation direction of the third motor is controlled.

Step 904: and when the position information of the third motor and the position information of the fourth motor meet a fourth preset condition, controlling the second relay to lose power.

Step 905: when the second relay is in power failure, the output polarities of the first output port of the second full-bridge circuit and the second output port of the first full-bridge circuit are controlled, so that the rotation direction of the fourth motor is controlled.

The embodiment provides a motor control method, which can control the steering of a four-way motor through two full-bridge circuits and a relay, and compared with a mode that the four full-bridge circuits are arranged in a scene where the four motor needs to be controlled to respectively control the motor at present, the motor control method provided by the embodiment has lower cost.

Fig. 10 is a schematic structural diagram of a controller according to an embodiment of the present invention. As shown in fig. 10, the controller includes a processor 100 and a memory 101. The number of the processors 100 in the controller may be one or more, and one processor 100 is taken as an example in fig. 10; the processor 100 and the memory 101 of the controller may be connected by a bus or other means, and fig. 10 illustrates the connection by a bus as an example.

The memory 101, which is a computer-readable storage medium, may be used to store software programs, computer-executable programs, and modules, such as program instructions and modules corresponding to the motor control method in the embodiment of the present invention. The processor 100 executes various functional applications of the controller and data processing by running software programs, instructions, and modules stored in the memory 101, that is, implements the motor control method described above.

The memory 101 may mainly include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application program required for at least one function; the storage data area may store data created according to use of the controller, and the like. Further, the memory 101 may include high speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other non-volatile solid state storage device. In some embodiments, memory 101 may further include memory located remotely from processor 100, which may be connected to the controller via a network. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof.

Fig. 11 is a schematic structural diagram of a computer-readable storage medium according to an embodiment of the present invention. As shown in fig. 11, the present invention also provides a computer-readable storage medium 112 containing computer-executable instructions 111, the computer-executable instructions 111 when executed by a processor 113 for performing a motor control method comprising:

acquiring position information of a first motor and position information of a second motor;

when the position information of the first motor and the position information of the second motor are determined to meet a first preset condition, controlling a first relay to be powered on;

when the first relay is electrified, controlling the output polarities of a first output port of a first full-bridge circuit and a second output port of the first full-bridge circuit so as to control the rotation direction of the first motor;

when the position information of the first motor and the position information of the second motor meet a second preset condition, controlling a first relay to lose power;

when the first relay is in power failure, the output polarities of the first output port of the first full-bridge circuit and the second output port of the first full-bridge circuit are controlled, so that the rotation direction of the second motor is controlled.

Of course, the storage medium containing the computer-executable instructions provided by the embodiments of the present invention is not limited to the method operations described above, and may also perform related operations in the motor control method provided by any embodiment of the present invention.

From the above description of the embodiments, it is obvious for those skilled in the art that the present invention can be implemented by software and necessary general hardware, and certainly, can also be implemented by hardware, but the former is a better embodiment in many cases. Based on such understanding, the technical solutions of the present invention may be embodied in the form of a software product, which may be stored in a computer-readable storage medium, such as a floppy disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a FLASH Memory (FLASH), a hard disk or an optical disk of a computer, and includes instructions for enabling a controller to execute the motor control method according to the embodiments of the present invention.

It is to be noted that the foregoing is only illustrative of the preferred embodiments of the present invention and the technical principles employed. It will be understood by those skilled in the art that the present invention is not limited to the particular embodiments described herein, but is capable of various obvious changes, rearrangements and substitutions as will now become apparent to those skilled in the art without departing from the scope of the invention. Therefore, although the present invention has been described in greater detail by the above embodiments, the present invention is not limited to the above embodiments, and may include other equivalent embodiments without departing from the spirit of the present invention, and the scope of the present invention is determined by the scope of the appended claims.

22页详细技术资料下载
上一篇:一种医用注射器针头装配设备
下一篇:一种屠宰线控制柜的电机同步控制系统及方法

网友询问留言

已有0条留言

还没有人留言评论。精彩留言会获得点赞!

精彩留言,会给你点赞!