JP2009055301A - Wireless sensor network system - Google Patents

Wireless sensor network system Download PDF

Info

Publication number
JP2009055301A
JP2009055301A JP2007219685A JP2007219685A JP2009055301A JP 2009055301 A JP2009055301 A JP 2009055301A JP 2007219685 A JP2007219685 A JP 2007219685A JP 2007219685 A JP2007219685 A JP 2007219685A JP 2009055301 A JP2009055301 A JP 2009055301A
Authority
JP
Japan
Prior art keywords
end device
sleep
time
command
activation
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.)
Withdrawn
Application number
JP2007219685A
Other languages
Japanese (ja)
Inventor
Haruo Noma
春生 野間
Masakazu Miyamae
雅一 宮前
Tsutomu Terada
努 寺田
Satoshi Takahashi
悟史 高橋
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
ATR Advanced Telecommunications Research Institute International
Original Assignee
ATR Advanced Telecommunications Research Institute International
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by ATR Advanced Telecommunications Research Institute International filed Critical ATR Advanced Telecommunications Research Institute International
Priority to JP2007219685A priority Critical patent/JP2009055301A/en
Publication of JP2009055301A publication Critical patent/JP2009055301A/en
Withdrawn legal-status Critical Current

Links

Images

Classifications

    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D30/00Reducing energy consumption in communication networks
    • Y02D30/70Reducing energy consumption in communication networks in wireless communication networks

Landscapes

  • Small-Scale Networks (AREA)
  • Mobile Radio Communication Systems (AREA)

Abstract

<P>PROBLEM TO BE SOLVED: To surely perform communication without increasing power consumption of an end device. <P>SOLUTION: A wireless sensor network system 10 includes a PC 12, and the PC 12 is connected with a coordinator 14. To the coordinator 14, a plurality of end devices 18 are connected via a plurality of routers 16. To each end device 18, a photo-detection module 60 is connected as an infrared sensor. The end device 18 includes a sleep function and is driven by a battery. When sleeping, the end device 18 transmits to the PC 12 a GTB command reporting the next scheduled time of activation. Furthermore, when being activated from the sleeping state, an IAA command reporting the activation and the next scheduled time of sleep is transmitted to the PC 12. Therefore, the PC 12 knows whether the end device is being activated or not. Accordingly, it is enough for the PC only to transmit data or a command during activation of the end device, so that communication can be surely performed while suppressing battery consumption of the end device to a minimum. <P>COPYRIGHT: (C)2009,JPO&INPIT

Description

この発明はワイヤレス・センサ・ネットワーク・システムに関し、特にたとえば、ZigBee(登録商標)モジュールを備えるノードを有する、ワイヤレス・センサ・ネットワーク・システムに関する。   The present invention relates to a wireless sensor network system, and more particularly to a wireless sensor network system having a node with a ZigBee module, for example.

従来のこの種のワイヤレス・センサ・ネットワーク・システムの一例が、非特許文献1に開示されている。この非特許文献1に開示されるZigBeeは、アドホックなワイヤレス・センサ・ネットワークの構成を目的として、IEEE 802.15.4をベースとし、ZigBeeアライアンスによって規格化されたシステムである。たとえば、ZigBeeは、1のZigBeeコーディネータが、直接またはZigBeeルータを介して、1または複数のZigBeeエンド・デバイスに接続された、ツリー構造やスター構造のネットワークである。また、ZigBeeコーディネータには、PCがシリアルに接続されている。
実践入門ネットワーク ZigBee開発ハンドブック 鄭立著 リックテレコム
An example of a conventional wireless sensor network system of this type is disclosed in Non-Patent Document 1. ZigBee disclosed in Non-Patent Document 1 is a system based on IEEE 802.15.4 and standardized by the ZigBee Alliance for the purpose of configuring an ad hoc wireless sensor network. For example, ZigBee is a tree-structured or star-structured network where one ZigBee coordinator is connected to one or more ZigBee end devices, either directly or through a ZigBee router. A PC is serially connected to the ZigBee coordinator.
Practical introductory network ZigBee development handbook by Tatetsu

このような非特許文献1に開示されるワイヤレス・センサ・ネットワーク・システムは、或る建物内に設置され、センサ入力に基づいたサービスが提供される。ZigBeeエンド・デバイスは、スリープ機能およびレジューム機能を備え、スリープすることにより、間欠的に動作し、電力の消費をできるだけ少なくしている。しかし、スリープ管理については、ZigBeeの規格で定められておらず、ユーザのアプリケーションに任されている。このため、たとえば、ZigBeeエンド・デバイスのスリープ中に、PCから当該ZigBeeエンド・デバイスにデータやコマンドが送信されると、そのデータやコマンドを受信することができず、消失してしまうこともある。これを防止するために、ZigBeeエンド・デバイスのスリープ期間を短くして、PCからのデータやコマンドを受信する機会を増やすと、消費電力が増大し、電池の寿命を短くしてしまうという問題がある。   Such a wireless sensor network system disclosed in Non-Patent Document 1 is installed in a certain building, and a service based on sensor input is provided. The ZigBee end device has a sleep function and a resume function, and operates intermittently by sleeping to minimize power consumption. However, sleep management is not defined by the ZigBee standard and is left to the user's application. For this reason, for example, if data or a command is transmitted from the PC to the ZigBee end device while the ZigBee end device is sleeping, the data or command cannot be received and may be lost. . In order to prevent this, if the sleep period of the ZigBee end device is shortened and the opportunity to receive data and commands from the PC is increased, the power consumption increases and the battery life is shortened. is there.

それゆえに、この発明の主たる目的は、新規な、ワイヤレス・センサ・ネットワーク・システムを提供することである。   Therefore, the main object of the present invention is to provide a novel wireless sensor network system.

この発明の他の目的は、消費電力を増加させることなく、確実に通信することができる、ワイヤレス・センサ・ネットワーク・システムを提供することである。   Another object of the present invention is to provide a wireless sensor network system capable of reliably communicating without increasing power consumption.

本発明は、上記の課題を解決するために、以下の構成を採用した。なお、括弧内の参照符号および補足説明等は、本発明の理解を助けるために後述する実施の形態との対応関係を示したものであって、本発明を何ら限定するものではない。   The present invention employs the following configuration in order to solve the above problems. The reference numerals in parentheses, supplementary explanations, and the like indicate correspondence relationships with embodiments described later to help understanding of the present invention, and do not limit the present invention in any way.

第1の発明は、スリープ機能およびレジューム機能を有する1または複数のエンド・デバイス、エンド・デバイスと直接またはルータを介して接続される1のコーディネータ、およびコーディネータと通信可能に接続されるコンピュータを備える、ワイヤレス・センサ・ネットワーク・システムにおいて、エンド・デバイスは、スリープ機能によってスリープするとき、次回起動予定時刻をコンピュータに通知する起動予定通知手段を備え、コンピュータは、起動予定通知手段によって通知された次回起動予定時刻を受信して記憶する予定時刻記憶手段、エンド・デバイスに送信するデータやコマンドが有るとき、少なくとも次回起動予定時刻に基づいて、当該エンド・デバイスがスリープ中かどうかを判別するスリープ判別手段、およびスリープ判別手段によってスリープ中でないことが判別されたとき、エンド・デバイスにデータやコマンドを送信する送信手段を備えることを特徴とする、ワイヤレス・センサ・ネットワーク・システムである。   A first invention includes one or a plurality of end devices having a sleep function and a resume function, a coordinator connected to the end devices directly or via a router, and a computer communicably connected to the coordinator In the wireless sensor network system, when the end device sleeps by the sleep function, the end device is provided with a start schedule notification means for notifying the computer of the next start time, and the computer is notified next time by the start schedule notification means. Sleep determination for determining whether or not the end device is in a sleep state based on at least the next start time when there is data or a command to be transmitted to the end device. Means, and When it is determined to not be sleeping by-loop determining means, characterized in that it comprises a transmitting means for transmitting the data or command to the end device, a wireless sensor network system.

第1の発明では、ワイヤレス・センサ・ネットワーク・システム(10)は、1または複数のエンド・デバイス(18)、コーディネータ(14)を含み、エンド・デバイスとコーディネータとは直接、または1または複数のルータ(16)を介して通信可能に接続される。コーディネータにはコンピュータ(12)が接続され、コーディネータはゲートウェイとして機能する。エンド・デバイスは、スリープ機能およびレジューム機能を有し、エンド・デバイスの起動予定通知手段(50a,S17,S51,S97)は、スリープ機能によってスリープするとき、次回起動予定時刻をコンピュータに通知する。一方、コンピュータでは、予定時刻記憶手段(S149,S151)が、エンド・デバイスから通知された次回起動予定時刻を受信して記憶する。したがって、コンピュータでは、スリープ判別手段(S123)は、エンド・デバイスに送信するデータやコマンドが有るとき(S121で“YES”)、少なくとも次回起動予定時刻に基づいて、当該エンド・デバイスがスリープ中であるかどうかを判別する。送信手段(S125)は、エンド・デバイスがスリープ中でないことが判別されたとき(S123で“NO”)、当該エンド・デバイスにデータやコマンドを送信する。   In the first invention, the wireless sensor network system (10) includes one or more end devices (18), a coordinator (14), the end devices and the coordinator being directly or one or more Communication is established via a router (16). A computer (12) is connected to the coordinator, and the coordinator functions as a gateway. The end device has a sleep function and a resume function, and the end device activation schedule notifying means (50a, S17, S51, S97) notifies the computer of the next activation scheduled time when sleeping by the sleep function. On the other hand, in the computer, the scheduled time storage means (S149, S151) receives and stores the next activation scheduled time notified from the end device. Accordingly, in the computer, when there is data or a command to be transmitted to the end device (“YES” in S121), the sleep determination unit (S123) is in the sleep state based on at least the next scheduled start time. Determine if it exists. When it is determined that the end device is not in sleep (“NO” in S123), the transmission means (S125) transmits data and commands to the end device.

第1の発明によれば、エンド・デバイスは、スリープするとき、次回起動予定時刻をコンピュータに知らせるので、コンピュータはエンド・デバイスが起動しているときにデータやコマンドを送信することができる。つまり、スリープしならが間欠的に起動しても、確実に通信することができる。また、頻繁にエンド・デバイスを起動する必要がないので、消費電力を最低限に抑えることができる。   According to the first invention, when the end device sleeps, the computer notifies the computer of the next scheduled start time, so that the computer can transmit data and commands when the end device is activated. In other words, even if the sleep is activated intermittently, it is possible to reliably communicate. In addition, since it is not necessary to frequently start the end device, power consumption can be minimized.

第2の発明は第1の発明に従属し、エンド・デバイスは、起動したことおよび次回スリープ予定時刻を含む起動中情報をコンピュータに通知する起動中通知手段をさらに備え、コンピュータは、起動中通知手段によって通知された起動中情報を受信する起動中情報受信手段をさらに備え、スリープ判別手段は、次回起動予定時刻と起動中情報とに基づいて、エンド・デバイスがスリープ中かどうかを判断する。   The second invention is dependent on the first invention, and the end device further includes a startup notification means for notifying the computer of startup information including startup and the next sleep scheduled time, and the computer notifies the startup notification The information processing apparatus further includes an active information receiving means for receiving the active information notified by the means, and the sleep determining means determines whether or not the end device is in a sleep state based on the next start scheduled time and the active information.

第2の発明では、エンド・デバイスでは、起動中通知手段(50a,S3,S13,S37,S87)が、自身が起動したことおよび次回スリープ予定時刻を含む起動中情報をコンピュータに通知する。ただし、起動中情報は、エンド・デバイスがスリープの状態から起動(復帰)した場合のみならず、エンド・デバイスの電源が投入されることにより起動した場合にも、コンピュータに通知される。一方、コンピュータでは、起動中情報受信手段(S129)が、その起動中情報を受信する。スリープ判別手段は、次回起動予定時刻と起動中情報とに基づいて、エンド・デバイスがスリープ中かどうかを判別する。   In the second invention, in the end device, the activation notifying means (50a, S3, S13, S37, S87) notifies the computer of the activation information including the activation and the next sleep scheduled time. However, the activation information is notified to the computer not only when the end device is activated (returned) from the sleep state but also when the end device is activated when the power is turned on. On the other hand, in the computer, the activation information receiving means (S129) receives the activation information. The sleep determination unit determines whether the end device is sleeping based on the next activation scheduled time and the activation information.

