Wireless scene mode switch keyboard and scene mode control method
Technical field
The present invention relates to technical field of switch control, relate in particular to a kind of scene mode control method that adopts the wireless scene mode switch keyboard of Color Laser Projection Technology and realize control action based on this switchboards.
Background technology
The use of switch now and people's life are closely related, the use of switch is ubiquitous, in daily life, people use switch to realize the On/Off of lighting, part electric equipment, at present conventional switch panel is divided into a key, two keys, triple bond and quadruple linkage on the market, due to the limited size system of switch, so only realizing a small amount of equipment, a switch panel controls, cause the use of switch limited.
Along with the fast development of Internet of Things industry, on market for the more and more vigorous Smart Home that is especially applied in of stable remote control equipment demand, the control fields such as intelligent industrial, particularly power consumption is little, easily networking, data transmission is stable, product that can upstream device state, various types of intelligent radio switches constantly emerge in large numbers in market, also be subject to users' favor, but same problem is: the scene switch in Smart Home is all button or touch screen type, existing household equipment is more and more causes physical button to increase switch panel complexity, and for the mode of Touch Screen because power consumption is large, be difficult to long-time use as housed device.
Industry has been developed a kind of laser virtual keyboard at present, this laser virtual keyboard has low-power consumption, many by the feature of bond number, this kind of laser virtual keyboard is specially a scanning sensing apparatus, comprise the first and second generating lasers, the first generating laser is arranged at the high-end place of this scanning sensing apparatus, produce the pattern of keyboard in order to launch a visible laser Shu Jinhang face scanning, and in the time that user uses this keyboard to input, produce one first folded light beam; This second generating laser is located at below, mode with line sweep is parallel to keyboard pattern, and the angular velocity of line sweep is same as the line sweep angular velocity of this first generating laser, thereby in the time that user utilizes this keyboard to input, produce one second folded light beam; One laser pickoff is set between the first and second generating lasers, in the time that user utilizes this keyboard to input, receive folded light beam, thereby obtain user move occur position coordinates, then be the positional information of the orthogonal coordinate system of keyboard plane by above-mentioned coordinate conversion, determine key commands.
ZigBee is the radio network technique of a kind of novel short distance, low-power consumption, low data rate, low cost, low complex degree; It has taked the whole limited of the strong radio physical layer defined of IEEE802.1.4: economize point, simple, cost low specification again; And increase logical network, network security and application layer.ZigBee wireless transmission bandwidth, in 20-250KB/s scope, is applicable to the transmission of sensor data acquisition and control data, and ZigBee is wireless can set up large scale network, and network node capacity reaches 65535, has very powerful networking advantage.
Summary of the invention
The object of the present invention is to provide a kind of wireless scene mode switch keyboard and scene mode control method, design limited problem to solve the button on wireless scene switch panel in prior art, realized the effective application of laser virtual keyboard in field of switches.
For achieving the above object, the invention provides a kind of wireless scene mode switch keyboard, it comprises: projected keyboard unit, data processing unit, the two connects by wired mode data, wherein,
Described projected keyboard unit comprises: switchboards image projection module, infrared image acquisition module, infrared laser locating module and the first microcontroller module, and this switchboards image projection module projects the grating that is carved with switchboards image; This infrared image acquisition module is in order to gather the image information of user's click switch key area; This infrared laser locating module is in order to analyze the position coordinates of clicking area image information; This first microcontroller module memory contains the switch key numbering that each position coordinates is corresponding, calculates corresponding switch key numbering according to the position coordinates collecting;
Described data processing unit comprises: the second microcontroller module, memory module and wireless data transceiver module, store each switch key and number corresponding switching control instruction in this memory module; This second microcontroller module receives the switch key numbering of the first above-mentioned microcontroller module transmission, analyzes and draws corresponding switching control instruction, and carry out coding encrypting; This wireless data transceiver module adopts ZigBee wireless communication protocol mode and a gateway device to carry out the transmission of switching control instruction, carries out corresponding instruction move by the each controlled subset of gateway device control;
Above-mentioned switching control instruction is the On/Off instruction of controlling different scene modes in Smart Home living system.
Preferably, above-mentioned gateway device is connected with cloud server data by internet, in this cloud server, store each switch key and number corresponding switching control instruction, and after connection gateway device, number corresponding switching control instruction and adapt storing each switch key in above-mentioned memory module by cloud server; This cloud server records storage to each switching control instruction.
Preferably, above-mentioned different scene modes are control the unlatching of different controlled subsets in intelligent domestic system or close, and gateway device receives the instruction of controlling scene mode, after decoding identification, produce the action of controlling each controlled subset in scene mode.
Wherein, on the apparatus casing of described wireless scene mode switch keyboard, be also provided with switch key, function button and pilot lamp, by electrically conducting of switch key opertaing device, function button is for screening and the logout of equipment and gateway device, and pilot lamp is in order to the status information of display device.
Wireless scene mode switch keyboard of the present invention, after user's starting switch button, switchboards image projection module projection switchboards image, user clicks the switch key image of projection according to demand, the image information of infrared image acquisition module to user's click switch keyboard area, clicked the position coordinates of area image information by the analysis of infrared laser locating module, the first microcontroller module calculates the numbering of switch key according to above-mentioned position coordinates, and send data processing unit to, obtain corresponding scene steering order through data processing unit analysis, after encrypting conversion, be sent to gateway device in the mode of ZigBee host-host protocol, realized the scene mode of demand by the each controlled subset action of gateway device control.Can project multiple scene switch buttons by this wireless scene mode switch keyboard equipment, and according to user's demand, switch key is carried out to self-defined setting, only need an equipment can realize the control of most scene modes, solved on prior art Scene switch by the limited problem of bond number, user can arbitrarily arrange multiple scene modes according to hobby.
The present invention also provides a kind of scene mode control method, comprises that step is as follows:
1) open projected keyboard unit, the first microcontroller module controls switchboards image projection module projects the grating that is carved with switchboards image;
2) one of them section switch image on click switch keyboard image, infrared image acquisition module gathers the image information in this region;
3) infrared laser locating module analysis calculate the position coordinates of click on area image information, and the coordinate data obtaining is sent to the first microcontroller module;
4) the first microcontroller module is analysed and compared to the position coordinates receiving, and obtains the button that this position coordinates is corresponding and numbers and be transferred to data processing unit, sends to gateway device by data processing unit by ZigBee-network;
5) gateway device judges that the button receiving numbers corresponding scene mode steering order, and the scene mode steering order of generation is sent to corresponding controlled subset.
Preferably, above-mentioned steps 5) in also comprise: the button numbering data or the scene switch steering order that receive are sent to cloud server by gateway device, cloud server is resolved receiving button numbering data, obtain corresponding scene mode steering order, send result data to gateway device, by the corresponding controlled subset of gateway device control, meanwhile, cloud server pushes to the status data of controlling each controlled subset the intelligent terminal of a mandate again.
When initial, projected keyboard unit and gateway device are carried out to networking, user logins switch key that cloud server projects projected keyboard unit and numbers corresponding scene mode steering order and arrange.
Being carved with of projecting at wireless scene mode switch keyboard by above-mentioned scene mode control method user can complete the selection operation of scene mode on switchboards image, interface is clear, simple to operate, realize and used a kind of scene mode button based on image recognition technology to carry out man-machine interaction.
Beneficial effect of the present invention:
1, operation interface is succinctly directly perceived, and can realize the control of an interface several scenes pattern;
2, overcome existing switch panel button and designed limited problem, saved space and the energy;
3, the problems such as existing mechanical type scene switch keyboard holds flimsy problem and touch screen power consumption is large have been solved;
4, image recognition technology is combined effectively with wireless ZigBee technology, extensibility is good, and energy-conserving and environment-protective truly incorporate in intelligent control system wireless laser projected keyboard.
Accompanying drawing explanation
Fig. 1 illustrates the theory diagram that wireless scene mode switch keyboard of the present invention is implemented.
Fig. 2 illustrates the theory structure block diagram of wireless scene mode switch key of the present invention.
Fig. 3 illustrates the flow chart of steps of scene mode control method of the present invention.
Embodiment
For the ease of those skilled in the art's understanding, below in conjunction with embodiment and accompanying drawing, the present invention is further illustrated, and the content that embodiment is mentioned not is limitation of the invention.
Shown in Fig. 1, Fig. 2, in the present embodiment, wireless scene mode switch keyboard of the present invention, it comprises: projected keyboard unit, data processing unit, the two connects by wired UART mode data, is located at apparatus casing inside, wherein,
Projected keyboard unit is in order to project switchboards view data, show a plurality of scene switch button images above, and the regional location coordinate information of the click scene switch button image collecting can be converted to corresponding switch number and be transferred to data processing unit, it comprises:
Switchboards image projection module, be located at apparatus casing top, laser instrument by red wave band (can be also other wave bands) transmits the grating that is carved with scene switch keyboard image, this scene switch keyboard image specifically refers to numeral, Chinese character, letter or the image etc. that show the control of intelligent control system Scene pattern, as: home mode, the pattern of leaving home, sleep pattern, reading model, theater mode etc., the corresponding scene mode of each switch key image;
Infrared image acquisition module gathers the image information in the some switch keys of user's " click " region, this infrared image acquisition module is infrared laser positioning system, can send the laser beam that is parallel to projected image surface, in the time that user's finger touches arrives button projection surface, the laser beam that finger meeting blocking laser device sends, and form laser beam reflection at fingertip location; The brightness that now the brightness meeting of finger tip does not form reflecting part higher than other, gathers image by thermal camera, as the raw data of keyboard " click " identification;
Infrared laser locating module, the image collecting is carried out to thresholding and morphology processing, and carry out target detection, adopt least square method form matching with elliptic curve to the profile of each target, calculate the center-of-mass coordinate information of each fitted ellipse, obtaining after each target, to the motion state of each target in the enterprising row labels of time series, the tracking of realize target;
The button image of projection is carried out coordinate transform by the first microcontroller module, be mapped to the coordinate system of projection button, be key-press input instruction by the instruction transformation of " click " image, obtain the scene switch button numbering data message of clicking, and the scene switch button obtaining is numbered to data transmission to data processing unit, conversion process formula is as follows:
Wherein, A is the nonsingular pixel coordinate rotation matrix of 2*2; T is the pixel coordinate translation vector of 2*1; A and t are solved by original image and the rear image border of conversion angular coordinate; X ' is the rear pixel coordinate of conversion; X is conversion preceding pixel coordinate; A is image array.
Data processing unit comprises: the second microcontroller module, memory module and wireless data transceiver module, store each scene switch button and number corresponding scene switch steering order in this memory module; This second microcontroller module receives the scene switch button numbering of the first above-mentioned microcontroller module transmission, and analysis obtains described scene switch button and numbers corresponding scene switch steering order, and carries out coding encrypting; This wireless data transceiver module adopts ZigBee wireless communication protocol mode and a gateway device to carry out the transmission of scene switch steering order, carries out corresponding instruction move by the each controlled subset of gateway device control; In specific embodiment, described data processing unit adopts the CC2XXX series of TI company, ZigBee radio-frequency front-end, internal memory and microcontroller on this family chip, are integrated, it uses 18 MCU(8051), there is the RAM of 128KB flash memory able to programme and 8KB, possesses higher encryption, at park mode be transformed into aggressive mode and use the ultrashort time; Above-mentioned scene switch steering order is specifically applied in intelligent domestic system, and pattern is divided into: home mode, the pattern of leaving home, sleep pattern, reading model, theater mode etc., the corresponding scene mode of each switch key image;
Wherein, in the storer being provided with in above-mentioned gateway device, can store each scene switch button and number the coded order data of corresponding scene switch steering order and the controlled subset of control corresponding to each scene steering order, when this gateway device receives after the scene switch steering order of data processing unit transmission, analyze the director data that produces the corresponding controlled subset of control, and complete instruction action by the controlled subset of wireless ZigBee communication mode control, above-mentioned gateway device also can be connected with cloud server data by internet, in this cloud server, store each switch key and number corresponding scene switch steering order, the coded order data of the controlled subset of control corresponding to each scene steering order, the coded data of gateway device and the controlled subset of each networking and the control of intelligent terminal of mandate coding, user can login cloud server switch key is numbered, corresponding scene switch steering order is adapted, according to liking and demand selection setting of user, this cloud server also can record storage to the scene switch steering order of carrying out at every turn simultaneously, facilitate user to check and there is the property of tracing back.
In addition, on the housing of described wireless scene mode switch keyboard, be also provided with switch key, function button and pilot lamp, by electrically conducting of switch key opertaing device, function button is for screening and the logout of equipment and gateway device, and pilot lamp is in order to the status information of display device.
Wireless scene mode switch keyboard of the present invention, user can be fixed on the housing of wireless scene mode switch keyboard on metope or be placed on desk, after user's starting switch button, switchboards image projection module projection switchboards image, user clicks the switch key image of projection according to demand, the image information of infrared image acquisition module to user's click switch key area, clicked the position coordinates of area image information by the analysis of infrared laser locating module, the first microcontroller module calculates the numbering of switch key according to above-mentioned position coordinates, and send data processing unit to, obtain corresponding scene steering order through data processing unit analysis, after encrypting conversion, be sent to gateway device in the mode of ZigBee host-host protocol, realized the scene mode of demand by the each controlled subset action of gateway device control.Can project multiple scene switch buttons by this wireless display switchgear, and according to user's demand, switch key is carried out to self-defined setting, only need an equipment can realize the control of most scene modes, solved on prior art Scene switch by the limited problem of bond number, user can arbitrarily arrange multiple scene modes according to hobby.
Shown in Fig. 3, the present invention also provides a kind of scene mode control method, and the application based on above-mentioned wireless scene mode switch keyboard in intelligent domestic system, comprises that step is as follows:
When initial, projected keyboard unit and gateway device are carried out to networking, user logins switch key that cloud server projects projected keyboard unit and numbers corresponding scene mode steering order and arrange;
Step 11: open projected keyboard unit, the first microcontroller module controls switchboards image projection module projects the grating that is carved with scene switch keyboard image;
User is in intelligent domestic system uses, open projected keyboard unit, equipment is powered, switchboards image projection module on projected keyboard unit transmits the grating that is carved with switchboards image by the laser instrument of red wave band, user can select to click to the scene image in grating according to demand;
Step 12: one of them the region scene switch key image on click switch keyboard image, infrared image acquisition module gathers the image information in this region;
User clicks the scene switch button image in a region in scene switch keyboard image, as the pattern of leaving home, the image of this scene switch can be word " pattern of leaving home ", also can be English " Leave Home ", simultaneously, infrared image acquisition module can be sent the laser beam that is parallel to projected image surface, in the time that user's finger touches arrives using keyboard projecting table face, the laser beam that finger meeting blocking laser device sends, and form laser beam reflection at fingertip location, by thermal camera, image is gathered, as the raw data of keyboard " click " identification;
Step 13: the analysis of infrared laser locating module also calculates the position coordinates of click on area image information, and the coordinate data obtaining is sent to the first microcontroller module;
Step 14: the first microcontroller module is analysed and compared to the position coordinates receiving, obtain the button that this position coordinates is corresponding and number and be transferred to the second micro treatment module in data processing unit, control wireless data transceiver module and send to gateway device by ZigBee-network;
Step 15: gateway device judges that the button receiving numbers corresponding scene mode steering order, and the scene mode steering order of generation is sent to corresponding controlled subset; In the storer being provided with in this gateway device, can store each switch key and number the coded order data of corresponding scene switch steering order and the controlled subset of control corresponding to each scene steering order, when this gateway device receives after the scene switch steering order or scene switch button numbering of data processing unit transmission, analyze the director data that produces the corresponding controlled subset of control, and complete instruction action by the controlled subset of wireless ZigBee communication mode control;
In preferred embodiment, in above-mentioned steps 15, the button numbering data or the scene switch steering order that receive are sent to cloud server by gateway device, cloud server is resolved receiving button numbering data or scene switch steering order, obtain corresponding scene mode steering order, send result data to gateway device, again by the corresponding controlled subset of gateway device control, simultaneously, cloud server pushes to the status data of controlling each controlled subset the intelligent terminal of a mandate, facilitates the instant understanding of user to equipment state.The present invention is combined image recognition technology effectively with wireless ZigBee technology, and wireless laser projected keyboard is truly incorporated in intelligent control system.
The concrete application approach of the present invention is a lot, and the above is only the preferred embodiment of the present invention, should be understood that; for those skilled in the art; under the premise without departing from the principles of the invention, can also make some improvement, these improve and also should be considered as protection scope of the present invention.