System and method for realizing synchronous control of LED indicator lamp and stepping motor

文档序号:1569547 发布日期:2020-01-24 浏览:28次 中文

阅读说明:本技术 实现led指示灯与步进电机同步控制的系统及其方法 (System and method for realizing synchronous control of LED indicator lamp and stepping motor ) 是由 朱鸣岐 刘金花 侯斐 杜川川 李洋 许峰 于 2019-10-23 设计创作,主要内容包括:本发明涉及一种实现LED指示灯与步进电机同步控制的系统,包括LED指示灯上升控制单元和LED指示灯下降控制单元,所述的仪表自检子系统循环调用所述的LED指示灯上升控制单元和LED指示灯下降控制单元;定时中断服务子系统,包括步进电机上升控制单元和步进电机下降控制单元,所述的定时中断服务子系统调用所述的步进电机上升控制单元和步进电机下降控制单元。本发明还涉及一种实现LED指示灯与步进电机同步控制的方法。采用了本发明的实现LED指示灯与步进电机同步控制的系统及其方法,可以根据步进电机的微步值判断当前步进电机的指示刻度,并完全同步点亮或熄灭;改进了仪表自检过程中只有步进电机自检的功能,满足当前行业趋势和绝大部分的客户需求。(The invention relates to a system for realizing synchronous control of an LED indicator lamp and a stepping motor, which comprises an LED indicator lamp ascending control unit and an LED indicator lamp descending control unit, wherein an instrument self-checking subsystem circularly calls the LED indicator lamp ascending control unit and the LED indicator lamp descending control unit; the timed interrupt service subsystem comprises a stepping motor ascending control unit and a stepping motor descending control unit, and calls the stepping motor ascending control unit and the stepping motor descending control unit. The invention also relates to a method for realizing synchronous control of the LED indicator lamp and the stepping motor. By adopting the system and the method for realizing the synchronous control of the LED indicator lamp and the stepping motor, the indication scale of the current stepping motor can be judged according to the micro-step value of the stepping motor, and the current stepping motor is completely and synchronously lightened or extinguished; the function that only stepping motor self-checking in the instrument self-checking process is improved, and the current industry trend and most of customer demands are met.)

1. A system for realizing synchronous control of an LED indicator lamp and a stepping motor is characterized by comprising:

the instrument self-checking subsystem comprises an LED indicating lamp control module, the LED indicating lamp control module comprises an LED indicating lamp ascending control unit and an LED indicating lamp descending control unit, and the instrument self-checking subsystem calls the LED indicating lamp ascending control unit and the LED indicating lamp descending control unit in a circulating mode and is used for reading the micro-step value of the current stepping motor and further controlling the LED indicating lamp with the corresponding scale;

the timed interrupt service subsystem is connected with the instrument self-checking subsystem and is used for controlling the stepping motor to sequentially run in an accelerating mode, a constant speed mode and a decelerating mode; the timed interrupt service subsystem comprises a stepping motor control module, the stepping motor control module comprises a stepping motor ascending control unit and a stepping motor descending control unit, and the timed interrupt service subsystem calls the stepping motor ascending control unit and the stepping motor descending control unit.

2. The system for implementing synchronous control of the LED indicator lamp and the stepping motor as claimed in claim 1, wherein the timed interrupt service subsystem is executed for a time interval of 1 ms.

3. The system for realizing synchronous control of the LED indicator lamps and the stepping motor according to claim 1, wherein the meter self-test subsystem further comprises a serial-to-parallel shift lamp control chip connected with the LED indicator lamp control module and used for controlling the corresponding LED indicator lamps through time delay.

4. The system for realizing synchronous control of the LED indicator lamp and the stepping motor as claimed in claim 1, wherein the meter self-checking subsystem judges the indication scale of the current stepping motor according to the micro-step value of the stepping motor and synchronously lights or extinguishes the LED indicator lamp.

5. The system for realizing the synchronous control of the LED indicator lamp and the stepping motor as claimed in claim 1, wherein the stepping motor ascending control unit controls the speed of the stepping motor to be increased to 400 °/s to keep running at a constant speed.

6. The system for realizing the synchronous control of the LED indicator lamp and the stepping motor as claimed in claim 1, wherein the stepping motor descending control unit controls the speed of the stepping motor to be reduced to 80 °/s to keep running at a constant speed.