第2の発明では、コンピュータはエンド・デバイスが実際に起動しているか否かを知ることができるので、確実にデータやコマンドを送信することができる。   In the second invention, since the computer can know whether or not the end device is actually activated, it can reliably transmit data and commands.

第3の発明は第2の発明に従属し、エンド・デバイスは、センサ入力を検出するセンサ入力検出手段、および当該エンド・デバイスのスリープ中にセンサ入力検出手段によってセンサ入力が検出されたとき当該エンド・デバイスを起動させる起動手段をさらに備え、起動中通知手段は、起動手段によって当該エンド・デバイスが起動されたとき、起動中情報をコンピュータに通知する。   A third invention is dependent on the second invention, and the end device has sensor input detection means for detecting the sensor input, and when the sensor input is detected by the sensor input detection means during sleep of the end device, the end device An activation means for activating the end device is further provided, and the activation informing means notifies the activation information to the computer when the end device is activated by the activation means.

第3の発明では、エンド・デバイスでは、センサ入力検出手段(S41)がセンサ入力を検出する。起動手段(S71,S81,S83)は、エンド・デバイスのスリープ中に、センサ入力が検出されると(S41で“YES”)、当該エンド・デバイスを起動する。つまり、センサ入力をトリガとして、エンド・デバイスは目覚める。このとき、起動中通知手段は、起動中情報をコンピュータに通知する。   In the third invention, in the end device, the sensor input detecting means (S41) detects the sensor input. The activation means (S71, S81, S83) activates the end device when a sensor input is detected during sleep of the end device (“YES” in S41). That is, the end device wakes up with the sensor input as a trigger. At this time, the startup notification means notifies the startup information to the computer.

第3の発明によれば、エンド・デバイスがスリープ中であってもセンサ入力があると、これを起動するので、このとき、エンド・デバイスからセンサデータを送信することができるし、起動中では、コンピュータからデータやコマンドを送信することもできる。   According to the third invention, even if the end device is in the sleep state, if there is a sensor input, it is activated, so at this time, the sensor data can be transmitted from the end device. You can also send data and commands from your computer.

この発明によれば、エンド・デバイスの次回起動予定時刻をコンピュータに知らせるので、エンド・デバイスがスリープしながら間欠的に駆動する場合であっても、コンピュータはエンド・デバイスの起動中にのみデータやコマンドを送信することができる。つまり、エンド・デバイスの消費電力を増加させることなく、確実に通信することができる。このため、エンド・デバイスをバッテリ駆動しても、比較的長期間の駆動が可能である。   According to the present invention, since the next start-up time of the end device is notified to the computer, even if the end device is intermittently driven while sleeping, the computer only receives data or data during the start-up of the end device. Commands can be sent. That is, it is possible to reliably communicate without increasing the power consumption of the end device. For this reason, even if the end device is battery-driven, it can be driven for a relatively long period of time.

この発明の上述の目的,その他の目的,特徴および利点は、図面を参照して行う以下の実施例の詳細な説明から一層明らかとなろう。   The above object, other objects, features and advantages of the present invention will become more apparent from the following detailed description of embodiments with reference to the drawings.

図1を参照して、この発明の一実施例であるワイヤレス・センサ・ネットワーク・システム(以下、単に「システム」という。)10は、汎用のコンピュータであるPC12を含み、PC12にはRC232Cを介してシリアルにZigBeeコーディネータ(以下、単に「コーディネータ」という。)14が接続される。コーディネータ14には、複数のZigBeeルータ(以下、単に「ルータ」という。)16が接続され、各ルータ16には、ルータ16または複数のZigBeeエンド・デバイス(以下、単に「エンド・デバイス」という。)18が接続される。ここで、図1の点線枠で示すように、コーディネータ14、ルータ16およびエンド・デバイス18によって構成されるネットワークが、ワイヤレス・センサ・ネットワーク(ZigBee)20である。   Referring to FIG. 1, a wireless sensor network system (hereinafter simply referred to as “system”) 10 according to an embodiment of the present invention includes a PC 12 which is a general-purpose computer, and PC 12 is connected via RC 232C. A ZigBee coordinator (hereinafter simply referred to as “coordinator”) 14 is connected serially. A plurality of ZigBee routers (hereinafter simply referred to as “routers”) 16 are connected to the coordinator 14, and each router 16 is referred to as a router 16 or a plurality of ZigBee end devices (hereinafter simply referred to as “end devices”). ) 18 is connected. Here, as shown by the dotted frame in FIG. 1, the network constituted by the coordinator 14, the router 16, and the end device 18 is a wireless sensor network (ZigBee) 20.

なお、この実施例では、コーディネータ14に複数のルータ16を接続するようにしてあるが、ルータ16は1つでも構わない。また、コーディネータ14に直接エンド・デバイス18を接続するようにしても構わない。さらに、ルータ16には、複数のエンド・デバイス18を接続するようにしてあるが、エンド・デバイス18は1つでも構わない。ただし、場合によっては、一部のルータ16にはエンド・デバイス18が接続されていないこともある。さらにまた、図1では、コーディネータ14とエンド・デバイス18との間に1つまたは2つのルータ16を設ける例を示してあるが、ルータ16は3つ以上であっても構わない。   In this embodiment, a plurality of routers 16 are connected to the coordinator 14, but one router 16 may be used. Further, the end device 18 may be directly connected to the coordinator 14. Furthermore, although a plurality of end devices 18 are connected to the router 16, one end device 18 may be provided. However, in some cases, the end device 18 may not be connected to some routers 16. Furthermore, although FIG. 1 shows an example in which one or two routers 16 are provided between the coordinator 14 and the end device 18, the number of routers 16 may be three or more.

このようなシステム10は、或る建物内に設置され、センサ(この実施例では、後述する受光モジュール60)によって検出された検出信号(センサデータ:この実施例では、送信機ID)をPC12に送信し、図示は省略するが、PC12はこのセンサデータを内部メモリ(ハードディスクやRAMなど)やアクセス可能なデータベースに記憶する。ただし、センサデータを用いて、任意のアプリケーションを実行するようにしてもよい。また、PC12は、バッテリ駆動されるエンド・デバイス18に、電池残量や時刻設定(現在時刻)を問い合わせたり、エンド・デバイス18の時刻設定を行ったり、エンド・デバイス18にデータを送ったりする。   Such a system 10 is installed in a certain building, and a detection signal (sensor data: transmitter ID in this embodiment) detected by a sensor (in this embodiment, a light receiving module 60 described later) is transmitted to the PC 12. Although not shown, the PC 12 stores the sensor data in an internal memory (such as a hard disk or RAM) or an accessible database. However, any application may be executed using the sensor data. Further, the PC 12 inquires of the battery-powered end device 18 about the remaining battery level and time setting (current time), sets the time of the end device 18, and sends data to the end device 18. .

ここで、コーディネータ14やルータ16は比較的数が少ないため、システム10を或る建物内に設置する場合には、既存のコンセントから商用電源を供給するようにすればよいが、エンド・デバイス18は多数存在するため、既存のコンセントからの電源供給は現実的ではない。また、システム10を設置するために、コンセントを増設することも現実的ではない。このため、図2(A)および図2(B)に示すように、コーディネータ14とルータ16とを商用電源により駆動し、図2(C)に示すように、エンド・デバイス18のみをバッテリ(電池)により駆動するようにしてある。   Here, since the number of coordinators 14 and routers 16 is relatively small, when the system 10 is installed in a certain building, commercial power may be supplied from an existing outlet. Since there are many, there is no practical power supply from an existing outlet. In addition, it is not realistic to add an outlet to install the system 10. Therefore, as shown in FIGS. 2A and 2B, the coordinator 14 and the router 16 are driven by a commercial power source, and only the end device 18 is connected to the battery (as shown in FIG. 2C). Battery).

図2(A)は、図1に示したコーディネータ14の電気的な構成を示すブロック図である。図2(A)に示すように、コーディネータ14は、ZigBeeモジュール32を含み、このZigBeeモジュール32には、CPUコア32aが内蔵される。ZigBeeモジュール32には、上述したように、RS232Cのようなインターフェイスを介してPC12が接続される。また、コーディネータ14は、電源回路34を含み、電源回路34は図示しないコンセントプラグを壁ソケットに差し込んで得られる商用電源を降圧および整流して生成された直流電圧を、ZigBeeモジュール32に与える。   FIG. 2A is a block diagram showing an electrical configuration of the coordinator 14 shown in FIG. As shown in FIG. 2A, the coordinator 14 includes a ZigBee module 32, and the ZigBee module 32 incorporates a CPU core 32a. As described above, the PC 12 is connected to the ZigBee module 32 via an interface such as RS232C. The coordinator 14 also includes a power supply circuit 34, and the power supply circuit 34 supplies the ZigBee module 32 with a DC voltage generated by stepping down and rectifying a commercial power supply obtained by inserting a not-shown outlet plug into a wall socket.

なお、ZigBeeモジュール32(後述するZigBeeモジュール52も同じ。)としては、株式会社ルネサス製のZigBeeモジュール「品番:YCSCZB2」を用いることができる。   In addition, as ZigBee module 32 (ZigBee module 52 mentioned later is also the same), ZigBee module "product number: YCSCZB2" by Renesas Co., Ltd. can be used.

コーディネータ14は、ワイヤレス・センサ・ネットワーク(以下、単に「ネットワーク」という。)20全体を管理し、PC12とのゲートウェイとなる。コーディネータ14は、ZigBeeモジュール32を用いた無線通信により、ルータ16またはエンド・デバイス18から送信されるデータやコマンドを、インターフェイス(RS232C)を介してPC12に送信する。また、コーディネータ14は、インターフェイスを介してPC12から送信されるデータやコマンドを、直接、またはルータ16を介して、エンド・デバイス18に送信する。   The coordinator 14 manages the entire wireless sensor network (hereinafter simply referred to as “network”) 20 and serves as a gateway to the PC 12. The coordinator 14 transmits data and commands transmitted from the router 16 or the end device 18 to the PC 12 via the interface (RS232C) by wireless communication using the ZigBee module 32. The coordinator 14 transmits data and commands transmitted from the PC 12 via the interface to the end device 18 directly or via the router 16.

図2(B)はルータ16の電気的な構成を示すブロック図である。図面からも分かるように、ルータ16は、コーディネータ14とほぼ同じであるため、同じコンポーネントには同じ参照番号を付してある。また、重複した説明は省略するルータ16では、ZigBeeモジュール32が無線通信のみを実行する。   FIG. 2B is a block diagram showing an electrical configuration of the router 16. As can be seen from the drawing, the router 16 is substantially the same as the coordinator 14, and therefore the same components are denoted by the same reference numerals. In the router 16, which is not described repeatedly, the ZigBee module 32 performs only wireless communication.

ルータ16は、主として、通信の中継を行う。具体的には、ルータ16は、ZigBeeモジュール32を用いた無線通信より、配下に接続されたエンド・デバイス18から送信されるデータやコマンドを上位のルータ16やコーディネータ14を介してPC12に送信する。また、ルータ16は、コーディネータ14や上位のルータ16を介して送信されるPC12からのデータやコマンドを、自身の配下のエンド・デバイス18に送信する。   The router 16 mainly performs communication relay. Specifically, the router 16 transmits data and commands transmitted from the subordinate end device 18 to the PC 12 via the upper router 16 and the coordinator 14 by wireless communication using the ZigBee module 32. . Further, the router 16 transmits data and commands from the PC 12 transmitted via the coordinator 14 and the upper router 16 to the end device 18 under its control.

図2(C)は、エンド・デバイス18の電気的な構成を示すブロック図である。図2(C)に示すように、エンド・デバイス18は、マイコン50を含み、マイコン50にはCPUコア50aおよびタイマ50bなどのコンポーネントが内蔵される。また、マイコン50には、ZigBeeモジュール52が接続される。ZigBeeモジュール52には、CPUコア52などのコンポーネントが内蔵される。また、エンド・デバイス18は電源回路54を含み、電池(バッテリ)56からの直流電圧を、CPUコア50aの指示に従って、マイコン50およびZigBeeモジュール52に付与する。このエンド・デバイス18には、赤外線センサとしての受光モジュール60が接続される。図示は省略するが、受光モジュール60は、マイコン50に接続される。   FIG. 2C is a block diagram showing an electrical configuration of the end device 18. As shown in FIG. 2C, the end device 18 includes a microcomputer 50, and the microcomputer 50 includes components such as a CPU core 50a and a timer 50b. Further, a ZigBee module 52 is connected to the microcomputer 50. The ZigBee module 52 incorporates components such as the CPU core 52. Further, the end device 18 includes a power supply circuit 54, and applies a DC voltage from a battery (battery) 56 to the microcomputer 50 and the ZigBee module 52 in accordance with instructions from the CPU core 50a. A light receiving module 60 as an infrared sensor is connected to the end device 18. Although not shown, the light receiving module 60 is connected to the microcomputer 50.

