Wireless ad hoc network control network and wireless ad hoc network method of LED lamp

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

阅读说明:本技术 Led灯的无线自组网控制网络及无线自组网方法 (Wireless ad hoc network control network and wireless ad hoc network method of LED lamp ) 是由 李刚 于 2021-09-16 设计创作,主要内容包括:本发明提供一种LED灯的无线自组网控制网络,包括触发控制器、主控制器、电源;所述电源连接主控制器,所述主控制器连接一个或多个LED灯;所述触发控制器通过无线通信与主控制器连接。所述触发控制器与所述主控制器之间通过一种无线自组网方法形成配对;所述无线自组网方法包括以下步骤:步骤S1,主控制器置于学习状态;步骤S2,触发控制器向主控制器发送控制码;所述控制码包括:引导码、产品类型码、功能码、校验码、结束码;步骤S3,主控制器接收并解析所述控制码,保存其中的产品类型码和功能码;配对完成;退出学习状态。本发明实现了LED灯的灵活控制,能够实现多种组网方式。(The invention provides a wireless ad hoc network control network of LED lamps, which comprises a trigger controller, a main controller and a power supply, wherein the trigger controller is connected with the main controller; the power supply is connected with a main controller, and the main controller is connected with one or more LED lamps; the trigger controller is connected with the main controller through wireless communication. The trigger controller and the main controller form pairing through a wireless ad hoc network method; the wireless ad hoc network method comprises the following steps: step S1, the main controller is set in learning state; step S2, the trigger controller sends control code to the main controller; the control code includes: a guide code, a product type code, a function code, a check code and an end code; step S3, the main controller receives and analyzes the control code, and stores the product type code and the function code; completing pairing; the learning state is exited. The invention realizes flexible control of the LED lamp and can realize various networking modes.)

1. A wireless ad hoc network control network of LED lamps is characterized by comprising a trigger controller, a main controller and a power supply; the power supply is connected with a main controller, and the main controller is connected with one or more LED lamps; the trigger controller is connected with the main controller through wireless communication.

2. The wireless ad-hoc network of LED lamps of claim 1, wherein,

the trigger controller and the main controller form pairing through a wireless ad hoc network method; the wireless ad hoc network method comprises the following steps:

step S1, the main controller is set in learning state;

step S2, the trigger controller sends control code to the main controller; the control code includes: a guide code, a product type code, a function code, a check code and an end code;

the boot code is for causing the master controller to initiate reception of the control code;

the product type code is used for indicating the product type of the trigger controller, so that the main controller can identify the corresponding function code according to the product type;

the function codes are used for controlling the functions of the LED lamp, so that the main controller correspondingly controls the LED lamp according to the analyzed function codes;

the check code is used for checking the accuracy of the received control code by the main controller;

the end code is used for enabling the main controller to stop receiving the control code;

step S3, the main controller receives and analyzes the control code, and stores the product type code and the function code; completing pairing; the learning state is exited.

3. The wireless ad-hoc network of LED lamps of claim 2,

the product type codes comprise two types, wherein the first type of product type codes are used for indicating that the trigger controller can trigger the switch of the LED lamp and adjusting the brightness or color temperature of the LED lamp; the second type of product type code is used for indicating that the trigger controller can only trigger the switch of the LED lamp;

the main controller correspondingly controls the LED lamp according to the analyzed function code, and the method specifically comprises the following steps:

when the product type code is a first type product type code,

the function code indicates opening of the switch;

function code +1 represents a close switch;

function code +2 indicates start of brightness or color temperature adjustment;

function code +3 indicates stop of brightness or color temperature adjustment;

when the product type code is a second type product type code,

the function code indicates opening of the switch;

the function code +1 indicates the off switch.

4. The wireless ad-hoc network of LED lamps of claim 2,

the function code is a random number.

5. The wireless ad-hoc network of LED lamps of claim 2,

the control code further comprises a version code; the version code is used for representing the version of the current trigger controller.

6. A wireless ad hoc network method applied to the wireless ad hoc network control network of the LED lamp according to claim 1, wherein the wireless ad hoc network method comprises the steps of:

step S1, the main controller is set in learning state;

step S2, the trigger controller sends control code to the main controller; the control code includes: a guide code, a product type code, a function code, a check code and an end code;

the boot code is for causing the master controller to initiate reception of the control code;

the product type code is used for indicating the product type of the trigger controller, so that the main controller can identify the corresponding function code according to the product type;

the function codes are used for controlling the functions of the LED lamp, so that the main controller correspondingly controls the LED lamp according to the analyzed function codes;

the check code is used for checking the accuracy of the received control code by the main controller;

the end code is used for enabling the main controller to stop receiving the control code;

step S3, the main controller receives and analyzes the control code, and stores the product type code and the function code; completing pairing; the learning state is exited.

7. The wireless ad-hoc networking method of claim 6,

