Lamp tube coding structure and automatic identification method thereof

文档序号:1026215 发布日期:2020-10-27 浏览:13次 中文

阅读说明:本技术 一种灯管编码结构及其自动识别方法 (Lamp tube coding structure and automatic identification method thereof ) 是由 杨明来 光金正 马强 毛崇彬 于 2020-08-07 设计创作,主要内容包括:本发明公开了一种灯管编码结构及其自动识别方法,包括灯管,所述灯管包括灯头、灯柱和微控制器,所述灯头接照明灯、激光灯,所述灯柱与灯头用电源线连接,所述灯柱中设有存储芯片和编码电路PCB,编码电路的信号线与微控制器连接,微控制器可以通过读取和修改灯柱里面存储芯片的数据,所述灯柱是由灯壳、散热片、存储芯片和编码电路PCB组成,灯壳为外层包裹层,存储芯片是用于存储灯的型号、电压、电流参数,微控制器可以根据实际需要添加和修改相应的参数。本发明可插拔连接方式解决灯不可拆卸和更换问题,更加方便人们进行使用,便于进行更换,节约成本和时间。(The invention discloses a lamp tube coding structure and an automatic identification method thereof, wherein the lamp tube comprises a lamp cap, a lamp post and a microcontroller, the lamp cap is connected with a lighting lamp and a laser lamp, the lamp post is connected with the lamp cap through a power line, a storage chip and a coding circuit PCB are arranged in the lamp post, a signal line of the coding circuit is connected with the microcontroller, the microcontroller can read and modify data of the storage chip in the lamp post, the lamp post comprises a lamp shell, a radiating fin, the storage chip and the coding circuit PCB, the lamp shell is an outer wrapping layer, the storage chip is used for storing model numbers, voltage and current parameters of the lamp, and the microcontroller can add and modify corresponding parameters according to actual needs. The pluggable connection mode solves the problem that the lamp cannot be disassembled and replaced, is more convenient for people to use and replace, and saves cost and time.)

1. A lamp tube coding structure comprises a lamp tube, and is characterized in that: the lamp tube comprises a lamp holder, a lamp post and a microcontroller, wherein the lamp holder is connected with an illuminating lamp and a laser lamp, the lamp post is connected with the lamp holder through a power line, a storage chip and a coding circuit PCB are arranged in the lamp post, a signal line of the coding circuit is connected with the microcontroller, and the microcontroller can read and modify data of the storage chip in the lamp post;

the lamp post comprises a lamp shell, a radiating fin, a storage chip and a coding circuit PCB, wherein the lamp shell is an outer wrapping layer, the storage chip is used for storing the model, color, voltage and current parameters of the lamp, the microcontroller can add and modify corresponding parameters according to actual requirements, the self-made coding circuit comprises a normal working circuit for driving the lamp, a storage chip driving circuit and a microcontroller control circuit, and the microcontroller identifies the type of the lamp and drives the lamp to normally work according to the working parameters of the type of the lamp.

2. A light tube coding structure according to claim 1, characterized in that: the memory chip uses W25Q128 or AT24C 02.

3. A light tube coding structure according to claim 2, characterized in that: and the microcontroller modifies and reads data in an SPI or IIC communication mode.

4. A light tube coding structure according to claim 3, characterized in that: the lamp post and the lamp are in any one of a pluggable form and an integrated form, and the lamp post and the microcontroller are separated and support plugging.

5. A light tube coding structure according to claim 4, characterized in that: the coded lamp is characterized in that the microcontroller writes relevant working parameters of the lamp into a memory chip of the lamp post in advance.

6. The method of claim 5, wherein the method further comprises the steps of: the user inserts the lamp with the code into a microcontroller mainboard with a lamp socket, the microcontroller reads data of a lamp post storage chip once at intervals in the process of executing the program, and the microcontroller executes a corresponding lamp control instruction according to the parameters read from the storage chip.