なお、マイコン50としては、株式会社ルネサス製のマイクロコンピュータ「品番:R8C/25(R5F21258SNFP)」を用いることができる。   As the microcomputer 50, a microcomputer “Product Number: R8C / 25 (R5F21258SNFP)” manufactured by Renesas Co., Ltd. can be used.

また、この実施例では、エンド・デバイス18には、赤外線センサを接続するようにしてあるが、これに代えて、または、これと共に、圧力センサ、照度センサや温度センサなどの他のセンサを設けるようにしてもよい。つまり、センサの種類や数は限定される必要はなく、PC12側で収集(記憶)ないし、アプリケーションの実行に必要なセンサが使用されるのである。   In this embodiment, an infrared sensor is connected to the end device 18, but instead of or in addition to this, another sensor such as a pressure sensor, an illuminance sensor, or a temperature sensor is provided. You may do it. That is, the type and number of sensors do not need to be limited, and sensors necessary for collection (storage) or execution of applications are used on the PC 12 side.

このようなエンド・デバイス18では、受光モジュール60から与えられるセンサデータなどのデータやマイコン50(CPUコア50a)によって発生されたコマンドを、直接またはルータ16を介してコーディネータ14に送信する。すると、上述したように、コーディネータ14がそのデータやコマンドをPC12に送信する。また、エンド・デバイス18は、コーディネータ14や上位のルータ16を介して送信されるPC12からのデータやコマンドを受信し、データを図示しない通信手段を用いて他の機器に送信したり、コマンドに従う処理を実行したりする。場合によっては、エンド・デバイス18は、PC12からのコマンドに従う処理を実行し、その結果(結果データ)をPC12に通知する。   In such an end device 18, data such as sensor data provided from the light receiving module 60 and a command generated by the microcomputer 50 (CPU core 50 a) are transmitted to the coordinator 14 directly or via the router 16. Then, as described above, the coordinator 14 transmits the data and command to the PC 12. Also, the end device 18 receives data and commands from the PC 12 transmitted via the coordinator 14 and the upper router 16, and transmits the data to other devices using a communication means (not shown) or follows the commands. Execute the process. In some cases, the end device 18 executes processing according to a command from the PC 12 and notifies the PC 12 of the result (result data).

たとえば、図示は省略するが、PC12やコーディネータ14は、システム管理室のような場所に設置される。ルータ16は、たとえば、その或る建物内の各階の任意の場所(たとえば、給湯室やエレベータホール)に設置される。ルータ16は、各階に1つでも良いし、ルータ16からエンド・デバイス18までの距離が遠い場合には、ルータ16を複数設けるようにしてもよい。エンド・デバイス18は、図3に示すように、ゲートに設置される。ただし、図3では分かり易く示すために、ゲートを示してあるが、実際には、エンド・デバイス18は、建物内の各部屋の出入り口、廊下、廊下と廊下との連結部(交差点,T字路など)、エレベータホール、廊下と階段と連結部のような要所に設置されたり、各部屋内の要所に設置されたりする。   For example, although not shown, the PC 12 and the coordinator 14 are installed in a place such as a system management room. The router 16 is installed in, for example, an arbitrary place (for example, a hot water supply room or an elevator hall) on each floor in a certain building. One router 16 may be provided on each floor, and when the distance from the router 16 to the end device 18 is long, a plurality of routers 16 may be provided. The end device 18 is installed at the gate as shown in FIG. However, for the sake of easy understanding in FIG. 3, the gate is shown, but in reality, the end device 18 is connected to the entrance / exit of each room in the building, the corridor, the connecting portion between the corridor and the corridor (intersection, T-shape). Road), elevator halls, corridors, staircases and connecting parts, or installed in important points in each room.

図3に示すように、ゲートの上部には、受光モジュール60が配置され、上述したように、受光モジュール60はゲートの上に載置されるエンド・デバイス18に接続される。一方、被験者の頭部(頭髪)には、送信機70が装着される。図示は省略するが、送信機70は、赤外線信号を送信し、これを受光モジュール60が検出する。ここで、送信機70から送信される赤外線信号は、たとえば、8ビットの固定のパターン(送信機ID)である。たとえば、受光モジュール60は、送信機IDを受信すると、受信した送信機IDをマイコン50(CPUコア50a)に与える。CPUコア50aは、送信機IDを受信した受光モジュール60の受光モジュールIDを付加して、図示しないRAMに記憶(一時記憶)し、その後、ZigBeeモジュール52を用いてPC12へ送信する。すると、受光モジュールIDの付加された送信機ID(センサデータ)が、ルータ16およびコーディネータ14を介してPC12に与えられる。   As shown in FIG. 3, the light receiving module 60 is disposed above the gate, and as described above, the light receiving module 60 is connected to the end device 18 mounted on the gate. On the other hand, the transmitter 70 is attached to the head (hair) of the subject. Although illustration is omitted, the transmitter 70 transmits an infrared signal, which is detected by the light receiving module 60. Here, the infrared signal transmitted from the transmitter 70 is, for example, an 8-bit fixed pattern (transmitter ID). For example, when receiving the transmitter ID, the light receiving module 60 gives the received transmitter ID to the microcomputer 50 (CPU core 50a). The CPU core 50 a adds the light receiving module ID of the light receiving module 60 that has received the transmitter ID, and stores (temporarily stores) the light receiving module ID in a RAM (not shown). Then, the transmitter ID (sensor data) to which the light receiving module ID is added is given to the PC 12 via the router 16 and the coordinator 14.

たとえば、センサデータ(受光モジュールIDの付加された送信機ID)に、タイマ50bによって計時された時刻(現在時刻)を付加すると、PC12側では、送信機IDに対応する送信機70を装着した被験者の現在位置または時系列に従った行動パターンを知ることができる。ただし、受光モジュールIDに対応して、当該受光モジュールIDを有する受光モジュール60の設置場所を記述したテーブル(場所テーブル)および送信機IDに対応して、当該送信機IDが示す送信機70を装着した被験者の名称ないし識別情報を記述したテーブル(被験者テーブル)を、図示しない、PC12内部のハードディスクやROMに記憶したり、PC12が接続可能なデータベースに記憶したりする必要がある。   For example, when the time (current time) timed by the timer 50b is added to the sensor data (transmitter ID to which the light receiving module ID is added), the subject wearing the transmitter 70 corresponding to the transmitter ID on the PC 12 side. You can know the current position or the action pattern according to the time series. However, a table (location table) describing the installation location of the light receiving module 60 having the light receiving module ID corresponding to the light receiving module ID and a transmitter 70 indicated by the transmitter ID corresponding to the transmitter ID are mounted. It is necessary to store a table (subject table) in which the name or identification information of the subject is recorded in a hard disk or ROM inside the PC 12 (not shown) or in a database to which the PC 12 can be connected.

したがって、エンド・デバイス18は、PC12にデータ等を送信する場合やPC12からのデータやコマンドを受信する場合に、起動していれば、その役割を果たすことができる。つまり、常時起動している必要はないため、スリープしながら、間欠的に駆動すればよく、センサ入力があった場合には、割り込み的に起動すればよいと考えられる。しかし、PC12は、エンド・デバイス18の起動しているかどうかを知ることができない。   Therefore, when the end device 18 is activated when transmitting data or the like to the PC 12 or when receiving data or a command from the PC 12, the end device 18 can play its role. That is, since it is not necessary to always start, it should just drive intermittently while sleeping, and when there is a sensor input, it may be necessary to start in an interrupted manner. However, the PC 12 cannot know whether the end device 18 is activated.

このため、この実施例では、エンド・デバイス18は、所定のコマンド(後述するIAAコマンド、GTBコマンド)をPC12に送信して、起動しているかどうかをPC12側で把握(判断)できるようにしてある。これにより、エンド・デバイス18がスリープしている間に、PC12から当該エンド・デバイス18にデータやコマンドが送信されてしまうのような不都合を事前に回避でき、したがって、PC12からエンド・デバイス18に送信されるデータやコマンドが消失されるのを防止することができる。   Therefore, in this embodiment, the end device 18 transmits a predetermined command (IAA command and GTB command described later) to the PC 12 so that the PC 12 can grasp (determine) whether or not it is activated. is there. Thus, it is possible to avoid inconvenience such as data or commands being transmitted from the PC 12 to the end device 18 while the end device 18 is sleeping. It is possible to prevent data and commands to be transmitted from being lost.

このような構成のシステム10では、PC12は、システム10内のエンド・デバイス18を、図4に示すようなアドレスマップ100を用いて管理する。図示は省略するが、アドレスマップ100は、PC12の内部メモリ(ハードディスクやRAM)に記憶したり、通信可能に接続されるデータベースや外付けの記憶媒体に記憶したりしている。図4に示すように、アドレスマップ100には、IEEE拡張アドレスに対応して、ショートアドレス、次回起動予定時刻および次回スリープ予定時刻が記述される。IEEE拡張アドレスは、IEEE802.3におけるMACアドレスと同様に、エンド・デバイス18固有のアドレスであり、ZigBeeモジュール52に割り当てられる。このIEEE拡張アドレスは、8バイトで構成される。また、ショートアドレスは、ネットワーク20における階層および配置位置を示す2バイトのアドレスであり、ネットワーク20に接続されると一義的に決定される(割り当てられる)。このショートアドレスを用いて、PC12は、データやコマンドを所望のエンド・デバイス18に送信する。   In the system 10 having such a configuration, the PC 12 manages the end device 18 in the system 10 by using an address map 100 as shown in FIG. Although illustration is omitted, the address map 100 is stored in an internal memory (hard disk or RAM) of the PC 12, or stored in a database or an external storage medium that is communicably connected. As shown in FIG. 4, in the address map 100, a short address, a next scheduled start time, and a next scheduled sleep time are described corresponding to the IEEE extended address. The IEEE extended address is an address unique to the end device 18 as in the MAC address in IEEE 802.3, and is assigned to the ZigBee module 52. This IEEE extended address is composed of 8 bytes. The short address is a 2-byte address indicating a hierarchy and an arrangement position in the network 20, and is uniquely determined (assigned) when connected to the network 20. Using this short address, the PC 12 transmits data and commands to a desired end device 18.

次回起動予定時刻は、対応するエンド・デバイス18がスリープしている状態から起動する(目覚める)予定時刻である。この次回起動予定時刻は、エンド・デバイス18が発行するコマンド(以下、「GTBコマンド」と呼ぶことにする。)に記述され、これを受信したPC12が当該エンド・デバイス18のIEEE拡張アドレスおよびショートアドレスに対応する欄に次回起動予定時刻を記憶(更新)する。次回スリープ予定時刻は、対応するエンド・デバイス18の電源が投入されることにより起動されたり、レジューム機能によりスリープの状態から起動したりした後に、次にスリープする予定時刻である。この次回スリープ予定時刻もまた、エンド・デバイス18が発行するコマンド(以下、「IAAコマンド」と呼ぶことにする。)に記述され、これを受信したPC12が当該エンド・デバイス18のIEEE拡張アドレスおよびショートアドレスに対応する欄に次回スリープ予定時刻を記憶(更新)する。   The next scheduled activation time is a scheduled time when the corresponding end device 18 is activated (wakes up) from the sleep state. The next scheduled activation time is described in a command issued by the end device 18 (hereinafter referred to as a “GTB command”), and the PC 12 that has received the command will receive the IEEE extended address and short-circuit of the end device 18. The next scheduled start time is stored (updated) in the column corresponding to the address. The next scheduled sleep time is the next scheduled sleep time after the corresponding end device 18 is activated by turning on the power or after being resumed from the sleep state by the resume function. This next scheduled sleep time is also described in a command issued by the end device 18 (hereinafter referred to as “IAA command”), and the PC 12 that has received the scheduled sleep time is the IEEE extended address of the end device 18 and The next sleep scheduled time is stored (updated) in the field corresponding to the short address.

