Implementation method for synchronous working of multiple groups of multicolor LED lamps

文档序号:1914470 发布日期:2021-12-03 浏览:12次 中文

阅读说明:本技术 一种多组多色led灯同步工作的实施方法 (Implementation method for synchronous working of multiple groups of multicolor LED lamps ) 是由 葛双军 汪胜凯 苏琳杰 王璐坤 葛双红 于 2021-08-23 设计创作,主要内容包括:本发明公开了一种多组多色LED灯同步工作的实施方法,属于装饰氛围灯技术领域,针对现有技术中车内氛围灯只是接收控制指令:呼吸模式,其同时收到指令进行独立的呼吸和颜色变化,要经过1-2s后会导致计算偏差,呼吸变化不一致,同一时刻,有的变亮、有的变暗、有的绿色、有的蓝色的问题;本发明通过LIN主控节点的控制模块用于发送周期T控制指令信息和同步指令信息到LIN从节点上的多个氛围灯接收模块,在控制指令外增加一个同步信号指令,达到了不同灯的呼吸模式效果的同步;在逻辑设计上从根本解决了多组多色LED呼吸同步的问题,让客户对产品有更好使用体验,有效降低更改成本,为LED实现更多更复杂功能提供了应用前景。(The invention discloses an implementation method for synchronous working of a plurality of groups of multicolor LED lamps, which belongs to the technical field of decorative atmosphere lamps and aims at the problems that in the prior art, an atmosphere lamp in a vehicle only receives a control instruction: the breathing mode simultaneously receives an instruction to carry out independent breathing and color change, and the calculation deviation can be caused after 1-2s, the breathing change is inconsistent, and the problems of brightening in some cases, darkening in some cases, green in some cases and blue in some cases exist at the same time; according to the invention, the control module of the LIN master control node is used for sending periodic T control instruction information and synchronous instruction information to the atmosphere lamp receiving modules on the LIN slave node, and a synchronous signal instruction is added outside the control instruction, so that the synchronization of the breathing mode effects of different lamps is achieved; the problem of multi-group multi-color LEDs in synchronous breathing is fundamentally solved in logic design, so that a client can better use and experience the product, the change cost is effectively reduced, and an application prospect is provided for realizing more complex functions of the LEDs.)

1. The implementation method for synchronous work of the multiple groups of multicolor LED lamps is characterized by comprising a control module arranged on an LIN master control node and a plurality of atmosphere lamp receiving modules arranged on an LIN slave node; the control module of the LIN master control node is used for sending periodic T control instruction information and synchronous instruction information to the atmosphere lamp receiving modules on the LIN slave node, and a synchronous signal instruction is added outside the control instruction, so that the synchronization of the breathing mode effects of the multiple groups of multicolor LED lamps is realized.

2. The method for implementing the synchronous operation of the multiple groups of multicolor LED lamps according to claim 1, which is characterized by comprising the following steps:

step 1): connecting each atmosphere lamp receiving module in a bus mode, and receiving in real time in an interruption mode; starting from the receiving of the control instruction, each receiving slave node atmosphere lamp receiving module does not immediately execute the instruction, but enters an execution waiting state, and when receiving a synchronous instruction, each atmosphere lamp receiving module synchronously executes a breathing action;

step 2): each atmosphere lamp receiving module executes a breathing function according to a system clock of the atmosphere lamp receiving module, gradually increases the brightness according to a brightness curve, and presets the increasable maximum brightness within T time;

step 3): after receiving the second synchronization instruction, all the atmosphere lamp receiving modules are synchronized to the same preset value no matter whether the currently set brightness value is larger than or smaller than or equal to the preset value, at the moment, all the atmosphere lamp receiving modules continue to perform breathing synchronization from the same brightness at the same time, the brightness is gradually increased, and the subsequent synchronization instruction repeatedly executes the logic;

step 4): after receiving the Nth synchronization instruction, when the preset maximum brightness is reached, all the atmosphere lamp receiving modules are synchronized to the same preset value no matter whether the currently set brightness value is larger than or smaller than or equal to the preset maximum value, at the moment, all the atmosphere lamp receiving modules continue breathing synchronization from the same brightness at the same time, the brightness is gradually reduced, and the subsequent synchronization instruction repeatedly executes the logic;

step 5): after receiving the 2N synchronization instruction, when the preset minimum brightness is reached, all the atmosphere lamp receiving modules are synchronized to the same preset value no matter whether the currently set brightness value is larger than or smaller than or equal to the preset minimum value, the preset minimum value is a zero value, color switching is carried out simultaneously, at the moment, all the receiving modules continue breathing synchronization from the same initial brightness and the same color, the brightness is gradually increased, and the subsequent synchronization instruction repeatedly executes the logic;

