CN104700605A - Method using CPU in Zigbee module to achieve infrared forward - Google Patents
Method using CPU in Zigbee module to achieve infrared forward Download PDFInfo
- Publication number
- CN104700605A CN104700605A CN201510153928.8A CN201510153928A CN104700605A CN 104700605 A CN104700605 A CN 104700605A CN 201510153928 A CN201510153928 A CN 201510153928A CN 104700605 A CN104700605 A CN 104700605A
- Authority
- CN
- China
- Prior art keywords
- infrared
- zigbee module
- zigbee
- chip microcomputer
- learning
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
Landscapes
- Selective Calling Equipment (AREA)
- Optical Communication System (AREA)
Abstract
The invention discloses a method using a CPU in a Zigbee module to achieve infrared forward. A hardware part comprises an infrared receiving pipe, an infrared transmitting pipe and the Zigbee module, and the infrared receiving pipe and the infrared transmitting pipe are directly connected with the Zigbee module. The invention further discloses a method for achieving infrared learning and transmitting in a single chip microcomputer in the Zigbee module. Digital waveform analysis compression storage is adopted for self-learning, namely a waveform copying type learning style. Stored waveform data are analyzed in the processing of transmitting, and 38K carrier waves are used for transmitting infrared rays. The method is suitable for all the 38k modulating infrared ray control devices. The infrared receiving pipe and the infrared transmitting pipe are directly connected with the Zigbee module, and all functions of infrared ray learning, encoding and decoding are directly achieved through the single-chip microcomputer of the Zigbee module. An intelligent home control system achieved by the adoption the Zigbee network and based on the waveform copying self-learning type infrared forwarding method can achieve control over various infrared remote control type devices.
Description
Technical field
The present invention relates to infrared retransmission method, especially a kind of method of the infrared forwarding of wireless self learning type based on Zigbee.Relate generally to field computing machine embedded scm, especially zigbee single-chip microcomputer, zigbee communication.Also relate to infrared forwarding, infrared learning, particularly relate to the study of infrared waveform copy mode.
Background technology
The household equipment of infrared control is a lot, and such as air-conditioning, TV, projector, blue light player, TV set-top box etc. equipment, intelligent domestic system controls these equipment to be needed to pass through infrared transponder.Due to ZigBee technology relative complex, the study of the existing infrared signal based on Zigbee infrared transponder and sending function are all add a module in addition or processing unit processes infrared signal, and Zigbee module only serves the transmitting function of control command wherein.In this mode practical application, relative cost is higher, and complex structure, is unfavorable for large-scale application.
Such as application number is 201110078340.2, publication No. CN 102722978 A, date of publication is that the Chinese patent application " Zigbee wireless learning infrared transponder " of 2012.10.10 has used three single-chip microcomputers, namely, except the single-chip microcomputer of Zigbee module own, the single-chip microcomputer of sending module single-chip microcomputer and study module has also been used.It provides serial ports wired connection, applies mechanically Multilevel method module, and receiving end and transmitting terminal are all made up of multiple device, and cause overall volume comparatively large, production cost is high.And for example application number is 201210124775.0, publication No. CN 102651165 A, date of publication is the Chinese patent application " the infrared repeater system of a kind of wireless learning type and method of work thereof " of 2012.08.29 is also process infrared signal with other processing unit.The present invention directly utilizes Zigbee module to realize infrared learning and controls with control and Zigbee, and structural design is simple, and infrared receiver end is only just an infrared receiving tube, transmitting terminal is exactly only an infrared transmitting tube, simply be connected with a Zigbee module, volume is little, and production cost is low.
Mode in addition with regard to infrared learning mainly contains three kinds, and one is decoding, namely obtains infrared ray remotes control code by the rule of general " 0 ", " 1 ".Two is according to product brand title, from known products catalogue, transfer infrared ray remotes control code.The third mode is exactly waveform copy mode.Obviously, waveform copy mode can have the broader scope of application, can control the basic function that various infrared equipment is infrared forwarding, therefore adopt the mode of learning of infrared copy to have more meaning as Smart Home application.But infrared copy mode method is complicated, require higher to single-chip microcomputer, infrared ray remotes control code is more, and the mode of learning that Zigbee module realizes infrared copy has technical difficulty.
Such as application number is 200810039017.2, publication No. CN 101609604 A, date of publication is the Chinese patent application " control method of infrared learning " of 2009.12.23 and application number is 201410403555.0, publication No. CN 104299402 A, date of publication is the mode that all refer to the study of infrared copy during the Chinese patent application of 2015.01.21 " adopts AD mode to carry out the method for infrared learning ", but this mode does not realize in Zigbee module, simultaneously the more above-mentioned patent of method of study copy of the present invention has more the feature of the low and means advanced person of cost, be embodied in the present invention's scm software especially to realize in the realization of 38K modulation transmission.
Summary of the invention
The object of this invention is to provide a kind of wireless telecommunications of integrated with Zigbee and self learning type infrared transponder in the new infrared transponder of one, above-mentioned defect can be overcome, reduce production cost.
For achieving the above object, the present invention directly uses the external infrared receiving tube of Zigbee module and infrared transmitting tube.
The present invention is on existing ZigBee technology basis, make full use of its mcu resource, adopt the study of waveform copy mode, directly realize the analysis of infrared signal, compression stores, and infrared control information is directly stored in the electricity erasable memorizer of Zigbee module.Meanwhile, the present invention utilizes the modulation of same chip microcontroller 38K infrared signal to export.
Accompanying drawing explanation
Fig. 1 the present invention is based on the hardware configuration schematic block diagram of the infrared retransmission method of self learning type of Zigbee.The direction that in figure, signal transmits is unidirectional, namely sends and has been come by Zigbee module with reception is all direct.
Fig. 2 infrared waveform copy mode of learning performing step.
The decoding emission process of Fig. 3 infrared waveform copy mode of learning.
Fig. 4 hardware implementing figure.
Embodiment
The hardware components of wireless self learning type infrared transponder of the present invention comprises infrared transmitting tube, infrared receiving tube and Zigbee module.Zigbee module is directly connected with infrared receiving tube, infrared transmitting tube respectively.
Zigbee module is the core of the wireless self learning type infrared transponder of Zigbee, and it is mainly divided into data receiver, data processing and data to store three parts.It can receive receiving tube on the wireless Zigbee gateway of process and self learning type infrared transponder and pass the instruction of coming, storage space is stored in the instruction of the telepilot of study, and the instruction extracting storage passes to the power valve of self learning type infrared transponder to realize controlling infrared remote control type equipment.
Waveform copy mode of learning realizes specifically dividing two processes in Zigbee module, i.e. infrared waves conformal analysis compression storing process, and ultra-red order extracts resolves modulation process of transmitting.The detailed process that technology realizes is shown in Fig. 2 and Fig. 3 respectively.
Infrared waves conformal analysis compression storing process as Fig. 2, wherein, in step 201) information of which numeral containing corresponding study in the instruction that receives of process.Step 202) enter learning process after, open interruption, but the wave recording that can not will begin in a minute, need to wait for that user can start record by corresponding button rear.Step 203) once enter recording status, need handoff mode, utilize and interrupt the time span that counting calculates waveform conversion.Step 204) record the length of each waveform, data are recorded in RAM, now can not be saved in NV and sheet in electricity erasable memorizer, otherwise likely affect waveshape.Step 205) learn judgement, if a waveform length is overflowed, namely waveform length is more than 65535 microseconds, can regard as study and complete, and now interrupts indicating difference accordingly.Or study waveform conversion reach some, such as, more than 590 bytes, also regard as study and complete because infrared emission repeat under having many situations send, with regard to have exceed record the upper limit and without the need to study situation.Step 206) learnt after, calculate the length of corresponding actual learning, keep corresponding data, and do a mark, now still can not write in NV in interrupt routine.Step 207) at the main circulating program place of Zigbee module, judge whether corresponding learning process complement mark, if had, the data then will learnt herein, according to the code code name of specifying, being written to electricity can in sheet in Flash and NV, and program needs to preserve by the study length of reality herein, effectively can save storage space.If sheet block maximum more than a Flash during preservation, just preserving with multiple blocks, is a fixing migration algorithm between each block.So far, to learn and the process of preserving completes.
Infrared waveform copy mode of learning has recorded actual waveform situation, also needing to be reduced into infrared waveform, in the present embodiment, only with infrared transmitting tube, then utilizing self-programmed software in Zigbee module to complete infrared signal and modulate and launch to realize infrared forwarding.Detailed process is as follows: step 301) intelligent domestic gateway is transmitted to the instruction that infrared transponder one needs to send infrared control order.Step 302) after infrared transponder receives instruction, perform mark according to instruction encoding.Can not send herein at once, need wait for that the main cpu of Zigbee module finishes other work.Step 303) in Zigbee major cycle, judge that this marks, send if necessary, just start process of transmitting.Process of transmitting completes in major cycle.Step 304) according to order number in corresponding nonvolatile memory, namely in previously described Flash, that is in " NV ", read corresponding Wave data.The head of these data is length informations.Step 305) set up a circulation according to length information i.e. waveform number information, now need to preserve interrupting information, then close and all interrupt.38K modulation is completed by instruction cycles mode completely, namely have during infrared transmission is that 38K modulates output time span, complete a waveform to send, and do not modulate next section of program, but program or same program, just the level of the pin of P02 remains unchanged, and what so both can ensure time span accurately also can complete 38K modulation.When debugging the frequency accuracy of concrete 38K modulation, can first debug out 38K waveform by oscillograph.Step 306) judge to be sent completely according to data length after, that recovers all to interrupt arranges state, allows Zigbee module can normally complete other work.
Operational instances, in learning process, user uses mobile phone or flat board by wifi/3G network to home gateway sending controling instruction, gateway forwards is to Zigbee module learn command " AT+UCAST=****; IRR** " of self learning type infrared transponder, wherein " * * * * " representative is the infrared transponder of specifying, and in practical application, an intelligent domestic system exists multiple transponder, and what " * * " represented is the order number that this transponder learns.Zigbee module is automatically treated to after accepting instruction and is in learning state, then the reception aperture that user aims at self learning type infrared transponder clicks the corresponding button that will learn on telepilot, at this moment the signal received and digital waveform are outputted to a pin of Zigbee module by the receiving tube of self learning type infrared transponder, and Zigbee module analytic signal also transfers the digital storage space be stored into after compression in Zigbee module to.Zigbee module judges that can return a successfully prompting after learning process completes " learns this button success ".
User controls the process of infrared equipment, user uses mobile phone or flat board by wifi/3G network to home gateway sending controling instruction " AT+UCAST=****; IRK** ", gateway can be given to the Zigbee module of self learning type infrared transponder after receiving steering order, after corresponding Zigbee module resolves corresponding control command, Zigbee module can extract corresponding infrared control instruction in storage space, after software simulating 38K modulates, control the infrared transmitting tube of self learning type infrared transponder, power valve directly sends instruction to infrared remote control type equipment.
Claims (6)
1., by the infrared forwarding implementation method of the self study of Zigbee single-chip microcomputer, it directly utilizes Zigbee module mcu programming, directly connects infrared receiving tube, infrared transmitting tube, realizes the infrared forwarding of self study.
2., according to the self study infrared forwarding implementation method of claim 1 with Zigbee single-chip microcomputer, it is characterized in that, described Zigbee module is directly connected with infrared receiving tube, infrared transmitting tube respectively.
3. according to the self study infrared forwarding implementation method of claim 1 with Zigbee single-chip microcomputer, it is characterized in that, the single-chip microcomputer of Zigbee module completes the digital wave analysis compression of infrared signal and stores, and namely infrared control signal is directly stored in the single-chip microcomputer of Zigbee module.
4. according to the self study infrared forwarding implementation method of claim 1 with Zigbee single-chip microcomputer, it is characterized in that, the single-chip microcomputer of Zigbee module completes the infrared signal that the digital wave data stored are modulated into 38K again and sends through power valve.
5., according to the self study infrared forwarding implementation method of claim 1 with Zigbee single-chip microcomputer, it is characterized in that, this self learning type infrared transponder is applied to intelligent domestic system, for controlling the equipment of infrared control.
6. according to the self study infrared forwarding implementation method of claim 1 with Zigbee single-chip microcomputer, it is characterized in that, it is waveform copy mode that Zigbee module completes the infrared mode of study.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201510153928.8A CN104700605A (en) | 2015-04-02 | 2015-04-02 | Method using CPU in Zigbee module to achieve infrared forward |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201510153928.8A CN104700605A (en) | 2015-04-02 | 2015-04-02 | Method using CPU in Zigbee module to achieve infrared forward |
Publications (1)
Publication Number | Publication Date |
---|---|
CN104700605A true CN104700605A (en) | 2015-06-10 |
Family
ID=53347678
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201510153928.8A Pending CN104700605A (en) | 2015-04-02 | 2015-04-02 | Method using CPU in Zigbee module to achieve infrared forward |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN104700605A (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN112927490A (en) * | 2020-12-31 | 2021-06-08 | 智慧云谷(上海)智能科技有限公司 | Infrared signal learning method |
Citations (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN202584411U (en) * | 2012-04-26 | 2012-12-05 | 南京物联传感技术有限公司 | Wireless learning infrared repeater system |
CN103021161A (en) * | 2012-12-07 | 2013-04-03 | 四川九洲电器集团有限责任公司 | Infrared learning type remote control device based on Zigbee transmission module |
CN103500497A (en) * | 2013-09-12 | 2014-01-08 | 广州供电局有限公司 | Intelligent remote controller |
CN203552458U (en) * | 2013-06-25 | 2014-04-16 | 上海翼扶科技有限公司 | Zigbee-based infrared transponder |
CN203706414U (en) * | 2013-12-27 | 2014-07-09 | 广西瀚特信息产业股份有限公司 | Infrared forwarding equipment |
US20140341585A1 (en) * | 2013-05-16 | 2014-11-20 | Seoby Electronics Co., Ltd. | Wireless relay system and employment method thereof |
CN204066382U (en) * | 2014-02-24 | 2014-12-31 | 安徽爱姆恩智能科技有限公司 | A kind of novel Zigbee infrared learning transponder |
-
2015
- 2015-04-02 CN CN201510153928.8A patent/CN104700605A/en active Pending
Patent Citations (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN202584411U (en) * | 2012-04-26 | 2012-12-05 | 南京物联传感技术有限公司 | Wireless learning infrared repeater system |
CN103021161A (en) * | 2012-12-07 | 2013-04-03 | 四川九洲电器集团有限责任公司 | Infrared learning type remote control device based on Zigbee transmission module |
US20140341585A1 (en) * | 2013-05-16 | 2014-11-20 | Seoby Electronics Co., Ltd. | Wireless relay system and employment method thereof |
CN203552458U (en) * | 2013-06-25 | 2014-04-16 | 上海翼扶科技有限公司 | Zigbee-based infrared transponder |
CN103500497A (en) * | 2013-09-12 | 2014-01-08 | 广州供电局有限公司 | Intelligent remote controller |
CN203706414U (en) * | 2013-12-27 | 2014-07-09 | 广西瀚特信息产业股份有限公司 | Infrared forwarding equipment |
CN204066382U (en) * | 2014-02-24 | 2014-12-31 | 安徽爱姆恩智能科技有限公司 | A kind of novel Zigbee infrared learning transponder |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN112927490A (en) * | 2020-12-31 | 2021-06-08 | 智慧云谷(上海)智能科技有限公司 | Infrared signal learning method |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN102354443B (en) | Wireless infrared (IR) remote control device and operating method thereof | |
CN103176445A (en) | BLC2200-based intelligent household control system and control method thereof | |
CN202584411U (en) | Wireless learning infrared repeater system | |
CN103426279A (en) | Household appliance implementation method based on intelligent mobile terminal control | |
CN104735274A (en) | Learning type universal infrared remote control method based on cloud platform and smart phone | |
CN103839404A (en) | Automatic test apparatus of infrared remote control equipment, and method thereof | |
CN105630495A (en) | Chip programming method and system | |
CN106033191A (en) | Household electrical appliance control method and device | |
CN109639737A (en) | Agreement generating device, the method for converting protocol of data collection station and configuration method | |
CN104332045A (en) | Intelligent infrared remote controlsystem based on wireless network and method | |
CN105335316A (en) | Motor assembling line serial port server based on cloud computation | |
CN205942295U (en) | Intelligence house infrared control system based on STM32 | |
CN106452995A (en) | WiFi remote control module | |
CN201751898U (en) | 1553B bus test device | |
CN104700605A (en) | Method using CPU in Zigbee module to achieve infrared forward | |
CN204496694U (en) | A kind of wireless self learning type infrared transponder based on Zigbee | |
CN104251536A (en) | One-to-many current loop communication method and communication device | |
CN103280090B (en) | Mobile acquisition control system and control method thereof | |
CN105187123A (en) | Intelligent household safety controller of combining WIFI communication and visible light communication | |
CN103986632A (en) | Method for adding device to network through visible light | |
CN104680769A (en) | Bluetooth-to-infrared meter reading system of intelligent mobile phone | |
CN103078902A (en) | Data transmission method and device of embedded monitoring equipment | |
CN109726604A (en) | A kind of data exchange communications method contacted between card and terminal | |
CN105488995A (en) | Smart-phone-based Bluetooth-to-infrared meter recording device | |
CN207966177U (en) | Network self-adapting remote control |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
WD01 | Invention patent application deemed withdrawn after publication |
Application publication date: 20150610 |
|
WD01 | Invention patent application deemed withdrawn after publication |