ただし、エンド・デバイス18が、ネットワーク20に新規に参加したり、電源を投入したりしたときに、上述したIAAコマンドを送信することにより、当該エンド・デバイス18のIEEE拡張アドレスおよびショートアドレスがPC12に通知され、アドレスマップ100に登録される。   However, when the end device 18 newly joins the network 20 or is turned on, the IEEE extended address and short address of the end device 18 are transmitted to the PC 12 by transmitting the IAA command described above. And registered in the address map 100.

なお、図4では、簡単のため、IEEE拡張アドレスを4つのアルファベット大文字で表わし、ショートアドレスを1つのアルファベット小文字で表わしているが、実際には、IEEE拡張アドレスは、8バイト(16個)の英数文字で表わされ、ショートアドレスは2バイト(4個)の英数文字で表わされる。また、簡単のため、次回起動予定時刻を、2文字のアルファベットで表わしているが、実際には、時(HH)分(SS)秒(MM)ミリ秒(mmm)が9つの数値で表わされる。同様に、簡単のため、次回スリープ予定時刻を、2文字のアルファベットで表わしているが、実際には、時(HH)分(SS)秒(MM)ミリ秒(mmm)が9つの数値で表わされる。   In FIG. 4, for the sake of simplicity, the IEEE extended address is represented by four alphabetic uppercase letters and the short address is represented by one alphabetic lowercase letter. However, actually, the IEEE extended address is 8 bytes (16 pieces). The short address is represented by 2 (4) alphanumeric characters. In addition, for the sake of simplicity, the next scheduled start time is represented by a two-letter alphabet. Actually, the hour (HH) minute (SS) second (MM) millisecond (mmm) is represented by nine numerical values. . Similarly, for the sake of simplicity, the next sleep scheduled time is represented by a two-letter alphabet. Actually, the hour (HH) minute (SS) second (MM) millisecond (mmm) is represented by nine numbers. It is.

ここで、GTBコマンドは、IEEE拡張アドレス、ショートアドレス、現在時刻(HHSSMMmmm)、GTB、次回起動予定時刻(HHSSMMmmm)によって構成される。IEEE拡張アドレスおよびショートアドレスは、上述したとおりである。現在時刻は、GTBコマンドを生成した(スリープに入る)時刻であり、時(HH)分(SS)秒(MM)ミリ秒(mmm)で表わされる。GTBは、当該GTBコマンドを示す識別情報である。次回起動予定時刻は、上述したように、スリープの状態から次に起動する予定時刻であり、現在時刻と同様に、時(HH)分(SS)秒(MM)ミリ秒(mmm)で表わされる。たとえば、GTBコマンドが、「1a3300a2e3334f02 2da6 201644213 GTB 202644213」である場合には、IEEE拡張アドレスが「1a3300a2e3334f02」であり、ショートアドレスが「2da6」である、エンド・デバイス18が、20時16分44秒213ミリ秒にスリープし、10分後(20時26分44秒213ミリ秒)に復帰(起動)する予定であることを示す。   Here, the GTB command is composed of an IEEE extension address, a short address, a current time (HHSSMMmmm), a GTB, and a next scheduled start time (HHSSMMmmm). The IEEE extended address and the short address are as described above. The current time is the time when the GTB command is generated (goes to sleep), and is expressed in hours (HH) minutes (SS) seconds (MM) milliseconds (mmm). GTB is identification information indicating the GTB command. As described above, the next startup scheduled time is the scheduled startup time from the sleep state, and is expressed in hours (HH) minutes (SS) seconds (MM) milliseconds (mmm), as with the current time. . For example, if the GTB command is “1a3300a2e3334f02 2da6 201644213 GTB 202644213”, the end device 18 whose IEEE extended address is “1a3300a2e3334f02” and whose short address is “2da6” is 20:16:44 It shows that it is going to sleep at 213 milliseconds, and to return (activate) after 10 minutes (20:26:44 seconds, 213 milliseconds).

また、エンド・デバイス18は、スリープの状態から起動したときに、起動したことおよび次にスリープに入る時刻(予定時刻)を示すコマンド(以下、「IAAコマンド」と呼ぶことにする。)をPC12に送信する。ただし、上述したように、エンド・デバイス18がネットワーク20に新規に参加したり、電源が投入されたりした場合にも、IAAコマンドがPC12に送信される。IAAコマンドは、GTBコマンドと同様であり、IEEE拡張アドレス、ショートアドレス、現在時刻(HHSSMMmmm)、IAA、次回スリープ予定時刻(HHSSMMmmm)によって構成される。IEEE拡張アドレスおよびショートアドレスは、上述したとおりである。現在時刻は、IAAコマンドを生成した時刻(スリープから起動した時刻)であり、時(HH)分(SS)秒(MM)ミリ秒(mmm)で表わされる。IAAは、当該IAAコマンドを示す識別情報である。次回スリープ予定時刻は、上述したように、起動している状態から次にスリープする予定時刻であり、現在時刻と同様に、時(HH)分(SS)秒(MM)ミリ秒(mmm)で表わされる。たとえば、IAAコマンドが、「1a3300a2e3334f02 2da6 201634213 IAA 201644213」である場合には、IEEE拡張アドレスが「1a3300a2e3334f02」であり、ショートアドレスが「2da6」である、エンド・デバイス18が、20時16分34秒213ミリ秒に目覚めて(起動して)、10秒後(20時16分44秒213ミリ秒)にスリープする予定であることを示す。   Further, when the end device 18 is activated from the sleep state, the PC 12 indicates a command (hereinafter referred to as an “IAA command”) indicating the activation and the time (scheduled time) when the device enters the sleep state next time. Send to. However, as described above, the IAA command is also transmitted to the PC 12 when the end device 18 newly joins the network 20 or is turned on. The IAA command is the same as the GTB command, and includes an IEEE extended address, a short address, a current time (HHSSMMmmm), an IAA, and a next scheduled sleep time (HHSSMMmmm). The IEEE extended address and the short address are as described above. The current time is the time when the IAA command is generated (the time when the IAA command is activated), and is expressed in hours (HH) minutes (SS) seconds (MM) milliseconds (mmm). IAA is identification information indicating the IAA command. As described above, the next sleep scheduled time is the scheduled time to sleep next from the activated state, and in the same way as the current time, it is in hours (HH) minutes (SS) seconds (MM) milliseconds (mmm). Represented. For example, if the IAA command is “1a3300a2e3334f02 2da6 201634213 IAA 201644213”, the end device 18 whose IEEE extended address is “1a3300a2e3334f02” and whose short address is “2da6” is 20:16:34 This indicates that the user is awakened (wakes up) at 213 milliseconds and sleeps 10 seconds later (20:16:44 seconds, 213 milliseconds).

ただし、上述したように、エンド・デバイス18の電源が投入(オフからオン)されることより、マイコン50およびZigBeeモジュール52が起動された場合にも、上述と同様のIAAコマンドがPC12に送信される。これは、主として、エンド・デバイス18がネットワーク20に、新規に参加したことを知らせるためである。   However, as described above, when the microcomputer 50 and the ZigBee module 52 are activated by turning on the power of the end device 18 (from off to on), the same IAA command as described above is transmitted to the PC 12. The This is mainly to inform the end device 18 that the network 20 has newly joined.

また、エンド・デバイス18が、ネットワーク20に参加した当初では、現在時刻が正しく設定されていないため、上記の現在時刻には、「999999999」が記述される。また、この実施例では、通常、スリープの状態から起動して次にスリープするまでの時間は一定時間に設定され、また、後述するように、次回スリープ予定時刻は現在時刻の設定に従って補正されるため、ここでは、当該一定時間に相当する時間が次回スリープ予定時刻として記述される。   Since the current time is not set correctly when the end device 18 first joins the network 20, “999999999” is described in the current time. In this embodiment, normally, the time from the sleep state to the next sleep is set to a fixed time, and as will be described later, the next scheduled sleep time is corrected according to the current time setting. Therefore, here, a time corresponding to the certain time is described as the next sleep scheduled time.

たとえば、一定時間が1分であるとすると、スリープ予定時刻には、「000100000」が記述される。その後、PC12からの指示(時刻同期メッセージ)に従って、エンド・デバイス18の現在時刻が設定されると、これに従って次回スリープ予定時刻が補正され、現在時刻および次回スリープ予定時刻の補正されたIAAコマンドがPC12に再度送信(再送信)される。電源が投入されたエンド・デバイス18では、最初にIAAコマンドをPC12に送信してから、PC12からの時刻同期メッセージ(TSETコマンド)を受信するまでの時間(調整時間)をカウントしており、TSETコマンドに従って現在時刻を設定したときに、上述の一定時間から調整時間を引いた時間を現在時刻に加算することにより、次回スリープ予定時刻を補正する。   For example, if the predetermined time is 1 minute, “000100000” is described in the scheduled sleep time. Thereafter, when the current time of the end device 18 is set in accordance with an instruction (time synchronization message) from the PC 12, the next sleep scheduled time is corrected according to this, and the current time and the next scheduled sleep time are corrected. It is transmitted again (retransmitted) to the PC 12. The end device 18 that is powered on counts the time (adjustment time) from when the IAA command is first transmitted to the PC 12 until the time synchronization message (TSET command) is received from the PC 12. When the current time is set according to the command, the next scheduled sleep time is corrected by adding the time obtained by subtracting the adjustment time from the above-mentioned fixed time to the current time.

たとえば、図5に示すように、エンド・デバイス18のマイコン50は、センサ入力が無い状態では、スリープしながら一定の時間間隔T1で起動し、PC12からのデータやコマンドの有無を検出する。PC12からのデータやコマンドが有れば、エンド・デバイス18のZigBeeモジュール52が、それを受信して、マイコン50が所定の処理を実行する。ただし、ZigBeeモジュール52がPC12からのデータやコマンドを受信したときに、マイコン50のみがスリープ中であれば、ZigBeeモジュール52がマイコン50を起動する。   For example, as shown in FIG. 5, the microcomputer 50 of the end device 18 is activated at a constant time interval T <b> 1 while sleeping in the absence of sensor input, and detects the presence or absence of data or commands from the PC 12. If there is data or a command from the PC 12, the ZigBee module 52 of the end device 18 receives it, and the microcomputer 50 executes a predetermined process. However, if only the microcomputer 50 is sleeping when the ZigBee module 52 receives data or a command from the PC 12, the ZigBee module 52 activates the microcomputer 50.

また、起動時には、マイコン50(CPUコア50a)は、上述したようなIAAコマンドを発生(生成)し、これをPC12に送信する。ただし、エンド・デバイス18の電源が投入された当初では、マイコン50(CPUコア50a)が起動し、CPUコア50aの指示に従ってZigBeeモジュール52(CPUコア52a)が起動した後に、IAAコマンドがPC12に送信される。PC12では、IAAコマンドの現在時刻に「999999999」が記述されていることと、IAAコマンドに含まれるIEEE拡張アドレスがアドレスマップ100に記述されていないこと、或いは、予定動作時刻との矛盾により、電源が投入されたり、新規に参加したりしたエンド・デバイス18であることが分かる。したがって、PC12はTSETコマンドを、IAAコマンドを送信してきたエンド・デバイス18に送信する。これによって、上述したように、エンド・デバイス18の現在時刻が設定され、PC12とエンド・デバイス18との時刻同期が計られる。   At the time of activation, the microcomputer 50 (CPU core 50a) generates (generates) the IAA command as described above and transmits it to the PC 12. However, at the beginning when the power of the end device 18 is turned on, the microcomputer 50 (CPU core 50a) is activated, and after the ZigBee module 52 (CPU core 52a) is activated according to the instruction of the CPU core 50a, the IAA command is sent to the PC 12. Sent. In the PC 12, the power supply is caused by the fact that “999999999” is described in the current time of the IAA command, the IEEE extended address included in the IAA command is not described in the address map 100, or a conflict with the scheduled operation time. It can be seen that the end device 18 has been introduced or newly joined. Therefore, the PC 12 transmits the TSET command to the end device 18 that has transmitted the IAA command. Thereby, as described above, the current time of the end device 18 is set, and the time synchronization between the PC 12 and the end device 18 is measured.