step 6): and synchronizing the system clock deviation in each atmosphere lamp receiving module within the time of each synchronization period T, and simultaneously enabling each synchronization instruction period to return the error generated within the time T to zero so as to realize the synchronization of a plurality of atmosphere lamp receiving modules.

3. An implementation method of synchronous operation of a plurality of groups of multicolor LED lamps as claimed in claim 2, wherein the breathing action in step 1) comprises setting an initial color and an initial brightness.

4. The method of claim 2, wherein the time T in step 2) is set to 2 × T times based on human visual discrimination.

5. The method as claimed in claim 2, wherein if one of the ambience lamp receiving modules reaches the preset maximum brightness due to the system clock within the time T, the maximum brightness is maintained until no next synchronization command is received in step 2); if another one of the ambience lamp receiving modules is slightly slower due to the system clock during time T without increasing to the preset brightness value, the increase continues.

6. An implementation method of synchronous operation of multiple groups of multicolor LED lamps as claimed in claim 2, wherein the control module of LIN master node is BCM for sending periodic T control command information and synchronization command information to the multiple atmosphere lamp receiving modules on LIN slave node.

7. An implementation method of synchronous operation of multiple groups of multi-color LED lamps as claimed in claim 2, wherein the LIN slave nodes are provided with independent controllers and respective clocks in the multiple atmosphere lamp receiving modules.

Technical Field

The invention relates to the technical field of control of atmosphere lamps for automobile interior decoration, in particular to an implementation method for synchronous working of multiple groups of multicolor LED lamps.

Background

The existing automotive atmosphere lamp control is divided into two parts, wherein one part is an instruction sending end (BCM vehicle body control system, main node), and a color value, a brightness value and a mode value are sent by the LIN bus sending end. Another part is that the LIN commands received by the mood light controller (i.e. the slave nodes) to the master node perform the relevant logic functions themselves depending on the function definition, such as breathing switching between different colors (to the effect of welcoming and welcoming at the driving gate, and the effect of rhythms in driving).

The atmosphere lamp controllers in the vehicle are distributed at different positions in the vehicle, such as two sides of an instrument desk, four doors, a central control system and the like, and can reach more than 20 positions at most, so that 20 atmosphere lamp controllers exist, clock deviation exists among MCUs of different controllers, so that 20 atmosphere lamps receive the same instruction of BCM at the same moment to execute related breathing functions, the breathing effect that the 20 lamps are synchronously lightened and darkened exists, after a certain time, the phenomenon that the 20 lamps are inconsistent in breathing can occur, the lamps are gradually lightened, the lamps are gradually darkened, and the control is disordered.

Although each slave node is the same in hardware and software and comprises the same main frequency clock, the atmosphere lamps of the plurality of slave nodes always have deviation due to different module clocks, the deviation is small, and the difference is gradually amplified after a certain time is accumulated, so that the problem of asynchronous breathing of a plurality of groups of LEDs can occur.

The general solution solves the synchronization problem by means of time delay and the like, and cannot fundamentally eliminate the asynchronous problem.

Disclosure of Invention

The invention aims to provide an implementation method for synchronous work of a plurality of groups of multicolor LED lamps, which fundamentally solves the problem of synchronous breathing of the plurality of groups of multicolor LED lamps through a logic design method and enables customers to have better use experience on products.

In order to achieve the purpose, the invention provides the following technical scheme:

an implementation method for synchronous working of a plurality of groups of multicolor LED lamps comprises a control module arranged on an LIN master control node and a plurality of atmosphere lamp receiving modules arranged on an LIN slave node; the control module of the LIN master control node is used for sending periodic T control instruction information and synchronous instruction information to the atmosphere lamp receiving modules on the LIN slave node, and a synchronous signal instruction is added outside the control instruction, so that the synchronization of the breathing mode effects of the multiple groups of multicolor LED lamps is realized.

Further, the specific implementation steps are as follows:

step 1): connecting each atmosphere lamp receiving module in a bus mode, and receiving in real time in an interruption mode; starting from the receiving of the control instruction, each receiving slave node atmosphere lamp receiving module does not immediately execute the instruction, but enters an execution waiting state, and when receiving a synchronous instruction, each atmosphere lamp receiving module synchronously executes a breathing action;

step 2): each atmosphere lamp receiving module executes a breathing function according to a system clock of the atmosphere lamp receiving module, gradually increases the brightness according to a brightness curve, and presets the increasable maximum brightness within T time;