7. A method for realizing synchronous control of an LED indicator lamp and a stepping motor based on the system of claim 1, which is characterized by comprising the following steps:

(1) the timed interruption service subsystem judges whether the current state is in an ascending state, if so, the ascending control unit of the stepping motor is called; otherwise, calling a stepping motor descending control unit;

(2) the LED indicator lamp control module reads the current micro-step value of the stepping motor, judges whether the scale corresponding to the micro-step value indicates the ascending process, and if so, the LED indicator lamp ascending control unit lights the LED indicator lamp; otherwise, the LED indicator lamp descending control unit extinguishes the LED indicator lamp.

8. The method for realizing synchronous control of the LED indicator lamp and the stepping motor as claimed in claim 7, wherein the method further comprises the following steps:

and the stepping motor continues to block the rotor for a certain micro step number after finishing an ascending process or a descending process.

Technical Field

The invention relates to the field of automobile electronic control, in particular to the field of automobile combination instruments, and specifically relates to a system and a method for realizing synchronous control of an LED indicator lamp and a stepping motor.

Background

In recent years, with the vigorous development of the automobile industry, the functions of the automobile combination instrument are more and more abundant. In the power-on self-checking process of some automobile combination instruments, due to the requirements of customers on the practicability and the attractiveness of the instruments, the self-checking function of the traditional stepping motor is ensured, and the synchronous control of the self-checking of the specific LED indicating lamp with the dial scales is also considered in the power-on self-checking process, so that the visual sense organ effects of the power-on self-checking of the whole instrument are coordinated and consistent. The key point of the synchronous control of the LED indicator lamp and the stepping motor is 'synchronization', namely, in the process of the whole stepping motor indicating self-checking ascending and descending, the LED indicator lamp with corresponding scales must be completely and synchronously lightened or extinguished. And the customer has strict time limit for the meter power-on self-test, which is generally 2 seconds to 3 seconds. The problem that we need to solve at present is to ensure that the on-off control of the LED indicator light is synchronous with the operation of the stepping motor, to ensure that the stepping motor operates smoothly and smoothly without step-out, and to complete the self-checking process within a strictly specified time. Therefore, we must put higher demands on the LED indicator and stepper motor control of the meter.

Disclosure of Invention

The invention aims to overcome the defects of the prior art and provides a system and a method for realizing synchronous control of an LED indicator lamp and a stepping motor, which have the advantages of high efficiency, simple structure and wide application range.

In order to achieve the purpose, the system and the method for realizing the synchronous control of the LED indicator lamp and the stepping motor are as follows:

this system for realizing LED pilot lamp and step motor synchronous control, its key feature is, the system include:

the instrument self-checking subsystem comprises an LED indicating lamp control module, the LED indicating lamp control module comprises an LED indicating lamp ascending control unit and an LED indicating lamp descending control unit, and the instrument self-checking subsystem calls the LED indicating lamp ascending control unit and the LED indicating lamp descending control unit in a circulating mode and is used for reading the micro-step value of the current stepping motor and further controlling the LED indicating lamp with the corresponding scale;

the timed interrupt service subsystem is connected with the instrument self-checking subsystem and is used for controlling the stepping motor to sequentially run in an accelerating mode, a constant speed mode and a decelerating mode; the timed interrupt service subsystem comprises a stepping motor control module, the stepping motor control module comprises a stepping motor ascending control unit and a stepping motor descending control unit, and the timed interrupt service subsystem calls the stepping motor ascending control unit and the stepping motor descending control unit.

Preferably, the timed interrupt service subsystem is executed at a time interval of 1 ms.

Preferably, the meter self-checking subsystem further comprises a serial-to-parallel shift lamp control chip connected to the LED indicator lamp control module for controlling the corresponding LED indicator lamp by time delay.

Preferably, the meter self-checking subsystem judges the indication scale of the current stepping motor according to the micro-step value of the stepping motor, and synchronously lights or extinguishes the LED indicator lamp.

Preferably, the stepping motor ascending control unit controls the speed of the stepping motor to be increased to 400 DEG/s to keep constant-speed running.

Preferably, the stepping motor descending control unit controls the speed of the stepping motor to be reduced to 80 °/s to keep constant-speed running.

The method for realizing the synchronous control of the LED indicator lamp and the stepping motor based on the system is mainly characterized by comprising the following steps of:

(1) the timed interruption service subsystem judges whether the current state is in an ascending state, if so, the ascending control unit of the stepping motor is called; otherwise, calling a stepping motor descending control unit;

(2) the LED indicator lamp control module reads the current micro-step value of the stepping motor, judges whether the scale corresponding to the micro-step value indicates the ascending process, and if so, the LED indicator lamp ascending control unit lights the LED indicator lamp; otherwise, the LED indicator lamp descending control unit extinguishes the LED indicator lamp.

Preferably, the method further comprises the steps of:

and the stepping motor continues to block the rotor for a certain micro step number after finishing an ascending process or a descending process.

By adopting the system and the method for realizing the synchronous control of the LED indicator lamp and the stepping motor, the indication scale of the current stepping motor can be judged according to the micro-step value of the stepping motor, and the current stepping motor is completely and synchronously lightened or extinguished; the function that only stepping motor self-checking in the instrument self-checking process is improved, and the current industry trend and most of customer demands are met. The invention ensures that the self-checking function of the instrument is finished within a very short limiting time by controlling the acceleration and deceleration of the stepping motor; the problem of step motor at uniform velocity self-checking time overlength is solved. In the invention, the stepping motor control module is arranged in the timed interrupt service subsystem to be executed, so that the stepping motor is ensured not to be out of step in the acceleration and deceleration process and high-speed operation; in the strategy of synchronous control of the LED indicating lamps, acceleration and deceleration and high-speed running of the stepping motor are not interfered by the LED indicating lamp control module. The acceleration and deceleration curves of the stepping motor control module are configurable so as to meet different requirements of different customers on the self-checking time and effect of the instrument.

Drawings

Fig. 1 is a block diagram of a system for implementing synchronous control of an LED indicator and a stepping motor according to the present invention.

Fig. 2 is a schematic diagram of a serial-parallel shift lamp control chip in the system for realizing synchronous control of the LED indicator lamp and the stepping motor according to the present invention.

Fig. 3 is a schematic diagram of acceleration and deceleration curve control of the stepping motor in the system for realizing synchronous control of the LED indicator and the stepping motor according to the present invention.

Fig. 4 is a flowchart of a timed interrupt service module of the method for implementing synchronous control of the LED indicator and the stepping motor according to the present invention.

Fig. 5 is a flowchart of an LED indicator control module of the method for implementing synchronous control of an LED indicator and a stepping motor according to the present invention.

Detailed Description

In order to more clearly describe the technical contents of the present invention, the following further description is given in conjunction with specific embodiments.

The system for realizing synchronous control of the LED indicator lamp and the stepping motor comprises:

the instrument self-checking subsystem comprises an LED indicating lamp control module, the LED indicating lamp control module comprises an LED indicating lamp ascending control unit and an LED indicating lamp descending control unit, and the instrument self-checking subsystem calls the LED indicating lamp ascending control unit and the LED indicating lamp descending control unit in a circulating mode and is used for reading the micro-step value of the current stepping motor and further controlling the LED indicating lamp with the corresponding scale;

the timed interrupt service subsystem is connected with the instrument self-checking subsystem and is used for controlling the stepping motor to sequentially run in an accelerating mode, a constant speed mode and a decelerating mode; the timed interrupt service subsystem comprises a stepping motor control module, the stepping motor control module comprises a stepping motor ascending control unit and a stepping motor descending control unit, and the timed interrupt service subsystem calls the stepping motor ascending control unit and the stepping motor descending control unit.

In a preferred embodiment of the present invention, the timed interrupt service subsystem is timed to execute for a time interval of 1 ms.

As a preferred embodiment of the present invention, the meter self-test subsystem further includes a serial-to-parallel shift lamp control chip, connected to the LED indicator lamp control module, for controlling the corresponding LED indicator lamp by time delay.

As a preferred embodiment of the present invention, the meter self-checking subsystem determines the indication scale of the current stepping motor according to the micro-step value of the stepping motor, and synchronously lights or extinguishes the LED indicator.

As a preferred embodiment of the invention, the stepping motor ascending control unit controls the speed of the stepping motor to be increased to 400 degrees/s and keeps running at a constant speed.

As a preferred embodiment of the invention, the stepping motor descending control unit controls the speed of the stepping motor to be reduced to 80 degrees/s to keep running at a constant speed.