the product type codes comprise two types, wherein the first type of product type codes are used for indicating that the trigger controller can trigger the switch of the LED lamp and adjusting the brightness or color temperature of the LED lamp; the second type of product type code is used for indicating that the trigger controller can only trigger the switch of the LED lamp;

the main controller correspondingly controls the LED lamp according to the analyzed function code, and the method specifically comprises the following steps:

when the product type code is a first type product type code,

the function code indicates opening of the switch;

function code +1 represents a close switch;

function code +2 indicates start of brightness or color temperature adjustment;

function code +3 indicates stop of brightness or color temperature adjustment;

when the product type code is a second type product type code,

the function code indicates opening of the switch;

the function code +1 indicates the off switch.

8. The wireless ad-hoc networking method of claim 6,

the function code is a random number.

9. The wireless ad-hoc networking method of claim 6,

the control code further comprises a version code; the version code is used for representing the version of the current trigger controller.

Technical Field

The invention relates to the technical field of control of LED lamps, in particular to a wireless ad hoc network control network and a wireless ad hoc network method of an LED lamp.

Background

At present, LED lamps in markets and supermarkets are single in control mode, usually, one controller controls one or more specific LED lamps, and flexible and convenient control modes cannot be realized.

Disclosure of Invention

The invention aims to overcome the defects in the prior art, provides a wireless ad hoc network control network and a wireless ad hoc network method of an LED lamp, realizes flexible control of the LED lamp, and can realize various networking modes. In order to achieve the technical purpose, the embodiment of the invention adopts the technical scheme that:

in a first aspect, an embodiment of the present invention provides a wireless ad hoc network control network for LED lamps, including a trigger controller, a main controller, and a power supply; the power supply is connected with a main controller, and the main controller is connected with one or more LED lamps; the trigger controller is connected with the main controller through wireless communication.

Further, the trigger controller and the main controller form a pair through a wireless ad hoc network method; the wireless ad hoc network method comprises the following steps:

step S1, the main controller is set in learning state;

step S2, the trigger controller sends control code to the main controller; the control code includes: a guide code, a product type code, a function code, a check code and an end code;

the boot code is for causing the master controller to initiate reception of the control code;

the product type code is used for indicating the product type of the trigger controller, so that the main controller can identify the corresponding function code according to the product type;

the function codes are used for controlling the functions of the LED lamp, so that the main controller correspondingly controls the LED lamp according to the analyzed function codes;

the check code is used for checking the accuracy of the received control code by the main controller;

the end code is used for enabling the main controller to stop receiving the control code;

step S3, the main controller receives and analyzes the control code, and stores the product type code and the function code; completing pairing; the learning state is exited.

Furthermore, the product type codes comprise two types, wherein the first type of product type codes are used for indicating that the trigger controller can trigger the switch of the LED lamp and adjust the brightness or color temperature of the LED lamp; the second type of product type code is used for indicating that the trigger controller can only trigger the switch of the LED lamp;

the main controller correspondingly controls the LED lamp according to the analyzed function code, and the method specifically comprises the following steps:

when the product type code is a first type product type code,

the function code indicates opening of the switch;

function code +1 represents a close switch;

function code +2 indicates start of brightness or color temperature adjustment;

function code +3 indicates stop of brightness or color temperature adjustment;

when the product type code is a second type product type code,

the function code indicates opening of the switch;

the function code +1 indicates the off switch.

Further, the function code is a random number.

Still further, the control code further includes a version code; the version code is used for representing the version of the current trigger controller.

In a second aspect, an embodiment of the present invention provides a wireless ad hoc network method, which is applied to the wireless ad hoc network control network of the LED lamp according to claim 1, where the wireless ad hoc network method includes the following steps:

step S1, the main controller is set in learning state;

step S2, the trigger controller sends control code to the main controller; the control code includes: a guide code, a product type code, a function code, a check code and an end code;

the boot code is for causing the master controller to initiate reception of the control code;

the product type code is used for indicating the product type of the trigger controller, so that the main controller can identify the corresponding function code according to the product type;

the function codes are used for controlling the functions of the LED lamp, so that the main controller correspondingly controls the LED lamp according to the analyzed function codes;

the check code is used for checking the accuracy of the received control code by the main controller;

the end code is used for enabling the main controller to stop receiving the control code;

step S3, the main controller receives and analyzes the control code, and stores the product type code and the function code; completing pairing; the learning state is exited.

Further, the product type codes comprise two types, wherein the first type of product type codes are used for indicating that the trigger controller can trigger the switch of the LED lamp and adjust the brightness or color temperature of the LED lamp; the second type of product type code is used for indicating that the trigger controller can only trigger the switch of the LED lamp;

the main controller correspondingly controls the LED lamp according to the analyzed function code, and the method specifically comprises the following steps:

when the product type code is a first type product type code,

the function code indicates opening of the switch;

function code +1 represents a close switch;

function code +2 indicates start of brightness or color temperature adjustment;

function code +3 indicates stop of brightness or color temperature adjustment;

when the product type code is a second type product type code,

the function code indicates opening of the switch;

the function code +1 indicates the off switch.