さらに、次回スリープ予定時刻になると、マイコン50(CPUコア50a)は、上述したようなGTBコマンドを生成し、これをPC12に送信して、スリープする。このとき、ZigBeeモジュール52もスリープする。たとえば、図5に示すGTBコマンド(1)では、現在時刻に時間間隔T1を加算した時刻t1が次回起動予定時刻として記述される。同様に、図5に示すGTBコマンド(2)では、現在時刻に時間間隔T1を加算した時刻t2が次回起動予定時刻として記述される。   Further, at the next scheduled sleep time, the microcomputer 50 (CPU core 50a) generates a GTB command as described above, transmits it to the PC 12, and sleeps. At this time, the ZigBee module 52 also sleeps. For example, in the GTB command (1) shown in FIG. 5, the time t1 obtained by adding the time interval T1 to the current time is described as the next scheduled start time. Similarly, in the GTB command (2) shown in FIG. 5, the time t2 obtained by adding the time interval T1 to the current time is described as the next activation scheduled time.

ただし、スリープ中であっても、センサ入力があると、これをトリガとして、マイコン50は起動され、マイコン50はZigBeeモジュール52を起動し、そして、センサ入力(センサデータ)をPC12に送信する。この場合、マイコン50(CPUコア50a)は、IAAコマンドを送信した後に、センサデータを送信する。そして、センサデータの送信を完了し、次回スリープ予定時刻になると、GTBコマンドをPC12に送信して、スリープする。図5に示すように、GTBコマンド(3)では、現在時刻に時間間隔T1を加算した時刻t3が次回起動予定時刻として記述される。このため、PC12では、アドレスマップ100において、当該エンド・デバイスの次回起動予定時刻がt2からt3に更新される。   However, even during sleep, if there is a sensor input, the microcomputer 50 is activated using this as a trigger, the microcomputer 50 activates the ZigBee module 52, and transmits the sensor input (sensor data) to the PC 12. In this case, the microcomputer 50 (CPU core 50a) transmits the sensor data after transmitting the IAA command. When the transmission of sensor data is completed and the next scheduled sleep time is reached, a GTB command is transmitted to the PC 12 to sleep. As shown in FIG. 5, in the GTB command (3), the time t3 obtained by adding the time interval T1 to the current time is described as the next activation scheduled time. Therefore, in the PC 12, the next scheduled start time of the end device is updated from t2 to t3 in the address map 100.

なお、センサ入力によってエンド・デバイス18がスリープから起動されたときに、PC12にセンサデータを送信するようにしてあるが、この後、エンド・デバイス18(マイコン50)がスリープするまでの間に、PC12から当該エンド・デバイス18にデータやコマンドを送信することも可能である。   Note that when the end device 18 is activated from sleep by sensor input, sensor data is transmitted to the PC 12. After this, until the end device 18 (the microcomputer 50) sleeps, Data and commands can be transmitted from the PC 12 to the end device 18.

具体的には、エンド・デバイス18は、図6に示す電源投入時の処理、図7および図8に示すレジューム・スリープ処理、図9に示すマイコン50のみがスリープ中のときのセンサ入力処理、および図10に示すマイコン50およびZigBeeモジュール52がスリープ中のときのセンサ入力処理を実行する。一方、PC12は、図11および図13に示す全体処理を実行する。   Specifically, the end device 18 includes a power-on process shown in FIG. 6, a resume / sleep process shown in FIGS. 7 and 8, a sensor input process when only the microcomputer 50 shown in FIG. And the sensor input process when the microcomputer 50 and the ZigBee module 52 shown in FIG. 10 are sleeping is executed. On the other hand, the PC 12 executes the entire process shown in FIGS.

図6に示すように、エンド・デバイス18は、電源が投入されると、電源投入時の処理を開始し、ステップS1で、接続待ちかどうかを判断する。ここでは、マイコン50(CPUコア50a)がZigBeeモジュール52の接続を待機しているのである。   As shown in FIG. 6, when the power is turned on, the end device 18 starts processing at power-on, and determines whether or not to wait for connection in step S1. Here, the microcomputer 50 (CPU core 50a) is waiting for the connection of the ZigBee module 52.

ステップS1で“YES”であれば、つまりZigBeeモジュール52の接続を待機している場合には、そのまま同じステップS1に戻る。一方、ステップS1で“NO”であれば、つまりZigBeeモジュール52の接続があれば、ステップS3で、IAAコマンドをPC12に送信する。   If “YES” in the step S1, that is, if waiting for the connection of the ZigBee module 52, the process returns to the same step S1 as it is. On the other hand, if “NO” in the step S1, that is, if there is a connection of the ZigBee module 52, an IAA command is transmitted to the PC 12 in a step S3.

続いて、ステップS5では、時刻同期メッセージを受信したかどうかを判断する。つまり、PC12から送信されたTSETコマンドを受信したかどうかを判断する。ステップS5で“NO”であれば、つまり時刻同期メッセージを受信していなければ、同じステップS5に戻って、時刻同期メッセージの受信を待機する。一方、ステップS5で“YES”であれば、つまり時刻同期メッセージを受信すれば、ステップS7で、時刻を設定する。ここでは、CPUコア50aは、タイマ50bの計時する時刻を、時刻同期メッセージが示す時刻に設定する。次いで、ステップS9で、次回スリープ予定時刻を補正する。そして、ステップS11で、ACKをPC12に送信し、ステップS13で、現在時刻および次回スリープ予定時刻の補正されたIAAコマンドを送信(再送信)する。   Subsequently, in step S5, it is determined whether a time synchronization message has been received. That is, it is determined whether or not the TSET command transmitted from the PC 12 has been received. If “NO” in the step S5, that is, if the time synchronization message is not received, the process returns to the same step S5 and waits for the reception of the time synchronization message. On the other hand, if “YES” in the step S5, that is, if a time synchronization message is received, the time is set in a step S7. Here, the CPU core 50a sets the time measured by the timer 50b to the time indicated by the time synchronization message. Next, in step S9, the next scheduled sleep time is corrected. In step S11, ACK is transmitted to the PC 12, and in step S13, the IAA command with the current time and the next scheduled sleep time corrected is transmitted (retransmitted).

次のステップS15では、次回スリープ予定時刻になったかどうかを判断する。つまり、CPUコア50aは、タイマ50bが計時する時刻が、ステップS13において再送信したIAAコマンドに記述された次回スリープ予定時刻になったかどうかを判断する。ステップS15で“NO”であれば、つまり次回スリープ予定時刻になっていなければ、そのまま同じステップS15に戻って、次回スリープ予定時刻になるのを待機する。一方、ステップS15で“YES”であれば、つまり次回スリープ予定時刻になれば、ステップS17で、GTBコマンドをPC12に送信し、ステップS17で、マイコン50とZigBeeモジュール52とをスリープして、電源投入時の処理を終了する。   In the next step S15, it is determined whether or not the next sleep scheduled time has come. That is, the CPU core 50a determines whether or not the time counted by the timer 50b is the next scheduled sleep time described in the IAA command retransmitted in step S13. If “NO” in the step S15, that is, if the next scheduled sleep time is not reached, the process returns to the same step S15 as it is and waits for the next scheduled sleep time. On the other hand, if “YES” in the step S15, that is, if the next scheduled sleep time is reached, a GTB command is transmitted to the PC 12 in a step S17, and the microcomputer 50 and the ZigBee module 52 are put into sleep in a step S17 to The processing at the time of input is terminated.

ただし、ステップS19では、マイコン50内のコンポーネントのうち、タイマ50b以外のコンポーネント(CPUコア50aを含む。)がスリープされる。したがって、CPUコア50aは、タイマ50bやセンサ(受光モジュール60)からのトリガに応じて起動し、これによって、マイコン50も起動する。また、ステップS19では、ZigBeeモジュール52内の全てのコンポーネント(CPUコア52aを含む。)がスリープされる。CPUコア52aは、マイコン50のCPUコア50aから起動の指示があったときに起動し、これによって、ZigBeeモジュール52も起動する。以下、マイコン50やZigBeeモジュール52がスリープする場合およびスリープの状態から起動する場合において同じであるため、その都度の詳細な説明は省略する。ただし、マイコン50は、ZigBeeモジュール52によって起動される場合もある。   However, in step S19, components (including the CPU core 50a) other than the timer 50b among the components in the microcomputer 50 are put to sleep. Therefore, the CPU core 50a is activated in response to a trigger from the timer 50b or the sensor (light receiving module 60), and thereby the microcomputer 50 is also activated. In step S19, all the components in the ZigBee module 52 (including the CPU core 52a) are put to sleep. The CPU core 52a is activated when an activation instruction is issued from the CPU core 50a of the microcomputer 50, whereby the ZigBee module 52 is also activated. Hereinafter, since it is the same when the microcomputer 50 or the ZigBee module 52 sleeps and when the microcomputer 50 or the ZigBee module 52 starts up from the sleep state, a detailed description thereof will be omitted. However, the microcomputer 50 may be activated by the ZigBee module 52.

図7および図8は、エンド・デバイス18のレジューム・スリープ処理のフロー図である。このレジューム・スリープ処理は、主として、マイコン50aによって実行され、マイコン50(CPUコア50a)がスリープし、ZigBeeモジュール52(CPUコア52a)のみが起動している場合の一部の処理についてはCPUコア52aによって実行される。また、このレジューム・スリープ処理は、上述した電源投入時の処理が終了した後に実行される。   7 and 8 are flowcharts of the resume / sleep process of the end device 18. This resume / sleep process is mainly executed by the microcomputer 50a, and the microcomputer 50 (CPU core 50a) sleeps and only a ZigBee module 52 (CPU core 52a) is activated. Executed by 52a. The resume / sleep process is executed after the above-described power-on process is completed.

図7に示すように、レジューム・スリープ処理が開始されると、ステップS31で、タイマ50bによりマイコン50(CPUコア50a)を起動する。つまり、タイマ50bが計時している時刻が次回起動予定時刻になると、タイマ50bからのトリガにより、CPUコア50aが起動される。続くステップS33では、マイコン50がZigBeeモジュール52を起動する。つまり、CPUコア50aがCPUコア52aに起動を指示する。   As shown in FIG. 7, when the resume / sleep process is started, the microcomputer 50 (CPU core 50a) is activated by the timer 50b in step S31. That is, when the time counted by the timer 50b becomes the next scheduled activation time, the CPU core 50a is activated by the trigger from the timer 50b. In subsequent step S <b> 33, the microcomputer 50 activates the ZigBee module 52. That is, the CPU core 50a instructs the CPU core 52a to start up.

続いて、ステップS35では、接続待ちかどうかを判断する。ここでは、マイコン50は、ZigBeeモジュール52の接続を待機しているのである。ステップS35で“YES”であれば、つまりZigBeeモジュール52の接続を待機している場合には、そのまま同じステップS35に戻って、ZigBeeモジュール52の接続を待機する。一方、ステップS35で“NO”であれば、つまりZigBeeモジュール52の接続がある場合には、ステップS37で、IAAコマンドをPC12に送信し、ステップS39で、マイコン50をスリープさせる。   Subsequently, in step S35, it is determined whether or not to wait for connection. Here, the microcomputer 50 is waiting for the connection of the ZigBee module 52. If “YES” in the step S35, that is, if the connection of the ZigBee module 52 is awaited, the process returns to the same step S35 as it is and the connection of the ZigBee module 52 is awaited. On the other hand, if “NO” in the step S35, that is, if there is a connection of the ZigBee module 52, an IAA command is transmitted to the PC 12 in a step S37, and the microcomputer 50 is caused to sleep in a step S39.

続いて,ステップS41では、センサ入力があるかどうかを判断する。つまり、センサ入力により、マイコン50(CPUコア50a)に起動のトリガが与えられたかどうかを判断する。ステップS41で“NO”であれば、つまりセンサ入力が無ければ、そのまま図8に示すステップS47に進む。一方、ステップS41で“YES”であれば、つまりセンサ入力があれば、後述するスリープ時のセンサ入力処理(図9参照)を実行し、ステップS45で、マイコン50をスリープさせて、ステップS41に戻る。   Subsequently, in step S41, it is determined whether there is a sensor input. That is, it is determined whether a start trigger is given to the microcomputer 50 (CPU core 50a) by sensor input. If “NO” in the step S41, that is, if there is no sensor input, the process directly proceeds to a step S47 shown in FIG. On the other hand, if “YES” in the step S41, that is, if there is a sensor input, a sensor input process at the time of sleep (see FIG. 9) described later is executed, the microcomputer 50 is caused to sleep in a step S45, and the process proceeds to the step S41. Return.