step 3): after receiving the second synchronization instruction, all the atmosphere lamp receiving modules are synchronized to the same preset value no matter whether the currently set brightness value is larger than or smaller than or equal to the preset value, at the moment, all the atmosphere lamp receiving modules continue to perform breathing synchronization from the same brightness at the same time, the brightness is gradually increased, and the subsequent synchronization instruction repeatedly executes the logic;

step 4): after receiving the Nth synchronization instruction, when the preset maximum brightness is reached, all the atmosphere lamp receiving modules are synchronized to the same preset value no matter whether the currently set brightness value is larger than or smaller than or equal to the preset maximum value, at the moment, all the atmosphere lamp receiving modules continue breathing synchronization from the same brightness at the same time, the brightness is gradually reduced, and the subsequent synchronization instruction repeatedly executes the logic;

step 5): after receiving the 2N synchronization instruction, when the preset minimum brightness is reached, all the atmosphere lamp receiving modules are synchronized to the same preset value no matter whether the currently set brightness value is larger than or smaller than or equal to the preset minimum value, the preset minimum value is a zero value, color switching is carried out simultaneously, at the moment, all the receiving modules continue breathing synchronization from the same initial brightness and the same color, the brightness is gradually increased, and the subsequent synchronization instruction repeatedly executes the logic;

step 6): and synchronizing the system clock deviation in each atmosphere lamp receiving module within the time of each synchronization period T, and simultaneously enabling each synchronization instruction period to return the error generated within the time T to zero so as to realize the synchronization of a plurality of atmosphere lamp receiving modules.

Further, the breathing action in step 1) includes setting an initial color and an initial brightness.

Further, the T time in step 2) is set to 2 × T time according to the human visual discrimination capability.

Further, in step 2), if one of the atmosphere lamp receiving modules reaches the preset maximum brightness due to the system clock in time T, the maximum brightness is maintained before the next synchronization command is not received; if another one of the ambience lamp receiving modules is slightly slower due to the system clock during time T without increasing to the preset brightness value, the increase continues.

Furthermore, the control module of the LIN master node is a BCM for sending periodic T control command information and synchronization command information to the plurality of atmosphere lamp receiving modules on the LIN slave node.

Further, the LIN is provided with independent controllers and respective clocks in the plurality of atmosphere lamp receiving modules on the nodes.

Compared with the prior art, the invention has the beneficial effects that:

the invention provides an implementation method for synchronous working of a plurality of groups of multicolor LED lamps, aiming at the problem that an atmosphere lamp in a vehicle only receives a control instruction in the prior art: the breathing mode simultaneously receives an instruction to carry out independent breathing and color change, and the calculation deviation can be caused after 1-2s, the breathing change is inconsistent, and the problems of brightening in some cases, darkening in some cases, green in some cases and blue in some cases exist at the same time; according to the invention, the control module of the LIN master control node is used for sending periodic T control instruction information and synchronous instruction information to the atmosphere lamp receiving modules on the LIN slave node, and a synchronous signal instruction is added outside the control instruction, so that the synchronization of the breathing mode effects of different lamps is achieved; the problem of multi-group multi-color LEDs in synchronous breathing is fundamentally solved in logic design, so that a client can better use and experience the product, the change cost is effectively reduced, and an application prospect is provided for realizing more complex functions of the LEDs.

Drawings

FIG. 1 is a block diagram of the module frame of the present invention;

FIG. 2 is a diagram of the logic method of the present invention.

Detailed Description

The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.

Referring to fig. 1-2, in the embodiment of the present invention: the implementation method for synchronous work of a plurality of groups of multicolor LED lamps is provided, and comprises a control module arranged on an LIN master control node and a plurality of atmosphere lamp receiving modules arranged on an LIN slave node; the control module of the LIN master control node is used for sending periodic T control instruction information and synchronous instruction information to the atmosphere lamp receiving modules on the LIN slave node, and a synchronous signal instruction is added outside the control instruction, so that the synchronization of the breathing mode effects of the multiple groups of multicolor LED lamps is realized.

The method comprises the following concrete implementation steps:

the method comprises the following steps: starting from receiving a control instruction of a control module, each receiving slave node atmosphere lamp receiving module does not immediately execute the instruction, but enters an execution waiting state, and when receiving a synchronous instruction of the control module, each atmosphere lamp receiving module synchronously executes a breathing action, wherein the breathing action comprises setting an initial color and an initial brightness, each atmosphere lamp receiving module is connected in a bus mode and receives in real time in an interrupt mode, so that the time difference of receiving the synchronous instruction can be ignored, or the error of receiving the synchronous instruction is in microsecond level, and no visual difference is generated for human vision;

