JP6473494B1 - Battery-driven wireless communication system and synchronization correction method - Google Patents

Battery-driven wireless communication system and synchronization correction method Download PDF

Info

Publication number
JP6473494B1
JP6473494B1 JP2017239362A JP2017239362A JP6473494B1 JP 6473494 B1 JP6473494 B1 JP 6473494B1 JP 2017239362 A JP2017239362 A JP 2017239362A JP 2017239362 A JP2017239362 A JP 2017239362A JP 6473494 B1 JP6473494 B1 JP 6473494B1
Authority
JP
Japan
Prior art keywords
unit
sleep time
sleep
slave
query
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.)
Active
Application number
JP2017239362A
Other languages
Japanese (ja)
Other versions
JP2019106660A (en
Inventor
鈴木 潤一
潤一 鈴木
敦史 三戸
敦史 三戸
圭子 遠藤
圭子 遠藤
孝之 大利
孝之 大利
慎 草野
慎 草野
俊光 大和田
俊光 大和田
尾崎 大介
大介 尾崎
正美 若林
正美 若林
Original Assignee
バックス情報システム株式会社
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 バックス情報システム株式会社 filed Critical バックス情報システム株式会社
Priority to JP2017239362A priority Critical patent/JP6473494B1/en
Application granted granted Critical
Publication of JP6473494B1 publication Critical patent/JP6473494B1/en
Publication of JP2019106660A publication Critical patent/JP2019106660A/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

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

Abstract

【課題】 親機と子機間の同期した双方向無線通信するシステムにおいて同期補正方式を提供する。
【解決手段】 無線通信センサシステム1は、親機10と、電池で駆動される子機20とを含む。親機は、スリープ時間に関する情報を含むクエリを全子機に送信する。子機20の各々は、クエリを受信し、クエリに含まれるスリープ時間に関する情報に基づきスリープ時間を算出し、算出したスリープ時間をタイマに設定し、スリープ時間の間、低消費電力で動作し、スリープ時間を経過したとき通常の動作状態で動作する。さらに無縁通信センサシステム1において、親機10は、子機の同期ズレを判定し、同期が外れた場合には、子機の同期を自動的に補正する機能を有する。
【選択図】 図1
PROBLEM TO BE SOLVED: To provide a synchronization correction method in a system for performing bidirectional two-way wireless communication between a parent device and a child device.
A wireless communication sensor system includes a parent device and a child device driven by a battery. The parent device transmits a query including information on the sleep time to all the child devices. Each of the slave units 20 receives the query, calculates the sleep time based on the information about the sleep time included in the query, sets the calculated sleep time in the timer, operates with low power consumption during the sleep time, When the sleep time elapses, it operates in the normal operating state. Further, in the wireless communication sensor system 1, the base unit 10 has a function of determining a synchronization shift of the slave unit and automatically correcting the synchronization of the slave unit when the synchronization is lost.
[Selection] Figure 1

Description

本発明は、親機と複数の子機との間で無線による通信を行う無線通信システムに関し、特に、電池で駆動される子機の消費電力の低減および親機と子機間の同期方法ならびに同期の補正方式に関する。   The present invention relates to a wireless communication system that performs wireless communication between a parent device and a plurality of child devices, and in particular, a method for reducing power consumption of a child device driven by a battery and a synchronization method between the parent device and the child device, and The present invention relates to a synchronization correction method.

親機と複数の子機とから構成される無線通信システムにおいて、子機の電源として電池を使用する場合、可能な限り消費電力を抑えて、電池寿命を長くすることが望まれる。電池寿命は、1回の充電で使用可能な時間を指す。例えば、1回の充電による電池寿命が1年以上であることが市場で求められており、また、電池はできるだけ小さいもの(例えば、単三電池)が求められている。   In a wireless communication system composed of a master unit and a plurality of slave units, when a battery is used as a power source for the slave unit, it is desired to suppress the power consumption as much as possible to increase the battery life. Battery life refers to the time available for a single charge. For example, the market demands that the battery life per charge be one year or longer, and the battery is required to be as small as possible (for example, an AA battery).

例えば、特許文献1の無線通信装置の制御システムでは、親機が有効最小な受信強度範囲内の強度で受信できるように、子機の無線の無線出力レベルを切り換え可能にすることで、子機の送信電力を抑え電池の長寿命化を図っている。また、特許文献2の無線通信システムでは、電池の残量を監視し、電池の残量が所定値以上であれば、消費電力が相対的に大きい第1の通信部(例えば、無線LAN通信部)を動作させ、電池の残量が所定値より小さければ、第1の通信部の動作を停止して消費電力が相対的に小さい第2の通信部(例えば、Blootooth通信部)を動作させることで、電池駆動による無線通信機の長時間動作を可能にしている。   For example, in the control system of the wireless communication apparatus disclosed in Patent Document 1, the slave unit can be switched by changing the wireless radio output level of the slave unit so that the master unit can receive with an intensity within the effective minimum reception intensity range. To reduce the transmission power of the battery and extend the battery life. In the wireless communication system of Patent Document 2, the remaining battery level is monitored, and if the remaining battery level is equal to or greater than a predetermined value, a first communication unit (for example, a wireless LAN communication unit) with relatively large power consumption is used. If the remaining battery level is smaller than a predetermined value, the operation of the first communication unit is stopped and the second communication unit (for example, the Bluetooth communication unit) with relatively low power consumption is operated. Thus, the battery-driven wireless communication device can be operated for a long time.

特開2012−256982号公報JP 2012-256882 A 特開2016−167683号公報Japanese Patent Laid-Open No. 2006-167683

子機の電力消費を抑えるため、親機と子機との通信を間欠的に行う方式がある。間欠無線通信では、子機が送信専用、親機が受信専用の一方通行の通信が一般的である。送信側の子機は、ある一定時間毎(例えば、1秒間隔)または、イベントが発生した時に親機に状態を通知し、それ以外の時間、またはイベントが発生しない期間は低消費電力状態(スリープ状態)に入る。このような間欠通信方式により、常時、通信を行う子機と比べて、消費電力を格段に抑えることができる。なお、低消費電力状態は、スリープと呼ばれる眠った状態であり、例えば、クロック速度を低速化したり、マイクロプロセッサやセンシング部の動作を停止させたり、通常の動作を行うことができない状態である。子機がスリープ状態であるとき、子機は、親機からの情報も受信することもできない。以降、低消費電力状態をスリープ状態と呼ぶ。   In order to reduce the power consumption of the slave unit, there is a method of intermittently communicating between the master unit and the slave unit. In intermittent wireless communication, one-way communication in which the slave unit is dedicated to transmission and the master unit is dedicated to reception is generally used. The slave unit on the transmission side notifies the parent unit of the status every certain time (for example, at intervals of 1 second) or when an event occurs. Enter sleep mode. By such an intermittent communication method, power consumption can be significantly reduced as compared with a slave device that always communicates. Note that the low power consumption state is a sleep state called sleep, and is a state in which, for example, the clock speed is reduced, the operation of the microprocessor or the sensing unit is stopped, or normal operation cannot be performed. When the slave unit is in the sleep state, the slave unit cannot receive information from the master unit. Hereinafter, the low power consumption state is referred to as a sleep state.

従来の間欠通信方式では、常時通信する子機に比べて消費電力を抑えることができる一方で、子機が送信専用、親機が受信専用の一方通行の通信であり、親機は、子機がスリ−プ状態であるか否かを判定することができず、親機は、子機に対して送信することができない。従って、例えば、子機が何らかの検出を行うセンサである場合、親機から子機に対してセンサの閾値の設定及び変更、子機の初期化等の指示等をすることができなかった。子機の設定及び変更を行う場合は、対象の子機をシステムから切離してオフラインで作業しなければならず、非常に煩雑であった。   In the conventional intermittent communication method, power consumption can be reduced compared to a slave device that always communicates, but the slave device is a one-way communication in which the slave device is dedicated to transmission and the master device is dedicated to reception. It is impossible to determine whether or not is in the sleep state, and the parent device cannot transmit to the child device. Therefore, for example, when the slave unit is a sensor that performs some kind of detection, the master unit cannot instruct the slave unit to set or change the threshold value of the sensor, initialize the slave unit, or the like. When setting and changing the slave unit, the target slave unit must be disconnected from the system and worked offline, which is very complicated.

一方で、親機から子機への送信を可能とするために、親機と子機の間で両機器が情報の送受信を行う双方向通信を用いることも可能であるが、現状の双方向通信システムでは、子機は、常に動作状態(ウェークアップ状態ともいう)となっている。これは、親機と複数の子機との間でスリープサイクルと動作サイクルの同期を取ることができず、親機は、子機がスリープ状態にあることを認識することができないためである。それ故、子機の電池の寿命が短くなってしまう。1つの例として、双方向通信での子機の電池寿命は、72時間程度である。   On the other hand, in order to enable transmission from the parent device to the child device, it is possible to use bidirectional communication in which both devices transmit and receive information between the parent device and the child device. In the communication system, the handset is always in an operating state (also called a wake-up state). This is because the sleep cycle and the operation cycle cannot be synchronized between the parent device and the plurality of child devices, and the parent device cannot recognize that the child device is in the sleep state. Therefore, the battery life of the slave unit is shortened. As one example, the battery life of the slave unit in bidirectional communication is about 72 hours.

本発明は、このような従来の課題を解決するものであり、親機と子機間でスリープサイクルの同期を取ることで双方向通信を可能にし、かつ子機の電池寿命を改善する無線通信システムおよび無線通信方法を提供することを目的とする。
さらに本発明は、親機と子機間の同期を補正する機能を備えた無線通信システムおよび無線通信方法を提供することを目的とする。
The present invention solves such a conventional problem, and enables a two-way communication by synchronizing a sleep cycle between a parent device and a child device, and improves a battery life of the child device. It is another object of the present invention to provide a wireless communication method.
Furthermore, an object of the present invention is to provide a wireless communication system and a wireless communication method having a function of correcting synchronization between a parent device and a child device.

本発明に係る無線通信システムは、電池により駆動される複数の子機と、複数の子機と無線通信を行う親機とを備えたものであって、親機は、子機のスリープ時間に関するスリープ時間情報を含むクエリを決められたアクセス周期TMで全ての子機に送信する送信手段と、前記クエリに対する応答メッセージを受信する受信手段と、前記応答メッセージの受信状況に基づき子機の同期が外れているか否かを判定する判定手段と、同期が外れていると判定した場合に、同期補正用のスリープ時間情報と同期補正の回数を含むクエリを前記送信手段に送信させる補正手段とを有し、複数の子機の各々は、親機からのクエリを受信する受信手段と、受信したクエリに含まれるスリープ時間情報に基づきスリープ時間を設定し、スリープ時間を計測するスリープ設定手段と、スリープ時間を設定するときに主要回路の電源をオフにし、スリープ時間が経過したときに主要回路の電源をオンにする電力制御手段と、親機からのクエリに対する応答メッセージを送信する送信手段と、前記同期補正用のスリープ時間情報と同期補正の回数を含むクエリが受信された場合、前記同期補正の回数だけ前記同期補正用のスリープ時間情報を前記スリープ設定手段に設定させる同期補正実行手段とを有し、親機が複数の子機の各々をアクセスする時間と子機のスリープ時間が同期される、無線通信システム。   A wireless communication system according to the present invention includes a plurality of slave units driven by a battery and a master unit that performs wireless communication with the plurality of slave units, and the master unit relates to a sleep time of the slave unit. A transmission unit that transmits a query including sleep time information to all the slave units at a determined access cycle TM, a reception unit that receives a response message to the query, and synchronization of the slave units based on the reception status of the response message A determination unit that determines whether or not there is a deviation, and a correction unit that causes the transmission unit to transmit a query including the sleep time information for synchronization correction and the number of times of synchronization correction when it is determined that the synchronization is lost. Each of the plurality of slave units sets the sleep time based on the reception means for receiving the query from the master unit and the sleep time information included in the received query, and measures the sleep time. Sleep setting means, power control means to turn off the main circuit when setting the sleep time, and turn on the main circuit when the sleep time has passed, and send a response message to the query from the parent device A synchronization unit that sets the sleep time information for synchronization correction to the sleep setting unit for the number of times of synchronization correction when a query including the sleep time information for synchronization correction and the number of times of synchronization correction is received. A wireless communication system, comprising: a correction execution unit, wherein a time when a parent device accesses each of a plurality of child devices and a sleep time of the child devices are synchronized.

ある実施態様では、同期補正用のスリープ時間×回数は、1台の子機のスリープ時間に実質的に等しい。ある実施態様では、親機は、子機へのアクセス周期を変更することなく、子機の同期補正を行う。ある実施態様では、親機が全ての子機をアクセスする周期Tは、同期補正用のスリープ時間の間隔よりも小さい。   In one embodiment, the sleep time x number of times for synchronization correction is substantially equal to the sleep time of one slave unit. In one embodiment, the parent device performs synchronization correction of the child device without changing the access cycle to the child device. In one embodiment, the period T at which the parent device accesses all the child devices is smaller than the sleep time interval for synchronization correction.

本発明に係る、電池により駆動される複数の子機と、複数の子機と無線通信を行う親機とを備えた無線通信システムにおける無線通信方法は、親機は、子機のスリープ時間に関するスリープ時間情報を含むクエリを決められたアクセス周期TMで全ての子機に送信するステップと、前記応答メッセージの受信状況に基づき子機の同期が外れているか否かを判定するステップと、同期が外れていると判定した場合に、同期補正用のスリープ時間情報と同期補正の回数を含むクエリを前記送信手段に送信させるステップとを有し、複数の子機の各々は、親機から送信されたクエリを受信するステップと、受信したクエリに含まれるスリープ時間情報に基づきスリープタイマにスリープ時間を設定しかつスリープタイマを起動させるステップと、クエリに対する応答メッセージを送信するステップと、応答メッセージの送信後、スリープ時間の間、主要回路の電源をオフにし、スリープ時間が経過したときに主要回路の電源をオンにするステップと、前記同期補正用のスリープ時間情報と同期補正の回数を含むクエリが受信された場合、前記同期補正の回数だけ前記同期補正用のスリープ時間情報を前記スリープ設定手段に設定させるステップとを有し、親機が複数の子機の各々をアクセスする時間と子機のスリープ時間が同期される。   According to the present invention, a wireless communication method in a wireless communication system including a plurality of slave units driven by a battery and a master unit that performs wireless communication with the plurality of slave units, the master unit relates to a sleep time of the slave unit A step of transmitting a query including sleep time information to all the slave units at a determined access cycle TM, a step of determining whether or not the slave units are out of synchronization based on the reception status of the response message, and synchronization And a step including transmitting a query including the sleep time information for synchronization correction and the number of times of synchronization correction to each of the plurality of slave units when transmitted from the master unit. Receiving the received query, setting the sleep time in the sleep timer based on the sleep time information included in the received query, and starting the sleep timer; Transmitting a response message to the communication device; turning off the main circuit during the sleep time after sending the response message; and turning on the main circuit when the sleep time elapses; and the synchronization correction And when the query including the sleep time information for synchronization and the number of times of synchronization correction is received, the sleep setting information is set in the sleep setting means for the number of times of the synchronization correction. The time for accessing each of the plurality of slave units is synchronized with the sleep time of the slave units.

本発明によれば、親機からスリープ時間に関する情報を複数の子機に送信し、子機それぞれがスリープ時間に関する情報に基づいてスリープ状態のオン/オフを切り替えるようにしたので、必要な時間帯だけスリープ状態が解除され、その他の状態についてはスリープ状態となるため、消費電力の節約が見込まれる。また、親機は、子機のスリープ状態が解除された時間に同期してクエリを送信することができる。さらに本発明によれば、子機の同期がズレた場合(外れた場合)であっても、子機へのアクセス周期を変えることなく自動的に子機の同期を補正することができる。   According to the present invention, the information related to the sleep time is transmitted from the parent device to the plurality of child devices, and each of the child devices is switched on / off of the sleep state based on the information related to the sleep time. Only the sleep state is canceled and the other states are in the sleep state, so that power consumption can be saved. Further, the parent device can transmit a query in synchronization with the time when the sleep state of the child device is released. Furthermore, according to the present invention, even if the synchronization of the slave unit is shifted (disconnected), the synchronization of the slave unit can be automatically corrected without changing the access cycle to the slave unit.

本発明の実施例に係る無線通信センサシステムの全体構成を示す図である。1 is a diagram illustrating an overall configuration of a wireless communication sensor system according to an embodiment of the present invention. 本発明の実施例に係る親機の構成を示すブロック図である。It is a block diagram which shows the structure of the main | base station which concerns on the Example of this invention. 本発明の第1の実施例に係る親機の通信制御プログラムの機能的な構成例を示す図である。It is a figure which shows the functional structural example of the communication control program of the main | base station which concerns on 1st Example of this invention. クエリ情報および子機からの応答メッセージ情報のフォーマットを例示する図である。It is a figure which illustrates the format of the query information and the response message information from a subunit | mobile_unit. スリープ時間に関するファンクションコードの機能を示す図である。It is a figure which shows the function of the function code regarding sleep time. 本発明の第1の実施例に係る子機の機能的な構成を示すブロック図である。It is a block diagram which shows the functional structure of the subunit | mobile_unit which concerns on 1st Example of this invention. 本発明の第1の実施例に係る子機の要部の回路構成を示す図である。It is a figure which shows the circuit structure of the principal part of the subunit | mobile_unit which concerns on 1st Example of this invention. 本発明の第1の実施例に係る制御部の機能的な構成を示すブロック図である。It is a block diagram which shows the functional structure of the control part which concerns on 1st Example of this invention. 本発明の実施例に係る無線通信センサシステムの全体の動作フローを説明するタイミングチャートである。It is a timing chart explaining the whole operation | movement flow of the radio | wireless communication sensor system based on the Example of this invention. 本発明の実施例に係る無線通信センサシステムの全体の動作フローを説明するタイミングチャートである。It is a timing chart explaining the whole operation | movement flow of the radio | wireless communication sensor system based on the Example of this invention. 本発明の実施例に係る子機の動作を説明するタイミングチャート図である。It is a timing chart figure explaining operation | movement of the subunit | mobile_unit which concerns on the Example of this invention. 本発明の実施例に係る子機の動作フローを示す図である。It is a figure which shows the operation | movement flow of the subunit | mobile_unit which concerns on the Example of this invention. 本発明の実施例に係る子機の動作フローを示す図である。It is a figure which shows the operation | movement flow of the subunit | mobile_unit which concerns on the Example of this invention. 本発明の実施例に係る親機の動作フローを示す図である。It is a figure which shows the operation | movement flow of the main | base station which concerns on the Example of this invention. 本発明の実施例の変形例に係る無線通信センサシステムの全体構成を示す図である。It is a figure which shows the whole structure of the radio | wireless communication sensor system which concerns on the modification of the Example of this invention. 本発明の第2の実施例に係る親機の通信制御プログラムの機能的な構成を示すブロック図である。It is a block diagram which shows the functional structure of the communication control program of the main | base station which concerns on 2nd Example of this invention. 本発明の第2の実施例に係る親機の同期補正シーケンスを説明する動作フローである。It is an operation | movement flow explaining the synchronous correction sequence of the main | base station which concerns on 2nd Example of this invention. 本発明の第2の実施例に係る子機の要部の回路構成を示す図である。It is a figure which shows the circuit structure of the principal part of the subunit | mobile_unit which concerns on 2nd Example of this invention. 本発明の第2の実施例に係る制御部の機能的な構成を示すブロック図である。It is a block diagram which shows the functional structure of the control part which concerns on 2nd Example of this invention. 図18(A)は、親機と子機の同期が取れている場合の動作を説明するタイミングチャート、図18(B)は、親機と子機の同期が外れている場合の動作を説明するタイミングチャート、図18(C)は、親機と子機の同期補正を行うときの動作を説明するタイミングチャートである。18A is a timing chart for explaining the operation when the parent device and the child device are synchronized, and FIG. 18B is for explaining the operation when the parent device and the child device are out of synchronization. FIG. 18C is a timing chart for explaining the operation when the synchronization correction of the parent device and the child device is performed.

次に、本発明の実施の形態について、図面を参照して詳細に説明する。本発明に係る無線通信システムは、電池により駆動される複数の子機と、複数の子機と双方向の無線通信を行う親機と、親機に接続された制御装置(ホスト装置)とを含んで構成される。本発明の無線通信システムは、好ましくは、複数の子機によって検出された情報を監視する監視システムであることができる。子機は、遠隔地に配置され、遠隔地の種々の情報を検出することが可能である。例えば、子機は、温度センサ、湿度センサ、水位センサ、土壌水分センサ、雨量計、圧力センサ、気圧センサ等を含むことができる。親機は、複数の子機と双方向の無線通信を行い、複数の子機に情報を送信し、あるいは複数の子機から情報を受信する。親機はさらに、無線通信システムの全体を制御する制御装置に接続され、制御装置からの命令等に応じて複数の子機に指示を送信することができる。   Next, embodiments of the present invention will be described in detail with reference to the drawings. A wireless communication system according to the present invention includes a plurality of slave units driven by a battery, a master unit that performs bidirectional wireless communication with the plurality of slave units, and a control device (host device) connected to the master unit. Consists of including. The wireless communication system of the present invention can be preferably a monitoring system that monitors information detected by a plurality of slave units. The slave unit is arranged in a remote place and can detect various information in the remote place. For example, the handset can include a temperature sensor, a humidity sensor, a water level sensor, a soil moisture sensor, a rain gauge, a pressure sensor, an atmospheric pressure sensor, and the like. The master unit performs bidirectional wireless communication with the plurality of slave units, transmits information to the plurality of slave units, or receives information from the plurality of slave units. The parent device is further connected to a control device that controls the entire wireless communication system, and can send instructions to a plurality of child devices in accordance with instructions from the control device.

図1は、本発明の実施例に係る無線通信センサシステムの全体構成を示す図である。本実施例に係る無線通信センサシステム1は、親機10と、複数の子機20a、20b、20c、…20n(nは、2以上の整数)と、ホスト装置30とを含んで構成される。なお、子機20a〜20nの全体を総称するときは、子機20という。   FIG. 1 is a diagram showing an overall configuration of a wireless communication sensor system according to an embodiment of the present invention. The wireless communication sensor system 1 according to the present embodiment includes a parent device 10, a plurality of child devices 20a, 20b, 20c,... 20n (n is an integer of 2 or more) and a host device 30. . In addition, the whole subunit | mobile_unit 20a-20n is called the subunit | mobile_unit 20 generically.

親機10は、複数の子機20の各々との間で無線(例えば、920MHzの周波数帯)による双方向通信を行う。親機10が子機20aに対してクエリ(問い合わせ)Qaを送信すると、子機20aは、クエリQaに対する応答メッセージRaを返信する。同様に、親機10が子機20bに対してクエリQbを送信すると、子機20bは、クエリQbに対する応答メッセージRbを返信する。本実施例のシステムでは、親機10が子機20をアクセスする場合には、予め決められた数nの子機20に対して、予め決められた順序(例えば、アドレスの若い順)で全ての子機20a、20b、20c、…20nにクエリQa、Qb、Qc、…Qnを送信し、各子機から応答メッセージを受信する。子機20は、親機からのアクセスがある期間に同期してウェークアップし、極力、電池が消耗されることを抑制する。また、仮に一部の子機が切断された場合であっても、親機10は、切断された子機をスキップすることなく、予め決められた数nの子機20をアクセスすることで、親機と子機との間の同期が失われないようにする。   Base unit 10 performs bidirectional communication with each of a plurality of slave units 20 by radio (for example, a frequency band of 920 MHz). When the parent device 10 transmits a query (inquiry) Qa to the child device 20a, the child device 20a returns a response message Ra to the query Qa. Similarly, when the parent device 10 transmits a query Qb to the child device 20b, the child device 20b returns a response message Rb to the query Qb. In the system of the present embodiment, when the parent device 10 accesses the child devices 20, the number n of the child devices 20 is determined in a predetermined order (for example, in ascending order of addresses). Queries Qa, Qb, Qc,... Qn are transmitted to the slave units 20a, 20b, 20c,... 20n, and a response message is received from each slave unit. The subunit | mobile_unit 20 wakes up synchronizing with the period with the access from a main | base station, and suppresses that a battery is consumed as much as possible. Even if some of the slave units are disconnected, the master unit 10 can access the predetermined number n of slave units 20 without skipping the disconnected slave units. Make sure that the synchronization between the master and slave units is not lost.

子機20は、親機10からクエリQを受信すると、それに対する応答メッセージRを作成し、これを親機10に送信する。子機20は、電池(バッテリー)により動作され、必要最低限の動作のみを行うスリープ状態(低消費電力状態)と、スリープ状態からウェークアップされた通常の動作状態とを有する。通常の動作状態では、子機に含まれる全ての機能が完全に動作することが可能であり、低消費電力情報では、子機に含まれる一部の機能が動作可能になる。   When receiving the query Q from the parent device 10, the child device 20 creates a response message R corresponding to the query Q and transmits it to the parent device 10. The subunit | mobile_unit 20 is operate | moved with a battery (battery), and has the sleep state (low power consumption state) which performs only minimum necessary operation | movement, and the normal operation state waked up from the sleep state. In a normal operation state, all the functions included in the child device can be operated completely, and some functions included in the child device can be operated in the low power consumption information.

ホスト装置30は、親機10に対して有線または無線により接続される。ホスト装置30は、コンピュータ装置、ノートパソコン、携帯型通信端末、タブレット型通信端末等であることができる。ホスト装置30は、システム全体を監視し、または制御するため、親機10に対して必要な指示を与え、また親機10から子機20の情報を収集する。ホスト装置30は、例えば、インターネットまたはイントラネット等のネットワークを介して親機10に接続されてもよい。   Host device 30 is connected to parent device 10 by wire or wirelessly. The host device 30 can be a computer device, a notebook computer, a portable communication terminal, a tablet communication terminal, or the like. The host device 30 gives necessary instructions to the parent device 10 and collects information on the child device 20 from the parent device 10 in order to monitor or control the entire system. The host device 30 may be connected to the parent device 10 via a network such as the Internet or an intranet.

図2は、本実施例に係る親機の構成の一例を示すブロック図である。親機10は、入力部100(例えば、親機10に取り付けられた各種スイッチ類やボタン、タッチパネル入力、電源のオン/オフスイッチ等)、無線通信部110、外部接続部120、記憶部130、表示部140および制御部150を含んで構成される。なお、この構成は例示であり、親機は、他の構成を含むものであっても良い。   FIG. 2 is a block diagram illustrating an example of the configuration of the parent device according to the present embodiment. The base unit 10 includes an input unit 100 (for example, various switches and buttons attached to the base unit 10, touch panel input, power on / off switch, etc.), a wireless communication unit 110, an external connection unit 120, a storage unit 130, The display unit 140 and the control unit 150 are included. In addition, this structure is an illustration and the main | base station may include another structure.

無線通信部110は、子機20との間で双方向の無線通信を行うための無線モジュール(以下、WMと呼ぶことがある)を含む。親機10と子機20の間の無線通信は、親機10から複数の子機20に対してアクセス可能なプロトコルで行われ、例えば、Modbus(登録商標)プロトコルの通信方式が採用される。この通信方式では、親機10だけがクエリ(問い合わせ)を発行することができ、親機10は、アドレス指定された子機にクエリを発行するユニキャスト通信を行う。子機の各々は、親機からのクエリに対して応答メッセージを作成し、これを親機10に送信する。   Wireless communication unit 110 includes a wireless module (hereinafter also referred to as WM) for performing bidirectional wireless communication with handset 20. Wireless communication between the parent device 10 and the child device 20 is performed using a protocol that allows the parent device 10 to access the plurality of child devices 20, and for example, a communication method of Modbus (registered trademark) protocol is adopted. In this communication method, only the parent device 10 can issue a query (inquiry), and the parent device 10 performs unicast communication for issuing a query to an addressed child device. Each of the child devices creates a response message in response to the query from the parent device, and transmits this to the parent device 10.

外部接続部120は、ホスト装置30との有線または無線の接続を確立したり、その他のネットワーク等との接続を確立する。親機10とホスト装置30との接続は、子機20との無線通信と非同期で行われる。有線接続は、例えば、RS232Cケーブル、USBケーブル、有線LANであることができ、無線接続は、WiFi(登録商標)、WiMAX、無線LAN、Bluetooth(登録商標)であることができる。   The external connection unit 120 establishes a wired or wireless connection with the host device 30 or establishes a connection with another network or the like. The connection between the parent device 10 and the host device 30 is performed asynchronously with the wireless communication with the child device 20. The wired connection can be, for example, an RS232C cable, a USB cable, or a wired LAN, and the wireless connection can be WiFi (registered trademark), WiMAX, wireless LAN, or Bluetooth (registered trademark).

記憶部130は、制御部150が実行するプログラム、子機20へのクエリ、子機20からの応答メッセージ、ホスト装置30からの命令等などの種々のデータを格納することができる。表示部140は、親機10に取り付けられた液晶ディスプレイ等の表示媒体であり、親機10の状態を表す警告メッセージ、子機20から応答メッセージ、外部機器との接続情報等を表示することができる。   The storage unit 130 can store various data such as a program executed by the control unit 150, a query to the child device 20, a response message from the child device 20, a command from the host device 30, and the like. The display unit 140 is a display medium such as a liquid crystal display attached to the parent device 10 and can display a warning message indicating the state of the parent device 10, a response message from the child device 20, connection information with an external device, and the like. it can.

制御部150は、好ましい態様では、マイクロコントローラまたはマイクロプロセッサ(MPU)等から構成され、制御部150は、親機10と子機20との双方向の無線通信を制御する通信制御プログラムまたはシーケンスを実行する。   In a preferred embodiment, the control unit 150 includes a microcontroller or a microprocessor (MPU), and the control unit 150 executes a communication control program or sequence for controlling bidirectional wireless communication between the parent device 10 and the child device 20. Run.

図3は、制御部150が実行する通信制御プログラムまたはシーケンスの機能的な構成を示す図である。通信制御プログラム(または通信制御シーケンス)200は、クエリ作成部210、スリープ情報設定部220、クエリ送信部230、応答メッセージ受信部240、子機情報提供部250を含む。   FIG. 3 is a diagram illustrating a functional configuration of a communication control program or sequence executed by the control unit 150. The communication control program (or communication control sequence) 200 includes a query creation unit 210, a sleep information setting unit 220, a query transmission unit 230, a response message reception unit 240, and a slave device information provision unit 250.

クエリ作成部210は、子機20の各々に発行するクエリを作成する。図4(A)に、クエリの伝送フォーマットを示す。クエリには、同図に示すように、デバイスアドレスと、ファンクションコードと、クエリデータと、エラーチェックとが含まれる。   The query creation unit 210 creates a query to be issued to each of the child devices 20. FIG. 4A shows a query transmission format. As shown in the figure, the query includes a device address, a function code, query data, and an error check.

デバイスアドレスは、子機20の各々に割り当てられた固有の識別情報であり、親機は、子機20をアクセスするとき、子機のデバイスアドレスを指定する。例えば、図1の子機20aにクエリを送信する場合には、子機20aのデバイスアドレスを指定し、子機20bにクエリを送信する場合には、子機20bのデバイスアドレスを指定する。   The device address is unique identification information assigned to each child device 20, and the parent device specifies the device address of the child device when accessing the child device 20. For example, when a query is transmitted to the slave unit 20a in FIG. 1, the device address of the slave unit 20a is specified, and when a query is transmitted to the slave unit 20b, the device address of the slave unit 20b is specified.

ファンクションコードは、例えば、Modbus規格による種々のコマンド等が含まれる。例えば、子機の出力のオン/オフ状態を読み出すコマンド、子機の入力のオン/オフ状態を読み出すコマンド、子機のレジスタが保持する内容を読み出すコマンド、子機のレジスタの内容を変更するコマンド等がある。さらに本実施例では、図5に示すように独自のファンクションコードFnを備えている。ファンクションコードFnは、子機にスリープ時間の設定指示とポーリングを行うコマンドである。このファンクションコードFnは、親機10が子機20にアクセスする場合には、常に含まれる。   The function code includes, for example, various commands according to the Modbus standard. For example, a command for reading the on / off status of the slave unit output, a command for reading the on / off status of the slave unit input, a command for reading the content held by the slave unit register, and a command for changing the register content of the slave unit Etc. Further, in this embodiment, an original function code Fn is provided as shown in FIG. The function code Fn is a command for instructing the slave unit to set the sleep time and polling. This function code Fn is always included when the parent device 10 accesses the child device 20.

クエリデータには、種々の情報を含めることができ、例えば、子機のセンサのしきい値の設定や変更に加え、ファンクションコードFnのためのスリープ時間を設定するために必要なスリープ情報が含まれる。エラーチェックは、伝送データのエラーの検出・訂正を行うための情報が含まれる。   Various data can be included in the query data. For example, in addition to setting or changing the threshold value of the sensor of the slave unit, the sleep information necessary for setting the sleep time for the function code Fn is included. It is. The error check includes information for detecting and correcting transmission data errors.

スリープ情報設定部220は、子機20がスリープ時間を設定するために必要なスリープ情報を設定する。1つの好ましい例では、スリープ情報は、親機が全ての子機20をアクセスする周期T(以後、状態通知間隔ともいう)である。子機20の数がnであるとき、親機10は、T/nの時間間隔で1つの子機をアクセスすることになる。状態通知間隔Tは、ホスト装置30から親機10に指示されるが、親機10は、この指示がない場合、デフォルト値を状態通知間隔Tとすることができる。   The sleep information setting unit 220 sets sleep information necessary for the slave unit 20 to set a sleep time. In one preferred example, the sleep information is a period T (hereinafter also referred to as a status notification interval) in which the parent device accesses all the child devices 20. When the number of slave units 20 is n, the master unit 10 accesses one slave unit at a time interval of T / n. The state notification interval T is instructed from the host device 30 to the parent device 10, but the parent device 10 can set the default value as the state notification interval T when there is no instruction.

クエリ送信部230は、無線通信部110を介して、例えば、子機のアドレスの若い順(例えば、図1の子機20a、20b、20c、…20nの順)に作成したクエリを全ての子機20に対して送信する。   The query transmission unit 230 transmits, for example, queries created in ascending order of the addresses of the slave units (for example, in the order of the slave units 20a, 20b, 20c,..., 20n in FIG. 1) via the wireless communication unit 110 to all the child units. To the machine 20.

応答メッセージ受信部240は、クエリに対して子機20から送信された応答メッセージを受信する。応答メッセージの伝送フォーマットを図4(B)に示す。確認用デバイスアドレスは、応答メッセージを作成した子機のアドレスであり、確認用ファンクションコードは、子機が実行したファンクションコードであり、応答データは、クエリに対する応答内容を含む情報である。子機情報提供部250は、応答メッセージ受信部240で受信した応答データをホスト装置30に提供する。   The response message receiving unit 240 receives a response message transmitted from the child device 20 in response to the query. The transmission format of the response message is shown in FIG. The confirmation device address is the address of the child device that created the response message, the confirmation function code is the function code executed by the child device, and the response data is information including the content of the response to the query. The slave unit information providing unit 250 provides the response data received by the response message receiving unit 240 to the host device 30.

次に、本実施例の子機20について説明する。図6は、子機20の機能的な構成を示すブロック図である。子機20は、概ね、センサモジュール300、無線通信モジュール310、電源モジュール320および制御モジュール330を含む。センサモジュール300は、子機20が設置された位置において必要な情報を検出するためのセンサ回路、センサ回路により検出された情報を保持する記憶回路等を含む。無線通信モジュール310は、親機10との間で双方向の無線通信を行うための通信回路等を含む。電源モジュール320は、電池から供給される電力を各部へ搬送制御する回路等を含む。制御モジュール330は、子機20の全体を制御する回路等を含む。   Next, the subunit | mobile_unit 20 of a present Example is demonstrated. FIG. 6 is a block diagram showing a functional configuration of the slave unit 20. The subunit | mobile_unit 20 generally contains the sensor module 300, the radio | wireless communication module 310, the power supply module 320, and the control module 330. FIG. The sensor module 300 includes a sensor circuit for detecting necessary information at a position where the slave unit 20 is installed, a storage circuit for holding information detected by the sensor circuit, and the like. The wireless communication module 310 includes a communication circuit for performing bidirectional wireless communication with the parent device 10. The power supply module 320 includes a circuit that controls conveyance of power supplied from the battery to each unit. The control module 330 includes a circuit that controls the entire slave unit 20.

図7は、子機20の要部の回路構成を示す図である。図中において、破線は、電源ライン、実線は、信号ラインを示す。また、ここにはセンサモジュール300の詳細は示されていない。   FIG. 7 is a diagram illustrating a circuit configuration of a main part of the slave unit 20. In the drawing, a broken line indicates a power supply line, and a solid line indicates a signal line. Also, details of the sensor module 300 are not shown here.

子機20は、充電可能な二次電池400を含み、電池400は、電圧VB(例えば、3.6〜3.7V)を各部へ供給する。すなわち、電池400からの電圧VBは、DC/DCコンバータ402、404、リセット回路410、412、およびスリープタイマ420に供給される。   The subunit | mobile_unit 20 contains the secondary battery 400 which can be charged, and the battery 400 supplies the voltage VB (for example, 3.6-3.7V) to each part. That is, voltage VB from battery 400 is supplied to DC / DC converters 402 and 404, reset circuits 410 and 412, and sleep timer 420.

リセット回路410は、電池400の電圧VBが印加されると、これに応答してパワーオンリセットのためのリセット信号RESET1を電源ロード制御回路440に出力する。電源ロード制御回路440は、リセット信号RESET1を受け取ると、パワーオンリセットされ、DC/DCコンバータ402にイネーブル信号ENを出力し、DC/DCコンバータ402を動作させる。DC/DCコンバータ402は、電池400の電圧VBを所望の電圧V1に変換し、変換された電圧V1は、制御部430およびリセット回路412に供給される。リセット回路412は、DC/DCコンバータ402からの電圧V1を受け取ると、これに応答してパワーオンリセットのためのリセット信号RESET2を制御部430に出力する。制御部430は、DC/DCコンバータ402からの電圧V1を入力し、かつリセット回路410からのリセット信号RESET2を受け取ると、パワーオンリセットされ、内部を初期化する。制御部430はさらに無線モジュール470を初期化し、かつパワーオンするためのリセット信号RESET3およびパワーオン信号PWRONを無線モジュール470へ出力する。   When the voltage VB of the battery 400 is applied, the reset circuit 410 outputs a reset signal RESET1 for power-on reset to the power load control circuit 440 in response thereto. When the power load control circuit 440 receives the reset signal RESET 1, the power load control circuit 440 is reset to power-on, outputs an enable signal EN to the DC / DC converter 402, and operates the DC / DC converter 402. The DC / DC converter 402 converts the voltage VB of the battery 400 into a desired voltage V1, and the converted voltage V1 is supplied to the control unit 430 and the reset circuit 412. Upon receiving the voltage V1 from the DC / DC converter 402, the reset circuit 412 outputs a reset signal RESET2 for power-on reset to the control unit 430 in response thereto. When the control unit 430 receives the voltage V1 from the DC / DC converter 402 and receives the reset signal RESET2 from the reset circuit 410, the control unit 430 is reset to power-on and initializes the inside. The control unit 430 further initializes the wireless module 470 and outputs a reset signal RESET3 and a power-on signal PWRON for powering on the wireless module 470.

一方、DC/DCコンバータ404は、電池400からの電圧VBにより動作され、変換された所望の電圧V2を無線モジュール470に出力する。無線モジュール470は、電圧V2が入力されただけでは、パワーダウンモードであるが、上記したように制御部430からのパワーオン信号PWRONが入力されると、パワーオンモードになる。無線モジュール470がパワーオンモードであるとき、無線モジュール470は、親機10からのクエリを受信することが可能である。無線モジュール470はさらに、制御部430からのコマンドを受け取ることが可能であり、当該コマンドによりパワーオンモードからスリープ状態、スリープ状態からパワーオンモードに移行することができる。無線モジュール470がスリープ状態のとき、無線モジュール470のRF回路の電源がオフし、低消費電力状態となる。スリープ状態のとき、無線モジュール470は、親機10からのクエリを受信することはできない。   On the other hand, the DC / DC converter 404 is operated by the voltage VB from the battery 400 and outputs the converted desired voltage V2 to the wireless module 470. The wireless module 470 is in a power-down mode only when the voltage V2 is input, but enters the power-on mode when the power-on signal PWRON from the control unit 430 is input as described above. When the wireless module 470 is in the power-on mode, the wireless module 470 can receive a query from the parent device 10. Further, the wireless module 470 can receive a command from the control unit 430, and can shift from the power-on mode to the sleep state and from the sleep state to the power-on mode by the command. When the wireless module 470 is in the sleep state, the power of the RF circuit of the wireless module 470 is turned off and the power consumption state is entered. When in the sleep state, the wireless module 470 cannot receive a query from the parent device 10.

スリープタイマ420は、電池400からの電圧Vbにより動作可能になる。スリープタイマ420は、子機20のスリープ時間をカウントすることにより制御部430のスリープ時間を監視する。スリープタイマ420のスリープ時間は、制御部430によって設定される。好ましい例では、制御部430は、親機10のクエリに含まれるアクセス周期Tに基づきスリープ時間を算出し、算出されたスリープ時間Tslpをスリープタイマ420に設定し、スリープタイマ420のカウントを始動させる。   The sleep timer 420 can be operated by the voltage Vb from the battery 400. The sleep timer 420 monitors the sleep time of the control unit 430 by counting the sleep time of the slave unit 20. The sleep time of the sleep timer 420 is set by the control unit 430. In a preferred example, the control unit 430 calculates a sleep time based on the access cycle T included in the query of the parent device 10, sets the calculated sleep time Tslp in the sleep timer 420, and starts counting the sleep timer 420. .

制御部430は、親機へ応答メッセージを送信後、電源ロード制御回路440に対してDC/DCコンバータ402の動作を停止させるための制御信号STPを出力する。電源ロード制御回路440は、制御信号STPを受け取ると、DC/DCコンバータ402にディスエーブル信号を出力し、DC/DCコンバータ402の動作が停止される。これにより、制御部430には電圧V1が供給されなくなり、制御部430は、事実上、電源オフ状態となる。また、スリープタイマ420は、スリープ時間の経過をカウントすると、タイムオーバー信号TMOを電源ロード制御回路440に出力する。電源ロード制御回路440は、タイムオーバー信号TMOを受け取ると、DC/DCコンバータ402に再びイネーブル信号ENを出力し、DC/DCコンバータ402を動作させる。これにより、制御部430が電源オン状態になる。   After transmitting the response message to the master unit, control unit 430 outputs a control signal STP for stopping the operation of DC / DC converter 402 to power load control circuit 440. When receiving the control signal STP, the power load control circuit 440 outputs a disable signal to the DC / DC converter 402, and the operation of the DC / DC converter 402 is stopped. As a result, the voltage V1 is not supplied to the control unit 430, and the control unit 430 is effectively turned off. In addition, when the sleep timer 420 counts the elapse of the sleep time, it outputs a time over signal TMO to the power load control circuit 440. When the power load control circuit 440 receives the time over signal TMO, the power load control circuit 440 outputs the enable signal EN to the DC / DC converter 402 again to operate the DC / DC converter 402. Thereby, the control part 430 will be in a power-on state.

アドレス保持部450は、子機のアドレスを保持し、当該アドレス情報を制御部430へ提供する。このアドレス情報は、例えば、クエリに対する応答メッセージを作成するときに参照される。また、アドレス保持部450へのアドレスの設定方法は任意であるが、例えば、ディップスイッチなどよりアドレスの設定または変更を行うことができる。   Address holding unit 450 holds the address of the slave unit and provides the address information to control unit 430. This address information is referred to, for example, when creating a response message to the query. The method of setting the address in the address holding unit 450 is arbitrary, but the address can be set or changed by a dip switch or the like, for example.

割込み制御部460は、無線モジュール470が自局宛てのクエリを受信したとき、制御部430に割り込み信号INTを出力し、スリープ状態の制御部430をウェークアップさせる。   When the wireless module 470 receives a query addressed to itself, the interrupt control unit 460 outputs an interrupt signal INT to the control unit 430 to wake up the control unit 430 in the sleep state.

次に、制御部430の主な機能について説明する。制御部430は、図8に示すように、クリエ受信部500、ファンクション実行部510、スリープ時間算出部520、スリープ時間設定部530、スリープ/起動実行部540、応答メッセージ作成部550および応答メッセージ送信部560等を含む。これらの機能は、ソフトウエア(プログラム)、ハードウエア、あるいはソフトウエアとハードウエアの組合せのいずれによって実行されてもよい。制御部430が、例えば、ROM、RAMを含むマイクロプロセッサMPUを含むとき、ROMまたはRAM内のプログラムを実行することにより、上記の主な機能を動作させることができる。   Next, main functions of the control unit 430 will be described. As shown in FIG. 8, the control unit 430 includes a CLIE receiving unit 500, a function executing unit 510, a sleep time calculating unit 520, a sleep time setting unit 530, a sleep / startup executing unit 540, a response message creating unit 550, and a response message transmission. Part 560 and the like. These functions may be executed by any one of software (program), hardware, or a combination of software and hardware. When the control unit 430 includes, for example, a microprocessor MPU including a ROM and a RAM, the main functions described above can be operated by executing a program in the ROM or the RAM.

クエリ受信部500は、無線モジュール470を介して自局宛てのクエリを受信する。1つの例では、制御部430はプログラムコマンド(スリープコマンド)を実行することによりスリープ状態となり、制御部430がスリープ状態のとき、無線モジュール470が親機10から自局宛てのクエリを受信すると、無線モジュール470は、割込み制御部460に割込み信号INTを出力させる。制御部430は、割込み信号INTを受け取ると、スリープ状態からウェークアップする。無線モジュール470は、クエリに含まれるデバイスアドレスを抽出し、自局宛てのクエリか否かを判定する。   The query receiving unit 500 receives a query addressed to itself via the wireless module 470. In one example, the control unit 430 enters a sleep state by executing a program command (sleep command). When the control unit 430 is in the sleep state, the wireless module 470 receives a query addressed to itself from the base unit 10; The wireless module 470 causes the interrupt control unit 460 to output an interrupt signal INT. When receiving the interrupt signal INT, the control unit 430 wakes up from the sleep state. The wireless module 470 extracts a device address included in the query and determines whether the query is for the own station.

ファンクション実行部510は、クエリ受信部500によりクエリが受信されると、クエリに含まれるファンクションコードを実行する。例えば、ここには図示しないが、子機に含まれるセンサのしきい値を設定したり、センサにより検出された値をレジスタから読出す等の動作を行う。また、クエリには、常に、図5に示すファンクションコードFnが含まれているため、ファンクション実行部510は、スリープ時間算出部520にスリープ時間の算出等をさせる。   When the query is received by the query receiving unit 500, the function execution unit 510 executes the function code included in the query. For example, although not shown here, operations such as setting a threshold value of a sensor included in the slave unit and reading a value detected by the sensor from a register are performed. Since the query always includes the function code Fn shown in FIG. 5, the function execution unit 510 causes the sleep time calculation unit 520 to calculate the sleep time.

スリープ時間算出部520は、クエリに含まれるアクセス周期T(状態通知間隔T)に基づきスリープ時間Tslpを算出する。スリープ時間Tslpは、以下の数式により算出される。ここで、Trstは子機内部のリセット時間、Tiniは子機内部の初期化時間、Trcvは親機の送信時間+子機の受信時間、Tstはスリープタイマ設定とタイマスタートまでの時間である。Trst、Tini、Trcv、Tstの時間は、例えば、デフォルト値として予めレジスタ等に保持される。但し、親機は、所望のファンクションコードにより、レジスタに記憶されたTrst、Tini、Trcv、Tstの時間を変更することも可能である。

Figure 0006473494
The sleep time calculation unit 520 calculates the sleep time Tslp based on the access cycle T (state notification interval T) included in the query. The sleep time Tslp is calculated by the following formula. Here, Trst is the reset time inside the slave unit, Tini is the initialization time inside the slave unit, Trcv is the transmission time of the master unit + the reception time of the slave unit, and Tst is the time between the sleep timer setting and the timer start. The times of Trst, Tini, Trcv, and Tst are previously stored in a register or the like as default values, for example. However, the master unit can change the times of Trst, Tini, Trcv, and Tst stored in the register according to a desired function code.
Figure 0006473494

スリープ時間設定部530は、信号線SLTを介して算出されたスリープ時間Tslpをスリープタイマ420に設定する。スリープタイマ420は、スリープ時間が設定されると、そのカウントを開始し、カウント終了時にタイムオーバー信号TMOを電源ロード制御回路440に出力する。   The sleep time setting unit 530 sets the sleep time Tslp calculated via the signal line SLT in the sleep timer 420. When the sleep time is set, the sleep timer 420 starts counting, and outputs a time over signal TMO to the power load control circuit 440 when the count ends.

スリープ/起動実行部540は、予め決められた動作シーケンスに従い、制御部430をスリープ状態にする。1つの例では、スリープ/起動実行部540は、プログラムのスリープコマンドを実行することでスリープ状態になる。制御部430がスリープ状態になると、制御部430に含まれる、例えば、カウンタやクロックなどがオフにされ、制御部430が低消費電力状態になる。また、スリープ/起動実行部540は、割込み制御部460から割込み信号INTが入力されたとき、ウェークアップコマンドを実行し、制御部430をスリープ状態から起動する。   The sleep / startup execution unit 540 puts the control unit 430 into a sleep state according to a predetermined operation sequence. In one example, the sleep / startup execution unit 540 enters a sleep state by executing a sleep command of a program. When the control unit 430 enters a sleep state, for example, a counter or a clock included in the control unit 430 is turned off, and the control unit 430 enters a low power consumption state. In addition, when the interrupt signal INT is input from the interrupt control unit 460, the sleep / startup execution unit 540 executes a wakeup command and starts up the control unit 430 from the sleep state.

応答メッセージ作成部550は、クエリに対する応答メッセージを作成する。例えば、クエリがセンサの検出値の要求であれば、応答メッセージ作成部550は、センサの検出値を含む応答メッセージを作成する。応答メッセージ送信部560は、作成された応答メッセージを親機に返信する。なお、応答メッセージの伝送フォーマットは、図4(B)に示した通りである。   The response message creation unit 550 creates a response message for the query. For example, if the query is a request for a sensor detection value, the response message creation unit 550 creates a response message including the sensor detection value. Response message transmission unit 560 returns the created response message to the parent device. Note that the transmission format of the response message is as shown in FIG.

ホスト装置30は、親機10に対して子機20のセンサのしきい値の設定や変更を指示したり、状態通知間隔Tを通知したり、あるいは親機10から提供された子機20の応答メッセージの内容を受信する。なお、ここでは親機10とホスト装置30とを別個に構成しているが、両者を1つの装置として構成してもよい。   The host device 30 instructs the parent device 10 to set or change the threshold value of the sensor of the child device 20, notifies the state notification interval T, or the child device 20 provided from the parent device 10. The content of the response message is received. Here, although parent device 10 and host device 30 are configured separately, they may be configured as one device.

次に、本発明の実施例に係る無線通信センサシステム1の動作について説明する。図9Aおよび図9Bは、親機10と4つの子機#1、#2、#3、#4とが無線通信するときの親機から子機の動作タイミングを示す図である。図中、MPUは、制御部430を表し、W/Mは、無線モジュール470を表す。また、TM1、TM2、TM3、TM4は、子機#1、#2、#3、#4をアクセスする周期であり、TM1=TM2=TM3=TM4である(これらを総称するときTMという)。図10は、システム立上げ時と通常動作時の子機の動作を示すタイミングチャートである。図中、P1は初期化動作、P2は受信動作、P3はスリープ時間セット動作、P4は応答送信動作を表し、t1、t2、t3、t4は、P1、P2、P3、P4の動作に要する時間を表す。また、図11A、11Bは、子機の詳細な動作フローを示し、図12は、親機の詳細な動作フローを示す。 Next, the operation of the wireless communication sensor system 1 according to the embodiment of the present invention will be described. FIGS. 9A and 9B are diagrams illustrating operation timings of the slave unit to the slave unit when the master unit 10 and the four slave units # 1, # 2, # 3, and # 4 perform wireless communication. In the figure, MPU represents the control unit 430, and W / M represents the wireless module 470. TM1, TM2, TM3, and TM4 are periods in which the slave units # 1, # 2, # 3, and # 4 are accessed, and TM1 = TM2 = TM3 = TM4 (referred to as TM when collectively referred to). FIG. 10 is a timing chart showing the operation of the slave unit at the time of system startup and normal operation. In the figure, P1 is an initialization operation, P2 is a reception operation, P3 is a sleep time setting operation, P4 is a response transmission operation, and t1, t2, t3, and t4 are times required for operations of P1, P2, P3, and P4. Represents. 11A and 11B show a detailed operation flow of the child device, and FIG. 12 shows a detailed operation flow of the parent device.

無線通信センサシステムの立上げ時
1.ホスト装置30は、親機10に対して、親機が全子機をアクセスする周期、すなわち状態通知間隔Tを設定するように指示する。親機は、ホスト装置30からの指示がない場合、デフォルト値を状態通知間隔Tとする。この設定は、システムの立上げ時に限らず随時行うことができる。
When starting up the wireless communication sensor system The host device 30 instructs the parent device 10 to set a cycle in which the parent device accesses all the child devices, that is, a state notification interval T. When there is no instruction from the host device 30, the parent device sets the default value as the state notification interval T. This setting is not limited to when the system is started up, but can be performed at any time.

2.全ての子機のMPUは、電源が投入(Power On)されると自身の初期化を行い、WMのみを動作状態にして、自分自身はスリープ状態に入る。   2. When the power is turned on (Power On), the MPUs of all the slave units initialize themselves, set only the WM to the operating state, and enter the sleep state.

図11Aに示すように、電池400からの電圧VBがリセット回路410に供給されると、リセット回路410がリセット信号RESET1を電源ロード制御回路440に出力し(ステップS1)、電源ロード制御回路440が起動される。電源ロード制御回路440からのイネーブル信号ENによりDC/DCコンバータ402が起動され(ステップS2)、これによりリセット回路412からリセット信号RESET2が制御部430に出力され、制御部430の内部初期化が行われる(ステップS3)。制御部430は、無線モジュール470にパワーオン信号PWRONを出力し、無線モジュール470は、パワーオン信号PWRONに応答してパワーオンモードになる。さらに制御部430は、無線時モジュール470に対してリセット信号RESET3を出力し、無線モジュール470は、このリセット信号RESET3に応答して内部初期化をおこなう。次に、制御部430は、内部タイマにより一定時間をカウントし(例えば、62msをカウントし)、その時間が経過すると(ステップS4)、無線モジュール470に対してレジスタ初期化のコマンドを出力し、無線モジュール470は、このコマンドに応答してレジスタを初期化する。無線モジュール470は、レジスタの初期化が終了すると、その旨を制御部430に送信し、制御部430は、受信監視タイマ動作を開始し(ステップS6)、その開始に伴い制御部430は、スリープ状態に入る(ステップS7)。他方、無線モジュール470は、レジスタの初期化を終了した段階で、親機からのクエリの受信待ちとなる。   As shown in FIG. 11A, when the voltage VB from the battery 400 is supplied to the reset circuit 410, the reset circuit 410 outputs a reset signal RESET1 to the power load control circuit 440 (step S1), and the power load control circuit 440 It is activated. The DC / DC converter 402 is activated by the enable signal EN from the power load control circuit 440 (step S2), whereby the reset signal RESET2 is output from the reset circuit 412 to the control unit 430, and internal initialization of the control unit 430 is performed. (Step S3). The controller 430 outputs a power-on signal PWRON to the wireless module 470, and the wireless module 470 enters a power-on mode in response to the power-on signal PWRON. Further, the control unit 430 outputs a reset signal RESET3 to the wireless time module 470, and the wireless module 470 performs internal initialization in response to the reset signal RESET3. Next, the control unit 430 counts a certain time by an internal timer (for example, counts 62 ms), and when that time has elapsed (step S4), outputs a register initialization command to the wireless module 470, The wireless module 470 initializes the register in response to this command. When the initialization of the register is completed, the wireless module 470 transmits a message to that effect to the control unit 430, and the control unit 430 starts the reception monitoring timer operation (step S6). The state is entered (step S7). On the other hand, the wireless module 470 waits to receive a query from the parent device when the initialization of the register is completed.

これらの様子は、図9Aにも示されている。すなわち、子機#1、#2、#3、#4では、電源がオンされると、MPUが、パワーオン(Power on)、ウェークアップ(wake up)、スリープ(sleep)と遷移し、W/Mがウェークアップ(wake up)する。   These aspects are also shown in FIG. 9A. That is, in the slave units # 1, # 2, # 3, and # 4, when the power is turned on, the MPU transitions to power on, wake up, and sleep, and W / M wakes up.

また、図10には、子機#1と、子機#2、#3、#4との間で電源投入の時間が異なる例が示されている。子機#1、#2、#3、#4において電源が投入されると、それぞれ初期化動作P1が行われる。   FIG. 10 shows an example in which the power-on time is different between the slave unit # 1 and the slave units # 2, # 3, and # 4. When power is turned on in slave units # 1, # 2, # 3, and # 4, initialization operation P1 is performed.

3.親機10は、ホスト装置30から受信した状態通知間隔T、またはデフォルト値を子機のスリープ時間情報としてクエリのメッセージの中に付加して子機に送信する。子機へのアクセスは、常に子機のアドレスの若い順に行う。   3. The base unit 10 adds the status notification interval T received from the host device 30 or the default value as sleep time information of the slave unit to the query message and transmits it to the slave unit. Access to slave units is always performed in ascending order of slave unit addresses.

図12に示すように、親機10は、電源がオンされると(ステップQ1)、親機のMPUの内部を初期化し(ステップQ2)、親機の無線モジュールを初期化し(Q3)、最初の子機へのクエリの準備を行う(Q4)。親機10は、自身の内部タイマにより子機をアクセスする時間TMを管理し、時間TMの間隔で子機にクエリ(パケット)を送信する(ステップQ5、Q6、Q7、Q8)。   As shown in FIG. 12, when the power is turned on (step Q1), the base unit 10 initializes the MPU of the base unit (step Q2), initializes the radio module of the base unit (Q3), Prepare a query to the child machine (Q4). Base unit 10 manages time TM for accessing the handset by its own internal timer, and transmits a query (packet) to the handset at intervals of time TM (steps Q5, Q6, Q7, Q8).

これらの様子が図10にも示されている。ここでは、親機10が、子機#1の初期化動作P1の終了時点から内部タイマを起動させるものとする。親機10は、子機#1の初期化動作P1の終了時点でクエリを子機#1に送信し、子機#1は、受信動作P2でクエリを受信する。親機10は、子機#1へのクエリの送信から時間TM1を経過したとき、子機#2にクエリを送信し、子機#2へのクエリの送信から時間TM2を経過したとき、子機#3にクエリを送信し、子機#3へのクエリの送信から時間TM3を経過したとき、子機#4にクエリを送信し、子機#4へのクエリの送信から時間TM4を経過したとき、子機#1にクエリを送信する。   These states are also shown in FIG. Here, base unit 10 starts the internal timer from the end of initialization operation P1 of handset # 1. Master unit 10 transmits the query to slave unit # 1 at the end of initialization operation P1 of slave unit # 1, and slave unit # 1 receives the query in reception operation P2. When the time TM1 has elapsed from the transmission of the query to the child device # 1, the parent device 10 transmits the query to the child device # 2, and when the time TM2 has elapsed from the transmission of the query to the child device # 2, When a query is transmitted to the machine # 3 and the time TM3 has elapsed from the transmission of the query to the slave unit # 3, the query is transmitted to the slave unit # 4, and the time TM4 has elapsed from the transmission of the query to the slave unit # 4 When this occurs, a query is transmitted to the slave unit # 1.

4.全子機の無線モジュール470は、受信待ち状態にあり、受信した宛先アドレスが自局なら、受信動作を継続すると同時に制御部430に割込みを発生する。
5.子機の制御部430は、割込み信号INTに応答してスリープ状態からウェークアップして動作状態となり、無線モジュール470からクエリの受信を開始する。
4). The radio module 470 of all the slave units is in a reception waiting state, and if the received destination address is its own station, it continues the reception operation and generates an interrupt to the control unit 430 simultaneously.
5. The control unit 430 of the slave unit wakes up from the sleep state in response to the interrupt signal INT and enters an operation state, and starts receiving a query from the wireless module 470.