図8に示すように、ステップS47では、次回スリープ予定時刻であるかどうかを判断する。つまり、タイマ50bが計時する時刻が次回スリープ予定時刻となり、タイマ50bからのトリガにより、マイコン50の起動が指示されたかどうかを判断する。ステップS47で“YES”であれば、つまり次回スリープ予定時刻であれば、ステップS49で、タイマ50bからのトリガにより、マイコン50(CPUコア50a)を起動し、ステップS51で、CPUコア50aはGTBコマンドをPC12に送信し、ステップS53で、マイコン50とZigBeeモジュール52とをスリープさせて、レジューム・スリープ処理を終了する。   As shown in FIG. 8, in step S47, it is determined whether or not it is the next scheduled sleep time. That is, the time measured by the timer 50b is the next scheduled sleep time, and it is determined whether the activation of the microcomputer 50 is instructed by the trigger from the timer 50b. If “YES” in the step S47, that is, if it is the next scheduled sleep time, the microcomputer 50 (the CPU core 50a) is started by a trigger from the timer 50b in a step S49, and the CPU core 50a is set in the GTB in a step S51. The command is transmitted to the PC 12, and in step S53, the microcomputer 50 and the ZigBee module 52 are caused to sleep, and the resume / sleep process is terminated.

また、ステップS47で“NO”であれば、つまり次回スリープ予定時刻でなければ、ステップS55で、ZigBeeモジュール52(CPUコア52a)が、PC12からのデータやコマンドを受信したかどうかを判断する。ステップS55で“NO”であれば、つまりPC12からのデータやコマンドを受信していなければ、そのまま図7に示したステップS41に戻る。一方、ステップS55で“YES”であれば、つまりPC12からのデータやコマンドを受信すれば、ステップS57で、ZigBeeモジュール52(CPUコア52a)がマイコン50を起動する。その後、ステップS59では、マイコン50(CPUコア50a)がPC12からのデータやコマンドに従った処理を実行し、ステップS61で、マイコン50をスリープさせて、ステップS41に戻る。   If “NO” in the step S47, that is, if it is not the next sleep scheduled time, it is determined whether or not the ZigBee module 52 (the CPU core 52a) has received data or a command from the PC 12 in a step S55. If “NO” in the step S55, that is, if data or a command from the PC 12 is not received, the process returns to the step S41 shown in FIG. 7 as it is. On the other hand, if “YES” in the step S55, that is, if data or a command is received from the PC 12, the ZigBee module 52 (the CPU core 52a) starts the microcomputer 50 in a step S57. Thereafter, in step S59, the microcomputer 50 (CPU core 50a) executes processing in accordance with data and commands from the PC 12, and in step S61, the microcomputer 50 is caused to sleep, and the process returns to step S41.

なお、詳細な説明は省略するが、ステップS59では、PC12からの問い合わせコマンドに応じて、タイマ50bが計時する現在時刻や電池58の残量をPC12に知らせたり、PC12からの時刻設定の指示コマンドに応じて、タイマ50bが計時する時刻をリセットしたり、PC12からのデータやコマンドなどを図示しない通信手段を用いて他の電子機器に送信したりする。   Although detailed description is omitted, in step S59, in response to an inquiry command from the PC 12, the current time measured by the timer 50b and the remaining amount of the battery 58 are notified to the PC 12, or a time setting instruction command from the PC 12 Accordingly, the time counted by the timer 50b is reset, or data, commands, etc. from the PC 12 are transmitted to other electronic devices using communication means (not shown).

図9は、図7に示したステップS43のスリープ時のセンサ入力処理を示すフロー図である。このセンサ入力処理は、マイコン50のみがスリープし、ZigBeeモジュール52が起動している場合に実行される。図9に示すように、スリープ時のセンサ入力処理が開始されると、ステップS71で、マイコン50を起動する。つまり、センサ入力をトリガとして、マイコン50が起動される。続くステップS73では、マイコン50(CPUコア50a)は、ZigBeeモジュール50(CPUコア52a)を指示して、センサデータをPC12に送信する。そして、ステップS75では、マイコン50(CPUコア50a)は、センサデータの送信を完了したかどうかを判断する。ステップS75で“NO”であれば、つまりセンサデータの送信を完了していなければ、ステップS75に戻って、センサデータの送信を継続する。一方、ステップS75で“YES”であれば、つまりセンサデータの送信を完了すれば、ステップS77で、センサ入力があるかどうかを判断する。ここでは、マイコン50(CPU50a)は、さらにセンサ入力があるかどうかを判断しているのである。ステップS77で“YES”であれば、つまりセンサ入力が有れば、ステップS73に戻って、センサデータを送信する。一方、ステップS77で“NO”であれば、つまりセンサ入力が無ければ、そのままレジューム・スリープ処理にリターンする。   FIG. 9 is a flowchart showing sensor input processing during sleep in step S43 shown in FIG. This sensor input process is executed when only the microcomputer 50 sleeps and the ZigBee module 52 is activated. As shown in FIG. 9, when the sensor input process during sleep is started, the microcomputer 50 is activated in step S71. That is, the microcomputer 50 is activated with the sensor input as a trigger. In subsequent step S73, the microcomputer 50 (CPU core 50a) instructs the ZigBee module 50 (CPU core 52a) to transmit the sensor data to the PC 12. In step S75, the microcomputer 50 (CPU core 50a) determines whether or not the transmission of sensor data has been completed. If “NO” in the step S75, that is, if the transmission of the sensor data is not completed, the process returns to the step S75 and the transmission of the sensor data is continued. On the other hand, if “YES” in the step S75, that is, if the transmission of the sensor data is completed, it is determined whether or not there is a sensor input in a step S77. Here, the microcomputer 50 (CPU 50a) determines whether or not there is a sensor input. If “YES” in the step S77, that is, if there is a sensor input, the process returns to the step S73 to transmit the sensor data. On the other hand, if “NO” in the step S77, that is, if there is no sensor input, the process directly returns to the resume / sleep process.

図10は、上述のステップS19またはS53或いは後述するS99の処理によって、マイコン50とZigBeeモジュール52との両方がスリープした場合におけるセンサ入力処理を示すフロー図である。図10に示すように、スリープ時のセンサ入力処理を開始すると、ステップS81で、センサ入力をトリガとして、マイコン50が起動される。続く、ステップS83では、マイコン50がZigBeeモジュール52を起動する。そして、ステップS85では、ZigBeeモジュール52の接続待ちかどうかを判断する。   FIG. 10 is a flowchart showing the sensor input process when both the microcomputer 50 and the ZigBee module 52 sleep by the above-described step S19 or S53 or the process of S99 described later. As shown in FIG. 10, when the sensor input process at the time of sleep is started, the microcomputer 50 is activated in step S81 using the sensor input as a trigger. In step S83, the microcomputer 50 activates the ZigBee module 52. In step S85, it is determined whether to wait for the connection of the ZigBee module 52.

ステップS85で“YES”であれば、つまりZigBeeモジュール52の接続待ちであれば、そのまま同じステップS85に戻って、ZigBeeモジュール52の接続を待機する。一方、ステップS85で“NO”であれば、つまりZigBeeモジュール52の接続待ちでなければ、次のステップS87で、IAAコマンドをPC12に送信する。次に、マイコン50(CPUコア50a)は、ZigBeeモジュール52に指示して、センサデータをPC12に送信する。そして、ステップS91で、CPUコア50aは、センサデータの送信を完了したかどうかを判断する。   If “YES” in the step S85, that is, if waiting for the connection of the ZigBee module 52, the process returns to the same step S85 as it is to wait for the connection of the ZigBee module 52. On the other hand, if “NO” in the step S85, that is, if not waiting for the connection of the ZigBee module 52, an IAA command is transmitted to the PC 12 in a next step S87. Next, the microcomputer 50 (CPU core 50a) instructs the ZigBee module 52 to transmit the sensor data to the PC 12. In step S91, the CPU core 50a determines whether transmission of sensor data has been completed.

ステップS91で“NO”であれば、つまりセンサデータの送信を完了していなければ、ステップS89に戻って、センサデータの送信を継続する。一方、ステップS91で“YES”であれば、つまりセンサデータの送信を完了すれば、ステップS93で、センサ入力が有るかどうかを判断する。ここで、センサ入力が有れば、ステップS93で“YES”となり、ステップS89に戻って、センサデータをPC12に送信する。しかし、センサ入力が無ければ、ステップS93で“NO”となり、次のステップS95で、次回スリープ予定時刻かどうかを判断する。   If “NO” in the step S91, that is, if the transmission of the sensor data is not completed, the process returns to the step S89, and the transmission of the sensor data is continued. On the other hand, if “YES” in the step S91, that is, if the transmission of the sensor data is completed, it is determined whether or not there is a sensor input in a step S93. If there is a sensor input, “YES” is determined in the step S93, and the process returns to the step S89 to transmit the sensor data to the PC 12. However, if there is no sensor input, “NO” is determined in the step S93, and it is determined whether or not the next scheduled sleep time is determined in a next step S95.

ステップS95で“NO”であれば、つまり次回スリープ予定時刻でなければ、ステップS93に戻って、センサ入力の有無を検知する。一方、ステップS95で“YES”であれば、つまり次回スリープ予定時刻であれば、ステップS97で、GTBコマンドを送信し、ステップS99で、マイコン50とZigBeeモジュール52とをスリープさせて、スリープ時のセンサ入力処理を終了する。   If “NO” in the step S95, that is, if it is not the next scheduled sleep time, the process returns to the step S93 to detect the presence or absence of the sensor input. On the other hand, if “YES” in the step S95, that is, if it is the next scheduled sleep time, a GTB command is transmitted in a step S97, and the microcomputer 50 and the ZigBee module 52 are caused to sleep in a step S99, The sensor input process is terminated.

図11ないし図13は、PC12の全体処理を示すフロー図である。図11に示すように、PC12は、全体処理を開始すると、ステップS121で、エンド・デバイス18に対して送信するデータやコマンドが有るかどうかを判断する。ここでは、PC12は、バッファ(PC12内のRAM。図示せず。)に、エンド・デバイス18に送信するデータやコマンドが有るかどうかを判断するのである。ステップS121で“NO”であれば、つまりエンド・デバイス18に対して送信するデータやコマンドが無ければ、そのまま図12に示すステップS129に進む。一方、ステップS121で“YES”であれば、つまりエンド・デバイス18に送信するデータやコマンドがバッファに有れば、ステップS123で、送信先のエンド・デバイス18がスリープ中であるかどうかを断判(判別)する。ここでは、PC12は、アドレスマップ100を参照して、送信先のエンド・デバイス18のIEEE拡張アドレスに対応して記載された次回起動予定時刻になったか(または経過しているか)どうかを判断する。また、PC12は、IAAコマンドを先に受信している場合には、アドレスマップ100を参照して、送信先のエンド・デバイス18(IEEE拡張アドレスおよびショートアドレス)に対応して記述された次回スリープ予定時刻を未だ経過していないかどうかを判断するのである。   11 to 13 are flowcharts showing the overall processing of the PC 12. As shown in FIG. 11, when starting the entire process, the PC 12 determines whether there is data or a command to be transmitted to the end device 18 in step S121. Here, the PC 12 determines whether there is data or a command to be transmitted to the end device 18 in a buffer (RAM in the PC 12; not shown). If “NO” in the step S121, that is, if there is no data or command to be transmitted to the end device 18, the process proceeds to a step S129 shown in FIG. On the other hand, if “YES” in the step S121, that is, if data or commands to be transmitted to the end device 18 are present in the buffer, it is determined in a step S123 whether or not the destination end device 18 is in the sleep state. Make a decision. Here, the PC 12 refers to the address map 100 and determines whether or not the next scheduled start time described corresponding to the IEEE extended address of the destination end device 18 has come (or has passed). . If the PC 12 has received the IAA command first, the PC 12 refers to the address map 100 and next sleep described in correspondence with the destination end device 18 (IEEE extended address and short address). It is determined whether the scheduled time has not yet passed.