Further, the function code is a random number.

Still further, the control code further includes a version code; the version code is used for representing the version of the current trigger controller.

The technical scheme provided by the embodiment of the invention has the following beneficial effects: the method and the device can form a flexible and various networking mode, and are convenient for flexibly controlling the LED lamp. And through wireless networking, wiring is reduced, and the efficiency of field layout is improved.

Drawings

Fig. 1 is a schematic diagram of a wireless ad hoc network control network according to an embodiment of the present invention.

Fig. 2 is a flowchart of a wireless ad hoc network method according to an embodiment of the present invention.

Detailed Description

In order to make the objects, technical solutions and advantages of the present invention more apparent, the present invention is described in further detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.

In an embodiment of the present invention, as shown in fig. 1, a wireless ad hoc network control network of LED lamps includes a trigger controller, a main controller, and a power supply; the power supply is connected with a main controller, and the main controller is connected with one or more LED lamps; the trigger controller is connected with the main controller through wireless communication; the wireless communication between the trigger controller and the master controller adopts a 433M frequency band;

the trigger controller and the main controller form pairing through a wireless ad hoc network method; the wireless ad hoc network method comprises the following steps:

step S1, the main controller is set in learning state;

the main controller automatically enters a learning state within a set time after starting up and then is switched into a working state; or when the main controller is in a working state, the main controller is switched to a learning state through a switching key on the main controller;

step S2, the trigger controller sends control code to the main controller; the format of the control code is as follows:

guide code + version code + product type code + function code + check code + end code

The boot code is for causing the master controller to initiate reception of the control code; in the present embodiment, the pilot code is a low level signal of 12 ms;

the version code is used for representing the version of the current trigger controller; so as to facilitate the analysis of the problems of each version when updating and maintaining; in this embodiment, the version code length is 1 Byte;

the product type code is used for indicating the product type of the trigger controller, so that the main controller can identify the corresponding function code according to the product type; the length of the product type code is 1 Byte; in order to enable the wireless ad hoc network control network of the LED lamp to have more application scenes and more various control modes, the trigger controller can comprise a human body induction controller, a door control controller, a hand scanning controller, a remote control controller and the like; for example, the human body induction controller can passively detect human body infrared signals, the hand scanning controller can actively send short-distance infrared signals and then detect infrared echo signals, the door control controller can detect the opening and closing of the cabinet door, and the triggering controllers can trigger the opening and closing of the LED lamp; the remote controller can trigger the switch of the LED lamp and can adjust the brightness or color temperature of the LED lamp; in this embodiment, the product type code includes two types, where the first type product type code is 0x01, and is used to indicate that the trigger controller can trigger the switch of the LED lamp and adjust the brightness or color temperature of the LED lamp; the second product type code is 0x02 and is used for indicating that the trigger controller can only trigger the switch of the LED lamp;

the function codes are used for controlling the functions of the LED lamp, so that the main controller correspondingly controls the LED lamp according to the analyzed function codes; the length of the function code is 1 Byte; in this embodiment, the function code is a random number;

when the product type code is a first type product type code,

the function code indicates opening of the switch;

function code +1 represents a close switch;

function code +2 indicates start of brightness or color temperature adjustment;

function code +3 indicates stop of brightness or color temperature adjustment;

when the product type code is a second type product type code,

the function code indicates opening of the switch;

function code +1 represents a close switch;

the check code is used for checking the accuracy of the received control code by the main controller; the check code length is 2Byte, and a CRC check mode is adopted;

the end code is used for enabling the main controller to stop receiving the control code; in this embodiment, the end code is a high level signal of 1.2 ms;

step S3, the main controller receives and analyzes the control code, and saves the version code, the product type code and the function code; completing pairing; the learning state is exited.

After the pairing is completed, the trigger controller and the main controller can control the LED lamp through wireless communication;

by the wireless ad hoc network method, various flexible networking modes of one-sending-one-receiving, one-sending-multiple-receiving, multiple-sending-one-receiving and multiple-sending-multiple-receiving can be realized;

the application scene introduction, for example, for a one-time multi-receiving networking mode, one human body induction controller can establish wireless connection with a plurality of main controllers simultaneously, so that LED lamps connected with the plurality of main controllers can be controlled simultaneously; for another example, for a multi-transmitting and one-receiving networking mode, a plurality of remote controllers can establish wireless connection with the same main controller, so that the plurality of remote controllers can control the LED lamps connected with the same main controller.

Finally, it should be noted that the above embodiments are only for illustrating the technical solutions of the present invention and not for limiting, and although the present invention has been described in detail with reference to examples, it should be understood by those skilled in the art that modifications or equivalent substitutions may be made on the technical solutions of the present invention without departing from the spirit and scope of the technical solutions of the present invention, which should be covered by the claims of the present invention.

8页详细技术资料下载
上一篇:一种医用注射器针头装配设备
下一篇:一种烟机照明方法及装置

网友询问留言

已有0条留言

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

精彩留言,会给你点赞!