7. The method of claim 6, wherein the method comprises the steps of: the lamp control instruction comprises lamp working voltage, lamp working current, lamp state, lamp power and lamp color brightness ratio, and the lamp color comprises red and blue;

controlling the power of the lamp, namely, under the condition that the working voltage of the lamp is not changed, changing the working current of the lamp by adjusting the PWM duty ratio by the microcontroller, and extinguishing the lamp when the duty ratio is 0 so as to change the state of the lamp;

the control lamp color and brightness ratio is that when the microcontroller mainboard is provided with a plurality of pluggable red and blue lamps with fixed proportion, the microcontroller adjusts the lamp power according to the proportion parameter by reading the parameters of the color and proportion of the memory chip, thereby realizing the ratio of the lamp color and brightness.

Technical Field

The invention relates to the field of design of common illuminating lamps and laser lamps, in particular to a lamp tube coding structure and an automatic identification method thereof.

Background

With the rapid development of modern economy and technology, intelligent lamps will become a trend of future lamp development. First, most intelligent lamps in the current market are not detachable and replaceable, and are directly scrapped if the lamps are broken. For multifunctional intelligent lamps, the way of non-detachable replacement is that the resources of the lamp cannot be efficiently utilized. Furthermore, many smart lamps cannot identify the type of lamp, that is, if the lamp is broken, only the type of lamp can be replaced, and other types of lamps cannot be replaced. The mode that the lamp type can not be automatically identified enables the installation and the replacement to lack flexibility, and the lamp type can not be automatically identified and the work of controlling the lamp can not meet the requirements of modern intelligent lamps.

Disclosure of Invention

The present invention is directed to a lamp encoding structure and an automatic identification method thereof, so as to solve the problems mentioned in the background art.

In order to achieve the purpose, the invention provides the following technical scheme: a lamp tube coding structure and an automatic identification method thereof comprise a lamp holder, a lamp post and a microcontroller, wherein the lamp holder is connected with a lighting lamp and a laser lamp, the lamp post is connected with the lamp holder through a power line, a storage chip and a coding circuit PCB are arranged in the lamp post, a signal line of the coding circuit is connected with the microcontroller, and the microcontroller can read and modify data of the storage chip in the lamp post;

the lamp post comprises a lamp shell, a radiating fin, a storage chip and a coding circuit PCB, wherein the lamp shell is an outer wrapping layer, the storage chip is used for storing the model, color, voltage and current parameters of the lamp, the microcontroller can add and modify corresponding parameters according to actual requirements, the self-made coding circuit comprises a normal working circuit for driving the lamp, a storage chip driving circuit and a microcontroller control circuit, and the microcontroller identifies the type of the lamp and drives the lamp to normally work according to the working parameters of the type of the lamp.

Preferably, the memory chip uses W25Q128 or AT24C 02.

Preferably, the microcontroller modifies and reads data through SPI or IIC communication.

Preferably, the lamp post and the lamp are in any one of a pluggable form and an integrated form, the lamp post and the lamp cap are arranged integrally, the lamp post and the microcontroller are separated to support plugging, and the lamp cap and the lamp post can be integrated or separated.

Preferably, the coded lamp is a microcontroller that writes the relevant operating parameters of the lamp into a memory chip of the lamppost in advance.

Preferably, the user inserts the lamp with the code into a microcontroller mainboard with a lamp socket, the microcontroller reads data of the lamp post memory chip once at intervals in the process of executing the program, and the microcontroller executes the corresponding lamp control instruction according to the parameters read from the memory chip.

Preferably, the lamp control command comprises lamp working voltage, lamp working current, lamp state, lamp power and lamp color brightness ratio, and the lamp color comprises red and blue;

controlling the power of the lamp, namely, under the condition that the working voltage of the lamp is not changed, changing the working current of the lamp by adjusting the PWM duty ratio by the microcontroller, and extinguishing the lamp when the duty ratio is 0 so as to change the state of the lamp;