ステップS123で“NO”であれば、つまり送信先のエンド・デバイス18が起動中であれば、ステップS125で、当該送信先のエンド・デバイス18にデータやコマンドを送信し、ステップS126で、当該送信先のエンド・デバイス18からのACKを受信したかどうかを判断する。ステップS126で“NO”であれば、そのまま同じステップS126に戻って、ACKの受信を待機する。一方、ステップS126で“YES”であれば、つまり当該送信先のエンド・デバイス18からのACKを受信すれば、ステップS129に進む。また、ステップS123で“YES”であれば、つまり送信先のエンド・デバイス18がスリープ中であれば、ステップS127で、データやコマンドをバッファに記憶(一時記憶)して、ステップS129に進む。なお、バッファに一時記憶されたデータやコマンドは、次回送信される。   If “NO” in the step S123, that is, if the destination end device 18 is activated, in step S125, data and commands are transmitted to the destination end device 18, and in step S126, the data It is determined whether or not an ACK is received from the destination end device 18. If “NO” in the step S126, the process returns to the same step S126 as it is and waits for reception of an ACK. On the other hand, if “YES” in the step S126, that is, if an ACK is received from the destination end device 18, the process proceeds to a step S129. If “YES” in the step S123, that is, if the destination end device 18 is sleeping, in a step S127, data and commands are stored (temporarily stored) in a buffer, and the process proceeds to a step S129. Note that data and commands temporarily stored in the buffer are transmitted next time.

図12に示すように、ステップS129では、エンド・デバイス18からのIAAコマンドを受信したかどうかを判断する。ステップS129で“NO”であれば、つまりIAAコマンドを受信していなければ、図13に示すステップS145に進む。一方、ステップS129で“YES”であれば、つまりIAAコマンドを受信すれば、ステップS131で、新しいノードまたは電源投入かどうかを判断する。ここでは、PC12は、IAAコマンドに含まれる現在時刻に「999999999」が記述されているかどうか、または、IAAコマンドに含まれるIEEE拡張アドレスがアドレスマップ100に登録されているかどうか、或いは予定動作時刻との矛盾があるかどうかにより、エンド・デバイス18が、ネットワーク20に新規に参加したり、その電源が投入されたりしたかどうかを判断する。   As shown in FIG. 12, in step S129, it is determined whether an IAA command from the end device 18 has been received. If “NO” in the step S129, that is, if the IAA command is not received, the process proceeds to the step S145 shown in FIG. On the other hand, if “YES” in the step S129, that is, if an IAA command is received, it is determined whether or not a new node or power is turned on in a step S131. Here, the PC 12 determines whether “999999999” is described in the current time included in the IAA command, whether the IEEE extended address included in the IAA command is registered in the address map 100, or the scheduled operation time. The end device 18 determines whether or not the end device 18 newly joins the network 20 or is turned on depending on whether or not there is a contradiction.

ステップS131で“NO”であれば、つまりIAAコマンドの現在時刻に「999999999」が記述されていなかったり、アドレスマップ100に既に登録されていたりするエンド・デバイス18であれば、新しいノードまたは電源投入でないと判断して、ステップS143で、アドレスマップ100を更新して、図11に示したステップS121に戻る。つまり、ステップS143では、PC12は、アドレスマップ100において、IAAコマンドに記述されたIEEE拡張アドレスおよびショートアドレスに対応して記述される次回スリープ予定時刻を、IAAコマンドに記述された次回スリープ予定時刻に更新する。   If “NO” in the step S131, that is, if the end device 18 does not describe “999999999” in the current time of the IAA command or is already registered in the address map 100, a new node or power on In step S143, the address map 100 is updated, and the process returns to step S121 shown in FIG. That is, in step S143, the PC 12 sets the next sleep scheduled time described in the address map 100 corresponding to the IEEE extended address and short address described in the IAA command to the next scheduled sleep time described in the IAA command. Update.

一方、ステップS131で“YES”であれば、つまりIAAコマンドの現在時刻に「999999999」が記述されていたり、IEEE拡張アドレスがアドレスマップ100に未だ登録されていなかったりするエンド・デバイス18であれば、新しいノードまたは電源投入であると判断して、ステップS133で、当該エンド・デバイス18をアドレスマップ100に追加する。つまり、PC12は、今回IAAコマンドを送信してきたエンド・デバイス18のIEEE拡張アドレスおよびショートアドレスを、アドレスマップ100に追加するとともに、その拡張アドレスおよびショートアドレスに対応してIAAコマンドが示す次回スリープ予定時刻を記述する。   On the other hand, if “YES” in the step S131, that is, if the end device 18 has “999999999” described in the current time of the IAA command or the IEEE extended address has not been registered in the address map 100 yet. In step S 133, the end device 18 is added to the address map 100. That is, the PC 12 adds the IEEE extended address and short address of the end device 18 that has transmitted the IAA command this time to the address map 100, and also schedules the next sleep indicated by the IAA command corresponding to the extended address and short address. Describe the time.

次いで、ステップS135では、時刻同期メッセージ(TSETコマンド)を、ステップS133でアドレスマップ100に追加されたエンド・デバイス18(のショートアドレス)宛てに送信する。そして、ステップS137では、そのエンド・デバイス18からのACKを受信したかどうかを判断する。次のステップS139では、通信時間をチェックする。図示は省略するが、CPUコア50aは、時刻同期メッセージを送信してからACKを受信するまでの時間をカウントしており、これを通信時間としてチェックする。   Next, in step S135, a time synchronization message (TSET command) is transmitted to the end device 18 (its short address) added to the address map 100 in step S133. In step S137, it is determined whether or not an ACK from the end device 18 has been received. In the next step S139, the communication time is checked. Although illustration is omitted, the CPU core 50a counts the time from the transmission of the time synchronization message to the reception of the ACK, and checks this as the communication time.

そして、ステップS141では、通信時間が規定時間(たとえば、100ms)以内であるかどうかを判断する。ステップS141で“NO”であれば、つまり通信時間が100ms以内でなければ、ステップS135に戻って、時刻同期メッセージの送信を繰り返す。図示は省略するが、時刻同期メッセージの送信は、規定回数(たとえば、5回)まで実行され、規定回数を超えるとエラーとなり、当該エンド・デバイス18はネットワーク20への参加に失敗したものとされる。たとえば、このエンド・デバイス18のIEEE拡張アドレスとショートアドレスとが、アドレスマップ100から削除される。一方、ステップS141で“YES”であれば、つまり通信時間が規定時間内であれば、当該エンド・デバイス18はネットワーク20への参加に成功したものとされ、そのままステップS121に戻る。   In step S141, it is determined whether or not the communication time is within a specified time (for example, 100 ms). If “NO” in the step S141, that is, if the communication time is not within 100 ms, the process returns to the step S135 to repeat the transmission of the time synchronization message. Although illustration is omitted, the transmission of the time synchronization message is executed up to a specified number of times (for example, 5 times), an error occurs when the specified number of times is exceeded, and the end device 18 is assumed to have failed to join the network 20. The For example, the IEEE extended address and the short address of the end device 18 are deleted from the address map 100. On the other hand, if “YES” in the step S141, that is, if the communication time is within the specified time, it is determined that the end device 18 has succeeded in joining the network 20, and the process returns to the step S121 as it is.

図13に示すように、ステップS145では、センサデータを受信したかどうかを判断する。ステップS145で“YES”であれば、つまりセンサデータを受信すれば、ステップS147で、センサデータをたとえば内部メモリやアクセス可能なデータベースに記憶して、図11に示したステップS121に戻る。一方、ステップS145で“NO”であれば、つまりセンサデータを受信していなければ、ステップS149で、GTBコマンドを受信したかどうかを判断する。   As shown in FIG. 13, in step S145, it is determined whether sensor data has been received. If “YES” in the step S145, that is, if sensor data is received, the sensor data is stored in, for example, an internal memory or an accessible database in a step S147, and the process returns to the step S121 shown in FIG. On the other hand, if “NO” in the step S145, that is, if sensor data is not received, it is determined whether or not a GTB command is received in a step S149.

ステップS149で“NO”であれば、つまりGTBコマンドを受信していなければ、そのままステップS121に戻る。一方、ステップS149で“YES”であれば、つまりGTBコマンドを受信すれば、ステップS151で、アドレスマップ100において、当該GTBコマンドが示すエンド・デバイス18(IEEE拡張アドレスおよびショートアドレス)に対応する次回起動予定時刻を記憶(更新)して、ステップS121に戻る。   If “NO” in the step S149, that is, if the GTB command is not received, the process returns to the step S121 as it is. On the other hand, if “YES” in the step S149, that is, if a GTB command is received, the next time corresponding to the end device 18 (IEEE extended address and short address) indicated by the GTB command in the address map 100 in the step S151. The scheduled start time is stored (updated), and the process returns to step S121.

この実施例によれば、エンド・デバイスからPCにIAAコマンドやGTBコマンドを送信するので、PCはエンド・デバイスがスリープ中であるか、起動中であるかを判断することができ、起動中にのみデータやコマンドを送信することできる。つまり、PCはエンド・デバイスのスリープ中にデータやコマンドを送信することがないので、データやコマンドが消失してしまうのを防止することができる。また、PCからエンド・デバイスへの通信は、エンド・デバイスが起動中である場合にのみ実行されるので、エンド・デバイスを頻繁に起動させて、PCからのデータやコマンドの有無をチェックさせる必要がない。つまり、エンド・デバイスでは、頻繁に通信する必要がないため、バッテリの消耗を最低限に抑えることができる。これにより、エンド・デバイスを比較的長時間バッテリ駆動することができる。   According to this embodiment, since the IAA command or GTB command is transmitted from the end device to the PC, the PC can determine whether the end device is sleeping or starting up. Only data and commands can be sent. That is, since the PC does not transmit data or commands while the end device is sleeping, it is possible to prevent the data and commands from being lost. In addition, since communication from the PC to the end device is executed only when the end device is being activated, it is necessary to frequently activate the end device to check for the presence of data and commands from the PC. There is no. In other words, since the end device does not need to communicate frequently, battery consumption can be minimized. Thereby, the end device can be battery-driven for a relatively long time.

なお、この実施例では、一定時間毎にエンド・デバイスを起動するようにスリープ期間(実施例では、時間間隔T1)を決定するようにしてあるが、当該スリープ期間をPCからのコマンドによって可変的に設定できるようにしてもよい。たとえば、会社のような建物内では、夜間において人の出入りはほとんど無く、被験者の現在位置や行動パターンを記録する必要がないと考えられるからである。つまり、時間帯に応じて、適宜スリープ期間を設定変更することが考えられる。   In this embodiment, the sleep period (in the embodiment, the time interval T1) is determined so as to activate the end device at regular intervals. However, the sleep period can be changed by a command from the PC. It may be possible to set to. For example, in a building such as a company, there are almost no people going in and out at night, and it is considered unnecessary to record the current position and behavior pattern of the subject. That is, it can be considered that the sleep period is appropriately changed according to the time zone.