図11Aにおいて、制御部430は、割込み信号INTによりスリープ状態から起動される(ステップS8)。無線モジュール470は、クエリのアドレスから自局宛てのクエリか否かを判定し、自局宛てのクエリであれば、クエリを受信し、受信したクエリのパケットデータを制御部430へ送信する。こうして、制御部430による受信が開始される(ステップS9)。   In FIG. 11A, the control unit 430 is activated from the sleep state by the interrupt signal INT (step S8). The wireless module 470 determines whether the query is addressed to the local station based on the query address. If the query is addressed to the local station, the wireless module 470 receives the query and transmits packet data of the received query to the control unit 430. Thus, reception by the control unit 430 is started (step S9).

図10に示すように、子機#1〜#4は、それぞれ親機からクエリを受信するが、その受信動作P2は、子機#2〜#4では、初期化動作P1から一定期間だけ経過したときに行われる。また、図9Aにおいて、クエリが受信されると、MPUがウェークアップすることが示されている。   As shown in FIG. 10, slave units # 1 to # 4 each receive a query from the master unit, but the reception operation P2 of the slave units # 2 to # 4 has elapsed for a certain period from the initialization operation P1. When done. Also, FIG. 9A shows that the MPU wakes up when a query is received.

6.子機の制御部430は、受信完了後、パワーオン信号PWRONをディスエーブルし無線モジュール470をスリープ状態にする。
7.子機の制御部430は、受信した状態通知間隔Tを基にスリープ時間Tslpを算出し、スリープ時間をスリープタイマ420に設定し、タイマをスタートさせる。
8.子機の制御部430は、スリープ時間をタイムアウトすると、ウェークアップされる。そして、親機10から、例えば、センサの情報の出力を要求するコマンドを含むクエリを受信すると、無線モジュール470をウェークアップさせて送信状態にする。
6). After the reception is completed, the control unit 430 of the slave unit disables the power-on signal PWRON and puts the wireless module 470 into the sleep state.
7). The control unit 430 of the slave unit calculates the sleep time Tslp based on the received state notification interval T, sets the sleep time in the sleep timer 420, and starts the timer.
8). The control unit 430 of the slave unit is woken up when the sleep time is timed out. Then, for example, when a query including a command requesting output of sensor information is received from the base unit 10, the wireless module 470 is woken up to be in a transmission state.