The invention discloses a method for realizing synchronous control of an LED indicator lamp and a stepping motor based on the system, which comprises the following steps:

(1) the timed interruption service subsystem judges whether the current state is in an ascending state, if so, the ascending control unit of the stepping motor is called; otherwise, calling a stepping motor descending control unit;

(2) the LED indicator lamp control module reads the current micro-step value of the stepping motor, judges whether the scale corresponding to the micro-step value indicates the ascending process, and if so, the LED indicator lamp ascending control unit lights the LED indicator lamp; otherwise, the LED indicator lamp descending control unit extinguishes the LED indicator lamp;

and the stepping motor continues to block the rotor for a certain micro step number after finishing an ascending process or a descending process.

The invention belongs to the technical field of automobile electronic control, and particularly relates to a method for synchronously controlling an LED indicator lamp and a stepping motor of an automobile combination instrument. The invention provides a method for synchronously controlling an LED indicator light and a stepping motor, which aims to solve the problem that an automobile combination instrument completes the synchronization of the control of the LED indicator light and the stepping motor within limited power-on self-checking time and ensure that the stepping motor does not run out of step.

The invention provides a method for synchronously controlling an LED indicator light and a stepping motor.

As shown in FIG. 1, the meter self-checking subsystem is executed in a system main program, and the meter self-checking subsystem calls an LED indicator lamp ascending control module and an LED indicator lamp descending control module in a circulating mode. The LED indicator lamp ascending control module and the LED indicator lamp descending control module read the current micro-step value of the stepping motor in the execution process, so that the LED indicator lamp with the corresponding scale is judged to be controlled. The ascending control module and the descending control module of the stepping motor are called in the timed interrupt service subsystem, and the timed interrupt service subsystem is called 1 time in 1 ms.

As shown in fig. 2, since there are many LED indicators on the dial scale, the LED indicators must be controlled by serially shifting the lamp control chip. Different from the direct control of the LED indicator lamp through a GPIO (general purpose input/output pin) of an MCU (micro control unit), the serial conversion and parallel shift lamp control chip driving program has certain requirements on software time sequence, and the corresponding LED indicator lamp can be correctly controlled only by carrying out proper software time delay.

As shown in fig. 3, the meter self-test must be completed within a specified time, generally 2 seconds to 3 seconds, due to customer requirements; the stepper motor must be run at very high speeds (at least 400 deg./s) to meet the demand. Therefore, the motor indication cannot be simply controlled in a constant-speed driving mode, because the starting speed of the general stepping motor can only reach about 80 degrees/s. The stepping motor can only run at a constant speed after reaching the required speed through the acceleration curve, and then must be decelerated, otherwise, the motor is damaged due to direct high-speed rotation blockage, and great noise is generated. In the acceleration and deceleration process and the high-speed uniform operation process of the stepping motor, if the stepping motor is frequently interrupted by the LED indicating lamp control module to realize the synchronization effect, the stepping motor is out of step, the out of step can cause the motor to be blocked or shaken, and even the motor can not be driven to continuously operate directly.

As shown in fig. 4, in order to ensure that the stepping motor does not lose step during the whole self-test operation process, a stepping motor control module is called in the timed interrupt service subsystem. And judging whether the current self-test is in an indication ascending state or an indication descending state in the timed interruption service subsystem, and calling corresponding stepping motor control modules respectively. In the instruction ascending (descending) control program of the stepping motor, the running speed of the motor is gradually increased according to the micro-step value of the current motor, and the current speed is kept to run at a constant speed when the speed of the motor is increased to at least 400 degrees/s; when the ascending (descending) process is completed quickly, the running speed of the motor is gradually reduced according to the micro-step value of the current motor, the current speed is kept running at a constant speed after the speed of the motor is reduced to 80 DEG/s, and the motor is required to be locked for a certain micro-step number after the motor finishes the specified micro-step number, so that the motor can run normally after the ascending/descending direction is switched. The whole ascending and descending curve (comprising acceleration, uniform speed and deceleration stages) can be configured according to different customer requirements, so that the reusability of the whole control program is increased.