図1はこの発明のワイヤレス・センサ・ネットワーク・システムの一例を示す図解図である。FIG. 1 is an illustrative view showing one example of a wireless sensor network system of the present invention. 図2は図1に示すコーディネータ、ルータおよびエンド・デバイスの電気的な構成を示すブロック図である。FIG. 2 is a block diagram showing the electrical configuration of the coordinator, router, and end device shown in FIG. 図3は図1および図2に示すようなエンド・デバイスの設置状態およびエンド・デバイスに接続されたセンサの検出対象について説明するための図解図である。FIG. 3 is an illustrative view for explaining an installation state of the end device as shown in FIGS. 1 and 2 and a detection target of a sensor connected to the end device. 図4は図1に示しPCで管理されるエンド・デバイスのアドレスマップを示す図解図である。FIG. 4 is an illustrative view showing an address map of the end device shown in FIG. 1 and managed by the PC. 図5はエンド・デバイスからPCに送信されるコマンドおよびPCからエンド・デバイスに送信されるコマンドの時間変化の一例を示すタイミングチャートである。FIG. 5 is a timing chart showing an example of a time change of a command transmitted from the end device to the PC and a command transmitted from the PC to the end device. 図6はエンド・デバイスの接続処理を示すフロー図である。FIG. 6 is a flowchart showing end device connection processing. 図7はエンド・デバイスのレジューム・スリープ処理の一部を示すフロー図である。FIG. 7 is a flowchart showing a part of the resume / sleep process of the end device. 図8はエンド・デバイスのレジューム・スリープ処理の他の一部であって、図7に後続するフロー図である。FIG. 8 is another part of the resume / sleep process of the end device, and is a flowchart subsequent to FIG. 図9はマイコンのみがスリープしている場合におけるエンド・デバイスのスリープ時のセンサ入力処理を示すフロー図である。FIG. 9 is a flowchart showing sensor input processing during sleep of the end device when only the microcomputer is sleeping. 図10はマイコンおよびZigBeeモジュールがスリープしている場合におけるエンド・デバイスのスリープ時のセンサ入力処理を示すフロー図である。FIG. 10 is a flowchart showing sensor input processing during sleep of the end device when the microcomputer and the ZigBee module are sleeping. 図11はPCの全体処理の一部を示すフロー図である。FIG. 11 is a flowchart showing a part of the entire processing of the PC. 図12はPCの全体処理の他の一部であって、図11に後続するフロー図である。FIG. 12 is another part of the overall processing of the PC, and is a flowchart subsequent to FIG. 図13はPCの全体処理のその他の一部であって、図11および図12に後続するフロー図である。FIG. 13 shows another part of the overall processing of the PC, and is a flowchart following FIG. 11 and FIG.

符号の説明Explanation of symbols

10 …ワイヤレス・センサ・ネットワーク・システム
12 …PC
14 …ZigBeeコーディネータ
16 …ZigBeeルータ
18 …ZigBeeエンド・デバイス
20 …ワイヤレス・センサ・ネットワーク
32a,50a,52a …CPUコア
32,52 …ZigBeeモジュール
34,54 …電源回路
50 …マイコン
50b …タイマ
58 …電池
10 ... Wireless sensor network system 12 ... PC
DESCRIPTION OF SYMBOLS 14 ... ZigBee coordinator 16 ... ZigBee router 18 ... ZigBee end device 20 ... Wireless sensor network 32a, 50a, 52a ... CPU core 32, 52 ... ZigBee module 34, 54 ... Power supply circuit 50 ... Microcomputer 50b ... Timer 58 ... Battery

Claims (3)

スリープ機能およびレジューム機能を有する1または複数のエンド・デバイス、
前記エンド・デバイスと直接またはルータを介して接続される1のコーディネータ、および
前記コーディネータと通信可能に接続されるコンピュータを備える、ワイヤレス・センサ・ネットワーク・システムにおいて、
前記エンド・デバイスは、
前記スリープ機能によってスリープするとき、次回起動予定時刻を前記コンピュータに通知する起動予定通知手段を備え、
前記コンピュータは、
前記起動予定通知手段によって通知された次回起動予定時刻を受信して記憶する予定時刻記憶手段、
前記エンド・デバイスに送信するデータやコマンドが有るとき、少なくとも前記次回起動予定時刻に基づいて、当該エンド・デバイスがスリープ中かどうかを判別するスリープ判別手段、および
前記スリープ判別手段によってスリープ中でないことが判別されたとき、前記エンド・デバイスにデータやコマンドを送信する送信手段を備えることを特徴とする、ワイヤレス・センサ・ネットワーク・システム。
One or more end devices having a sleep function and a resume function;
In a wireless sensor network system comprising: a coordinator connected to the end device directly or via a router; and a computer communicatively connected to the coordinator.
The end device is
When sleep by the sleep function, comprising a startup schedule notification means for notifying the computer of the next startup time,
The computer
Scheduled time storage means for receiving and storing the next scheduled startup time notified by the startup schedule notification means;
When there is data or a command to be transmitted to the end device, sleep determining means for determining whether or not the end device is sleeping based on at least the next scheduled start time; A wireless sensor network system, comprising: a transmission means for transmitting data or a command to the end device when it is determined.
前記エンド・デバイスは、起動したことおよび次回スリープ予定時刻を含む起動中情報を前記コンピュータに通知する起動中通知手段をさらに備え、
前記コンピュータは、前記起動中通知手段によって通知された起動中情報を受信する起動中情報受信手段をさらに備え、
前記スリープ判別手段は、前記次回起動予定時刻と前記起動中情報とに基づいて、前記エンド・デバイスがスリープ中かどうかを判別する、請求項1記載のワイヤレス・センサ・ネットワーク・システム。
The end device further includes a startup notification means for notifying the computer of startup information including startup and next sleep scheduled time,
The computer further includes a running information receiving unit that receives the running information notified by the running notification unit,
2. The wireless sensor network system according to claim 1, wherein the sleep determination unit determines whether the end device is in a sleep state based on the next start-up activation time and the in-activation information.
前記エンド・デバイスは、センサ入力を検出するセンサ入力検出手段、および当該エンド・デバイスのスリープ中に前記センサ入力検出手段によってセンサ入力が検出されたとき当該エンド・デバイスを起動させる起動手段をさらに備え、
前記起動中通知手段は、前記起動手段によって当該エンド・デバイスが起動されたとき、前記起動中情報を前記コンピュータに通知する、請求項2記載のワイヤレス・センサ・ネットワーク・システム。
The end device further includes sensor input detection means for detecting sensor input, and activation means for starting the end device when sensor input is detected by the sensor input detection means during sleep of the end device. ,
The wireless sensor network system according to claim 2, wherein when the end device is activated by the activation unit, the activation notification unit notifies the computer of the activation information.
JP2007219685A 2007-08-27 2007-08-27 Wireless sensor network system Withdrawn JP2009055301A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2007219685A JP2009055301A (en) 2007-08-27 2007-08-27 Wireless sensor network system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2007219685A JP2009055301A (en) 2007-08-27 2007-08-27 Wireless sensor network system

Publications (1)

Publication Number Publication Date
JP2009055301A true JP2009055301A (en) 2009-03-12

Family

ID=40505971

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2007219685A Withdrawn JP2009055301A (en) 2007-08-27 2007-08-27 Wireless sensor network system

Country Status (1)

Country Link
JP (1) JP2009055301A (en)

Cited By (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2011021307A1 (en) * 2009-08-21 2011-02-24 三菱電機株式会社 Pon system, subscriber-end terminal apparatus, station-end terminal apparatus and power saving method
WO2012114827A1 (en) * 2011-02-25 2012-08-30 三菱電機株式会社 Communication system, station side communication device, user side communication device, communication method, and control device
WO2012144507A1 (en) * 2011-04-20 2012-10-26 シャープ株式会社 Control device, communication device, network system, network management method, and program
JP2014042093A (en) * 2012-08-21 2014-03-06 Sharp Corp Radio communication terminal, its control method and its control program
GB2506254A (en) * 2012-08-09 2014-03-26 Commputime Ltd Sleep mode operation for networked end devices
US8804599B2 (en) 2010-10-01 2014-08-12 Oki Electric Industry Co., Ltd. Wireless network and terminal, and network configuration method and device
US9119149B2 (en) 2011-03-24 2015-08-25 Samsung Electronics Co., Ltd. Method and apparatus of sensor network supporting bidirectional event detection
JP2016007025A (en) * 2010-05-25 2016-01-14 ジャガー ランド ローバー リミテッドJaguar Land Rover Limited Vehicle communication
US9288837B2 (en) 2009-08-25 2016-03-15 Oki Electric Industry Co., Ltd. Wireless device and wireless system

Cited By (20)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2011021307A1 (en) * 2009-08-21 2011-02-24 三菱電機株式会社 Pon system, subscriber-end terminal apparatus, station-end terminal apparatus and power saving method
JP5258969B2 (en) * 2009-08-21 2013-08-07 三菱電機株式会社 PON system, subscriber-side terminator, station-side terminator, and power saving method
US9106984B2 (en) 2009-08-21 2015-08-11 Mitsubishi Electric Corporation PON system, subscriber-side terminal apparatus, station-side terminal apparatus, and power saving method
US9288837B2 (en) 2009-08-25 2016-03-15 Oki Electric Industry Co., Ltd. Wireless device and wireless system
US9878690B2 (en) 2010-05-25 2018-01-30 Jaguar Land Rover Limited Vehicle communications
JP2017163559A (en) * 2010-05-25 2017-09-14 ジャガー ランド ローバー リミテッドJaguar Land Rover Limited Vehicle communication
JP2016007025A (en) * 2010-05-25 2016-01-14 ジャガー ランド ローバー リミテッドJaguar Land Rover Limited Vehicle communication
US8804599B2 (en) 2010-10-01 2014-08-12 Oki Electric Industry Co., Ltd. Wireless network and terminal, and network configuration method and device
US9240854B2 (en) 2011-02-25 2016-01-19 Mitsubishi Electric Corporation Communication system, station-side communication device, user-side communication device, communication method, and control device
JP5259021B2 (en) * 2011-02-25 2013-08-07 三菱電機株式会社 Communication system, station side communication device, user side communication device, communication method, and control device
CN102907047A (en) * 2011-02-25 2013-01-30 三菱电机株式会社 Communication system, station side communication device, user side communication device, communication method, and control device
WO2012114827A1 (en) * 2011-02-25 2012-08-30 三菱電機株式会社 Communication system, station side communication device, user side communication device, communication method, and control device
US9119149B2 (en) 2011-03-24 2015-08-25 Samsung Electronics Co., Ltd. Method and apparatus of sensor network supporting bidirectional event detection
US9801134B2 (en) 2011-03-24 2017-10-24 Samsung Electronics Co., Ltd. Method and apparatus of sensor network supporting bidirectional event detection
JP2012227756A (en) * 2011-04-20 2012-11-15 Sharp Corp Control device, communication apparatus, network system, network management method, and program
WO2012144507A1 (en) * 2011-04-20 2012-10-26 シャープ株式会社 Control device, communication device, network system, network management method, and program
GB2506254A (en) * 2012-08-09 2014-03-26 Commputime Ltd Sleep mode operation for networked end devices
GB2506254B (en) * 2012-08-09 2015-02-25 Computime Ltd Sleep mode operation for networked end devices
US9237524B2 (en) 2012-08-09 2016-01-12 Computime, Ltd. Sleep mode operation for networked end devices
JP2014042093A (en) * 2012-08-21 2014-03-06 Sharp Corp Radio communication terminal, its control method and its control program

Similar Documents

Publication Publication Date Title
JP2009055301A (en) Wireless sensor network system
US11726768B2 (en) Systems and methods for updating software in a hazard detection system
CN108432282B (en) Method and apparatus for managing electronic devices through wireless communication
US9674781B2 (en) Systems and methods for waking up devices of a fabric network
US10292102B2 (en) Systems and methods for disseminating messages among a fabric network
JP6257763B2 (en) Branch processor hazard detection system and computer program
CN103676821B (en) The method setting up control planning, configuration equipment and networked devices
US8468066B2 (en) Inventory or asset management system
US8755913B2 (en) Lighting control network
JP2010514320A (en) Method and system for resetting a device of a wireless network, and wireless network device
US20140135998A1 (en) Method and Apparatus for Energy Efficient Heating and Air Conditioning Automation
KR20120006567A (en) Method for controlling transmissions from a resource-restricted device, and batteryless device
US10685326B1 (en) Systems and methods for wirelessly monitoring inventory
WO2016036581A1 (en) Systems and methods for waking up devices of a fabric network
US9922541B2 (en) Systems and methods for detecting anomalies in a hazard detection system
TWI444078B (en) Realization of sleep and reconnecting functions on network system and the method
KR101457436B1 (en) Low power sensor node
JP5591147B2 (en) Wireless telemeter system capable of multi-stage relay and wireless slave unit used in the wireless telemeter system
JP2017208673A (en) Electrical apparatus, electrical apparatus control system, electrical apparatus control method, and program
EP2910089B1 (en) Apparatus and method for interpreting received control commands
CN115019494B (en) Wireless switch, processing method and control system of wireless switch
JP2011151700A (en) Wireless sensor network system
US9520055B2 (en) Process of communication between a first node and a second node of a home automation installation
JP6309809B2 (en) Controller, control system, and control system control method
JP7183906B2 (en) Wireless communication device and program

Legal Events

Date Code Title Description
A300 Application deemed to be withdrawn because no request for examination was validly filed

Free format text: JAPANESE INTERMEDIATE CODE: A300

Effective date: 20101102