図11Aにおいて、制御部430は、無線モジュール470がクエリを受信すると、そこに含まれるアクセス周期Tに基づきスリープ時間Tslpを算出し(ステップS10)、スリープ時間Tslpをスリープタイマ420にセットし(ステップS11)、無線モジュール470をスリープ状態にするためのコマンドROFを無線モジュール470に出力する(ステップS12)。無線モジュール470は、コマンドROFにより、スリープ状態に移行し、例えば、無線モジュールのRF回路の電源がオフされ、低消費電力状態になる。スリープ状態であるとき、無線モジュール470は、クエリを受信することはできない。なお、ステップS12と、ステップS10、11は、いずれが先に行われても良く、あるいは同時に行われても良い。   In FIG. 11A, when the wireless module 470 receives a query, the control unit 430 calculates a sleep time Tslp based on the access period T included therein (step S10), and sets the sleep time Tslp in the sleep timer 420 (step S10). S11), a command ROF for setting the wireless module 470 to the sleep state is output to the wireless module 470 (step S12). The wireless module 470 shifts to a sleep state in response to the command ROF, for example, the power of the RF circuit of the wireless module is turned off and enters a low power consumption state. When in the sleep state, the wireless module 470 cannot receive a query. Note that either step S12 and steps S10 and S11 may be performed first or at the same time.