when the microcontroller main board is provided with a plurality of pluggable red and blue lamps with fixed proportion (for example, 15 lamps in total, 3 blue lamps and 12 red lamps are respectively adopted as the lamp proportion, and the proportion is fixed.

The invention has the technical effects and advantages that:

(1) the problem that the lamp can not be disassembled and replaced is solved through the pluggable connection mode, people can use the lamp more conveniently, replacement is facilitated, and cost and time are saved.

(2) The lamp tube is added with the storage chip to solve the problem that the microcontroller cannot identify the lamp type, so that the lamp tube is stronger in adaptability and more convenient to use.

(3) The lamp tube driving circuit solves the communication and control problems of the microcontroller and the lamp tube, so that the lamp tube can operate more stably.

(4) The automatic identification method of the lamp enables the lamp to be plug and play, and the middle process does not need manual operation, so that the lamp is more convenient and intelligent to use.

Drawings

FIG. 1 is a structural component diagram of the present invention.

Fig. 2 is a view of the lamp post assembly of the present invention.

Fig. 3 is a system block diagram of the present invention.

Fig. 4 is a program flow diagram 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.

The invention provides a lamp tube coding structure and an automatic identification method thereof as shown in figures 1-4, which mainly comprise a lamp head, a lamp post, a microcontroller and the like, and is shown in figure 1 below. The lamp holder can be directly connected with various lamps such as a common illuminating lamp, a laser lamp and the like, and the lamp post is connected with the lamp holder through a power line. The lamp post comprises a storage chip (W25Q128 or AT24C02 and other storage chips) and a coding circuit PCB, a signal line of the coding circuit is connected with a microcontroller, and the microcontroller (STM32) can read and modify data of the storage chip in the lamp post through a certain communication mode (SPI or IIC communication mode).

The lamp post is composed of four parts, namely a lamp shell, a radiating fin, a storage chip and a coding circuit PCB. The lamp shell is an outermost wrapping layer and is used for wrapping and fixing the lamp cap and the circuit board. Because the lamp can continuously generate heat if the lamp works for a long time or the power is high, the radiating fins are close to the position of the lamp, and the heat is conveniently and quickly radiated. The storage chip is used for storing parameters such as the model number, the color, the voltage, the current and the like of the lamp, and the microcontroller (STM32) can add and modify the corresponding parameters according to actual needs. The self-made coding circuit consists of a normal working circuit for driving the lamp, a storage chip driving circuit, a microcontroller control circuit and the like, and aims to enable the microcontroller to identify the type of the lamp and drive the lamp to work normally according to the working parameters of the type of the lamp.

As shown in figure 2 below: the left side is the lamp pins, the middle is the self-made circuit board, and the right side is a row of pins for connecting with the microcontroller. The lamp post and the lamp are integrated or separated, and the lamp post and the microcontroller are separated to support plug-in type. If the lamp is broken, the user can replace the lamp only by simple plugging and unplugging, and the lamps of different types can be replaced, because the lamp is provided with the storage chip, the microcontroller can drive the lamps of different types to normally work according to the parameters of the storage chip.

As shown in the system block diagram of fig. 3 below, the dashed line box is an integral and may not be separated, and the lamp head and the dashed line box may be an integral and may also be separated, and the lamp head and the dashed line box may be referred to as a lamp with code (coded lamp). The lamp with the code and the microcontroller are separable, and the connection mode of the lamp and the microcontroller is a plug-in mode, so that the lamp is convenient to replace. Firstly, the coded lamp is that the microcontroller writes the relevant operating parameters of the lamp into the memory chip of the lamppost in advance. The process of coding the lamp is generally finished when the lamp with the code leaves a factory, and the lamp is supported to be changed by a user in actual use after leaving the factory, but the user is generally not advised to change the parameters of the storage chip in the lamp post at will, so that each lamp has the relevant working parameters when leaving the factory. Then, the user inserts the coded lamp into a microcontroller with a lamp socket, the microcontroller reads the data of the lamp post memory chip once every certain time interval (such as 50 milliseconds) in the process of executing the program, and the microcontroller processes the data read from the memory chip to control the normal operation of the lamp. The microcontroller thus accomplishes the identification and control of the different types of lamps.

The microcontroller program executes the following system flowchart shown in fig. 4, and after the program initialization is completed, a time slice (for example, 50 milliseconds) is set, and the reading of the data of the lamp tube memory chip, the processing of the data to obtain the data of the control lamp tube, the driving of the lamp operating program and other user programs are respectively completed in the time slice. Because the program always reads the data stored in the lamp chip in a loop, hot plugging is supported, i.e. the power can not be cut off in the process of replacing the lamp. Thus, the flexibility is high, and the replacement operation is very convenient.

The light supplement lamp for plant growth is described as an example.

The plant growth light supplement lamp is formed by matching a plurality of blue laser lamps with the wavelength of 460 +/-40 nm and a plurality of red laser lamps with the wavelength of 680 +/-40 nm according to a certain proportion (such as 12 red lamps and 3 blue lamps, the proportion of the lamps is 4: 1). Because the illumination that different plants need all is different, so the proportion collocation of blue light red light, specific proportion can carry out reasonable selection according to actual conditions, and the selection with the power size also has the difference. Therefore, the plant growth light filling lamp needs to have a connection mode which supports convenient disassembly and replacement, and the pluggable connection mode needs to be physically firm and good in electrical contact. In addition, the microcontroller can automatically recognize and control the operation of the blue light and the red light. Thereby reach the collocation proportion that the user need adjust blue lamp and red light, only need pull down the red light and trade blue lamp or the blue light is pulled down and trades the red light and can accomplish the adjustment of collocation proportion, vegetation light filling lamp just can normally work, does not need the user to carry out too many loaded down with trivial details operations, also can reduce the error rate of changing simultaneously to raise the efficiency greatly, make vegetation light filling lamp become more nimble and intelligent.

The plant growth fill light can be composed of 3 460nm blue laser lamps and 12 660nm red laser lamps arranged according to 5 x 3. The rated voltage of the blue lamp is 6V, and the rated power is 80 mW; rated voltage is 5V and rated power is 120mW when the lamp is at red. The blue light and the red light can all pass through the self-control circuit as shown in 2, namely the memory chip and the peripheral circuit thereof, and the microcontroller controls the brightness of the blue light and the red light in a PWM mode. The ratio of the blue light to the red light is not limited to the above ratio.

According to the requirement of the attached drawings of the invention, the self-made lamp tube comprises: the lamp holder is connected with a blue lamp (red lamp), and the lamp post comprises an AT24C02 memory chip, a self-made circuit board, a heat sink and a lamp shell. The self-made lamps are integrated into a whole, and are hereinafter referred to as lamps.

According to the requirements of the drawing, the microcontroller can select STM32, and the communication mode can select IIC protocol. This part and self-control vegetation light filling lamp PCB as an organic whole, hereinafter called the mainboard. The main board is provided with 15 sockets for the lamp tubes, and the sockets can be connected with the red lamp tubes or the blue lamp tubes.

The lamp tube and the main board are two mutually independent bodies. The mounting, dismounting and replacing modes only need to insert the lamp tube on the main board, and the adjustment of the matching proportion of the red lamp and the blue lamp can be completed only by pulling the lamp on the lamp tube and inserting the lamp in the lamp tube. If the fluorescent tube on the mainboard has burnt or has bad, only need to dismantle the fluorescent tube that bad get off install again go can, STM32 reads fluorescent tube memory chip's data automatically through the IIC agreement to carry out automatic control to the lamp, need not too much loaded down with trivial details operation, it is very convenient to the maintenance in later stage.

The method for automatically identifying the lamp tube of the plant light supplement lamp main board is that STM32 reads information of a coding chip in the lamp tube through an IIC communication protocol in each program operation period, and then controls the state, the brightness and the color and brightness matching proportion of the lamp. The brightness of the lamp is that STM32 changes the power of the lamp by adjusting the size of the PWM duty cycle, the PWM duty cycle of 100% represents the full power operation of the lamp, the PWM duty cycle of 0% represents the lamp to go out, and the brightness change of the lamp is realized by adjusting the PWM duty cycle from 1% -100%. The lamp color and brightness matching proportion is adjusted in such a way that the numbers of the red lamps and the blue lamps on the main board of the plant light supplementing lamp are fixed, and the brightness proportion of each red lamp and each blue lamp is changed, so that the color and brightness proportion of the red lamps and the blue lamps of the whole plant light supplementing lamp is changed. If the number proportion of the red lamps and the blue lamps on the plant light supplementing lamps needs to be changed, the lamp tubes need to be replaced manually.

For example, there are 15 lamps on a plant light supplement lamp mainboard, wherein 12 red lamps are provided, 3 blue lamps are provided, that is, the ratio of the number of the red lamps to the number of the blue lamps is 4:1, if the ratio needs to be changed to 2:1, 2 red lamps need to be manually changed to the blue lamps, and thus 10 red lamps and 5 blue lamps are changed. The light color and brightness matching proportion is that the number ratio (such as 4:1) of red light and blue light is fixed on the main board of the plant light supplement lamp, and if the current red light duty ratio is 60% and the current blue light duty ratio is 30%, the light color and brightness matching proportion is 2: 1. If the ratio of the brightness is to be changed to 3:1, the duty ratio of the red light can be adjusted to 90% or the duty ratio of the blue light can be adjusted to 20%, so as to change the ratio of the color and brightness matching of the light. The data of this example is only one proportion data of the plant fill light, and is also applicable to other proportion data.

The method comprises the following steps:

the lamp tube is programmed into relevant information of the lamp in the storage chip in the lamp tube when the lamp tube leaves a factory, and a user can modify corresponding data of the storage chip through corresponding operation before the lamp tube is installed on the plant growth light supplement lamp or the user can properly increase some required parameters according to needs. If the work is set from 6 pm to 5 am on monday weekly, this is just a simple explanation, and the user actually sets the work.

After the blue light and red light tubes are matched according to a certain ratio, the STM32 can automatically execute a corresponding program to control the plant growth light supplementing lamp after power is on. The STM32 can be adjusted by reading data of AT24C02 memory chip in the lamp tube by IIC to identify whether the lamp is red or blue, and the working voltage and current are needed, and according to user adjustment, when the blue lamp and the red lamp are on or off, and the brightness is needed. The intelligent control lamp has the characteristics of simple operation, flexible matching proportion and intelligent control.

After long-time operation, the blue lamp or the red lamp possibly has the service life, and is very convenient to replace. The user only needs simple dismantlement vegetation light filling lamp's shell screw, then directly pulls out bad fluorescent tube, inserts good fluorescent tube, then can accomplish the maintenance to the tight shell screw of turning round of light filling lamp. The plant growth light supplement lamp can continue to work normally.

In the description of the present invention, unless otherwise expressly specified or limited, the terms "disposed," "mounted," "connected," and "secured" are to be construed broadly, e.g., as meaning fixedly connected, detachably connected, or integral to; can be mechanically or electrically connected; either directly or indirectly through intervening media, either internally or in any other relationship. The specific meanings of the above terms in the present invention can be understood in specific cases to those skilled in the art.

The standard parts used by the invention can be purchased from the market, and the special-shaped parts can be customized according to the description and the description of the attached drawings.

Although embodiments of the present invention have been shown and described, it will be appreciated by those skilled in the art that changes, modifications, substitutions and alterations can be made in these embodiments without departing from the principles and spirit of the invention, the scope of which is defined in the appended claims.

9页详细技术资料下载
上一篇:一种医用注射器针头装配设备
下一篇:一种灯光显示的控制方法及装置

网友询问留言

已有0条留言

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

精彩留言,会给你点赞!