Control method of brushless direct current motor control system

文档序号:1381186 发布日期:2020-08-14 浏览:8次 中文

阅读说明:本技术 一种无刷直流电机控制系统的控制方法 (Control method of brushless direct current motor control system ) 是由 罗淦恩 高宁 潘叶江 于 2020-04-01 设计创作,主要内容包括:本发明公开了一种无刷直流电机控制系统的控制方法,所述无刷直流电机控制系统包括Cortex-M0处理器、PWM控制模块、反电动势检测模块、电机、系统电压电流检测模块、LCD显示模块和按键模块,其中所述Cortex-M0处理器分别与所述PWM控制模块、所述反电动势检测模块、所述系统电压电流检测模块、所述LCD显示模块和所述按键模块电性连接,所述PWM控制模块和反电动势检测模块分别与所述电机电性连接,所述控制方法包括如下步骤:进行底层驱动初始化;执行主程序执行流程;执行DMA中断服务流程;执行第一定时器中断服务流程;执行第二定时器中断服务流程。其成本较低,利于提高产品的市场竞争力。(The invention discloses a control method of a brushless direct current motor control system, the brushless direct current motor control system comprises a Cortex-M0 processor, a PWM control module, a counter electromotive force detection module, a motor, a system voltage and current detection module, an LCD display module and a key module, wherein the Cortex-M0 processor is respectively and electrically connected with the PWM control module, the counter electromotive force detection module, the system voltage and current detection module, the LCD display module and the key module, the PWM control module and the counter electromotive force detection module are respectively and electrically connected with the motor, and the control method comprises the following steps: initializing a bottom layer drive; executing the main program execution flow; executing DMA interrupt service flow; executing a first timer interrupt service flow; and executing the second timer interrupt service flow. The cost is low, and the market competitiveness of the product is favorably improved.)

1. A control method of a brushless direct current motor control system is characterized in that the brushless direct current motor control system comprises a Cortex-M0 processor, a PWM control module, a counter electromotive force detection module, a motor, a system voltage and current detection module, an LCD display module and a key module, wherein the Cortex-M0 processor is respectively electrically connected with the PWM control module, the counter electromotive force detection module, the system voltage and current detection module, the LCD display module and the key module, the PWM control module and the counter electromotive force detection module are respectively electrically connected with the motor, and the control method comprises the following steps:

initializing a bottom layer drive;

executing the main program execution flow;

executing DMA interrupt service flow;

executing a first timer interrupt service flow;

and executing the second timer interrupt service flow.

2. The method of claim 1, wherein the step of initializing the bottom layer driver comprises:

an LCD GPIO configuration, a PWM timebase configuration, an ADC and DMA configuration, a first timer configuration, a second timer configuration, and a key GPIO configuration.

3. The method of claim 1, wherein the step of executing the main program execution flow comprises:

initializing a bottom layer drive;

initializing LCD bottom layer drive;

performing LCD display initialization;

initializing system variables;

enabling a PWM control module;

and entering a motor running stage.

4. The method of claim 3, wherein the step of entering the motor operation phase comprises:

the voltage, current, speed display and response key detection procedures are cycled during operation of the motor.

5. The method of claim 1, wherein the step of performing the DMA interrupt service routine comprises:

acquiring a collected motor back electromotive force value;

acquiring a collected power supply voltage value;

acquiring a collected motor current value;

the DMA generation interrupt informs the Cortex-M0 processor to record the motor back emf value, the supply voltage value, and the motor current value and perform back emf zero crossing detection to deduce the next commutation time.

6. The method of claim 1, wherein the step of performing the first timer interrupt service routine comprises:

judging whether the motor is in a running state;

if the motor is in the running state, judging whether the motor needs to be strongly dragged to start or not;

if the motor needs to be strongly dragged to start, a strong dragging frequency conversion program is executed;

if the motor does not need to be strongly dragged to start, judging whether the motor is in a closed-loop control stage;

and if the motor is in the closed-loop control stage, executing a closed-loop control program, and if the motor is not in the closed-loop control stage, quitting the interruption and waiting for the next first timer interruption service flow to continue to carry out motor strong dragging.

7. The method of claim 6, wherein the step of performing the second timer interrupt service routine comprises:

judging whether the motor is in a running state;

if the motor is not in the running state, the interruption service process is quitted, and if the motor is in the running state, the motor phase change program is executed to maintain the stable running of the motor.