この様子が図10に示されている。子機#1〜#4は、スリープ時間セット動作P3でスリープ時間をスリープタイマ420に設定し、スリープタイマ420は、その設定時からスリープ時間Tslpのカウントを開始する。   This is shown in FIG. The slave units # 1 to # 4 set the sleep time in the sleep timer 420 in the sleep time setting operation P3, and the sleep timer 420 starts counting the sleep time Tslp from the setting time.

9.子機の制御部430は、周辺電源をオンにしてセンサ値、入力情報、子機タイプ等の情報を収集して親機に送信する。
10.子機の制御部430は、周辺電源をオフする。
11.子機の制御部430は、無線モジュール470をパワーダウンモード(低消費電力)にして、自分自身の電源をオフする。
9. The control unit 430 of the slave unit turns on the peripheral power supply, collects information such as sensor values, input information, and slave unit type, and transmits the collected information to the master unit.
10. The control unit 430 of the slave unit turns off the peripheral power supply.
11. The control unit 430 of the slave unit sets the wireless module 470 in the power down mode (low power consumption) and turns off its own power supply.

図11Bにおいて、制御部430は、クエリのファンクションを実行するべく、図示しない周辺部電源ロードを起動させ(ステップS13)、センサ等の情報を収集し(ステップS14)、収集を終了した後、周辺部電源ロードをオフする(ステップS15)。制御部430はまた、収集した情報を親機10に送信するため応答メッセージを作成する。次に、制御部は、無線モジュール470に対してRF回路の電源をオンするためのコマンドRONを送信し(ステップS16)、これにより、無線モジュール470はウェークアップされ、送信可能な状態になる。次に、制御部430は、作成された応答メッセージのパケットデータを無線モジュール470に送信し、無線モジュール470が応答メッセージを親機10に送信する(ステップS17)。制御部430は、無線モジュール470から応答メッセージの送信終了の通知を受け取ると、無線モジュール470をパワーダウンモードにするためパワーオン信号PWRONをオフにする(ステップS18)。無線モジュール470は、制御部430によりパワーオン信号PWRONがオンされるまで(ステップS3)、パワーダウンモードを継続する。制御部430は、上記の一連の動作をするや否や、電源ロード制御回路410にDC/DCコンバータ402を停止させるための信号STPを送信し、これにより、DC/DCコンバータ402の動作が停止され(ステップS19)、制御部430は、電源遮断状態となる(ステップS20)。制御部430は、スリープタイマ420に設定されたスリープ時間Tslpの間、電源遮断状態であり、スリープタイマ420がスリープ時間をカウントすると、タイムオーバー信号TMOが電源ロード制御回路440に出力され、これに応答して電源ロード制御回路440は、DC/DCコンバータ402にイネーブル信号ENを出力し、制御部430にリセット信号RESET2が入力されて内部初期化が開始され(ステップS3)、無線モジュール470がパワーオンモードになる。   In FIG. 11B, the control unit 430 activates a peripheral power supply load (not shown) to execute a query function (step S13), collects information such as sensors (step S14), The part power supply load is turned off (step S15). The control unit 430 also creates a response message for transmitting the collected information to the parent device 10. Next, the control unit transmits a command RON for turning on the power of the RF circuit to the wireless module 470 (step S16), whereby the wireless module 470 is woken up and becomes ready for transmission. Next, control unit 430 transmits the packet data of the created response message to wireless module 470, and wireless module 470 transmits the response message to base unit 10 (step S17). When receiving the notification of the end of transmission of the response message from the wireless module 470, the control unit 430 turns off the power-on signal PWRON to place the wireless module 470 in the power down mode (step S18). The wireless module 470 continues the power down mode until the power on signal PWRON is turned on by the control unit 430 (step S3). As soon as the above-described series of operations is performed, the control unit 430 transmits a signal STP for stopping the DC / DC converter 402 to the power load control circuit 410, whereby the operation of the DC / DC converter 402 is stopped. (Step S19), the control part 430 will be in a power-off state (step S20). The control unit 430 is in a power-off state during the sleep time Tslp set in the sleep timer 420. When the sleep timer 420 counts the sleep time, a time over signal TMO is output to the power load control circuit 440 and responds to this. Then, the power load control circuit 440 outputs the enable signal EN to the DC / DC converter 402, the reset signal RESET2 is input to the control unit 430, internal initialization is started (step S3), and the wireless module 470 is powered on. Become a mode.