step two: each atmosphere lamp receiving module executes a breathing function according to a system clock of the atmosphere lamp receiving module, and gradually increases the brightness according to a brightness curve; presetting increasable maximum brightness in the time of a control instruction T, and if one atmosphere lamp receiving module reaches the preset maximum brightness due to the fact that a system clock is fast in the time of T, keeping the maximum brightness before a next synchronous instruction is not received; if the other atmosphere lamp receiving module is slightly slow due to the system clock in the T time, the increase is continued under the condition that the preset brightness value is not increased; for the control instruction T time, considering the visual discrimination ability of human eyes, the control instruction T time cannot be set to be too large, generally referred to as 2T time, under the condition of the value, the respiratory effect is kept and is not recognized by human eyes, and meanwhile, at the T time, although certain errors exist, errors generated by system clocks of different modules are not large, so that the synchronization effect cannot be influenced;

step three: after receiving the second synchronization instruction, all the atmosphere lamp receiving modules are synchronized to the same preset value no matter whether the currently set brightness value is larger than or smaller than or equal to the preset value, at the moment, all the atmosphere lamp receiving modules continue to perform breathing synchronization from the same brightness at the same time, the brightness is gradually increased, and the subsequent synchronization instruction repeatedly executes the logic;

step four: after receiving the Nth synchronization instruction, when the preset maximum brightness is reached, all the atmosphere lamp receiving modules are synchronized to the same preset value no matter whether the currently set brightness value is larger than or smaller than or equal to the preset maximum value, at the moment, all the atmosphere lamp receiving modules continue breathing synchronization from the same brightness at the same time, the brightness is gradually reduced, and the subsequent synchronization instruction repeatedly executes the logic;

step five: after receiving the 2N synchronization instruction, when the preset minimum brightness is reached, all the atmosphere lamp receiving modules are synchronized to the same preset value no matter whether the currently set brightness value is larger than or smaller than or equal to the preset minimum value, the preset minimum value is a zero value, color switching is carried out simultaneously, at the moment, all the receiving modules continue breathing synchronization from the same initial brightness and the same color, the brightness is gradually increased, and the subsequent synchronization instruction repeatedly executes the logic;

step six: although the system clocks of the modules have deviation, the synchronization is carried out within the time of each synchronization period T, and meanwhile, the error generated within the time T is reset to zero within each synchronization instruction period, so that the problem of error accumulation does not exist, and the problem of asynchronous respiration of a plurality of LED atmosphere lamps can be perfectly solved.

As a further technical solution of the present invention, the steps from the first step to the sixth step include, but are not limited to, using a 2-time synchronization method; including but not limited to synchronization using synchronization instructions or periodic instructions; including but not limited to using a periodic error zeroing algorithm; including but not limited to the above-described synchronous logic control algorithm or similar algorithms, and algorithms that implement synchronization using similar synchronous algorithm schemes as well as using other periodic instructions.

The working principle is as follows: the control module of the LIN master node is BCM, which is used for sending periodic T control instruction information and synchronous instruction information to a plurality of atmosphere lamp receiving modules on the LIN slave node, when in actual work, a plurality of (3-15) atmosphere lamps are arranged in a vehicle, each atmosphere lamp is provided with an independent controller and a respective clock, and the atmosphere lamps in the vehicle in the prior art only receive the control instruction: in the breathing mode, independent breathing and color change are carried out after instructions are received at the same time, and after 1-2s, calculation deviation can be caused due to the fact that clocks are independent and have deviation, breathing changes are inconsistent, and some people become bright, some people become dark, some people become green and some people become blue at the same time; according to the invention, a synchronous signal instruction is added outside the control instruction, and as shown in the steps from the first step to the sixth step, the synchronization of the breathing mode effects of different lamps is achieved.

In summary, the following steps: according to the implementation method for synchronous work of the multiple groups of multicolor LED lamps, provided by the invention, the problem of synchronous breathing of the multiple groups of multicolor LEDs is fundamentally solved through logic design, so that a client has better use experience on products, the change cost is effectively reduced, and an application prospect is provided for realizing more and more complex functions of the LEDs.

The above description is only for the preferred embodiment of the present invention, but the scope of the present invention is not limited thereto, and any person skilled in the art should be able to cover the technical solutions and the inventive concepts of the present invention within the technical scope of the present invention.

7页详细技术资料下载
上一篇:一种医用注射器针头装配设备
下一篇:一种外贸物流车辆用警示牌

网友询问留言

已有0条留言

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

精彩留言,会给你点赞!

技术分类