Technical Field

The invention relates to the technical field of motors, in particular to a control method of a brushless direct current motor control system.

Background

Disclosure of Invention

The present invention is directed to solve at least one of the problems of the related art to a certain extent, and therefore, the present invention is to provide a control method for a brushless dc motor control system, which is low in cost and beneficial to improving the market competitiveness of the product.

The above purpose is realized by the following technical scheme:

a control method of a brushless direct current motor control system, the brushless direct current motor control system comprises a Cortex-M0 processor, a PWM control module, a counter electromotive force detection module, a motor, a system voltage and current detection module, an LCD display module and a key module, wherein the Cortex-M0 processor is respectively electrically connected with the PWM control module, the counter electromotive force detection module, the system voltage and current detection module, the LCD display module and the key module, the PWM control module and the counter electromotive force detection module are respectively electrically connected with the motor, and the control method comprises the following steps:

initializing a bottom layer drive;

executing the main program execution flow;

executing DMA interrupt service flow;

executing a first timer interrupt service flow;

and executing the second timer interrupt service flow.

In some embodiments, the step of initializing the underlying driver comprises:

an LCD GPIO configuration, a PWM timebase configuration, an ADC and DMA configuration, a first timer configuration, a second timer configuration, and a key GPIO configuration.

In some embodiments, the step of executing the main program execution flow includes:

initializing a bottom layer drive;

initializing LCD bottom layer drive;

performing LCD display initialization;

initializing system variables;

enabling a PWM control module;

and entering a motor running stage.

In some embodiments, the step after entering the motor run phase comprises:

the voltage, current, speed display and response key detection procedures are cycled during operation of the motor.

In some embodiments, the step of performing the DMA interrupt service flow comprises:

acquiring a collected motor back electromotive force value;

acquiring a collected power supply voltage value;

acquiring a collected motor current value;

the DMA generation interrupt informs the Cortex-M0 processor to record the motor back emf value, the supply voltage value, and the motor current value and perform back emf zero crossing detection to deduce the next commutation time.

In some embodiments, the step of executing the first timer interrupt service flow comprises:

judging whether the motor is in a running state;

if the motor is in the running state, judging whether the motor needs to be strongly dragged to start or not;

if the motor needs to be strongly dragged to start, a strong dragging frequency conversion program is executed;

if the motor does not need to be strongly dragged to start, judging whether the motor is in a closed-loop control stage;

and if the motor is in the closed-loop control stage, executing a closed-loop control program, and if the motor is not in the closed-loop control stage, quitting the interruption and waiting for the next first timer interruption service flow to continue to carry out motor strong dragging.

In some embodiments, the step of executing the second timer interrupt service flow comprises:

judging whether the motor is in a running state;

if the motor is not in the running state, the interruption service process is quitted, and if the motor is in the running state, the motor phase change program is executed to maintain the stable running of the motor.

Compared with the prior art, the invention at least comprises the following beneficial effects:

1. the control method of the brushless direct current motor control system provided by the invention constructs the control system by taking the low-end Cortex-M0 processor as a core, thereby reducing the cost of the brushless direct current motor control system and achieving the purpose of improving the market competitiveness of products;

2. by reasonably utilizing the chip internal resources of the Cortex-M0 processor, the reliability of the brushless direct current motor control system is improved, and the debugging is easy to realize.

Drawings

FIG. 1 is a block schematic diagram of a control system in an embodiment of the present invention;

FIG. 2 is a flow chart illustrating initialization of the underlying driver according to an embodiment of the present invention;

FIG. 3 is a flowchart illustrating the execution flow of a main program according to an embodiment of the present invention;

FIG. 4 is a flow chart illustrating the DMA interrupt service flow in the embodiment of the present invention;

FIG. 5 is a flow chart illustrating a first timer interrupt service flow according to an embodiment of the present invention;

FIG. 6 is a flowchart illustrating a second timer interrupt service flow according to an embodiment of the present invention.

Detailed Description

The present invention is illustrated by the following examples, but the present invention is not limited to these examples. Modifications to the embodiments of the invention or equivalent substitutions of parts of technical features without departing from the spirit of the invention are intended to be covered by the scope of the claims of the invention.

14页详细技术资料下载
上一篇:一种医用注射器针头装配设备
下一篇:一种消除舵机电气噪声的有刷直流电机调控电路

网友询问留言

已有0条留言

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

精彩留言,会给你点赞!