図9Aにおいて、子機20は、スリープタイマを起動し、かつ応答メッセージを送信すると、その後、電源オフとなり、スリープ時間Tslpが経過したとき、MPUが電源オンし、無線モジュールがウェークアップされることが示されている。また、図10において、子機は、スリープ時間セット動作P3が終了するや否や、スリープ時間Tslpのタイマが起動され、応答送信動作P4の終了後に、子機の電源がオフされ、スリープ時間Tslpがタイムアウトしたとき、子機の電源がオンされることが示されている。   In FIG. 9A, when the slave unit 20 starts the sleep timer and transmits a response message, the slave unit 20 is powered off, and when the sleep time Tslp elapses, the MPU is powered on and the wireless module is woken up. It is shown. In FIG. 10, the slave unit starts the sleep time Tslp timer as soon as the sleep time setting operation P3 ends, and after the response transmission operation P4 ends, the slave unit is turned off and the sleep time Tslp is set to It is shown that the power of the slave unit is turned on when the timeout occurs.

12.親機10は、子機から受信した情報をホスト装置30に送信する。親機10は、(TMx=T/子機台数n、本例では、TM1=TM2=TM3=TM4)を子機1台の処理時間として、上記3〜11の処理を全子機に対して行う。
13.親機は、全ての子機へのアクセスが完了した時点で、ホスト装置30にスリープ時間に関する設定があるか否かを問合せする。あればスリープ時間の設定内容を変更する。具体的には、アクセス周期Tを変更する。
12 Master device 10 transmits information received from the slave device to host device 30. The master unit 10 performs the above processes 3 to 11 for all slave units, with (TMx = T / number of slave units n, in this example, TM1 = TM2 = TM3 = TM4) as the processing time of one slave unit. Do.
13. When the access to all the child devices is completed, the parent device inquires of the host device 30 whether there is a setting relating to the sleep time. If there is, change the sleep time settings. Specifically, the access cycle T is changed.

それぞれの子機のスリープ時間Tslpは、同じであるが、各子機間においてスリープ時間がTMだけずれる。子機は、電源投入後に限り、親機からアクセスがあるまで、受信状態が続く。   The sleep times Tslp of the respective slave units are the same, but the sleep time is shifted by TM between the respective slave units. Only after the power is turned on, the slave unit continues to receive until it is accessed from the master unit.

通常時
1.子機は、スリープタイマ420だけが動作している状態である。
2.子機のスリープタイマ420は、スリープ時間Tslpがタイムアウトになった時点で、割込みを発生させ子機のMPUの電源をオンにする。
Normal time The slave unit is in a state where only the sleep timer 420 is operating.
2. The sleep timer 420 of the slave unit generates an interrupt and turns on the power of the MPU of the slave unit when the sleep time Tslp times out.

図7に示すように、スリープタイマ420は、タイムアウトになった時点で、タイムオーバー信号TMOを電源ロード制御回路440に出力し、これに応答して電源ロード制御回路440がDC/DCコンバータ402を起動させ、制御部430への電源がオンされる。1つの好ましい例では、子機は、親機がアクセスする時点よりも一定時間Tp前(例えば、100ms)に電源オンされる。上記したように、スリープ時間Tslpは、
Tslp=T−Trst−Tini−Trcv−Tst
で算出される。
親機がアクセスする周期Tよりも前に子機が電源オンされる時間Tpは、
Tp=Trst+Tini+Trcv+Tst
となる。
As shown in FIG. 7, the sleep timer 420 outputs a time over signal TMO to the power load control circuit 440 at the time of timeout, and the power load control circuit 440 activates the DC / DC converter 402 in response thereto. Then, the power supply to the control unit 430 is turned on. In one preferable example, the slave unit is powered on a certain time Tp before the master unit accesses (for example, 100 ms). As described above, the sleep time Tslp is
Tslp = T-Trst-Tini-Trcv-Tst
Is calculated by
The time Tp when the slave unit is turned on before the period T when the master unit accesses is:
Tp = Trst + Tini + Trcv + Tst
It becomes.

3.子機のMPUは、電源が投入(Power On)されると自身の初期化を行い、無線モジュール470のみを動作状態にして自分自身はスリープ状態に入る。
4.親機は、ホストから受信した状態通知間隔T、またはデフォルト値を子機のスリープ時間としてクエリのメッセージの中に付加して子機に送信する。子機のアクセスは、常に子機のアドレスの若い順に行う。
5.子機の無線モジュール470は、受信待ち状態にあり、受信した宛先アドレスが自局なら、受信動作を継続すると同時にMPUに割込みを発生する。
6.子機のMPUは、前記割込みでスリープ状態からウェークアップして動作状態となり、WMからの受信を開始する。
7.子機のMPUは、受信完了後、無線モジュール470のRF回路の電源をオフにしスリープ状態にする。
8.子機のMPUは、受信した状態通知間隔Tを基づきスリープ時間Tslpを算出し、算出したスリープ時間Tslpをスリープタイマ420に設定し、タイマをスタートさせる。
9.子機のMPUは、無線モジュール470のRF回路の電源をオンにしてウェークアップし送信状態にする。
10.子機のMPUは、周辺電源をオンにしてセンサ値、入力情報、子機タイプ等の情報を収集して親機に送信する。
11.子機のMPUは、周辺電源をオフする。
12.子機のMPUは、無線モジュール470をパワーダウンモードにして、自分自身の電源をオフする。
13.親機は、子機から受信した情報をホストに送信する。
14.親機は、(TMx=T/子機台数n)を子機1台の処理時間として上記3〜11の処理を全子機に対して行う。
15.親機は、全ての子機へのアクセスが完了した時点で、ホストにスリープ時間等の設定があるか否かを問合せする。あればスリープ時間等の設定内容を変更する。
また、親機は、子機に対して電池残量を問い合わせるクエリを発行することができ、親機は、子機から受信した電池残量が閾値未満のものが1台でもあれば、子機の状態通知周期Tを延長する。それぞれの子機のスリープ時間Tslpは、同じ値であるが、それぞれの子機間においてスリープ時間は、TM時間だけずれる。
3. When the power is turned on (Power On), the slave MPU initializes itself, sets only the wireless module 470 in an operating state, and enters the sleep state.
4). The parent device adds the status notification interval T received from the host or the default value to the slave device as a sleep time of the child device and transmits it to the child device. The slave units are always accessed in ascending order of the slave unit addresses.
5. If the wireless module 470 of the slave unit is in a reception waiting state and the received destination address is its own station, it continues the reception operation and simultaneously generates an interrupt to the MPU.
6). The MPU of the slave unit wakes up from the sleep state by the interrupt and enters an operation state, and starts receiving from the WM.
7). After completion of reception, the slave unit MPU turns off the power of the RF circuit of the wireless module 470 to enter the sleep state.
8). The MPU of the slave unit calculates the sleep time Tslp based on the received state notification interval T, sets the calculated sleep time Tslp in the sleep timer 420, and starts the timer.
9. The MPU of the slave unit turns on the power of the RF circuit of the wireless module 470 and wakes up to enter the transmission state.
10. The MPU of the slave unit turns on the peripheral power supply, collects information such as sensor values, input information, and slave unit type, and transmits the collected information to the master unit.
11. The MPU of the slave unit turns off the peripheral power supply.
12 The slave MPU puts the wireless module 470 into a power-down mode and turns off its own power supply.
13. The master unit transmits the information received from the slave unit to the host.
14 The parent device performs the above processes 3 to 11 on all the child devices with (TMx = T / number of child devices n) as the processing time of one child device.
15. When the access to all the child devices is completed, the parent device inquires of the host whether there is a setting such as a sleep time. If there is, change the settings such as sleep time.
In addition, the master unit can issue a query for inquiring the remaining battery level to the slave unit. If the master unit receives at least one battery remaining from the slave unit that is less than the threshold, The state notification cycle T is extended. The sleep times Tslp of the respective slave units are the same value, but the sleep time is shifted by TM time between the respective slave units.

