一种用于室内照明的节电控制系统A power-saving control system for indoor lighting
技术领域technical field
本实用新型涉及一种用于室内照明的节电控制系统,属于嵌入式开发和电力载波通信结合的领域。The utility model relates to a power-saving control system for indoor lighting, which belongs to the field of the combination of embedded development and power carrier communication.
背景技术Background technique
国内公共场所的室内照明系统通常采用手动控制,经常出现人少、无人或者环境亮度足够时灯仍全部点亮、灯管出现故障时工作人员未能及时发现和更换。尤其在学校教室、会议室、办公室等公共场所,经常出现此类情况。目前有些公共场所的照明系统虽然已采用自动控制,但当只需要局部照明时往往控制范围较大,形成过大和多余的照明区域,此外,在灯管出现故障时未能及时发出报警提示工作人员检修,损坏的灯管仍在消耗电能,这些都造成了极大的电能资源浪费。Indoor lighting systems in domestic public places are usually controlled manually, and there are often cases where there are few people, no one, or the lights are all lit when the ambient brightness is sufficient, and the staff fails to detect and replace the lamps in time when they fail. Especially in public places such as school classrooms, conference rooms, offices, etc., such situations often occur. At present, although the lighting system in some public places has adopted automatic control, when only local lighting is required, the control range is often large, resulting in excessive and redundant lighting areas. In addition, when the lamp tube fails, it fails to issue an alarm to remind the staff in time. Maintenance, damaged lamps are still consuming electricity, which has caused a great waste of electricity resources.
发明内容SUMMARY OF THE INVENTION
本实用新型提供了一种用于室内照明的节电控制系统,以用于根据室内光强检测模块与人体感应模块所采集的光强信息、人体活动信息控制灯管1、灯管2的亮灭,再进一步可以用于对灯管工作状态正常/异常进行判断,并将灯管工作正常/异常和点亮/熄灭的状态进行显示等。The utility model provides a power-saving control system for indoor lighting, which is used for controlling the lighting of lamps 1 and 2 according to the light intensity information and human activity information collected by an indoor light intensity detection module and a human body sensing module. It can be further used to judge the normal/abnormal working status of the lamp tube, and display the normal/abnormal working status of the lamp tube and the status of lighting/extinguishing.
本实用新型的技术方案是:一种用于室内照明的节电控制系统,包括电源转换模块1、人体感应模块2、室内光强检测模块3、灯管亮灭检测模块4、微处理器5、2路继电器模块7、照明灯8构成的子系统,子系统能有N个,N为室内照明灯8的数量;The technical scheme of the utility model is: a power-saving control system for indoor lighting, comprising a power conversion module 1, a human body sensing module 2, an indoor light intensity detection module 3, a lamp on-off detection module 4, and a microprocessor 5 , 2-way relay module 7, and a subsystem composed of lighting lamps 8, the subsystems can have N, and N is the number of indoor lighting lamps 8;
其中电源转换模块1、微处理器5、2路继电器模块7安装在灯罩14上的安装盒13中,人体感应模块2、室内光强检测模块3、灯管亮灭检测模块4和照明灯8安装在安装盒13外;电源转换模块1、2路继电器模块7、照明灯8与220VAC电源进线12连接,电源转换模块1再分别与微处理器5、人体感应模块2、室内光强检测模块3、灯管亮灭检测模块4和2路继电器模块7连接,微处理器5再分别与人体感应模块2、室内光强检测模块3、灯管亮灭检测模块4和2路继电器模块7连接,2路继电器模块7再与照明灯8连接。The power conversion module 1, the microprocessor 5, the 2-way relay module 7 are installed in the installation box 13 on the lampshade 14, the human body sensing module 2, the indoor light intensity detection module 3, the lamp on-off detection module 4 and the lighting lamp 8 Installed outside the installation box 13; the power conversion module 1, the 2-way relay module 7, and the lighting lamp 8 are connected to the 220VAC power supply line 12, and the power conversion module 1 is respectively connected to the microprocessor 5, the human body induction module 2, and the indoor light intensity detection. Module 3, lamp on/off detection module 4 and 2-way relay module 7 are connected, and the microprocessor 5 is connected with human body sensing module 2, indoor light intensity detection module 3, lamp on-off detection module 4 and 2-way relay module 7 respectively connected, the 2-way relay module 7 is then connected to the lighting lamp 8.
还包括安装在安装盒13中的电力载波模块Ⅰ6,以及安装在集控室的主系统;电力载波模块Ⅰ6的个数与子系统个数相同,主系统包括电力载波模块Ⅱ9、TTL转USB模块10、电脑11;电力载波模块Ⅰ6与电源转换模块1连接,微处理器5通过电力载波模块Ⅰ6经220VAC电源进线12与电力载波模块Ⅱ9连接,TTL转USB模块10与电力载波模块Ⅱ9、电脑11连接。It also includes the power carrier module I6 installed in the installation box 13, and the main system installed in the centralized control room; the number of the power carrier module I6 is the same as the number of subsystems, and the main system includes the power carrier module II9, TTL to USB module 10 , computer 11; the power carrier module I6 is connected to the power conversion module 1, the microprocessor 5 is connected to the power carrier module II9 through the power carrier module I6 and the 220VAC power input line 12, the TTL to USB module 10 is connected to the power carrier module II9, computer 11 connect.
所述电源转换模块1型号为RS-25-5;其中,RS-25-5的L、N端分别与220VAC电源进线12连接,+5V端输出5V直流电压,GND端接地,此模块将220V交流电压转换为5V直流电压,为人体感应模块2、室内光强检测模块3、灯管亮灭检测模块4、微处理器5、电力载波模块Ⅰ6、2路继电器模块7提供直流电源。The model of the power conversion module 1 is RS-25-5; wherein, the L and N terminals of the RS-25-5 are respectively connected to the 220VAC power input line 12, the +5V terminal outputs 5V DC voltage, and the GND terminal is grounded. The 220V AC voltage is converted into 5V DC voltage, which provides DC power for the human body induction module 2, the indoor light intensity detection module 3, the lamp on and off detection module 4, the microprocessor 5, the power carrier module I6, and the 2-way relay module 7.
所述人体感应模块2为热释电人体红外传感器模块,型号为HC-SR501,安装在由塑料制成的空心外螺纹套管Ⅱ17的无螺纹一端,空心外螺纹套管Ⅱ17有螺纹的一端通过灯罩14上开设的螺孔用螺母15固定在灯罩14中心;HC-SR501的VCC端接5V直流电源,GND端接地,OUT端接微处理器5的23端。The human body sensing module 2 is a pyroelectric human body infrared sensor module, the model is HC-SR501, which is installed on the unthreaded end of the hollow externally threaded sleeve II17 made of plastic, and the threaded end of the hollow externally threaded sleeve II17 passes through. The screw hole opened on the lampshade 14 is fixed in the center of the lampshade 14 with the nut 15;
所述室内光强检测模块3为光敏电阻传感器模块,型号为G5516;室内光强检测模块3采用的G5516的VCC端接5V直流电源,GND端接地,AO端接微处理器5的11端,DO端悬空;The indoor light intensity detection module 3 is a photoresistor sensor module, the model is G5516; the VCC terminal of the G5516 used in the indoor light intensity detection module 3 is connected to the 5V DC power supply, the GND terminal is grounded, and the AO terminal is connected to the 11 terminal of the microprocessor 5. The DO terminal is left floating;
所述灯管亮灭检测模块4由灯管1亮灭检测模块4-1和灯管2亮灭检测模块4-2组成,灯管1亮灭检测模块4-1和灯管2亮灭检测模块4-2均采用光敏电阻传感器模块,分别安装于由黑色不透明塑料制成的两个空心外螺纹套管Ⅰ16中,空心外螺纹套管Ⅰ16通过灯罩14上开设的螺孔用螺母15固定在灯罩14上,分别位于照明灯8的灯管18-1、灯管28-2上方;光敏电阻传感器模块型号为G5516,两上G5516的DO端分别接微处理器5的9和10端,AO端悬空,VCC端接5V直流电源,GND端接地。The lamp on/off detection module 4 is composed of a lamp 1 on/off detection module 4-1 and a lamp 2 on/off detection module 4-2, the lamp 1 on/off detection module 4-1 and the lamp 2 on/off detection module 4-1 Modules 4-2 all use photoresistor sensor modules, which are respectively installed in two hollow external thread sleeves I16 made of black opaque plastic. The lampshade 14 is located above the lamp 18-1 and the lamp 28-2 of the lighting lamp 8 respectively; the model of the photoresistor sensor module is G5516, the DO terminals of the two G5516 are respectively connected to the 9 and 10 terminals of the microprocessor 5, AO The terminal is floating, the VCC terminal is connected to the 5V DC power supply, and the GND terminal is grounded.
所述微处理器5采用STC15F2K61S2单片机,内部带8通道10位A/D转换器,其VCC端接5V直流电源,GND端接地,微处理器5的23端接人体感应模块2,微处理器5的11端接室内光强检测模块3,微处理器5的9和10端接灯管亮灭检测模块4,微处理器5的21、22端接电力载波模块Ⅰ6,微处理器5的33与32端接2路继电器模块7。The microprocessor 5 adopts STC15F2K61S2 single-chip microcomputer, with an 8-channel 10-bit A/D converter inside, its VCC terminal is connected to 5V DC power supply, the GND terminal is grounded, the 23 terminal of the microprocessor 5 is connected to the human body sensing module 2, and the microprocessor Terminal 11 of 5 is connected to indoor light intensity detection module 3, terminals 9 and 10 of microprocessor 5 are connected to lamp on-off detection module 4, terminals 21 and 22 of Terminals 33 and 32 are connected to 2-way relay module 7.
所述电力载波模块Ⅰ6采用KQ-130F系列,其VCC端和+5V端接5V直流电源,GND端接地,RX端接微处理器5的22端,TX接微处理器5的21端,L、N端与220VAC电源进线12连接,MODE和NC/RST端悬空。The power carrier module I6 adopts KQ-130F series, its VCC terminal and +5V terminal are connected to 5V DC power supply, the GND terminal is grounded, the RX terminal is connected to the 22 terminal of the microprocessor 5, the TX terminal is connected to the 21 terminal of the microprocessor 5, and the L , The N terminal is connected to the 220VAC power supply line 12, and the MODE and NC/RST terminals are suspended.
所述2路继电器模块7采用2路5V继电器,型号为RM2HLE,2路继电器模块7的VCC端接5V直流电源,GND端接地,VREF端接地,IN1与IN2端分别接微处理器5的33与32端,公共端COM1与COM2并联后接220VAC电源进线12的一极,常闭触点端NC1与NC2分别接照明灯8的两个灯管的电源端L0与L1;The 2-way relay module 7 adopts 2-way 5V relay, the model is RM2HLE, the VCC terminal of the 2-way relay module 7 is connected to the 5V DC power supply, the GND terminal is grounded, the VREF terminal is grounded, and the IN1 and IN2 terminals are respectively connected to the 33 of the microprocessor 5. 32 terminals, the common terminals COM1 and COM2 are connected in parallel with one pole of the 220VAC power supply line 12, and the normally closed contact terminals NC1 and NC2 are respectively connected to the power terminals L0 and L1 of the two lamps of the lighting lamp 8;
所述照明灯8包括灯管18-1和灯管28-2,型号均为FSL T8LED,灯管18-1的电源端L0和灯管28-2的电源端L1分别接2路继电器模块7的NC1和NC2端,灯管18-1的电源端N0和灯管28-2的电源端N1并联后接220VAC电源进线12的另一极。The lighting lamp 8 includes a lamp tube 18-1 and a lamp tube 28-2, both of which are FSL T8LED. The power supply terminal L0 of the lamp tube 18-1 and the power supply terminal L1 of the lamp tube 28-2 are respectively connected to 2-way relay modules 7. The NC1 and NC2 terminals, the power terminal N0 of the lamp 18-1 and the power terminal N1 of the lamp 28-2 are connected in parallel with the other pole of the 220VAC power supply line 12.
所述电力载波模块Ⅱ9采用KQ-130F系列,TTL转USB模块10采用CH340G系列,电力载波模块Ⅱ9的L、N端与220VAC电源进线12连接,电力载波模块Ⅱ9的VCC端和+5V端接TTL转USB模块10的5V端,电力载波模块Ⅱ9的GND端、RX端、TX端分别接TTL转USB模块10的GND端、TXD端、RXD端,电力载波模块Ⅱ9的MODE和NC/RST端悬空,TTL转USB模块10的3V3端悬空,TTL转USB模块10的USB口与电脑11的USB口连接。The power carrier module II9 adopts the KQ-130F series, the TTL to USB module 10 adopts the CH340G series, the L and N terminals of the power carrier module II9 are connected to the 220VAC power input line 12, and the VCC terminal of the power carrier module II9 is connected to the +5V terminal The 5V terminal of TTL to USB module 10, the GND terminal, RX terminal and TX terminal of power carrier module II9 are respectively connected to the GND terminal, TXD terminal and RXD terminal of TTL to USB module 10, and the MODE and NC/RST terminals of power carrier module II9 In the air, the 3V3 end of the TTL to USB module 10 is left in the air, and the USB port of the TTL to USB module 10 is connected to the USB port of the computer 11 .
本实用新型的有益效果是:①该系统中的子系统安装于室内单个照明灯(双灯管)灯座上,室内有N个灯座的情况下可安装N个子系统,对于距离合适的每个灯座,通过安装子系统(各个子系统间的控制是独立的),每个子系统根据室内光强检测模块与人体感应模块所采集的灯座周围的光强信息和人体活动信息控制灯管1、灯管2的亮灭。如此,可自动点亮有人和光强不足的区域的灯,自动熄灭有人(或无人)但光强足够的区域的灯和光强不足但无人活动的区域的灯,实现局部照明控制,从而节约电能。②本实用新型主系统可实时监测N个子系统中灯管的工作正常/异常状态,当异常时在主系统中发出报警,提示工作人员进行检修。③本实用新型可实时监测N个子系统中灯管的点亮/熄灭状态,工作人员可通过主系统电脑查看各个子系统灯管的工作状态(点亮/熄灭、正常/异常)。④本实用新型可用于管理人员远程实时控制N个子系统任意灯管的点亮/熄灭。The beneficial effects of the utility model are: 1. The subsystems in the system are installed on the lamp socket of a single lamp (dual lamp) in the room. When there are N lamp sockets in the room, N subsystems can be installed. By installing subsystems (the control between each subsystem is independent), each subsystem controls the lamp tube according to the light intensity information and human activity information around the lamp holder collected by the indoor light intensity detection module and the human body sensing module. 1. Lamp 2 turns on and off. In this way, the lights in the areas with people and insufficient light intensity can be automatically turned on, and the lights in the areas with people (or no one) but sufficient light intensity and the lights in the areas with insufficient light intensity but no people are automatically turned off, so as to realize local lighting control, Thereby saving electric energy. ②The main system of the utility model can monitor the working normal/abnormal state of the lamps in the N subsystems in real time, and when abnormal, an alarm is issued in the main system to remind the staff to carry out maintenance. ③The utility model can monitor the lighting/extinguishing status of the lamps in N subsystems in real time, and the staff can check the working status (on/off, normal/abnormal) of the lamps of each subsystem through the main system computer. ④ The utility model can be used for the management personnel to remotely control the lighting/extinguishment of any lamp tube of the N subsystems in real time.
附图说明Description of drawings
图1是本实用新型系统结构框图;Fig. 1 is the system structure block diagram of the present utility model;
图2是本实用新型子系统安装俯视示意图;FIG. 2 is a schematic top view of the installation of the subsystem of the present invention;
图3是本实用新型图2的A-A剖面图;Fig. 3 is the A-A sectional view of Fig. 2 of the present utility model;
图4是人体感应模块感应范围示意图;FIG. 4 is a schematic diagram of the sensing range of the human body sensing module;
图5是子系统电路原理图(图5中所有标注+5V的地方电性连接);Figure 5 is a schematic diagram of the subsystem circuit (all places marked +5V in Figure 5 are electrically connected);
图6是主系统电路原理图;Figure 6 is a schematic diagram of the main system circuit;
图中各标号:1-电源转换模块、2-人体感应模块、3-室内光强检测模块、4-灯管亮灭检测模块、4-1-灯管1亮灭检测模块、4-2灯管2亮灭检测模块、5-微处理器、6-电力载波模块Ⅰ、7-2路继电器模块、8-照明灯、8-1-灯管1、8-2-灯管2、9-电力载波模块Ⅱ、10-TTL转USB模块、11-电脑、12-220VAC电源进线、13-安装盒、14-灯罩、15-螺母、16-空心外螺纹套管Ⅰ、17-空心外螺纹套管Ⅱ、H是人体感应模块2安装位置距地面的距离,L是人体感应模块2能感应到的最大距离,r为人体感应模块能感应到的人在地面上活动范围的半径。Labels in the figure: 1-power conversion module, 2-human body sensing module, 3-indoor light intensity detection module, 4-lamp on/off detection module, 4-1-lamp 1 on/off detection module, 4-2 lamp Tube 2 on-off detection module, 5-microprocessor, 6-power carrier module I, 7-2 relay modules, 8-lighting lamp, 8-1-light tube 1, 8-2-light tube 2, 9- Power carrier module II, 10-TTL to USB module, 11-computer, 12-220VAC power inlet, 13-installation box, 14-lampshade, 15-nut, 16-hollow external thread sleeve I, 17-hollow external thread Sleeves II and H are the distance between the installation position of the human body sensing module 2 and the ground, L is the maximum distance that the human body sensing module 2 can sense, and r is the radius of the human movement range on the ground that the human body sensing module can sense.
具体实施方式Detailed ways
实施例1:如图1-6所示,一种用于室内照明的节电控制系统,包括电源转换模块1、人体感应模块2、室内光强检测模块3、灯管亮灭检测模块4、微处理器5、2路继电器模块7、照明灯8构成的子系统,子系统能有N个,N为室内照明灯8的数量;其中电源转换模块1、微处理器5、2路继电器模块7安装在灯罩14上的安装盒13中,人体感应模块2、室内光强检测模块3、灯管亮灭检测模块4和照明灯8安装在安装盒13外;电源转换模块1、2路继电器模块7、照明灯8与220VAC电源进线12连接,电源转换模块1再分别与微处理器5、人体感应模块2、室内光强检测模块3、灯管亮灭检测模块4和2路继电器模块7连接,微处理器5再分别与人体感应模块2、室内光强检测模块3、灯管亮灭检测模块4和2路继电器模块7连接,2路继电器模块7再与照明灯8连接。Embodiment 1: As shown in Figures 1-6, a power-saving control system for indoor lighting includes a power conversion module 1, a human body sensing module 2, an indoor light intensity detection module 3, a lamp on-off detection module 4, Microprocessor 5, 2-way relay module 7, and a subsystem composed of lighting lamps 8, the subsystems can have N, and N is the number of indoor lighting lamps 8; among them, power conversion module 1, microprocessor 5, and 2-way relay modules 7. Installed in the installation box 13 on the lampshade 14, the human body sensing module 2, the indoor light intensity detection module 3, the lamp on-off detection module 4 and the lighting lamp 8 are installed outside the installation box 13; the power conversion module 1, 2 relays Module 7 and lighting lamp 8 are connected to the 220VAC power supply line 12, and the power conversion module 1 is respectively connected to the microprocessor 5, the human body sensing module 2, the indoor light intensity detection module 3, the lamp on-off detection module 4 and the 2-way relay module. 7 is connected, and the microprocessor 5 is connected with the human body sensing module 2, the indoor light intensity detection module 3, the lamp on-off detection module 4 and the 2-way relay module 7 respectively, and the 2-way relay module 7 is connected with the lighting lamp 8.
进一步地,可以设置还包括安装在安装盒13中的电力载波模块Ⅰ6,以及安装在集控室的主系统;电力载波模块Ⅰ6的个数与子系统个数相同,主系统包括电力载波模块Ⅱ9、TTL转USB模块10、电脑11;电力载波模块Ⅰ6与电源转换模块1连接,微处理器5通过电力载波模块Ⅰ6经220VAC电源进线12与电力载波模块Ⅱ9连接,TTL转USB模块10与电力载波模块Ⅱ9、电脑11连接。Further, the power carrier module I6 installed in the installation box 13 and the main system installed in the centralized control room can be provided; the number of the power carrier module I6 is the same as the number of subsystems, and the main system includes the power carrier module II9, TTL to USB module 10, computer 11; the power carrier module I6 is connected to the power conversion module 1, the microprocessor 5 is connected to the power carrier module II9 through the power carrier module I6 and the 220VAC power input line 12, and the TTL to USB module 10 is connected to the power carrier Module II9 and computer 11 are connected.
进一步地,可以设置所述电源转换模块1型号为RS-25-5;其中,RS-25-5的L、N端分别与220VAC电源进线12连接,+5V端输出5V直流电压,GND端接地,此模块将220V交流电压转换为5V直流电压,为人体感应模块2、室内光强检测模块3、灯管亮灭检测模块4、微处理器5、电力载波模块Ⅰ6、2路继电器模块7提供直流电源。Further, the model of the power conversion module 1 can be set as RS-25-5; wherein, the L and N terminals of the RS-25-5 are respectively connected with the 220VAC power supply line 12, the +5V terminal outputs 5V DC voltage, and the GND terminal Grounding, this module converts 220V AC voltage to 5V DC voltage, which is human body induction module 2, indoor light intensity detection module 3, lamp on/off detection module 4, microprocessor 5, power carrier module I6, 2-way relay module 7 Provides DC power.
进一步地,可以设置所述人体感应模块2为热释电人体红外传感器模块,型号为HC-SR501,安装在由塑料制成的空心外螺纹套管Ⅱ17的无螺纹一端,空心外螺纹套管Ⅱ17有螺纹的一端通过灯罩14上开设的螺孔用螺母15固定在灯罩14中心;HC-SR501的VCC端接5V直流电源,GND端接地,OUT端接微处理器5的23端。Further, the human body sensing module 2 can be set as a pyroelectric human body infrared sensor module, the model is HC-SR501, which is installed on the unthreaded end of the hollow externally threaded sleeve II17 made of plastic, and the hollow externally threaded sleeve II17 The threaded end is fixed to the center of the lampshade 14 with the nut 15 through the screw hole opened on the lampshade 14;
进一步地,可以设置所述室内光强检测模块3为光敏电阻传感器模块,型号为G5516;室内光强检测模块3采用的G5516的VCC端接5V直流电源,GND端接地,AO端接微处理器5的11端,DO端悬空;还可以设置所述灯管亮灭检测模块4由灯管1亮灭检测模块4-1和灯管2亮灭检测模块4-2组成,灯管1亮灭检测模块4-1和灯管2亮灭检测模块4-2均采用光敏电阻传感器模块,分别安装于由黑色不透明塑料制成的两个空心外螺纹套管Ⅰ16中,空心外螺纹套管Ⅰ16通过灯罩14上开设的螺孔用螺母15固定在灯罩14上,分别位于照明灯8的灯管18-1、灯管28-2上方;光敏电阻传感器模块型号为G5516,两上G5516的DO端分别接微处理器5的9和10端,AO端悬空,VCC端接5V直流电源,GND端接地。Further, the indoor light intensity detection module 3 can be set to be a photoresistor sensor module, the model is G5516; the VCC terminal of the G5516 used by the indoor light intensity detection module 3 is connected to a 5V DC power supply, the GND terminal is grounded, and the AO terminal is connected to the microprocessor. The 11th terminal of 5, the DO terminal is suspended; it can also be set that the lamp on/off detection module 4 is composed of the lamp 1 on/off detection module 4-1 and the lamp 2 on/off detection module 4-2, the lamp 1 on/off The detection module 4-1 and the light-off detection module 4-2 of the lamp 2 both use photoresistor sensor modules, which are respectively installed in two hollow externally threaded sleeves I16 made of black opaque plastic, and the hollow externally threaded sleeves I16 pass through. The screw holes opened on the lampshade 14 are fixed on the lampshade 14 with nuts 15, and are respectively located above the lamps 18-1 and 28-2 of the lamp 8; the model of the photoresistor sensor module is G5516, and the DO ends of the two G5516 are respectively Connect to the 9 and 10 terminals of the microprocessor 5, the AO terminal is floating, the VCC terminal is connected to the 5V DC power supply, and the GND terminal is grounded.
进一步地,可以设置所述微处理器5采用STC15F2K61S2单片机,内部带8通道10位A/D转换器,其VCC端接5V直流电源,GND端接地,微处理器5的23端接人体感应模块2,微处理器5的11端接室内光强检测模块3,微处理器5的9和10端接灯管亮灭检测模块4,微处理器5的21、22端接电力载波模块Ⅰ6,微处理器5的33与32端接2路继电器模块7。Further, it can be set that the microprocessor 5 adopts STC15F2K61S2 single-chip microcomputer, with an 8-channel 10-bit A/D converter inside, its VCC terminal is connected to the 5V DC power supply, the GND terminal is grounded, and the 23 terminal of the microprocessor 5 is connected to the human body sensing module. 2. The terminal 11 of the microprocessor 5 is connected to the indoor light intensity detection module 3, the terminals 9 and 10 of the microprocessor 5 are connected to the lamp on-off detection module 4, and the terminals 21 and 22 of the microprocessor 5 are connected to the power carrier module I6. Terminals 33 and 32 of the microprocessor 5 are connected to the 2-way relay module 7 .
进一步地,可以设置所述电力载波模块Ⅰ6采用KQ-130F系列,其VCC端和+5V端接5V直流电源,GND端接地,RX端接微处理器5的22端,TX接微处理器5的21端,L、N端与220VAC电源进线12连接,MODE和NC/RST端悬空。Further, the power carrier module I6 can be set to use KQ-130F series, its VCC terminal and +5V terminal are connected to 5V DC power supply, the GND terminal is grounded, the RX terminal is connected to the 22 terminal of the microprocessor 5, and the TX terminal is connected to the microprocessor 5. 21 terminals, L and N terminals are connected to the 220VAC power supply line 12, and the MODE and NC/RST terminals are left floating.
进一步地,可以设置所述2路继电器模块7采用2路5V继电器,型号为RM2HLE,2路继电器模块7的VCC端接5V直流电源,GND端接地,VREF端接地,IN1与IN2端分别接微处理器5的33与32端,公共端COM1与COM2并联后接220VAC电源进线12的一极,常闭触点端NC1与NC2分别接照明灯8的两个灯管的电源端L0与L1;所述照明灯8包括灯管18-1和灯管28-2,型号均为FSL T8LED,灯管18-1的电源端L0和灯管28-2的电源端L1分别接2路继电器模块7的NC1和NC2端,灯管18-1的电源端N0和灯管28-2的电源端N1并联后接220VAC电源进线12的另一极。Further, it can be set that the 2-way relay module 7 adopts 2-way 5V relay, the model is RM2HLE, the VCC terminal of the 2-way relay module 7 is connected to the 5V DC power supply, the GND terminal is grounded, the VREF terminal is grounded, and the IN1 and IN2 terminals are respectively connected to the microcomputer. Terminals 33 and 32 of the processor 5, the common terminals COM1 and COM2 are connected in parallel with one pole of the 220VAC power supply line 12, and the normally closed contact terminals NC1 and NC2 are respectively connected to the power terminals L0 and L1 of the two lamps of the lighting lamp 8 ; Described lighting lamp 8 includes lamp tube 18-1 and lamp tube 28-2, the model is FSL T8LED, the power supply terminal L0 of lamp tube 18-1 and the power supply terminal L1 of lamp tube 28-2 are respectively connected to 2-way relay modules 7 of the NC1 and NC2 terminals, the power terminal N0 of the lamp 18-1 and the power terminal N1 of the lamp 28-2 are connected in parallel with the other pole of the 220VAC power supply line 12.
进一步地,可以设置所述电力载波模块Ⅱ9采用KQ-130F系列,TTL转USB模块10采用CH340G系列,电力载波模块Ⅱ9的L、N端与220VAC电源进线12连接,电力载波模块Ⅱ9的VCC端和+5V端接TTL转USB模块10的5V端,电力载波模块Ⅱ9的GND端、RX端、TX端分别接TTL转USB模块10的GND端、TXD端、RXD端,电力载波模块Ⅱ9的MODE和NC/RST端悬空,TTL转USB模块10的3V3端悬空,TTL转USB模块10的USB口与电脑11的USB口连接。Further, it can be set that the power carrier module II9 adopts the KQ-130F series, the TTL to USB module 10 adopts the CH340G series, the L and N terminals of the power carrier module II9 are connected to the 220VAC power supply line 12, and the VCC terminal of the power carrier module II9 is connected. and +5V terminals are connected to the 5V terminal of the TTL to USB module 10, the GND terminal, RX terminal and TX terminal of the power carrier module II9 are respectively connected to the GND terminal, TXD terminal and RXD terminal of the TTL to USB module 10, and the MODE of the power carrier module II9 And the NC/RST terminal is suspended, the 3V3 terminal of the TTL to USB module 10 is suspended, and the USB port of the TTL to USB module 10 is connected to the USB port of the computer 11 .
本实用新型的工作原理是:The working principle of the utility model is:
本实用新型包括子系统和主系统,子系统可有N个,每个子系统设置一个独有的ID,N为室内照明灯8的数量。子系统根据室内光强检测模块与人体感应模块所采集的灯座周围光强信息、人体活动信息控制照明灯的工作,实现三种不同的照明灯工作模式,实现局部照明控制,以达到节约电能的目的。并且子系统可采集灯管当前点亮/熄灭状态,再进一步可判断灯管工作正常/异常,并将当前灯管工作正常/异常和点亮/熄灭的状态信息附加子系统ID后传输至主系统中显示,且当任意灯管工作异常时在主系统中发出报警,提示工作人员进行检修。此外,通过主系统中电脑可人为远程控制N个子系统中任意灯管的点亮/熄灭。The utility model includes a subsystem and a main system, the number of subsystems can be N, each subsystem is set with a unique ID, and N is the number of indoor lighting lamps 8 . The subsystem controls the work of the lighting lamp according to the light intensity information around the lamp holder and human activity information collected by the indoor light intensity detection module and the human body sensing module, realizes three different lighting lamp working modes, and realizes local lighting control to save electric energy. the goal of. In addition, the subsystem can collect the current lighting/extinguishing status of the lamp, and then further judge whether the lamp is working normally/abnormally, and attach the status information of the current lamp working normally/abnormally and lighting/extinguishing to the main unit after attaching the subsystem ID. Displayed in the system, and when any lamp works abnormally, an alarm will be issued in the main system, prompting the staff to carry out maintenance. In addition, through the computer in the main system, the on/off of any lamp in the N subsystems can be remotely controlled manually.
1、子系统的工作原理:1. The working principle of the subsystem:
(1)电源转换模块1将220V交流电转换为5V直流电,为其它模块供电。室内光强检测模块3采用光敏电阻传感器模块,用于检测环境光照强度,室内光强检测模块3检测到的光强越大,其AO端输出的模拟电压越小,反之则越大。室内光强检测模块3将检测到的环境光强模拟量信号从其AO端送到微处理器5经A/D转换为数字量,微处理器5根据此数字量将环境光照强度分为三个亮度级别(超亮、较亮和较暗)。灯管亮灭检测模块4也采用光敏电阻传感器模块,当灯管熄灭时,其DO端输出高电平,反之则输出低电平。人体感应模块2利用热释电人体红外传感器模块,能感应灯下地面半径r范围内是否有活动的人体,热释电人体红外传感器模块设为可重复触发模式,其感应延时时间设置为5分钟(或者更长时间)。如有活动的人体,其输出持续感应延时时间的高电平信号至微处理器5,如无活动的人体,其输出低电平信号至微处理器5。2路继电器模块7采用高电平触发,即其接收到微处理器5输出的高电平时,常开触点闭合,常闭触点断开,反之,则常开触点断开,常闭触点闭合。(1) Power conversion module 1 converts 220V alternating current into 5V direct current to supply power to other modules. The indoor light intensity detection module 3 adopts a photoresistor sensor module to detect the ambient light intensity. The greater the light intensity detected by the indoor light intensity detection module 3, the smaller the analog voltage output by the AO terminal, and vice versa. The indoor light intensity detection module 3 sends the detected ambient light intensity analog signal from its AO end to the microprocessor 5 for A/D conversion into a digital quantity, and the microprocessor 5 divides the ambient light intensity into three parts according to this digital quantity. brightness levels (superbright, brighter, and darker). The light-on-off detection module 4 also adopts a photoresistor sensor module. When the light-tube is off, its DO terminal outputs a high level, otherwise, it outputs a low level. The human body induction module 2 uses the pyroelectric human body infrared sensor module to sense whether there is an active human body within the radius r of the ground under the lamp. The pyroelectric human body infrared sensor module is set to a repeatable trigger mode, and its induction delay time is set to 5 minutes (or longer). If there is an active human body, it outputs a high-level signal that continues the induction delay time to the microprocessor 5. If there is no active human body, it outputs a low-level signal to the microprocessor 5. The 2-way relay module 7 adopts a high-level signal. Flat trigger, that is, when it receives the high level output from the microprocessor 5, the normally open contact is closed and the normally closed contact is disconnected; otherwise, the normally open contact is disconnected and the normally closed contact is closed.
在不同环境亮度级别(超亮、较亮和较暗)情况下子系统具有三种不同的工作模式,具体如下:The subsystem has three different operating modes under different ambient brightness levels (superbright, brighter, and darker), as follows:
工作模式一:当室内光强检测模块3检测到的光强信号经微处理器5的A/D转换后的数字量小于400时,系统处于超亮工作模式,此时微处理器5的33、32端输出高电平信号控制2路继电器7的NC1、NC2端常闭触点断开,使灯管1和灯管2置于全灭状态,人体感应模块2不起作用。Working mode 1: When the digital quantity of the light intensity signal detected by the indoor light intensity detection module 3 after the A/D conversion of the microprocessor 5 is less than 400, the system is in the ultra-bright working mode. At this time, 33 of the microprocessor 5 , Terminal 32 outputs a high level signal to control the normally closed contacts of the NC1 and NC2 terminals of the 2-way relay 7 to be disconnected, so that the lamp 1 and lamp 2 are placed in a completely off state, and the human body induction module 2 does not work.
工作模式二:当室内光强检测模块3检测到的光强信号经微处理器5的A/D转换后的数字量大于或等于400且小于600时,系统处于较亮工作模式,此时微处理器5的32端输出高电平信号控制2路继电器7的NC2端常闭触点断开,使灯管2熄灭,同时,根据人体感应模块2送来的检测信号,微处理器5的33端输出信号控制2路继电器7的NC1端常闭触点,具体为:情况①,灯下无活动的人体时,微处理器5的33端输出高电平至2路继电器模块7的IN1端,使灯管1熄灭;情况②,灯下有活动的人体时,微处理器5的33端输出低电平至2路继电器模块7的IN1端,使灯管1点亮。Working mode 2: When the digital quantity of the light intensity signal detected by the indoor light intensity detection module 3 after the A/D conversion of the microprocessor 5 is greater than or equal to 400 and less than 600, the system is in a brighter working mode. The 32 terminal of the processor 5 outputs a high level signal to control the normally closed contact of the NC2 terminal of the 2-way relay 7 to disconnect, so that the lamp 2 is extinguished. At the same time, according to the detection signal sent by the human body induction module 2, the The output signal of terminal 33 controls the normally closed contact of the NC1 terminal of the 2-way relay 7, specifically: situation ①, when there is no human body under the lamp, the 33-terminal of the microprocessor 5 outputs a high level to the IN1 of the 2-way relay module 7 terminal, so that the lamp 1 goes out; in case ②, when there is a moving human body under the lamp, the 33 terminal of the microprocessor 5 outputs a low level to the IN1 terminal of the 2-way relay module 7, so that the lamp 1 is lit.
工作模式三:当室内光强检测模块3检测到的光强信号经微处理器5的A/D转换后的数字量大于或等于600时,系统处于较暗工作模式,此时微处理器5根据人体感应模块2送来的检测信号控制2路继电器模块7动作,具体为:情况①,灯下无活动的人体时,微处理器5的33、32端输出高电平至2路继电器模块7,使灯管1和灯管2熄灭;情况②,灯下有活动的人体时,微处理器5的33、32端输出低电平至2路继电器模块7,使得灯管1和灯管2全亮;情况③,灯下有活动的人体变为无活动的人体时,微处理器5的33端输出不变(灯管1点亮),微处理器5的32端输出高电平至2路继电器模块7,使灯管2先熄灭(提示灯下人做出轻微动作),并延时1分钟;若在延时的1分钟内检测到有活动的人体则微处理器5的32端输出低电平至2路继电器模块7,使灯管2再次点亮;若在延时的1分钟后检测到灯下仍无活动的人体则微处理器5的33端输出变为高电平送至2路继电器模块7,使灯管1也熄灭,即返回情况①;若在延时的1分钟后检测到灯下有活动的人体则返回情况②。Working mode 3: When the digital quantity of the light intensity signal detected by the indoor light intensity detection module 3 is greater than or equal to 600 after the A/D conversion of the microprocessor 5, the system is in a dark working mode, and the microprocessor 5 Control the action of the 2-way relay module 7 according to the detection signal sent by the human body sensing module 2, specifically: in the case ①, when there is no human body under the light, the 33 and 32 terminals of the microprocessor 5 output a high level to the 2-way relay module 7. Turn off lamp 1 and lamp 2; in case ②, when there is an active human body under the lamp, the 33 and 32 terminals of the microprocessor 5 output low level to the 2-way relay module 7, so that the lamp 1 and the lamp are 2 is fully on; in case ③, when the human body with activity under the lamp becomes an inactive human body, the output of terminal 33 of the microprocessor 5 remains unchanged (the lamp 1 is lit), and the terminal 32 of the microprocessor 5 outputs a high level Go to the 2-way relay module 7, make the lamp 2 go out first (prompt the person under the lamp to make a slight movement), and delay for 1 minute; if a moving human body is detected within 1 minute of the delay, the microprocessor 5 Terminal 32 outputs a low level to the 2-way relay module 7, so that the lamp 2 lights up again; if there is no human body under the lamp detected after a delay of 1 minute, the output of terminal 33 of the microprocessor 5 becomes high The level is sent to the 2-way relay module 7, so that the lamp 1 is also extinguished, that is, returning to situation ①; if a human body is detected under the lamp after a delay of 1 minute, it returns to situation ②.
在室内每个双灯管照明灯的灯座上安装该子系统,并根据人体感应模块2的感应范围合理布局灯座间距,则可感应到室内不同位置是否有人,通过以上不同环境光强下三种工作模式的控制,即可实现自动根据室内不同位置的环境亮度和是否有人点亮相应位置的灯,实现室内局部照明控制,达到节能。Install this subsystem on the lamp socket of each double-tube lighting lamp in the room, and arrange the distance between the lamp sockets reasonably according to the sensing range of the human body sensing module 2, so that it can sense whether there are people in different positions in the room. The control of the three working modes can automatically realize the indoor local lighting control according to the ambient brightness of different indoor positions and whether someone lights up the lamps in the corresponding positions, so as to achieve energy saving.
人体感应模块2的感应范围为地面半径r的圆形区域,r的计算方法如下:The sensing range of the human body sensing module 2 is a circular area with a ground radius r. The calculation method of r is as follows:
人体感应模块2安装位置如图3所示,其感应范围示意图如图4所示,图4中热释电人体红外传感器模块安装于O点,由热释电人体红外传感器模块资料手册可知,其感应范围为一个圆锥体与部分球体组合而成,图中为感应范围的剖面图,其中ABC三点在同一个圆上,AO=BO=3~4米,L=5~7米,∠AOB=100°,将传感器感应的最大距离调为L=7米,AO=4米,热释电人体红外传感器安装高度距地面H=5米,r为传感器能感应到的人在地面上活动范围的半径。则ABC三点的坐标分别为:A(-4sin50°,0),B(4sin50°,0),C(0,-7+4cos50°),由ABC三个点的坐标可确定圆的方程,得到如下公式:其中,x为圆心Q的横坐标,y为圆心Q的纵坐标,R为圆的半径。The installation position of the human body induction module 2 is shown in Figure 3, and the schematic diagram of its sensing range is shown in Figure 4. In Figure 4, the pyroelectric human body infrared sensor module is installed at point O. It can be seen from the manual of the pyroelectric human body infrared sensor module that its The sensing range is a combination of a cone and some spheres. The figure is a cross-sectional view of the sensing range, where three points ABC are on the same circle, AO=BO=3~4 meters, L=5~7 meters, ∠AOB = 100°, adjust the maximum sensing distance of the sensor to L = 7 meters, AO = 4 meters, the installation height of the pyroelectric human body infrared sensor is H = 5 meters from the ground, and r is the range of people on the ground that the sensor can sense. radius. Then the coordinates of the three points ABC are: A(-4sin50°, 0), B(4sin50°, 0), C(0, -7+4cos50°). The coordinates of the three points ABC can determine the equation of the circle, The following formula is obtained: where x is the abscissa of the center Q, y is the ordinate of the center Q, and R is the radius of the circle.
(x+4sin50°)2+y2=R2 (1)(x+4sin50°) 2 +y 2 =R 2 (1)
(x-4sin50°)2+y2=R2 (2)(x-4sin50°) 2 +y 2 =R 2 (2)
x2+(y+7-4cos50°)2=R2 (3)x 2 +(y+7-4cos50°) 2 =R 2 (3)
由公式(1)、(2)、(3)可求解得:x=0,y≈-1.15,R≈3.27,则可求解r如下: From formulas (1), (2) and (3), it can be solved: x=0, y≈-1.15, R≈3.27, then r can be solved as follows:
(2)利用灯管亮灭检测模块4检测灯管的亮灭,微处理器5根据其输出至2路继电器模块7的控制信号与灯管亮灭检测模块4输入到微处理器5的信号判断灯管的工作状态。①若微处理器5的33端输出为低电平(控制灯管1点亮)而9端输入为高电平(检测到灯管1为熄灭状态),则微处理器5判断此时灯管1工作异常。②若微处理器5的33端输出为低电平(控制灯管1点亮)而9端输入为低电平(检测到灯管1为点亮状态),则微处理器5判断此时灯管1工作正常。③若微处理器5的32端输出为低电平(控制灯管2点亮)而10端输入为高电平(检测到灯管2为熄灭状态),则微处理器5判断此时灯管2工作异常。④若微处理器5的32端输出为低电平(控制灯管1点亮)而10端输入为低电平(检测到灯管2为点亮状态),则微处理器5判断此时灯管2工作正常。如此类推,当处理器5的33、32端输出信号控制某一灯管熄灭时,而灯管亮灭检测模块4实际检测到此灯管仍点亮,则该灯管工作异常,否则该灯管工作正常。(2) Use the lamp on-off detection module 4 to detect the on-off of the lamp, and the microprocessor 5 outputs the control signal to the 2-way relay module 7 and the signal input from the lamp on-off detection module 4 to the microprocessor 5 according to the control signal. Determine the working status of the lamp. ①If the output of terminal 33 of the microprocessor 5 is low level (controlling lamp 1 to light) and the input of terminal 9 is high level (detecting that the lamp 1 is off), the microprocessor 5 judges that the lamp Tube 1 is working abnormally. ②If the output of terminal 33 of the microprocessor 5 is low level (controlling lamp 1 to light) and the input of terminal 9 is low level (detecting that the lamp 1 is on), the microprocessor 5 judges that at this time Lamp 1 works fine. ③If the output of terminal 32 of the microprocessor 5 is low level (controlling the lamp 2 to light) and the input of terminal 10 is high level (detecting that the lamp 2 is in an off state), the microprocessor 5 judges that the lamp is at this time. Tube 2 is working abnormally. ④If the output of the 32 terminal of the microprocessor 5 is low level (controlling the lamp 1 to light up) and the input of the 10 terminal is low level (detecting that the lamp 2 is in the lighting state), the microprocessor 5 judges that at this time Lamp 2 works fine. By analogy, when the output signals of the 33 and 32 terminals of the processor 5 control a certain lamp to turn off, and the lamp on-off detection module 4 actually detects that the lamp is still on, the lamp works abnormally, otherwise the lamp The tube works fine.
(3)当灯管的点亮/熄灭状态或者工作状态正常/异常发生改变时,微处理器5通过电力载波模块Ⅰ6将灯管点亮/熄灭和工作正常/异常的新状态信息附加子系统ID(每个子系统设定一个独有的ID,用以标识不同的子系统)后发送至主系统。(3) When the lighting/extinguishing state of the lamp or the normal/abnormal working state changes, the microprocessor 5 attaches the new state information of the lamp lighting/extinguishing and normal/abnormal operation to the subsystem through the power carrier module I6 ID (each subsystem sets a unique ID to identify different subsystems) and then sends it to the main system.
2、主系统的工作原理:2. The working principle of the main system:
主系统中的电力载波模块Ⅱ9通过220VAC电源进线12接收子系统电力载波模块Ⅰ6传来的携带子系统ID的灯管工作状态正常/异常和点亮/熄灭的新状态信息,并将此信息通过TTL转USB模块10传送至电脑11,并在电脑11上显示这些信息,并当N个子系统中任意灯管工作异常时主系统电脑11发出报警,提示工作人员及时检修。此外,工作人员可通过电脑11发出点亮/熄灭N个子系统中任意灯管的携带子系统ID的控制信号,此控制信号经TTL转USB模块10传送至电力载波模块Ⅱ9,再经220VAC电源进线12传送到子系统电力载波模块Ⅰ6后送至微处理器5,微处理器5提取来自主系统控制信号中的子系统ID与自身子系统ID对比,如不一致则不做任何处理,如一致则根据主系统发来的控制信号输出控制信号至2路继电器模块7,控制子系统中灯管1或灯管2的点亮/熄灭。The power carrier module II9 in the main system receives the new status information of the normal/abnormal working status and on/off of the lamp carrying the subsystem ID from the subsystem power carrier module I6 through the 220VAC power input line 12, and transmits this information. The information is transmitted to the computer 11 through the TTL to USB module 10, and the information is displayed on the computer 11. When any lamp tube in the N subsystems is abnormal, the main system computer 11 issues an alarm, prompting the staff to repair it in time. In addition, the staff can send out the control signal carrying the subsystem ID through the computer 11 to turn on/off any lamp in the N subsystems. The line 12 is sent to the subsystem power carrier module I6 and then sent to the microprocessor 5. The microprocessor 5 extracts the subsystem ID from the main system control signal and compares it with its own subsystem ID. If it is inconsistent, it will not do any processing. Then, according to the control signal sent by the main system, the control signal is output to the 2-way relay module 7 to control the lighting/extinguishing of lamp 1 or lamp 2 in the subsystem.
本实用新型的工作过程如下:The working process of the present utility model is as follows:
系统上电后,室内光强检测模块3采用光敏电阻传感器模块检测环境光照强度并将其转换为电压模拟量从其AO端输出至微处理器5的11端,微处理器5利用其内部的10位A/D转换器将此电压模拟量转换为数字量。微处理器5根据此数字量将环境光照强度分为三个亮度级别:当此数字量小于400时,环境亮度级别为超亮,子系统处于超亮工作模式;当此数字量大于或等于400且小于600时,环境亮度级别为较亮,子系统处于较亮工作模式;当此数字量大于或等于600时,环境亮度级别为较暗,子系统处于较暗工作模式。人体感应模块2利用热释电人体红外传感器模块,能感应灯下地面半径r范围内是否有活动的人体,热释电人体红外传感器模块设为可重复触发模式,其感应延时时间设置为5分钟(或者更长时间),即感应到有活动的人时人体感应模块2的OUT端输出高电平至微处理器5的23端,此高电平信号可维持5分钟(或者更长时间),如无活动的人体,人体感应模块2的OUT端输出低电平信号至微处理器5的23端。灯管亮灭检测模块4由两个光敏电阻传感器模块组成。灯管亮灭检测模块4-1检测灯管1的状态,当灯管1点亮时,其D0端输出低电平至微处理器5的9端,反之,则输出高电平至微处理器5的9端。灯管亮灭检测模块4-2检测灯管2的状态,当灯管2点亮时,其D0端输出低电平至微处理器5的10端,反之则输出高电平至微处理器5的10端。After the system is powered on, the indoor light intensity detection module 3 uses the photoresistor sensor module to detect the ambient light intensity and converts it into a voltage analog output from its AO terminal to the 11 terminal of the microprocessor 5. The microprocessor 5 uses its internal A 10-bit A/D converter converts this voltage analog to digital. The microprocessor 5 divides the ambient light intensity into three brightness levels according to this digital quantity: when this digital quantity is less than 400, the ambient brightness level is super bright, and the subsystem is in super bright working mode; when this digital quantity is greater than or equal to 400 And when it is less than 600, the ambient brightness level is brighter, and the subsystem is in a brighter working mode; when the number is greater than or equal to 600, the ambient brightness level is darker, and the subsystem is in a darker working mode. The human body induction module 2 uses the pyroelectric human body infrared sensor module to sense whether there is an active human body within the radius r of the ground under the lamp. The pyroelectric human body infrared sensor module is set to a repeatable trigger mode, and its induction delay time is set to 5 minutes (or longer), that is, when an active person is detected, the OUT terminal of the human body sensing module 2 outputs a high level to the 23 terminal of the microprocessor 5, and this high-level signal can be maintained for 5 minutes (or longer). ), if there is no moving human body, the OUT terminal of the human body sensing module 2 outputs a low-level signal to the terminal 23 of the microprocessor 5 . The lamp on/off detection module 4 is composed of two photoresistor sensor modules. The lamp on/off detection module 4-1 detects the state of the lamp 1. When the lamp 1 is lit, its D0 terminal outputs a low level to the 9 terminal of the microprocessor 5, otherwise, it outputs a high level to the microprocessor terminal 9 of device 5. The lamp on/off detection module 4-2 detects the state of the lamp 2. When the lamp 2 is lit, its D0 terminal outputs a low level to the 10 terminal of the microprocessor 5, otherwise it outputs a high level to the microprocessor 5 of the 10 end.
当环境亮度级别为超亮时,子系统处于超亮工作模式。微处理器5不处理人体感应模块2输入的微处理器5的23端的信号。同时,微处理器5的33与32端输出高电平至2路继电器模块7的IN1与IN2端,使2路继电器模块7内部NC1与NC2端的常闭触点断开,灯管1和灯管2供电电路断开,使灯管1和灯管2都熄灭。When the ambient brightness level is super bright, the subsystem is in super bright working mode. The microprocessor 5 does not process the signal from the terminal 23 of the microprocessor 5 input by the human body sensing module 2 . At the same time, the 33 and 32 terminals of the microprocessor 5 output high level to the IN1 and IN2 terminals of the 2-way relay module 7, so that the normally closed contacts of the NC1 and NC2 terminals in the 2-way relay module 7 are disconnected, and the lamp 1 and the lamp are disconnected. The power supply circuit of tube 2 is disconnected, so that both lamp 1 and lamp 2 are extinguished.
当环境亮度级别为较亮时,子系统处于较亮工作模式。微处理器5的32端输出高电平至2路继电器模块7的IN2端,使2路继电器模块7内部NC2端的常闭触点端断开,灯管2供电回路断路,使灯管2熄灭。同时,微处理器5检测其23端由人体感应模块2的OUT端输入的信号。①若微处理器5检测到23端输入为低电平(灯下无活动的人时),则微处理器5的33端输出高电平至2路继电器模块7的IN1端,使2路继电器模块7内部NC1端常闭触点断开,灯管1供电回路断开,灯管1熄灭。②若微处理器5检测到23端输入为高电平(灯下有活动的人时),则微处理器5的33端输出低电平至2路继电器模块7的IN1端,使2路继电器模块7内部NC1端常闭触点闭合,灯管1供电回路接通,使灯管1点亮。When the ambient brightness level is brighter, the subsystem is in a brighter operating mode. The 32 terminal of the microprocessor 5 outputs a high level to the IN2 terminal of the 2-way relay module 7, so that the normally closed contact terminal of the NC2 terminal inside the 2-way relay module 7 is disconnected, and the power supply circuit of the lamp 2 is disconnected, so that the lamp 2 is extinguished. . At the same time, the microprocessor 5 detects the signal input from the OUT end of the human body sensing module 2 at its 23 end. ①If the microprocessor 5 detects that the input of terminal 23 is low level (when there is no active person under the light), the terminal 33 of the microprocessor 5 outputs a high level to the IN1 terminal of the 2-way relay module 7, so that the 2-way The normally closed contact of the NC1 terminal inside the relay module 7 is disconnected, the power supply circuit of the lamp 1 is disconnected, and the lamp 1 is extinguished. ② If the microprocessor 5 detects that the input of the 23 terminal is high (when there is an active person under the lamp), the 33 terminal of the microprocessor 5 outputs a low level to the IN1 terminal of the 2-way relay module 7, so that the 2-way The normally closed contact of the NC1 terminal inside the relay module 7 is closed, and the power supply circuit of the lamp 1 is connected, so that the lamp 1 is lit.
当环境亮度级别为较暗时,子系统处于较暗工作模式。此时,微处理器5检测其23端由人体感应模块2的OUT端输入的信号。情况①:若微处理器5检测到23端输入为低电平(灯下无活动的人时),则微处理器5的33和32端输出高电平至2路继电器模块7的IN1和IN2端,使2路继电器模块7内部NC1和NC2端常闭触点断开,灯管1和灯管2供电回路断开,灯管1和灯管2熄灭。情况②:若微处理器5检测到23端输入为高电平(灯下有活动的人时),则微处理器5的33和32端输出低电平至2路继电器模块7的IN1和IN2端,使2路继电器模块7内部NC1和NC2端常闭触点闭合,灯管1和灯管2供电回路接通,使灯管1和灯管2点亮。情况③:若微处理器5检测到23端输入从高电平变为低电平的跳变(灯下有活动的人变为无活动的人时),则微处理器5的33端输出不变(灯管1点亮),微处理器5的32端输出高电平至2路继电器模块7的IN2端,使2路继电器模块7的NC2端常闭触点断开,灯管2供电电路断开,先使灯管2熄灭,以提示灯下人做出轻微动作。同时,微处理器5延时1分钟;若微处理器5在此1分钟的延时内检测到23端输入低电平至高电平的跳变(灯下无活动的人变为有活动的人时),则微处理器5的32端口输出低电平至2路继电器模块7的IN2端,使接2路继电器模块7的NC2端常闭触点闭合,灯管2供电电路接通,使灯管2再次点亮。延时1分钟后,若微处理器5检测到23端输入为低电平(灯下无活动的人时),则微处理器5的32端输出高电平至2路继电器模块7的IN1端,使2路继电器模块7的NC1端常闭触点断开,灯管1供电电路断开,使灯管1也熄灭,即返回情况①;若微处理器5检测到23端输入为高电平(灯下有活动的人),则返回情况②。When the ambient brightness level is dark, the subsystem is in dark operating mode. At this time, the microprocessor 5 detects the signal input from the OUT end of the human body sensing module 2 at its 23 end. Situation ①: If the microprocessor 5 detects that the input of terminal 23 is low level (when there is no active person under the light), then the terminals 33 and 32 of the microprocessor 5 output a high level to IN1 and IN1 of the 2-way relay module 7 The IN2 terminal makes the normally closed contacts of the NC1 and NC2 terminals in the 2-way relay module 7 disconnected, the power supply circuit of the lamp 1 and the lamp 2 is disconnected, and the lamp 1 and the lamp 2 are extinguished. Situation ②: If the microprocessor 5 detects that the input of the 23 terminal is high level (when there is an active person under the lamp), then the 33 and 32 terminals of the microprocessor 5 output a low level to the IN1 and the 2-way relay module 7. The IN2 terminal closes the normally closed contacts of the NC1 and NC2 terminals in the 2-way relay module 7, and the power supply circuit of the lamp 1 and the lamp 2 is connected, so that the lamp 1 and the lamp 2 are lit. Situation ③: If the microprocessor 5 detects the transition of the input of terminal 23 from high level to low level (when there is an active person under the lamp to an inactive person), then the output of terminal 33 of the microprocessor 5 unchanged (lamp 1 is lit), the 32 terminal of the microprocessor 5 outputs a high level to the IN2 terminal of the 2-way relay module 7, so that the normally closed contact of the NC2 terminal of the 2-way relay module 7 is disconnected, and the lamp 2 When the power supply circuit is disconnected, the lamp tube 2 is turned off first to remind the person under the lamp to make slight movements. At the same time, the microprocessor 5 delays for 1 minute; if the microprocessor 5 detects the transition from the low level to the high level of the input of the 23 terminal within the delay of 1 minute (the inactive person under the lamp becomes active time), then the 32 port of the microprocessor 5 outputs a low level to the IN2 terminal of the 2-way relay module 7, so that the normally closed contact of the NC2 terminal connected to the 2-way relay module 7 is closed, and the power supply circuit of the lamp 2 is connected. Turn lamp 2 on again. After a delay of 1 minute, if the microprocessor 5 detects that the input of terminal 23 is low level (when there is no active person under the light), the terminal 32 of the microprocessor 5 outputs a high level to IN1 of the 2-way relay module 7 end, the normally closed contact of the NC1 end of the 2-way relay module 7 is disconnected, and the power supply circuit of the lamp 1 is disconnected, so that the lamp 1 is also extinguished, that is, return to the situation ①; if the microprocessor 5 detects that the input of the 23 terminal is high level (there is an active person under the light), then return to situation ②.
系统工作过程中,灯管亮灭检测模块4不断检测灯管1和灯管2的点亮/熄灭状态并分别从灯管亮灭检测模块4-1和灯管亮灭检测模块4-2的D0端输出信号至微处理器5的9、10端。微处理器5根据其工作时33、32端的输出信号和9、10端的输入信号判断灯管工作正常/异常:①若微处理器5的33端输出为低电平(控制灯管1点亮)而9端输入为高电平(检测到灯管1为熄灭状态),则微处理器5判断此时灯管1工作异常。②若微处理器5的33端输出为低电平(控制灯管1点亮)而9端输入为低电平(检测到灯管1为点亮状态),则微处理器5判断此时灯管1工作正常。③若微处理器5的32端输出为低电平(控制灯管2点亮)而10端输入为高电平(检测到灯管2为熄灭状态),则微处理器5判断此时灯管2工作异常。④若微处理器5的32端输出为低电平(控制灯管2点亮)而10端输入为低电平(检测到灯管2为点亮状态),则微处理器5判断此时灯管2工作正常。如此类推,当处理器5的33、32端输出信号控制某一灯管熄灭时,而灯管亮灭检测模块4实际检测到此灯管仍点亮,则该灯管工作异常,否则该灯管工作正常。During the working process of the system, the lamp on/off detection module 4 continuously detects the on/off status of the lamp 1 and the lamp 2 and detects the on/off status of the lamp from the lamp on/off detection module 4-1 and the lamp on/off detection module 4-2 respectively. The D0 terminal outputs signals to the 9 and 10 terminals of the microprocessor 5 . The microprocessor 5 judges that the lamp is working normally/abnormally according to the output signals of terminals 33 and 32 and the input signals of terminals 9 and 10 when it is working: ①If the output of terminal 33 of the microprocessor 5 is low level (controlling lamp 1 to light up) ) and the input of terminal 9 is a high level (it is detected that the lamp tube 1 is in an off state), then the microprocessor 5 judges that the lamp tube 1 is working abnormally at this time. ②If the output of terminal 33 of the microprocessor 5 is low level (controlling lamp 1 to light) and the input of terminal 9 is low level (detecting that the lamp 1 is on), the microprocessor 5 judges that at this time Lamp 1 works fine. ③If the output of terminal 32 of the microprocessor 5 is low level (controlling the lamp 2 to light) and the input of terminal 10 is high level (detecting that the lamp 2 is in an off state), the microprocessor 5 judges that the lamp is at this time. Tube 2 is working abnormally. ④If the output of the 32 terminal of the microprocessor 5 is low level (controlling the lamp 2 to light up) and the input of the 10 terminal is low level (detecting that the lamp 2 is on), the microprocessor 5 judges that at this time Lamp 2 works fine. By analogy, when the output signals of the 33 and 32 terminals of the processor 5 control a certain lamp to turn off, and the lamp on-off detection module 4 actually detects that the lamp is still on, the lamp works abnormally, otherwise the lamp The tube works fine.
系统工作过程中,当微处理器5检测到9端和10端的输入信号(灯管点亮/熄灭的状态)发生变化时,或者当微处理器5判断得到的灯管工作正常/异常状态发生变化时,微处理器5通过22(TXD)端将当前灯管新状态信息(灯管点亮/熄灭的状态信息和灯管工作正常/异常状态信息)附加子系统ID后(每个子系统设定一个独有的ID,用以标识不同的子系统),发送到电力载波模块Ⅰ6的RX端,电力载波模块Ⅰ6通过220VAC电力线12将此携带子系统ID的灯管新状态信息发送到主系统的电力载波模块Ⅱ9,电力载波模块Ⅱ9的TX端再将接收到的携带子系统ID的灯管新状态信息发送到TTL转USB模块10的RXD端,TTL转USB模块将其RXD端接收到的TTL电平信号转换后通过电脑11的USB口将携带子系统ID的灯管新状态信息发送到电脑11,并在电脑11上更新显示相应子系统中每个灯管的点亮/熄灭状态或者工作正常/异常状态,并且,若N个子系统中任意灯管工作为异常状态,则电脑11发出报警信息,提示管理人员及时检修灯管。During the working process of the system, when the microprocessor 5 detects that the input signals at the 9th and 10th ends (the status of the lamp on/off) changes, or when the microprocessor 5 judges that the lamp works normally/abnormally occurs. When changing, the microprocessor 5 attaches the new status information of the current lamp (the status information of the lamp on/off and the status information of the lamp working normally/abnormally) through the 22 (TXD) terminal, and then attaches the subsystem ID (each subsystem device set a unique ID to identify different subsystems), and send it to the RX end of the power carrier module I6. The power carrier module I6 sends the new status information of the lamp carrying the subsystem ID to the main system through the 220VAC power line 12. The power carrier module II9, the TX terminal of the power carrier module II9 will then send the received new status information of the lamp carrying the subsystem ID to the RXD terminal of the TTL to USB module 10, and the TTL to USB module will receive the RXD terminal. After the TTL level signal is converted, the new status information of the lamp carrying the subsystem ID is sent to the computer 11 through the USB port of the computer 11, and the computer 11 updates and displays the on/off status of each lamp in the corresponding subsystem or In normal/abnormal state, and if any lamp in the N subsystems is in an abnormal state, the computer 11 sends out an alarm message to prompt the management personnel to repair the lamp in time.
系统工作过程中,当管理人员需要远程人为控制N个子系统中任意灯管的点亮/熄灭时,管理人员可通过电脑11发出携带子系统ID的点亮/熄灭子系统中任意灯管的控制信号,例如:当管理人员需点亮/熄灭某一子系统中的灯管1时,可通过电脑11发出携带某子系统ID的点亮/熄灭灯管1的控制信号,此控制信号经电脑11的USB口送出,经TTL转USB模块10转换为TTL电平信号后,从TTL转USB模块10的TXD端传输到电力载波模块Ⅱ9的RX端,电力载波模块Ⅱ9通过220VAC电源进线12将此携带某子系统ID的控制信号发送到子系统电力载波模块Ⅰ6,电力载波模块Ⅰ6的TX端将接收到的来自主系统的携带某子系统ID的控制信号发送到微处理器5的21(RXD)端。微处理器5接收到该携带某子系统ID的控制信号(点亮/熄灭灯管1)后,提取该控制信号中的子系统ID与自身子系统ID对比,如不一致则不做任何处理,如一致则根据该控制信号从其33端输出信号(低电平/高电平)至2路继电器模块7的IN1端,使2路继电器模块7内部NC1端的常闭触点闭合/断开,灯管1供电电路接通/断开,使灯管1点亮/熄灭。以此类推,管理人员也可远程在主系统人为控制某子系统中灯管2的点亮/熄灭,或者同时人为控制某子系统中灯管1和灯管2的点亮/熄灭。按此方式,通过主系统中电脑11可人为远程控制N个子系统中任意灯管的点亮/熄灭。During the working process of the system, when the administrator needs to remotely control the lighting/extinguishment of any lamp in the N subsystems, the administrator can send the control of any lamp in the subsystem carrying the subsystem ID through the computer 11. Signals, for example: when the manager needs to turn on/off the lamp 1 in a certain subsystem, the computer 11 can send out a control signal to turn on/off the lamp 1 carrying the ID of a certain subsystem, and the control signal is passed through the computer. 11 is sent out from the USB port, and after being converted into a TTL level signal by the TTL to USB module 10, it is transmitted from the TXD end of the TTL to USB module 10 to the RX end of the power carrier module II9. The control signal carrying a certain subsystem ID is sent to the subsystem power carrier module I6, and the TX end of the power carrier module I6 sends the received control signal carrying a certain subsystem ID from the main system to 21 ( RXD) terminal. After the microprocessor 5 receives the control signal (turning on/off the lamp 1) carrying a certain subsystem ID, it extracts the subsystem ID in the control signal and compares it with its own subsystem ID. If it is inconsistent, it will not do any processing. If they are consistent, output a signal (low level/high level) from terminal 33 to the IN1 terminal of the 2-way relay module 7 according to the control signal, so that the normally closed contact at the NC1 end of the 2-way relay module 7 is closed/disconnected. The power supply circuit of the lamp 1 is turned on/off, so that the lamp 1 is turned on/off. By analogy, the administrator can also remotely control the lighting/extinguishment of lamp 2 in a subsystem manually from the main system, or manually control the lighting/extinguishment of lamp 1 and lamp 2 in a subsystem at the same time. In this way, the computer 11 in the main system can manually control the lighting/extinguishment of any lamp in the N subsystems remotely.
上面结合附图对本实用新型的具体实施方式作了详细说明,但是本实用新型并不限于上述实施方式,在本领域普通技术人员所具备的知识范围内,还可以在不脱离本实用新型宗旨的前提下作出各种变化。The specific embodiments of the present utility model have been described in detail above in conjunction with the accompanying drawings, but the present utility model is not limited to the above-mentioned embodiments, and within the scope of knowledge possessed by those of ordinary skill in the art, the utility model can also be used without departing from the purpose of the present utility model. Various changes are made under the premise.