As shown in fig. 5, after the timed interrupt service subsystem is executed, the LED indicator lamp control module in the meter self-test subsystem can read the current micro-step value of the stepping motor. When the microstep value reaches the corresponding dial scale, the LED indicating lamp control module can judge whether the current process of indicating ascending or descending is indicated, and accordingly the LED indicating lamp is turned on or turned off. Therefore, the strategy of synchronous control of the LED indicator lamp and the stepping motor is realized.

The invention realizes the synchronous control of the LED indicator lamp corresponding to the dial scale and the stepping motor within very limited self-checking time and ensures that the stepping motor does not run smoothly and smoothly without step loss by executing the stepping motor control module in the timed interruption service subsystem, carrying out acceleration and deceleration control on the stepping motor and carrying out synchronous motor micro-step value control on the LED indicator lamp.

The LED indicating lamp can judge the indicating scale of the current stepping motor according to the micro-step value of the stepping motor and is completely and synchronously lightened or extinguished.

By controlling the acceleration and deceleration of the stepping motor, the self-checking function of the instrument is ensured to be completed within a very short limiting time, and the problem of overlong constant-speed self-checking time of the stepping motor is solved.

The stepping motor control module is arranged in the timed interrupt service subsystem to be executed, so that the stepping motor is ensured not to be out of step in the acceleration and deceleration process and high-speed operation.

In the strategy of synchronous control of the LED indicating lamps, acceleration and deceleration and high-speed running of the stepping motor are not interfered by the LED indicating lamp control module.

And after the stepping motor finishes an ascending or descending process, the stepping motor continues to be locked for a certain micro-step number, so that the stepping motor can normally run when the ascending or descending direction is rapidly switched.

The acceleration and deceleration curves of the stepping motor control module are configurable to meet different requirements of different customers on the self-checking time and effect of the instrument.

The invention relates to a specific embodiment of a 7-inch screen-based automobile combined instrument, which comprises the following steps:

1. a customer requires the instrument to complete self-checking of 18 dial scale LED indicating lamps and 2 220-degree stepping motors in the self-checking process of 2 seconds;

2. the instrument self-checking control system, the timed interrupt service subsystem and the stepping motor control module are transplanted to the technical scheme.

3. Configuring an acceleration and deceleration curve of the stepping motor according to the 2-second requirement and the 220-degree dial angle requirement;

4. the LED indicating lamp control module matched with 18 dial scale LED indicating lamps is designed.

Another embodiment of the invention based on a 7-inch screen automobile combination instrument is as follows:

1. a customer requires the instrument to complete self-checking of 22 dial scale LED indicating lamps and 2 202-degree stepping motors in the self-checking process of 3 seconds;

2. transplanting the instrument self-checking control system, the timed interrupt service subsystem and the stepping motor control module of the scheme;

3. configuring an acceleration and deceleration curve of the stepping motor according to the requirement of 3 seconds and the requirement of 202-degree dial angle;

4. the LED indicating lamp control module is designed to match with 22 dial scale LED indicating lamps.

By adopting the system and the method for realizing the synchronous control of the LED indicator lamp and the stepping motor, the indication scale of the current stepping motor can be judged according to the micro-step value of the stepping motor, and the current stepping motor is completely and synchronously lightened or extinguished; the function that only stepping motor self-checking in the instrument self-checking process is improved, and the current industry trend and most of customer demands are met. The invention ensures that the self-checking function of the instrument is finished within a very short limiting time by controlling the acceleration and deceleration of the stepping motor; the problem of step motor at uniform velocity self-checking time overlength is solved. In the invention, the stepping motor control module is arranged in the timed interrupt service subsystem to be executed, so that the stepping motor is ensured not to be out of step in the acceleration and deceleration process and high-speed operation; in the strategy of synchronous control of the LED indicating lamps, acceleration and deceleration and high-speed running of the stepping motor are not interfered by the LED indicating lamp control module. The acceleration and deceleration curves of the stepping motor control module are configurable so as to meet different requirements of different customers on the self-checking time and effect of the instrument.

In this specification, the invention has been described with reference to specific embodiments thereof. It will, however, be evident that various modifications and changes may be made thereto without departing from the broader spirit and scope of the invention. The specification and drawings are, accordingly, to be regarded in an illustrative rather than a restrictive sense.

11页详细技术资料下载
上一篇:一种医用注射器针头装配设备
下一篇:伺服驱动器、伺服电机的控制方法及装置

网友询问留言

已有0条留言

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

精彩留言,会给你点赞!