図11A、図11Bは、子機のMPU(制御部430)とWM(無線モジュール470)の動作を説明する遷移図である。
S1.MPU側;バッテリーのパワーオンで、リセット回路410が信号RESET1を出力
WM側;信号PWRONにより電源オン
S2.MPU側;電源ロード制御回路440に信号RESET1が入力され、DC/DCコンバータ402が起動し、リセット回路412が信号RESET2を出力
WM側;パワーダウン状態(低消費電力)
S3.MPU側;MPUに信号RESET2が入力され、MPUの内部が初期化され、WMの信号PWRONをオンにし、信号RESET3をWMに入力
WM側;パワーダウンモードからパワーオンモードに移行
S4.MPU側;62ms待ち
WM側;ハード的な内部初期化(外部からのアクセス不可;60ms)
S5.MPU側;WMの内部レジスタの初期化
WM側;MPUからのデータを各レジスタに設定、完了通知
S6.MPU側;受信監視タイマをスタート
WM側;親機からの受信待ち状態
S7.MPU側;スリープ状態に移行
WM側;親機からの受信待ち状態で、受信時、MPUに割込み発生(外部割込み)
S8.MPU側;WMからの割込みでスリープ状態からウェークアップ
WM側;受信動作
S9.MPU側;受信動作
WM側;受信動作及び完了通知
S10.MPU側;受信した状態通知期間Tからスリープ時間Tslpを算出
WM側;動作状態
S11.MPU側;スリープ時間Tslpをスリープタイマ420に設定して、タイマをスタート
WM側;動作状態
S12.MPU側;前記完了通知でWMをスリープ状態にする
WM側;スリープ状態
S13.MPU側;周辺回路電源ロード(電源ロード制御回路)
WM側;スリープ状態
S14.MPU側;センサ等の情報収集
WM側;スリープ状態
S15.MPU側;周辺回路電源ノーロード
WM側;スリープ状態
S16.MPU側;WMをウェークアップ
WM側;ウェークアップして、動作状態に移行
S17.MPU側;親機に応答パケット送信
WM側;親機に送信及びMPUに完了通知
S18.MPU側;前記完了通知確認し、WMの信号PWRONをオフにしてパワーダウンモードにする
WM側;パワーダウンモードに移行
S19.MPU側;ディスイネーブル信号DISによりDC/DCコンバータをオフ
WM側;パワーダウン状態
20.MPU側;パワーダウン状態
WM側;パワーダウン状態
スリープタイマ420がスリープ時間Tslpをタイムアウトした時点で、信号TMOが電源ロード制御回路420へ出力され、DC/DCコンバータ402がオンし、S3へ。
11A and 11B are transition diagrams for explaining the operations of the MPU (control unit 430) and the WM (wireless module 470) of the slave unit.
S1. MPU side: When battery is powered on, reset circuit 410 outputs signal RESET1 WM side: Power on by signal PWRON S2. MPU side: The signal RESET1 is input to the power load control circuit 440, the DC / DC converter 402 is activated, and the reset circuit 412 outputs the signal RESET2. WM side: Power-down state (low power consumption)
S3. MPU side: Signal RESET2 is input to MPU, the inside of MPU is initialized, WM signal PWRON is turned on, and signal RESET3 is input to WM WM side: Transition from power-down mode to power-on mode S4. MPU side: 62 ms wait WM side: Hardware internal initialization (access from outside is impossible; 60 ms)
S5. MPU side: initialization of internal register of WM WM side: data from MPU is set in each register, completion notification S6. MPU side: Start reception monitoring timer WM side: Waiting for reception from master unit S7. MPU side: Transition to sleep state WM side: MPU interrupt occurs when receiving in the standby state of receiving from the main unit (external interrupt)
S8. MPU side: Wake-up from sleep state by interrupt from WM WM side: Reception operation S9. MPU side: reception operation WM side: reception operation and completion notification S10. MPU side; calculates sleep time Tslp from the received state notification period T WM side: operating state S11. MPU side; set sleep time Tslp to sleep timer 420 and start timer WM side; operating state S12. MPU side; puts WM in sleep state by the completion notification WM side: sleep state S13. MPU side; peripheral circuit power load (power load control circuit)
WM side; sleep state S14. MPU side; collecting information such as sensors WM side; sleep state S15. MPU side; peripheral circuit power supply no load WM side; sleep state S16. MPU side: wakes up the WM WM side: wakes up and shifts to the operating state S17. MPU side: Response packet transmission to master unit WM side: Transmission to master unit and completion notification to MPU S18. MPU side; confirms the completion notification and turns off the signal PWRON of the WM to enter the power down mode. WM side; shifts to the power down mode S19. MPU side: DC / DC converter is turned off by disenable signal DIS WM side: Power down state 20. MPU side; power down state WM side; power down state When the sleep timer 420 times out the sleep time Tslp, the signal TMO is output to the power load control circuit 420, the DC / DC converter 402 is turned on, and the process proceeds to S3.

図12は、親機のMPU(制御部)とWM(無線モジュール)の動作を説明する遷移図である。
Q1.電源オン
Q2.MPU内部初期化
Q3.MPUからのWMの内部レジスタの初期化
Q4.最初の子機(アドレス;#01)へのパケット準備
Q5.TMの値でリアルタイマスタート
TM=T/子機台数n(子機1台当たりの処理時間)
Q6.子機にパケット送信
Q7.送信完了後、子機からの受信待ち
受信完了⇒Q9へ(正常受信)
TM=タイムアウトしたとき、ステップS8(子機から応答なし)
Q8.次の子機のパケットを準備
⇒ステップS5へ
Q9.子機からの受信パケットをホストに送信
最終子機以外で完了⇒ステップS10へ
最終子機で完了⇒ステップQ11へ
Q10.次の子機のパケット準備
⇒ステップQ12へ
Q11.ホストに情報要求
ホストから情報を受信
⇒ステップQ10へ
Q12.TMのタイムアウト待ち
タイムアウト⇒ステップQ5へ
FIG. 12 is a transition diagram for explaining the operations of the MPU (control unit) and the WM (wireless module) of the master unit.
Q1. Power on Q2. MPU internal initialization Q3. Initialization of WM internal register from MPU Q4. Packet preparation for the first slave unit (address; # 01) Q5. Real timer start with TM value TM = T / number of slave units n (processing time per slave unit)
Q6. Send packet to slave unit Q7. Wait for reception from the slave unit after transmission is completed.
When TM = time out, step S8 (no response from slave unit)
Q8. Prepare the next slave unit packet ⇒ Go to step S5 Q9. Send the received packet from the slave unit to the host. Completion in other than the final slave unit ⇒ Go to step S10 Complete in the final slave unit ⇒ Go to step Q11 Packet preparation for the next slave unit ⇒ Go to step Q12 Q11. Request information from host Receive information from host ⇒ Go to step Q10 Q12. TM time-out waiting time-out ⇒ go to step Q5

ここで留意すべきは、子機の接続台数がnであるとき、1つまたは複数の子機が歯抜け状態(非接続状態)になったとしても、親機は、予め決められた順序(例えば、アドレスが若い順)で全てのn個の子機をアクセスする。仮に、歯抜けとなった子機が存在しても、その子機からの応答がないだけであり、全ての子機をアクセスする周期Tは変わらないため、親機がアクセスする周期と子機がウェークアップする周期との同期は維持される。   It should be noted here that when the number of connected slave units is n, even if one or a plurality of slave units are in a tooth-missing state (non-connected state), the master unit has a predetermined order ( For example, all n child devices are accessed in ascending order of address). Even if there is a slave unit that has lost teeth, there is no response from the slave unit, and the period T for accessing all the slave units does not change. Synchronization with the wake-up period is maintained.

図13は、本発明の実施例に係る無線通信センサシステムの全体構成を示す図である。図1に示す無線通信センサシステム1は、親機10と子機20を直接無線接続しているが、図13に示すように、親機10と子機20の間に、無線通信を媒介する中継機40を含む構成であっても良い。これにより、図1に示す無線通信センサシステム1と機能面では変わらないものの、親機10と子機20が直接無線通信できないほど離れている場合であっても、システムを構成することが可能となる。   FIG. 13 is a diagram illustrating an overall configuration of a wireless communication sensor system according to an embodiment of the present invention. The wireless communication sensor system 1 shown in FIG. 1 directly connects the parent device 10 and the child device 20 wirelessly, but mediates wireless communication between the parent device 10 and the child device 20 as shown in FIG. A configuration including the repeater 40 may be used. Thereby, although it does not change in function from the wireless communication sensor system 1 shown in FIG. 1, it is possible to configure the system even when the parent device 10 and the child device 20 are so far away that direct wireless communication is not possible. Become.

なお、上記実施例では、子機が親機からアクセス周期Tまたはスリープ情報を受け取り、子機自身がスリープ時間Tslpを算出し、これをタイマに設定させたが、これに限らず、親機が全ての子機に対してスリープ時間Tslpを送信し、子機がスリープ時間Tslpを設定することも可能である。   In the above embodiment, the slave unit receives the access cycle T or the sleep information from the master unit, and the slave unit itself calculates the sleep time Tslp and sets it to the timer. It is also possible to transmit the sleep time Tslp to all the slave units, and the slave unit can set the sleep time Tslp.

本発明の実施例に係る無線通信センサシステムによれば、次のような効果を奏する。
・親機と子機間の双方向通信での電池駆動を実現できる。
・親機と子機間の双方向通信が可能なので、子機への情報の設定および変更をシステムのオンライン中に行うことができる。
・親機は、クエリの発行を全ての子機一周するたびに、子機のスリープ時間を算出して、それを子機に送り、子機がそれをスリープタイマとするので、タイマの精度が保証される。
・親機から子機へのクエリは、毎回、全子機に行うので、途中でシステムに参加する子機にもスリープ時間を設定することができる。また、子機の電源を落として、一時的にシステムから切離して、再度、電源を投入してシステムに参加する場合も同様である。
・全体の通信プロトコルに子機のタイプを設けて、そのタイプを予めシステムに登録しておくことにより、子機のプラグ・アンド・プレイも可能となる。
・本実施例による方式は、親機と子機の間に中継機があっても親機からのアクセスが中継機の処理時間分遅れるだけなので、影響を受けない。
The wireless communication sensor system according to the embodiment of the present invention has the following effects.
・ Battery drive can be realized through two-way communication between the master and slave units.
-Since two-way communication is possible between the master unit and the slave unit, information can be set and changed on the slave unit while the system is online.
-The master unit calculates the sleep time of the slave unit and sends it to the slave unit every time it issues a query, and the slave unit uses it as a sleep timer. Guaranteed.
-Since the query from the master unit to the slave units is performed for all the slave units every time, the sleep time can be set for the slave units participating in the system on the way. The same applies to the case where the slave unit is turned off, temporarily disconnected from the system, and then turned on again to participate in the system.
-By providing a slave unit type in the entire communication protocol and registering that type in the system in advance, it becomes possible to plug and play the slave unit.
The method according to the present embodiment is not affected even if there is a repeater between the master unit and the slave unit, because access from the master unit is only delayed by the processing time of the repeater.

次に、本発明の第2の実施例について説明する。本実施例は、親機と子機の間の同期補正に関する。経時的変化やその他の要因により親機と子機間の同期に誤差が蓄積すると、最終的に親機と子機の同期がズレ、良好なデータ通信を行うことができなくなる。第2の実施例は、親機と子機間の同期ズレが生じた場合、同期を補正する。   Next, a second embodiment of the present invention will be described. This embodiment relates to synchronization correction between a parent device and a child device. If errors accumulate in the synchronization between the parent device and the child device due to changes over time or other factors, the synchronization between the parent device and the child device will eventually shift, and good data communication cannot be performed. In the second embodiment, when a synchronization shift occurs between the parent device and the child device, the synchronization is corrected.

図14は、本発明の第2の実施例に係る通信制御プログラムの機能的な構成を示す図である。本実施例の通信制御プログラム200Aは、図3に示す構成に加えて、親機と子機との間の同期を補正する同期補正部260を含む。同期補正部260は、親機と子機間の同期のズレが検出されたとき、親機と子機間の同期を補正する。同期補正部260は、図14(B)に示すように、同期ズレ判定部262、およびサイクル時間/回数算出部264を含んで構成される。   FIG. 14 is a diagram showing a functional configuration of a communication control program according to the second embodiment of the present invention. The communication control program 200A of the present embodiment includes a synchronization correction unit 260 that corrects synchronization between the parent device and the child device in addition to the configuration shown in FIG. The synchronization correction unit 260 corrects the synchronization between the parent device and the child device when a synchronization shift between the parent device and the child device is detected. As shown in FIG. 14B, the synchronization correction unit 260 includes a synchronization deviation determination unit 262 and a cycle time / number of times calculation unit 264.

親機のタイマや子機のタイマには、デバイスの動作環境(特に温度)、バッテリー残量等の要因により微小に誤差が発生し、その誤差が累積されると、親機と子機間の同期がとれなくなり、特に子機のスリープ時間が長時間になると同期が取り難くなる。そうすると、親機から子機をアクセスしたときに、子機がウェークアップしていないという事態が生じてしまう。言い換えれば、親機が子機をアクセスした後に子機がウェークアップし、子機は、親機からのアクセスを待ち続けるという事態が生じ得る。   A small error occurs in the timer of the master unit and the timer of the slave unit due to factors such as the operating environment of the device (especially temperature) and the remaining battery level. Synchronization is lost, especially when the slave unit sleeps for a long time. Then, when the child device is accessed from the parent device, a situation occurs in which the child device is not waked up. In other words, a situation may occur in which the slave unit wakes up after the master unit accesses the slave unit, and the slave unit continues to wait for access from the master unit.

同期ズレ判定部262は、子機からの応答メッセージを受信することが予期される期間内に応答メッセージを受信することができないとき、当該子機との間の同期が取れていない、つまり同期ズレと判定する。 The synchronization deviation determination unit 262 , when unable to receive a response message within a period expected to receive a response message from the slave unit, is not synchronized with the slave unit, that is, the synchronization deviation. Is determined.

サイクル時間/回数算出部264は、同期ズレ判定部262により同期補正が必要である判定された場合、対象の子機を同期補正するためのスリープ時間とその回数を算出する。具体的には、サイクル時間/回数算出部264は、親機のアクセス周期Tを変更することなく、子機のスリープ時間を何等分化した同期補正用のスリープ時間を算出する。例えば、子機のスリープ時間が10分であるとき、同期補正用のスリープ時間として1分が算出され、その回数として10が算出される。つまり、同期補正用のスリープ時間×回数は、子機のスリープ時間に等しいか、ほぼ等しくなるように算出される。   When the synchronization deviation determination unit 262 determines that the synchronization correction is necessary, the cycle time / number calculation unit 264 calculates the sleep time and the number of times for performing the synchronization correction of the target child device. Specifically, the cycle time / number-of-times calculation unit 264 calculates the sleep time for synchronization correction obtained by dividing the sleep time of the slave unit in any way without changing the access cycle T of the master unit. For example, when the sleep time of the slave unit is 10 minutes, 1 minute is calculated as the sleep time for synchronization correction, and 10 is calculated as the number of times. That is, the sleep time for synchronization correction × number of times is calculated to be equal to or substantially equal to the sleep time of the slave unit.

同期ズレ判定部262により子機の同期補正が必要であると判定されると、クエリ作成部210は、対象の子機のデバイスアドレスと、図14(C)に示すようなファンクションコードFdと、同期補正用のスリープ時間/回数に関する補正データを有するクエリを作成し、クエリ送信部230は、作成されたクエリを対象の子機に送信する。ファンクションコードFdは、子機に、同期補正のためのスリープ時間とその回数を設定させるための命令である。 When the synchronization deviation determination unit 262 determines that the synchronization correction of the slave unit is necessary, the query creation unit 210 displays the device address of the target slave unit, the function code Fd as shown in FIG. A query having correction data regarding the sleep time / number of times for synchronization correction is created, and the query transmission unit 230 transmits the created query to the target child device. The function code Fd is a command for causing the slave unit to set the sleep time and the number of times for synchronization correction.

図15に、親機の同期補正シーケンスのフローを示す。親機の同期補正部260は、複数の子機をアクセス周期Tでアクセスし、各子機からの応答メッセージを一定期間内に受信したか否かをチェックする(S100)。同期補正部260は、期間内に応答メッセージを受信することができなかった場合には、当該子機との同期が外れているため、当該子機との間の同期補正が必要と判定する(S102)。次に、サイクル時間/回数算出部264は、同期補正用のスリープ時間とその回数を算出し(S104)、クエリ作成部210は、同期補正用のスリープ時間/回数に関する補正データとファンクションコードFdとを含むクエリを作成し、これを該当する子機に送信する(S106)。子機は、補正データに基づき同期補正を実施し(S108)、子機から同期終了を受信すると、同期補正部260は、子機の同期補正を終了する(S110)。   FIG. 15 shows a flow of the synchronization correction sequence of the master unit. The synchronization correction unit 260 of the parent device accesses the plurality of child devices at the access cycle T and checks whether or not a response message from each child device has been received within a certain period (S100). If the synchronization correction unit 260 cannot receive the response message within the period, the synchronization correction unit 260 determines that synchronization correction with the child device is necessary because the synchronization with the child device is lost ( S102). Next, the cycle time / number of times calculation unit 264 calculates the sleep time for synchronization correction and the number of times (S104), and the query creation unit 210 sets the correction data regarding the sleep time / number of times for synchronization correction, the function code Fd, Is created and transmitted to the corresponding slave unit (S106). The slave unit performs synchronization correction based on the correction data (S108), and upon receiving the synchronization end from the slave unit, the synchronization correction unit 260 ends the synchronization correction of the slave unit (S110).

図16に、第2の実施例による子機の要部回路の構成を示す。第2の実施例の子機の要部回路は、図7に示す第1の実施例の要部回路にカウンタ480を追加したものであり、これ以外の構成は実質的に同じである。また、図17に、第2の実施例に係る制御部430の機能的な構成を示す。第2の実施例の制御部430の機能的な構成は、図8に示す第1の実施例の構成に、同期補正実行部570を追加したものであり、これ以外の構成は実質的に同じである。   FIG. 16 shows the configuration of the main circuit of the slave unit according to the second embodiment. The main circuit of the slave unit of the second embodiment is obtained by adding a counter 480 to the main circuit of the first embodiment shown in FIG. 7, and the other configuration is substantially the same. FIG. 17 shows a functional configuration of the control unit 430 according to the second embodiment. The functional configuration of the control unit 430 of the second embodiment is obtained by adding a synchronization correction execution unit 570 to the configuration of the first embodiment shown in FIG. 8, and other configurations are substantially the same. It is.

同期補正実行部570は、親機から受信したクエリに含まれるファンクションコードFdに従い、補正データに含まれる同期補正用のスリープ時間と回数をスリープタイマ420およびカウンタ480に設定する。具体的には、子機は、同期補正用のスリープ時間Tslpを、第1の実施例のときと同様に、以下の式に従い算出し、算出したスリープ時間Tslpをスリープタイマ420に設定する。
Tslp=T−Trst−Tini−Trcv−Tst
(Trstは子機内部のリセット時間、Tiniは子機内部の初期化時間、Trcvは親機の送信時間+子機の受信時間、Tstはスリープタイマ設定とタイマスタートまでの時間)。
The synchronization correction execution unit 570 sets the sleep time and the number of times for synchronization correction included in the correction data in the sleep timer 420 and the counter 480 according to the function code Fd included in the query received from the parent device. Specifically, the slave unit calculates the sleep time Tslp for synchronization correction according to the following formula, similarly to the case of the first embodiment, and sets the calculated sleep time Tslp in the sleep timer 420.
Tslp = T-Trst-Tini-Trcv-Tst
(Trst is the reset time inside the slave unit, Tini is the initialization time inside the slave unit, Trcv is the transmission time of the master unit + the reception time of the slave unit, and Tst is the time until the sleep timer setting and timer start).

制御部430は、第1の実施例のとき同様に、スリープ時間Tslpの期間中パワーオフであり、スリープタイマ420がタイムアウトになった時点でパワーオンされる。同期補正実行部570は、制御部430がパワーオンされると、カウンタ480の値をデクリメントする(「−1」だけ減少させる)。親機からアクセスがあったとき、同期補正実行部570は、カウンタ480の値を参照し、カウント値が「1」または「0」でなければ、親機への応答メッセージの作成および送信を中止し、カウント値が「1」になると、同期完了の応答メッセージを作成しこれを親機へ送信させる。また、カウント値が「0」になると、同期補正実行部570による同期補正動作は行わず、通常の動作が行われる。   As in the first embodiment, the control unit 430 is powered off during the sleep time Tslp, and is powered on when the sleep timer 420 times out. When the control unit 430 is powered on, the synchronization correction execution unit 570 decrements the value of the counter 480 (decreases by “−1”). When there is an access from the parent device, the synchronization correction execution unit 570 refers to the value of the counter 480, and if the count value is not “1” or “0”, it stops creating and sending a response message to the parent device When the count value is “1”, a synchronization completion response message is generated and transmitted to the parent device. When the count value becomes “0”, the synchronization correction operation by the synchronization correction execution unit 570 is not performed, and the normal operation is performed.

図18(A)は、親機と子機の同期が取れているときのタイミングチャート、図18(B)は、親機と子機の同期が取れていないときのタイミングチャートである。同期が取られている場合、時刻t1で、子機はスリープ時間がタイムアップし、ウェークアップする。時間Tp(Tp=Trst+Tini+Trcv+Tst)は、時刻t1から時刻t2の間である。親機のアクセスTac_1は、時刻t2から時刻t3までの一定時間Tg内に行われる。一定時間Tgは、親機と子機との同期を許容することができる時間である。親機Tac_1が時間Tg内に行われると、子機は、親機からのクエリを受信し、クエリに対する応答メッセージを送信した後、スリープ状態になる。   FIG. 18A is a timing chart when the parent device and the child device are synchronized, and FIG. 18B is a timing chart when the parent device and the child device are not synchronized. If synchronization is established, at time t1, the slave unit times up and wakes up. Time Tp (Tp = Trst + Tini + Trcv + Tst) is between time t1 and time t2. Access Tac_1 of the parent device is performed within a certain time Tg from time t2 to time t3. The fixed time Tg is a time during which the synchronization between the parent device and the child device can be allowed. When the parent device Tac_1 is performed within the time Tg, the child device receives a query from the parent device and transmits a response message to the query, and then enters a sleep state.

一方、親機と子機の同期が外れた場合には、図18(B)に示すように、親機からのアクセスTac_1があったとき、子機は、未だスリープ状態である。それ故、親機からのクエリは子機に受信されず、子機からの応答メッセージは親機に返信されない。その後、時刻t3で子機がウェークアップし、子機は、親機からのアクセスを待ち続ける。そして、親機の次のアクセスTac_2があったとき、子機は、親機からのクエリに対する応答メッセージを送信することになる。   On the other hand, when the synchronization between the parent device and the child device is lost, as shown in FIG. 18B, when there is an access Tac_1 from the parent device, the child device is still in the sleep state. Therefore, a query from the parent device is not received by the child device, and a response message from the child device is not returned to the parent device. Thereafter, the slave unit wakes up at time t3, and the slave unit continues to wait for access from the master unit. When there is the next access Tac_2 of the parent device, the child device transmits a response message to the query from the parent device.

図18(C)は、本実施例による同期補正を説明するタイミングチャートである。ここでは、子機の台数が16であり、16番目の子機の同期を補正するものとする。また、同期補正用のスリープ時間は、子機のスリープ時間を16等分した時間とし、その回数を16とする。さらに16番目の子機に対する親機のアクセス周期Tacは、同期補正用のスリープ時間の間隔よりも短いものとし、C1、C2、C3〜C16は、親機からのアクセスがあったタイミングである。   FIG. 18C is a timing chart for explaining the synchronization correction according to the present embodiment. Here, the number of slave units is 16, and the synchronization of the 16th slave unit is corrected. The sleep time for synchronization correction is a time obtained by dividing the sleep time of the slave unit into 16 equal parts, and the number of times is 16. Further, the access cycle Tac of the parent device for the 16th child device is shorter than the interval of the sleep time for synchronization correction, and C1, C2, C3 to C16 are timings when there is an access from the parent device.

動作
C1:子機のスリープタイマ420は、スリープ時間Tslpの値がタイムアウトになって時点で、割込みを発生させ子機のMPUの電源をオンし、親機からの補正データ(スリープ時間、回数)を含むクエリを受信する。子機の詳細な動作は、第1の実施例のときと同様であるため、説明を省略する。
・子機は、補正データを基に、実際のスリープ時間Tslpを割出し、スリープ時間をスリープタイマ420に設定し、且つ、回数をカウンタ480に保存してタイマをスタートさせる。
Tslp=T−Trst−Tini−Trcv−Tst
これは、親機がアクセスする前に、内部処理を行って、受信待ち状態なる時間である。
・子機は、親機に応答パケットを送信する。
・子機は、電源オフ状態になる。
Operation C1: The sleep timer 420 of the slave unit generates an interrupt when the value of the sleep time Tslp times out, turns on the MPU of the slave unit, and corrects data (sleep time, number of times) from the master unit Receive a query that contains. Since the detailed operation of the slave unit is the same as that in the first embodiment, the description thereof is omitted.
The slave unit calculates the actual sleep time Tslp based on the correction data, sets the sleep time in the sleep timer 420, stores the number of times in the counter 480, and starts the timer.
Tslp = T-Trst-Tini-Trcv-Tst
This is the time during which internal processing is performed and the reception wait state is entered before the parent device accesses.
-The slave unit transmits a response packet to the master unit.
・ The handset is turned off.

C2〜C14:・子機のスリープタイマ420は、スリープ時間Tslpがタイムアウトになった時点で、割込みを発生させ子機のMPUの電源オンし、親機からのアクセスを待つ。
・子機は、親機からアクセスがあった時点でカウンタ480が「0」または「1」か否かを確認する。回数が「0」でも「1」でもないので、カウンタ480を「−1」して、それを保存すると同時にスリープタイマ420をスタートさせる。
・子機は、回数が「0」または「1」でもないので、親機への応答メッセージを送信せず、親機からアクセスがあったことだけを認識して、即、電源オフ状態になる。
C2 to C14: The slave timer 420 of the slave unit generates an interrupt when the sleep time Tslp times out, turns on the MPU of the slave unit, and waits for access from the master unit.
The slave unit checks whether the counter 480 is “0” or “1” at the time of access from the master unit. Since the number of times is neither “0” nor “1”, the counter 480 is set to “−1” and saved, and at the same time, the sleep timer 420 is started.
・ Since the number of times is not “0” or “1”, the slave unit does not send a response message to the master unit, recognizes only that the master unit has accessed, and immediately turns off. .

C15:子機のスリープタイマ420は、スリープ時間Tslpがタイムアウトになった時点で、割込みを発生させ子機のMPUの電源オンし、親機からのアクセスを待つ。
・子機は、親機からのアクセスがあった時点でカウンタ480が「1」なので、親機に対して、同期終了の応答メッセージを送信する。
・子機は、親機に同期終了の応答メッセージを送信後、カウンタ480を「−1」して電源オフ状態になる。
C15: The sleep timer 420 of the slave unit generates an interrupt when the sleep time Tslp has timed out, turns on the MPU of the slave unit, and waits for access from the master unit.
Since the counter 480 is “1” at the time of access from the parent device, the child device transmits a synchronization end response message to the parent device.
The slave unit sends a synchronization end response message to the master unit, then sets the counter 480 to “−1” and enters a power-off state.

C16:・子機のスリープタイマ420は、スリープ時間Tslpがタイムアウトになった時点で、割込みを発生させ子機のMPUの電源オンし、親機からのアクセスを待つ。
・子機は、親機からのアクセスがあった時点でカウンタ480が「0」か否かを確認する。カウン値が「0」なので、親機からのクエリを受信し、通常の動作を行う。
・子機は、受信した状態通知間隔(T)を基に以下の計算をして、スリープ時間Tslpを割出し、スリープ時間をスリープタイマ420に設定し、タイマをスタートさせる。次も、親機から同期補正の指示があれば、カウンタ480には、再び回数が設定され、そうでなければカウント値は、「0」のままである。
Tslp=T−Trst−Tini−Trcv−Tst
これは、親機がアクセスする前に、内部処理を行って、受信待ち状態なる時間である。
・子機は、親機に応答メッセージを送信する。
・子機は、電源オフ状態になる。
C16: The slave timer 420 of the slave unit generates an interrupt when the sleep time Tslp times out, turns on the MPU of the slave unit, and waits for access from the master unit.
The slave unit checks whether or not the counter 480 is “0” at the time of access from the master unit. Since the count value is “0”, a query from the parent device is received and normal operation is performed.
The slave unit performs the following calculation based on the received status notification interval (T), calculates the sleep time Tslp, sets the sleep time in the sleep timer 420, and starts the timer. Next, if there is a synchronization correction instruction from the parent device, the counter 480 is set again with the number of times, otherwise the count value remains “0”.
Tslp = T-Trst-Tini-Trcv-Tst
This is the time during which internal processing is performed and the reception wait state is entered before the parent device accesses.
-The slave unit sends a response message to the master unit.
・ The handset is turned off.

子機は、スリープ時間よりも短い同期補正用のスリープ時間で繰り返しスリープ/ウェークアップを繰り返すことで(C2〜C15の処理)、親機との同期が補正される。また、同期補正用のスリープ時間と回数とをスリープ時間に一致させることで、親機は、スリープサイクル時間を変更することなく、自動的に同期が外れた子機の同期補正を行うことができる。   The slave unit repeats sleep / wake-up repeatedly with a sleep time for synchronization correction shorter than the sleep time (processing of C2 to C15), thereby correcting the synchronization with the master unit. In addition, by matching the sleep time and number of times for synchronization correction with the sleep time, the parent device can automatically perform synchronization correction of the slave device that is out of synchronization without changing the sleep cycle time. .

さらに本実施例によれば、子機毎に異なったスリープタイマ値を設定し動作させることが可能である。
親機と子機間のスリープサイクルの同期補正を行うことにより、無制限にスリープタイマ時間を設定することが可能である。
ある電池残量と環境温度からスリープタイマ時間を伸ばすことで、電池寿命の延伸を図ることも可能である。
Furthermore, according to the present embodiment, it is possible to set and operate different sleep timer values for each slave unit.
By performing the sleep cycle synchronization correction between the master unit and the slave unit, the sleep timer time can be set indefinitely.
The battery life can be extended by extending the sleep timer time from a certain remaining battery level and ambient temperature.

以上、本発明の好ましい実施の形態について詳述したが、本発明は、特定の実施形態に限定されるものではなく、特許請求の範囲に記載された本発明の要旨の範囲内において、種々の変形・変更が可能である。   The preferred embodiment of the present invention has been described in detail above, but the present invention is not limited to the specific embodiment, and various modifications can be made within the scope of the present invention described in the claims. Deformation / change is possible.

1:無線通信センサシステム 10:親機
20(20a〜20n):子機 30:ホスト装置
200:通信制御プログラム 210:クエリ作成部
220:スリープ時間情報設定部 230:クエリ送信部
240:応答メッセージ受信部 250:子機情報提供部
400:電池 402、404:DC/DC変換器
410、412:リセット回路 420:スリープタイマ
430:制御部(MPU) 440:電源ロード制御回路
450:アドレス保持部 460:割込み制御部
470:無線モジュール 480:カウンタ
1: wireless communication sensor system 10: parent device 20 (20a to 20n): child device 30: host device 200: communication control program 210: query creation unit 220: sleep time information setting unit 230: query transmission unit 240: response message reception Unit 250: handset information providing unit 400: battery 402, 404: DC / DC converter 410, 412: reset circuit 420: sleep timer 430: control unit (MPU) 440: power load control circuit 450: address holding unit 460: Interrupt control unit 470: wireless module 480: counter

Claims (6)

電池により駆動される複数の子機と、複数の子機と無線通信を行う親機とを備えた無線通信システムであって、
親機は、子機のスリープ時間に関するスリープ時間情報を含むクエリを決められたアクセス周期TMで全ての子機に送信する送信手段と、
前記クエリに対する応答メッセージを受信する受信手段と、
前記応答メッセージの受信状況に基づき子機の同期が外れているか否かを判定する判定手段と、
同期が外れていると判定した場合に、子機のスリープ時間を複数に分割した同期補正用のスリープ時間情報と同期を補正するための補正命令を含むクエリを前記送信手段に送信させる補正手段とを有し、
複数の子機の各々は、
親機からのクエリを受信する受信手段と、
受信したクエリに含まれるスリープ時間情報に基づきスリープ時間を設定し、スリープ時間を計測するスリープ設定手段と、
スリープ時間を設定するときに主要回路の電源をオフにし、スリープ時間が経過したときに主要回路の電源をオンにする電力制御手段と、
親機からのクエリに対する応答メッセージを送信する送信手段と、
前記同期補正用のスリープ時間情報と前記補正命令を含むクエリが受信された場合、前記補正命令に従い前記同期補正用のスリープ時間情報に基づくスリープ時間を前記スリープ設定手段に設定させ、複数のスリープとウェークアップを繰り返させる同期補正実行手段とを有し、
親機が複数の子機の各々をアクセスする時間と子機のスリープ時間が同期される、無線通信システム。
A wireless communication system including a plurality of slave units driven by a battery and a master unit that performs wireless communication with the plurality of slave units,
The master unit transmits a query including sleep time information regarding the sleep time of the slave unit to all the slave units at a determined access cycle TM,
Receiving means for receiving a response message to the query;
Determining means for determining whether or not the slave is out of synchronization based on the reception status of the response message;
Correction means for transmitting to the transmission means a query including a correction instruction for correcting synchronization and sleep time information for synchronization correction obtained by dividing the sleep time of the slave unit into a plurality when the synchronization time is determined to be out of sync; Have
Each of the plurality of slave units
A receiving means for receiving a query from the parent device;
A sleep setting means for setting the sleep time based on the sleep time information included in the received query and measuring the sleep time;
Power control means for turning off the power of the main circuit when setting the sleep time and turning on the power of the main circuit when the sleep time elapses;
A transmission means for transmitting a response message to the query from the master unit;
When a query including the sleep time information for synchronization correction and the correction command is received, the sleep setting unit is configured to set a sleep time based on the sleep time information for synchronization correction according to the correction command, and a plurality of sleeps Synchronization correction execution means for repeating wake-up ,
A wireless communication system in which a time when a parent device accesses each of a plurality of child devices is synchronized with a sleep time of the child devices.
前記同期補正用のスリープ時間情報に基づき設定されるスリープ時間×設定される回数は、1台の子機のスリープ時間に等しい、請求項に記載の無線通信システム。 The wireless communication system according to claim 1 , wherein the sleep time set based on the sleep time information for synchronization correction × the set number of times is equal to the sleep time of one slave unit. 親機は、子機へのアクセス周期TMを変更することなく、子機の同期補正を行う、請求項1または2に記載の無線通信システム。 The wireless communication system according to claim 1 or 2, wherein the master unit performs synchronization correction of the slave unit without changing the access cycle TM to the slave unit. アクセス周期TMは、全ての子機をアクセスするアクセス周期Tと子機の台数nとしたとき、T/nであり、親機は、アクセス周期TMの時間間隔で子機をアクセスする、請求項1ないし3いずれか1つに記載の無線通信システム。 The access cycle TM is T / n when the access cycle T for accessing all the slave units and the number n of slave units are set, and the master unit accesses the slave units at a time interval of the access cycle TM. The wireless communication system according to any one of 1 to 3. 電池により駆動される複数の子機と、複数の子機と無線通信を行う親機とを備えた無線通信システムにおける無線通信方法であって、
親機は、子機のスリープ時間に関するスリープ時間情報を含むクエリを決められたアクセス周期TMで全ての子機に送信するステップと、
前記応答メッセージの受信状況に基づき子機の同期が外れているか否かを判定するステップと、
同期が外れていると判定した場合に、子機のスリープ時間を複数に分割した同期補正用のスリープ時間情報と同期を補正するための補正命令を含むクエリを前記送信手段に送信させるステップとを有し、
複数の子機の各々は、親機から送信されたクエリを受信するステップと、
受信したクエリに含まれるスリープ時間情報に基づきスリープタイマにスリープ時間を設定しかつスリープタイマを起動させるステップと、
クエリに対する応答メッセージを送信するステップと、
応答メッセージの送信後、スリープ時間の間、主要回路の電源をオフにし、スリープ時間が経過したときに主要回路の電源をオンにするステップと、
前記同期補正用のスリープ時間情報と前記補正命令を含むクエリが受信された場合、前記補正命令に従い前記同期補正用のスリープ時間情報に基づくスリープ時間を前記スリープ設定手段に設定させ、複数のスリープとウェークアップを繰り返させるステップとを有し、
親機が複数の子機の各々をアクセスする時間と子機のスリープ時間が同期される、無線通信方法。
A wireless communication method in a wireless communication system including a plurality of slave units driven by a battery and a master unit that performs wireless communication with the plurality of slave units,
The master unit transmits a query including sleep time information related to the sleep time of the slave unit to all the slave units at a determined access cycle TM;
Determining whether or not the slave is out of synchronization based on the reception status of the response message;
A step of causing the transmission means to transmit a query including a correction time for correcting the synchronization and the sleep time information for synchronization correction obtained by dividing the sleep time of the slave unit into a plurality when the synchronization is determined to be out of sync. Have
Each of the plurality of slave units receives a query transmitted from the master unit;
Setting the sleep time in the sleep timer based on the sleep time information included in the received query and starting the sleep timer;
Sending a response message to the query;
After sending the response message, turning off the main circuit during the sleep time and turning on the main circuit when the sleep time elapses;
When a query including the sleep time information for synchronization correction and the correction command is received, the sleep setting unit is configured to set a sleep time based on the sleep time information for synchronization correction according to the correction command, and a plurality of sleeps And repeating the wake-up ,
A wireless communication method in which a time when a parent device accesses each of a plurality of child devices is synchronized with a sleep time of the child device.
同期補正用のスリープ時間情報に基づき設定されるスリープ時間×設定される回数は、1台の子機のスリープ時間に等しく、親機は、全ての子機をアクセスするアクセス周期を変更することなく、子機の同期補正を行う、請求項5に記載の無線通信方法。 The sleep time set based on the sleep time information for synchronization correction × the set number of times is equal to the sleep time of one slave unit, and the master unit changes the access cycle T for accessing all slave units. The wireless communication method according to claim 5, wherein the slave unit is corrected for synchronization.
JP2017239362A 2017-12-14 2017-12-14 Battery-driven wireless communication system and synchronization correction method Active JP6473494B1 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2017239362A JP6473494B1 (en) 2017-12-14 2017-12-14 Battery-driven wireless communication system and synchronization correction method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2017239362A JP6473494B1 (en) 2017-12-14 2017-12-14 Battery-driven wireless communication system and synchronization correction method

Publications (2)

Publication Number Publication Date
JP6473494B1 true JP6473494B1 (en) 2019-02-20
JP2019106660A JP2019106660A (en) 2019-06-27

Family

ID=65443117

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2017239362A Active JP6473494B1 (en) 2017-12-14 2017-12-14 Battery-driven wireless communication system and synchronization correction method

Country Status (1)

Country Link
JP (1) JP6473494B1 (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2020176996A (en) * 2019-04-23 2020-10-29 バックス情報システム株式会社 Measurement device and measurement method for battery life
WO2021029214A1 (en) * 2019-08-09 2021-02-18 住友電気工業株式会社 Cutting tool, holder for cutting tool, tool system, communication method, and tool for lathe turning

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2006148457A (en) * 2004-11-18 2006-06-08 Sony Corp Ranging system, transmission terminal, reception terminal, ranging method, and computer program
US20110019602A1 (en) * 2009-06-26 2011-01-27 Lg Electronics Inc. Apparatus and method for operating sleep mode
JP2011049674A (en) * 2009-08-25 2011-03-10 Nippon Telegr & Teleph Corp <Ntt> Power saving method using shared buffer in communication network and communication node
US20140112225A1 (en) * 2012-10-23 2014-04-24 Qualcomm Incorporated Systems and methods for low power wake up signal and operations for wlan
JP2015531572A (en) * 2012-10-15 2015-11-02 エルジー エレクトロニクス インコーポレイティド Method and apparatus for maintaining cooperation in a wireless LAN system
JP2016509437A (en) * 2013-01-31 2016-03-24 クゥアルコム・インコーポレイテッドQualcomm Incorporated Method and apparatus for low power wakeup signal and operation for WLAN

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2006148457A (en) * 2004-11-18 2006-06-08 Sony Corp Ranging system, transmission terminal, reception terminal, ranging method, and computer program
US20110019602A1 (en) * 2009-06-26 2011-01-27 Lg Electronics Inc. Apparatus and method for operating sleep mode
JP2012531799A (en) * 2009-06-26 2012-12-10 エルジー エレクトロニクス インコーポレイティド Sleep mode operation method and apparatus
JP2011049674A (en) * 2009-08-25 2011-03-10 Nippon Telegr & Teleph Corp <Ntt> Power saving method using shared buffer in communication network and communication node
JP2015531572A (en) * 2012-10-15 2015-11-02 エルジー エレクトロニクス インコーポレイティド Method and apparatus for maintaining cooperation in a wireless LAN system
US20140112225A1 (en) * 2012-10-23 2014-04-24 Qualcomm Incorporated Systems and methods for low power wake up signal and operations for wlan
JP2016509437A (en) * 2013-01-31 2016-03-24 クゥアルコム・インコーポレイテッドQualcomm Incorporated Method and apparatus for low power wakeup signal and operation for WLAN

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2020176996A (en) * 2019-04-23 2020-10-29 バックス情報システム株式会社 Measurement device and measurement method for battery life
WO2021029214A1 (en) * 2019-08-09 2021-02-18 住友電気工業株式会社 Cutting tool, holder for cutting tool, tool system, communication method, and tool for lathe turning
JPWO2021029214A1 (en) * 2019-08-09 2021-09-30 住友電気工業株式会社 Cutting tools, cutting tool holders, tool systems, communication methods and turning tools

Also Published As

Publication number Publication date
JP2019106660A (en) 2019-06-27

Similar Documents

Publication Publication Date Title
US7507946B2 (en) Network sensor system and protocol
TWI361579B (en) Communication apparatus and network search method thereof
CN107809793B (en) Awakening control method and device of intelligent terminal
CN107092568B (en) Data communication interface for processing data in low power system
TWI545985B (en) Device synchronization over bluetooth
JP6506165B2 (en) Method and apparatus for operating low power near field communication function of portable terminal
JP4946646B2 (en) Communication network system and wakeup method for unwakened node
US11669147B2 (en) Dynamic power consumption management and wake-up method and application system therefor
TWI383301B (en) Method and system for network synchronization
US8867421B2 (en) Correction of clock errors in a wireless station to enable reduction of power consumption
JP6251363B1 (en) Battery-driven wireless communication system and communication method
CN108475100B (en) Working mode switching method, wireless sensor and system
CN108712740B (en) Bluetooth low-power connection method and device
JP6473494B1 (en) Battery-driven wireless communication system and synchronization correction method
JP2007110343A (en) Radio communication apparatus and its control method
KR20120096866A (en) Systems and methods for controlling sensor devices in mobile devices
JP2007067829A (en) Battery-driven communication device and communication method
JP5832126B2 (en) Communication apparatus, processing method, and program
CN112291703A (en) System and method for establishing communications for exchanging ranging information
JP2002351825A (en) Communication system
JP6795645B2 (en) Wireless communication system and communication distance extension method
CN114035477A (en) Equipment awakening method, device and system
CN209979045U (en) WiFi intelligence pad of weighing
JP6642148B2 (en) Power management system for power supply equipment
JP2021129184A (en) Battery-driven wireless communication system and method for automatically switching between synchronous communication and asynchronous communication

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20171214

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20181113

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20181226

TRDD Decision of grant or rejection written
A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20190122

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20190125

R150 Certificate of patent or registration of utility model

Ref document number: 6473494

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250