JP6375667B2 - USB connection system, host device, connection device, and control program - Google Patents

USB connection system, host device, connection device, and control program Download PDF

Info

Publication number
JP6375667B2
JP6375667B2 JP2014073283A JP2014073283A JP6375667B2 JP 6375667 B2 JP6375667 B2 JP 6375667B2 JP 2014073283 A JP2014073283 A JP 2014073283A JP 2014073283 A JP2014073283 A JP 2014073283A JP 6375667 B2 JP6375667 B2 JP 6375667B2
Authority
JP
Japan
Prior art keywords
power
self
current
connection
current amount
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
JP2014073283A
Other languages
Japanese (ja)
Other versions
JP2015194444A (en
Inventor
哲也 北嶋
哲也 北嶋
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Brother Industries Ltd
Original Assignee
Brother Industries Ltd
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 Brother Industries Ltd filed Critical Brother Industries Ltd
Priority to JP2014073283A priority Critical patent/JP6375667B2/en
Publication of JP2015194444A publication Critical patent/JP2015194444A/en
Application granted granted Critical
Publication of JP6375667B2 publication Critical patent/JP6375667B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Testing Of Short-Circuits, Discontinuities, Leakage, Or Incorrect Line Connections (AREA)
  • Power Sources (AREA)

Description

本発明は、USB接続システム、ホスト装置、接続デバイス及び制御プログラムに関する。   The present invention relates to a USB connection system, a host device, a connection device, and a control program.

パーソナルコンピュータなどのホスト装置に周辺機器である接続デバイスを接続する方法としてUSB(Universal Serial Bus)規格が知られている。このUSB規格では、接続デバイスとして、自己電源から電力供給を受けるセルフパワーデバイスと、ホスト装置からUSB接続を介して電力供給を受けるバスパワーデバイスとがある。   The USB (Universal Serial Bus) standard is known as a method for connecting a connection device, which is a peripheral device, to a host device such as a personal computer. In this USB standard, there are a self-powered device that receives power supply from a self-power supply and a bus-powered device that receives power supply from a host device via a USB connection.

特許文献1には、接続デバイスがUSB接続されると、この接続デバイスがバスパワーデバイスであるのか否か等の各種通信に必要な情報を取り込むホスト装置(デジタルカメラ)が開示されている。そして、このホスト装置は、取り込んだ上記情報に基づき、接続デバイスへの電力供給の制御を行っている。   Patent Document 1 discloses a host device (digital camera) that captures information necessary for various communications such as whether or not a connection device is a bus power device when the connection device is USB-connected. The host device controls power supply to the connected device based on the acquired information.

特開2001−75682号公報JP 2001-75682 A

ここで、本願の発明者は、ホスト装置に対してUSB接続される接続デバイスの構成や接続デバイスが設置される環境等に応じて、接続デバイスからの漏れ電流がユーザの体に流れ、その漏れ電流の電流量によってはユーザがこの漏れ電流を感受して不快に感じる場合があることを知見した。   Here, the inventor of the present application determines that the leakage current from the connected device flows to the user's body according to the configuration of the connected device connected to the host device via USB or the environment in which the connected device is installed. It has been found that depending on the amount of current, the user may feel this leakage current and feel uncomfortable.

そこで、本発明の目的は、ホスト装置に対してUSB接続される接続デバイスから漏れ出る電流の総電流量を概算することが可能なUSB接続システム、ホスト装置、接続デバイス及び制御プログラムを提供することにある。   Therefore, an object of the present invention is to provide a USB connection system, a host device, a connection device, and a control program capable of estimating the total amount of current leaking from a connection device connected by USB to the host device. It is in.

上記の課題を解決するために、本発明のUSB接続システムは、ホスト装置と、前記ホスト装置に対してUSB接続される少なくとも1つの接続デバイスと、前記ホスト装置に対してUSB接続可能な前記接続デバイスのうちの自己電源から電力供給を受けるセルフパワーデバイスの識別情報と、このセルフパワーデバイスから漏れ出る電流の電流量とを関連付けて記憶するデータベースとを備え、前記接続デバイスは、当該接続デバイスが、前記セルフパワーデバイス及び前記ホスト装置からUSB接続を介して電力供給を受けるバスパワーデバイスの何れであるかを示す電力情報を前記ホスト装置に送信する電力情報送信処理を実行可能であり、前記接続デバイスのうちの少なくとも前記セルフパワーデバイスは、当該セルフパワーデバイスの前記識別情報を前記ホスト装置に送信する識別情報送信処理を実行可能であり、前記ホスト装置は、前記接続デバイスそれぞれから前記電力情報を受信する電力情報受信処理と、前記接続デバイスのうちの前記セルフパワーデバイスから前記識別情報を受信する識別情報受信処理とを実行可能であり、前記ホスト装置、及び前記接続デバイスのうちの少なくとも何れかが、前記ホスト装置と前記接続デバイスそれぞれとの間で送受信される前記電力情報を集約する電力情報集約処理と、前記ホスト装置と前記セルフパワーデバイスそれぞれとの間で送受信される前記識別情報を集約する識別情報集約処理と、前記電力情報集約処理及び前記識別情報集約処理により集約された前記電力情報及び前記識別情報に基づいて、前記接続デバイスそれぞれから漏れ出る電流の電流量を合わした総電流量を概算する電流量概算処理とを実行可能であり、前記電流量概算処理は、前記接続デバイスそれぞれから漏れ出る電流の電流量について、前記電力情報に基づき前記バスパワーデバイスであると判断した前記接続デバイスについては、当該接続デバイスから漏れ出る電流の電流量が第1電流量未満であるとし、前記電力情報に基づき前記セルフパワーデバイスであると判断した前記接続デバイスについては、当該接続デバイスから漏れ出る電流の電流量が第1電流量以上であるとして、前記データベースを参照して、当該接続デバイスの前記識別情報に関連付けられた前記電流量を、当該接続デバイスから漏れ出る電流の電流量とすることを特徴とする。   In order to solve the above problems, a USB connection system according to the present invention includes a host device, at least one connection device that is USB-connected to the host device, and the connection that is USB-connectable to the host device. A self-powered device identifying information of a self-powered device and a database for storing the amount of current leaking from the self-powered device in association with each other, and the connecting device includes: A power information transmission process for transmitting to the host device power information indicating which of the self-power device and the bus power device is supplied with power from the host device via a USB connection; At least the self-powered device among the devices is the self-powered device. An identification information transmission process for transmitting the identification information of the network device to the host device, wherein the host device includes: a power information reception process for receiving the power information from each of the connected devices; and An identification information receiving process for receiving the identification information from the self-power device, and at least one of the host device and the connection device is between the host device and each of the connection devices. Power information aggregation processing for aggregating the transmitted and received power information, identification information aggregation processing for aggregating the identification information transmitted and received between the host device and the self-power device, the power information aggregation processing, and Based on the power information and the identification information aggregated by the identification information aggregation process, the connection device A current amount approximating process that approximates a total current amount that combines the amount of current leaking from each of the current devices, and the current amount estimating process is configured to perform the power consumption for the current amount of current leaking from each of the connected devices. For the connection device that is determined to be the bus power device based on the information, the amount of current leaking from the connection device is less than the first current amount, and the self-power device based on the power information For the determined connection device, the current amount associated with the identification information of the connection device is determined by referring to the database, assuming that the amount of current leaking from the connection device is equal to or greater than the first current amount. The current amount leaks from the connected device.

また、本発明のホスト装置は、少なくとも1つの接続デバイスがUSB接続されるホスト装置であって、前記接続デバイスそれぞれから、当該接続デバイスが自己電源から電力供給を受けるセルフパワーデバイス及び前記ホスト装置からUSB接続を介して電力供給を受けるバスパワーデバイスの何れであるかを示す電力情報を受信する電力情報受信処理と、前記接続デバイスのうちの前記セルフパワーデバイスから当該セルフパワーデバイスの識別情報を受信する識別情報受信処理と、前記電力情報受信処理により前記接続デバイスそれぞれから受信した前記電力情報を集約する電力情報集約処理と、前記識別情報受信処理により前記セルフパワーデバイスから受信した前記識別情報を集約する識別情報集約処理と、前記電力情報集約処理及び前記識別情報集約処理により集約された前記電力情報及び前記識別情報に基づいて、前記接続デバイスそれぞれから漏れ出る電流の電流量を合わした総電流量を概算する電流量概算処理とを実行し、前記電流量概算処理は、前記接続デバイスそれぞれから漏れ出る電流の電流量について、前記電力情報に基づき前記バスパワーデバイスであると判断した前記接続デバイスについては、当該接続デバイスから漏れ出る電流の電流量が所定電流量未満であるとし、前記電力情報に基づき前記セルフパワーデバイスであると判断した前記接続デバイスについては、当該接続デバイスから漏れ出る電流の電流量が前記所定電流量以上であるとして、前記セルフパワーデバイスの識別情報と、このセルフパワーデバイスから漏れ出る電流の電流量とが関連付けて記憶されたデータベースを参照して、当該接続デバイスの前記識別情報に関連付けられた前記電流量を、当該接続デバイスから漏れ出る電流の電流量とすることを特徴とする。   Further, the host device of the present invention is a host device to which at least one connection device is USB-connected, and from each of the connection devices, the connection device receives power supply from its own power source, and the host device. Power information reception processing for receiving power information indicating which of the bus power devices receives power supply via a USB connection, and receiving identification information of the self power device from the self power device of the connected devices Identification information reception processing, power information aggregation processing for aggregating the power information received from each of the connected devices by the power information reception processing, and aggregation of the identification information received from the self-power device by the identification information reception processing Identification information aggregation processing and the power information aggregation processing And based on the power information and the identification information aggregated by the identification information aggregation process, a current amount estimation process that approximates a total current amount that combines the current amounts of currents leaking from the connected devices, and In the current amount estimation process, with respect to the current amount of current leaking from each of the connection devices, the current amount of current leaking from the connection device for the connection device determined to be the bus power device based on the power information. For the connection device that is determined to be the self-power device based on the power information, the current amount of current leaking from the connection device is equal to or greater than the predetermined current amount, The identification information of the self-powered device and the amount of current leaking from this self-powered device Associating with reference to the stored database, the amount of current associated with the identification information of the connection device, characterized in that the current amount of leaking current from the connection device.

また、本発明の接続デバイスは、複数の接続デバイスがUSB接続されるホスト装置に対してUSB接続される接続デバイスであって、前記ホスト装置が前記接続デバイスそれぞれから受信した、当該接続デバイスが自己電源から電力供給を受けるセルフパワーデバイス及び前記ホスト装置からUSB接続を介して電力供給を受けるバスパワーデバイスの何れであるかを示す電力情報を前記ホスト装置から受信して集約する電力情報集約処理と、前記ホスト装置が前記接続デバイスのうちの前記セルフパワーデバイスから受信した、当該セルフパワーデバイスの識別情報を前記ホスト装置から受信して集約する識別情報集約処理と、前記電力情報集約処理及び前記識別情報集約処理により集約された前記電力情報及び前記識別情報に基づいて、前記接続デバイスそれぞれから漏れ出る電流の電流量を合わした総電流量を概算する電流量概算処理とを実行し、前記電流量概算処理は、前記接続デバイスそれぞれから漏れ出る電流の電流量について、前記電力情報に基づき前記バスパワーデバイスであると判断した前記接続デバイスについては、当該接続デバイスから漏れ出る電流の電流量が所定電流量未満であるとし、前記電力情報に基づき前記セルフパワーデバイスであると判断した前記接続デバイスについては、当該接続デバイスから漏れ出る電流の電流量が前記所定電流量以上であるとして、前記セルフパワーデバイスの識別情報と、このセルフパワーデバイスから漏れ出る電流の電流量とが関連付けて記憶されたデータベースを参照して、当該接続デバイスの前記識別情報に関連付けられた前記電流量を、当該接続デバイスから漏れ出る電流の電流量とすることを特徴とする。   The connection device of the present invention is a connection device that is USB-connected to a host device to which a plurality of connection devices are USB-connected, and the host device receives from each of the connection devices. A power information aggregating process for receiving and aggregating power information indicating whether a self-powered device that receives power supply from a power supply or a bus power device that receives power supply from the host device via a USB connection; The host device receives from the host device the identification information of the self-power device received from the self-power device and collects the identification information of the self-power device from the host device, the power information aggregation processing and the identification Based on the power information and the identification information aggregated by the information aggregation process A current amount estimation process that approximates a total current amount that combines the amount of current leaked from each of the connection devices, and the current amount estimation process is performed on the current amount of current leaking from each of the connection devices. For the connection device that is determined to be the bus power device based on power information, the amount of current leaking from the connection device is less than a predetermined current amount, and the self-power device based on the power information For the determined connection device, assuming that the amount of current leaking from the connection device is equal to or greater than the predetermined current amount, the identification information of the self-power device and the current amount of current leaking from the self-power device are: Refer to the database stored in association with the identification information of the connected device. The current amount of assigned communication, characterized in that the current amount of leaking current from the connection device.

また、本発明の制御プログラムは、複数の接続デバイスがUSB接続されるホスト装置に対してUSB接続される接続デバイスに実行させる制御プログラムであって、前記接続デバイスに、前記ホスト装置が前記接続デバイスそれぞれから受信した、当該接続デバイスが自己電源から電力供給を受けるセルフパワーデバイス及び前記ホスト装置からUSB接続を介して電力供給を受けるバスパワーデバイスの何れであるかを示す電力情報を前記ホスト装置から受信して集約する電力情報集約処理と、前記ホスト装置が前記接続デバイスのうちの前記セルフパワーデバイスから受信した、当該セルフパワーデバイスの識別情報を前記ホスト装置から受信して集約する識別情報集約処理と、前記電力情報集約処理及び前記識別情報集約処理により集約された前記電力情報及び前記識別情報に基づいて、前記接続デバイスそれぞれから漏れ出る電流の電流量を合わした総電流量を概算する電流量概算処理とを実行させ、前記電流量概算処理は、前記接続デバイスそれぞれから漏れ出る電流の電流量について、前記電力情報に基づき前記バスパワーデバイスであると判断した前記接続デバイスについては、当該接続デバイスから漏れ出る電流の電流量が所定電流量未満であるとし、前記電力情報に基づき前記セルフパワーデバイスであると判断した前記接続デバイスについては、当該接続デバイスから漏れ出る電流の電流量が前記所定電流量以上であるとして、前記セルフパワーデバイスの識別情報と、このセルフパワーデバイスから漏れ出る電流の電流量とが関連付けて記憶されたデータベースを参照して、当該接続デバイスの前記識別情報に関連付けられた前記電流量を、当該接続デバイスから漏れ出る電流の電流量とすることを特徴とする。   The control program of the present invention is a control program that is executed by a connection device that is USB-connected to a host device to which a plurality of connection devices are USB-connected, and the host device includes the connection device. Power information indicating whether the connected device is a self-powered device that receives power from its own power supply or a bus-powered device that receives power from the host device via a USB connection is received from the host device. Power information aggregating process for receiving and aggregating, and identification information aggregating process for receiving and aggregating identification information of the self-power device received from the self-powered device among the connected devices by the host device from the host device And by the power information aggregation process and the identification information aggregation process Based on the reduced power information and the identification information, a current amount estimation process for estimating a total current amount that combines the amount of current leaking from each of the connected devices is performed, and the current amount estimation process includes: Regarding the connection device that is determined to be the bus power device based on the power information, the amount of current leaking from each of the connection devices is less than a predetermined current amount. For the connection device that is determined to be the self-power device based on the power information, the current amount of current leaking from the connection device is greater than or equal to the predetermined current amount, and the identification information of the self-power device , Data stored in association with the amount of current leaking from this self-powered device Referring to over scan, the amount of current associated with the identification information of the connection device, characterized in that the current amount of leaking current from the connection device.

本願の発明者は、ホスト装置に対してUSB接続される接続デバイスがバスパワーデバイスである場合には、バスパワーデバイスの種類に拘わらず漏れ出る電流の電流量は所定電流量未満である一方、接続デバイスがセルフパワーデバイスである場合には、接続デバイスから漏れ出る電流の電流量が所定電流量以上となり、且つセルフパワーデバイスの種類によって漏れ出る電流の電流量が異なることを知見した。
そこで、本発明では、ホスト装置に対してUSB接続可能な接続デバイスのうちのセルフパワーデバイスの識別情報とこのセルフパワーデバイスから漏れ出る電流の電流量とを関連付けて記憶するためのデータベースとを備え、接続デバイスがセルフパワーデバイスである場合には、このデータベースを参照することで、当該接続デバイスから漏れ出る電流の電流量を正確に求める。一方で、接続デバイスがバスパワーデバイスである場合には、データベースを参照せずに一律に当該接続デバイスから漏れ出る電流の電流量が所定電流量未満であるとする。これにより、漏れ電流の総電流量の概算を早く行うことができる。
The inventor of the present application, when the connection device that is USB-connected to the host device is a bus power device, the amount of current leaked regardless of the type of the bus power device is less than the predetermined current amount, When the connection device is a self-power device, it has been found that the amount of current leaking from the connection device is equal to or greater than a predetermined current amount, and the amount of current leaking differs depending on the type of the self-power device.
Therefore, the present invention includes a database for storing the identification information of the self-power device among the connection devices that can be USB-connected to the host device and the amount of current leaking from the self-power device in association with each other. When the connected device is a self-powered device, the amount of current leaking from the connected device is accurately obtained by referring to this database. On the other hand, when the connection device is a bus power device, it is assumed that the amount of current that leaks uniformly from the connection device without referring to the database is less than the predetermined current amount. This makes it possible to quickly estimate the total amount of leakage current.

第1実施形態に係るUSB接続システムの概略構成図である。1 is a schematic configuration diagram of a USB connection system according to a first embodiment. 図1に示すホスト装置の電気構成図である。It is an electrical block diagram of the host apparatus shown in FIG. (a)はデバイスディスクリプタを説明するための図であり、(b)はコンフィグレーションディスクリプタを説明するための図であり、(c)はホスト装置に記憶されるディスクリプタテーブルを説明するための図であり、(d)は図1に示すサーバが備えるデータベースを説明するための図である。(A) is a figure for demonstrating a device descriptor, (b) is a figure for demonstrating a configuration descriptor, (c) is a figure for demonstrating the descriptor table memorize | stored in a host apparatus. (D) is a figure for demonstrating the database with which the server shown in FIG. 1 is provided. (a)はセルフパワーデバイスの電気構成図であり、(b)はバスパワーデバイスの電気構成図である。(A) is an electrical block diagram of a self-power device, (b) is an electrical block diagram of a bus power device. (a)は接続デバイスの処理を説明するフロー図であり、(b)はホスト装置の処理を説明するフロー図である。(A) is a flowchart explaining the process of a connected device, (b) is a flowchart explaining the process of a host apparatus. (a)は、図5(a)に示す電流量概算処理のフロー図であり、(b)は変形例に係る電流量概算処理のフロー図である。(A) is a flowchart of the electric current amount estimation process shown to Fig.5 (a), (b) is a flowchart of the electric current amount estimation process which concerns on a modification. (a)は第2実施形態に係るセルフパワーデバイスの電気構成図であり、(b)は(a)に示すパルス生成回路の回路構成図である。(A) is an electrical block diagram of the self-power device which concerns on 2nd Embodiment, (b) is a circuit block diagram of the pulse generation circuit shown to (a). (a)は基準電位が接地されているときの交流入力電圧、接続点電圧、及びパルス信号それぞれのタイムチャートであり、(b)は基準電位が接地されていないときの交流入力電圧、接続点電圧、及びパルス信号それぞれのタイムチャートである。(A) is a time chart of the AC input voltage, the connection point voltage, and the pulse signal when the reference potential is grounded, and (b) is the AC input voltage, the connection point when the reference potential is not grounded. It is a time chart of each of a voltage and a pulse signal. 第2実施形態に係るホスト装置の処理を説明するフロー図である。It is a flowchart explaining the process of the host apparatus which concerns on 2nd Embodiment. 第2実施形態に係るセルフパワーデバイスの処理を説明するフロー図である。It is a flowchart explaining the process of the self-power device which concerns on 2nd Embodiment.

(第1実施形態)
以下、本発明の第1実施形態について、図面を参照しつつ説明する。第1実施形態に係るUSB接続システム100は、図1に示すように、ホスト装置1と、ホスト装置1に対して、USBケーブル5によりUSB接続される接続デバイス50と、サーバ90とから主に構成されている。ホスト装置1は、複数のUSBポート30(図2参照)を備えており、この複数のUSBポート30を介して複数の接続デバイス50とUSB接続可能に構成されている。なお、本明細書において、ホスト装置1に対してUSB接続される接続デバイス50とは、ホスト装置1に直接接続される接続デバイスと、ハブ8等の中継装置を介して間接的に接続される接続デバイスとを含むものであり、他の接続デバイスを介してホスト装置1に接続される接続デバイスは含まない。また、以下において、ホスト装置1及び接続デバイス50の何れもフレーム接地されていないものとして説明する。
(First embodiment)
Hereinafter, a first embodiment of the present invention will be described with reference to the drawings. As shown in FIG. 1, the USB connection system 100 according to the first embodiment mainly includes a host device 1, a connection device 50 that is USB-connected to the host device 1 by a USB cable 5, and a server 90. It is configured. The host device 1 includes a plurality of USB ports 30 (see FIG. 2), and is configured to be capable of USB connection with a plurality of connection devices 50 via the plurality of USB ports 30. In this specification, the connection device 50 that is USB-connected to the host device 1 is indirectly connected to a connection device that is directly connected to the host device 1 via a relay device such as the hub 8. Connection devices are included, and connection devices connected to the host apparatus 1 via other connection devices are not included. In the following description, it is assumed that neither the host device 1 nor the connection device 50 is frame grounded.

また、ホスト装置1にUSB接続される接続デバイス50の電力供給に関わる種類としては、USBケーブル5を介して外部装置から電力供給を受ける、所謂バスパワーで動作するバスパワーデバイス80と、外部電源2(図2参照)に接続された電源部や内蔵された電池等の自前の自己電源から電力供給を受ける、所謂セルフパワーで動作するセルフパワーデバイス60とがある。そして、ホスト装置1は、バスパワーデバイス80に対して、USBケーブル5を介して電力の供給を行うように構成されている。   In addition, the types related to the power supply of the connection device 50 connected to the host device 1 by USB include a bus power device 80 that operates on a so-called bus power that receives power supply from an external device via the USB cable 5, and an external power source. 2 (see FIG. 2) and a self-powered device 60 that operates by so-called self-power, which is supplied with power from its own self-power source such as a power source unit or a built-in battery. The host device 1 is configured to supply power to the bus power device 80 via the USB cable 5.

ホスト装置1は、パーソナルコンピュータ等の情報処理装置であり、図2に示すように、ホスト装置1全体を制御する制御装置10、各種入力をユーザから受け付けるキーボード11、ユーザに対して種々の画像を表示するディスプレイ12、外部電源2に接続可能な電源回路13、複数のUSBポート30、及びネットワークポート35を主に備えている。電源回路13は、外部電源2から交流電力を受け付けてホスト装置1の各種駆動部等に電力を供給するための回路である。   The host apparatus 1 is an information processing apparatus such as a personal computer. As shown in FIG. 2, the control apparatus 10 that controls the entire host apparatus 1, a keyboard 11 that receives various inputs from the user, and various images for the user. A display 12 for displaying, a power supply circuit 13 connectable to the external power supply 2, a plurality of USB ports 30, and a network port 35 are mainly provided. The power supply circuit 13 is a circuit for receiving AC power from the external power supply 2 and supplying power to various drive units of the host device 1.

制御装置10は、中央演算処理装置としてのCPU(Central Processing Unit)21、ROM(Read Only Memory)22、RAM(Random Access Memory)23、ネットワーク制御回路25、入出力制御回路26及びUSB制御回路27を備えており、これらはバスを介して接続されている。ROM22には、CPU21が実行する制御プログラム22aや各種固定データ等が記憶されている。RAM23には、プログラム実行時に必要なデータが一時的に記憶される。   The control device 10 includes a central processing unit (CPU) 21, a read only memory (ROM) 22, a random access memory (RAM) 23, a network control circuit 25, an input / output control circuit 26, and a USB control circuit 27. These are connected via a bus. The ROM 22 stores a control program 22a executed by the CPU 21, various fixed data, and the like. The RAM 23 temporarily stores data necessary for program execution.

ネットワーク制御回路25は、ネットワークポート35に接続されるLANケーブル6を介して、サーバ90等の外部装置とインターネット7を経由したネットワーク通信を行うための制御回路である。入出力制御回路26は、キーボード11及びディスプレイ12の制御を行うための回路である。   The network control circuit 25 is a control circuit for performing network communication with an external device such as the server 90 via the Internet 7 via the LAN cable 6 connected to the network port 35. The input / output control circuit 26 is a circuit for controlling the keyboard 11 and the display 12.

USB制御回路27は、USBポート30に接続されるUSBケーブル5を介して接続デバイス50とUSB通信を行うための制御回路である。なお、USBケーブル5は、VBUSライン及びグランド(GND)ラインからなる電源系ラインと、D+ライン及びD−ラインからなる信号系ラインを有するケーブルである。また、USBポート30は、USBケーブル5における、VBUSライン、グランドライン、D+ライン及びD−ラインの4つのラインに対応して、4つの接続端子を備えている。そして、ホスト装置1が備える複数のUSBポート30において、USBケーブル5のグランドラインが接続されるグランド端子同士は、互いに接続されている。従って、複数のUSBポート30それぞれに接続される接続デバイス50の基準電位(グランド電位)は同電位となる。   The USB control circuit 27 is a control circuit for performing USB communication with the connection device 50 via the USB cable 5 connected to the USB port 30. The USB cable 5 is a cable having a power system line composed of a VBUS line and a ground (GND) line, and a signal system line composed of a D + line and a D− line. The USB port 30 includes four connection terminals corresponding to the four lines of the USB cable 5, that is, the VBUS line, the ground line, the D + line, and the D− line. And in the some USB port 30 with which the host apparatus 1 is provided, the ground terminals to which the ground line of the USB cable 5 is connected are mutually connected. Accordingly, the reference potential (ground potential) of the connection device 50 connected to each of the plurality of USB ports 30 is the same potential.

ところで、USB規格では、接続デバイス50は、接続デバイス50の特性や属性などの情報を含むディスクリプタを有している。そして、ホスト装置1と接続デバイス50とがUSB接続された際に、ホスト装置1から接続デバイス50に対してディスクリプタの送信要求が送信され、この送信要求を受信した接続デバイス50が、自身のディスクリプタをホスト装置1に対して送信するように構成されている。このホスト装置1と接続デバイス50との間のディスクリプタの送受信により、ホスト装置1が接続デバイス50の特性や属性などを正しく認識することが可能となる。このディスクリプタには、デバイスディスクリプタやコンフィグレーションディスクリプタ等が含まれる。   By the way, in the USB standard, the connection device 50 has a descriptor including information such as characteristics and attributes of the connection device 50. When the host apparatus 1 and the connection device 50 are connected via USB, a transmission request for a descriptor is transmitted from the host apparatus 1 to the connection device 50, and the connection device 50 that has received this transmission request receives its descriptor. Is transmitted to the host device 1. By transmitting and receiving descriptors between the host device 1 and the connection device 50, the host device 1 can correctly recognize the characteristics and attributes of the connection device 50. This descriptor includes a device descriptor, a configuration descriptor, and the like.

デバイスディスクリプタは、ディスクリプタを送信した接続デバイス50を識別するための情報を含むディスクリプタであり、例えば、図3(a)に示すように、「idVendor」や「idProduct」を含む。「idVendor」は接続デバイスのベンダを識別するためのベンタIDであり、「idProduct」は接続デバイス50の製品を示す製品IDである。ホスト装置1は、これらベンタID及び製品IDにより接続デバイス50の機種を識別することが可能となる。本実施形態においては、「idVendor」及び「idProduct」が接続デバイス50の識別情報に相当する。   The device descriptor is a descriptor including information for identifying the connection device 50 that has transmitted the descriptor, and includes, for example, “idVendor” and “idProduct” as illustrated in FIG. “IdVendor” is a vendor ID for identifying the vendor of the connected device, and “idProduct” is a product ID indicating the product of the connected device 50. The host device 1 can identify the model of the connection device 50 based on these vendor ID and product ID. In the present embodiment, “idVendor” and “idProduct” correspond to the identification information of the connected device 50.

コンフィグレーションディスクリプタは、ディスクリプタを送信した接続デバイス50のUSB構成情報を含むディスクリプタであり、例えば、図3(b)に示すように、「bmAttributes」や「MaxPower」を含む。「bmAttributes」は、第6ビット目がディスクリプタを送信した接続デバイス50がセルフパワーデバイス60及びバスパワーデバイス80の何れに対応しているかを示す。また、「MaxPower」は、接続デバイス50で必要とする電流値を示す。USB制御回路27は、接続デバイス50から受信したコンフィグレーションディスクリプタに基づき、当該接続デバイス50へのUSBケーブル5を介した電力供給を行うか否か等を判断する。例えば、USB制御回路27は、「bmAttributes」により接続デバイス50がバスパワーデバイス80であると特定され、且つ、「MaxPower」により特定される電流量が、ホスト装置1が供給可能な電流量の上限値よりも大きいとき、その接続デバイス50への電力供給を遮断する。本実施形態では、「bmAttributes」が電力情報に相当する。   The configuration descriptor is a descriptor including USB configuration information of the connection device 50 that has transmitted the descriptor, and includes, for example, “bmAttributes” and “MaxPower” as illustrated in FIG. “BmAttributes” indicates whether the connection device 50 to which the sixth bit has transmitted the descriptor corresponds to the self power device 60 or the bus power device 80. “MaxPower” indicates a current value required by the connection device 50. Based on the configuration descriptor received from the connection device 50, the USB control circuit 27 determines whether or not to supply power to the connection device 50 via the USB cable 5. For example, the USB control circuit 27 specifies that the connection device 50 is the bus power device 80 by “bmAttributes”, and the current amount specified by “MaxPower” is the upper limit of the current amount that can be supplied by the host device 1. When the value is larger than the value, the power supply to the connection device 50 is cut off. In the present embodiment, “bmAttributes” corresponds to power information.

そして、RAM23には、図3(c)に示すように、ホスト装置1に対して現在USB接続されている接続デバイス50についての、「idVendor」「idProduct」、及び「bmAttributes」を記憶するディスクリプタテーブル23aが記憶されている。即ち、ディスクリプタテーブル23aには、ホスト装置1に対してUSB接続される全ての接続デバイス50についての、「idVendor」「idProduct」、及び「bmAttributes」が集約された情報が登録されている。また、RAM23には、ホスト装置1に対して現在USB接続されている接続デバイス50それぞれについての、後述する電流量概算処理により概算された漏れ電流の電流量が登録された電流量テーブル23bが記憶されている。   As shown in FIG. 3C, the RAM 23 stores “idVendor”, “idProduct”, and “bmAttributes” for the connection device 50 that is currently USB-connected to the host apparatus 1. 23a is stored. That is, in the descriptor table 23a, information in which “idVendor”, “idProduct”, and “bmAttributes” are aggregated for all connection devices 50 that are USB-connected to the host device 1 is registered. In addition, the RAM 23 stores a current amount table 23b in which current amounts of leakage currents estimated by a current amount estimation process to be described later are registered for each of the connection devices 50 that are currently USB-connected to the host apparatus 1. Has been.

次に、接続デバイス50の構成について説明する。ここで、少し先に触れたように、接続デバイス50の電力供給に関わる種類として、セルフパワーデバイス60とバスパワーデバイス80とがある。以下、セルフパワーデバイス60及びバスパワーデバイス80の一例について、図4(a),(b)を参照しつつ説明する。   Next, the configuration of the connection device 50 will be described. Here, as mentioned earlier, there are the self-power device 60 and the bus power device 80 as the types related to the power supply of the connection device 50. Hereinafter, an example of the self power device 60 and the bus power device 80 will be described with reference to FIGS.

セルフパワーデバイス60は、図4(a)に示すように、セルフパワーデバイス60全体を制御する制御装置61、各種処理を行う駆動機構62、ユーザによる各種操作入力や各種の設定画面をユーザに対して表示可能なタッチパネル63、USBポート68及び、外部電源3に接続可能な電源回路64を主に備えている。駆動機構62は、例えば、セルフパワーデバイス60がプリンタの場合、用紙を搬送するための搬送機構と、搬送機構により搬送される用紙に画像を記録するためのインクジェット方式やレーザ方式等を採用した画像記録機構などによって構成される。また、電源回路64は、外部電源3から交流電力を受け付けてセルフパワーデバイス60の各種駆動部に電力を供給するための回路である。   As shown in FIG. 4A, the self-power device 60 includes a control device 61 that controls the entire self-power device 60, a drive mechanism 62 that performs various processes, various operation inputs by the user, and various setting screens to the user. A touch panel 63, a USB port 68, and a power circuit 64 connectable to the external power source 3 are mainly provided. For example, when the self-power device 60 is a printer, the drive mechanism 62 employs a transport mechanism for transporting paper and an image employing an ink jet method or a laser method for recording an image on the paper transported by the transport mechanism. It consists of a recording mechanism. The power supply circuit 64 is a circuit for receiving AC power from the external power supply 3 and supplying power to various drive units of the self-power device 60.

制御装置61は、CPU71、ROM72、RAM73、駆動部制御回路74、入出力制御回路75、及びUSB制御回路76を備えており、これらはバスを介して接続されている。ROM72には、CPU71が実行する制御プログラム72aや各種固定データ等が記憶されている。RAM73には、プログラム実行時に必要なデータが一時的に記憶される。駆動部制御回路74は、駆動機構62を制御するための回路である。入出力制御回路75は、タッチパネル63の制御を行うための回路である。USB制御回路76は、USBポート68に接続されるUSBケーブル5を介してホスト装置1とUSB通信を行うための制御回路である。   The control device 61 includes a CPU 71, a ROM 72, a RAM 73, a drive unit control circuit 74, an input / output control circuit 75, and a USB control circuit 76, which are connected via a bus. The ROM 72 stores a control program 72a executed by the CPU 71 and various fixed data. The RAM 73 temporarily stores data necessary for program execution. The drive unit control circuit 74 is a circuit for controlling the drive mechanism 62. The input / output control circuit 75 is a circuit for controlling the touch panel 63. The USB control circuit 76 is a control circuit for performing USB communication with the host apparatus 1 via the USB cable 5 connected to the USB port 68.

次に、バスパワーデバイス80の構成について説明する。バスパワーデバイス80は、図4(b)に示すように、電源回路64を備えていない点以外はセルフパワーデバイス60の構成と略同様である。従って、バスパワーデバイス80の詳細な説明については、重複するから省略する。このバスパワーデバイス80では、USBポート68に接続されるUSBケーブル5を介してホスト装置1から電力を受けつけて、この電力をバスパワーデバイス80の各種駆動部に電力を供給する。   Next, the configuration of the bus power device 80 will be described. As shown in FIG. 4B, the bus power device 80 is substantially the same as the configuration of the self power device 60 except that the power supply circuit 64 is not provided. Therefore, the detailed description of the bus power device 80 is omitted because it overlaps. The bus power device 80 receives power from the host device 1 via the USB cable 5 connected to the USB port 68 and supplies the power to various drive units of the bus power device 80.

次に、サーバ90の構成について説明するに先立って、接続デバイス50から漏れ出る電流(漏れ電流)について説明する。
ホスト装置1に対してUSB接続される接続デバイス50には、当該接続デバイス50の筐体(外装)にユーザが触れた際に、ユーザの体に漏れ電流が流れる接続デバイスが存在する。しかしながら、このような接続デバイスにおいても、一般的に、漏れ電流の上限値は規定されているため、一台の接続デバイス50から漏れ出る電流の電流量は非常に小さい。このため、この漏れ電流がユーザの体に流れたとしても、ユーザはこの漏れ電流を感受する可能性は極めて小さい。
しかしながら、本願の発明者は、ホスト装置1に対してUSB接続される接続デバイス50の構成や数、並びに接続デバイス50が設置される環境等に応じて、接続デバイス50からの漏れ電流がユーザの体に流れ、その漏れ電流の電流量によってはユーザがこの漏れ電流を感受して不快に感じる場合があることを知見した。例えば、複数のセルフパワーデバイス60がホスト装置1に対してUSB接続されており、これらのセルフパワーデバイス60が導電性の机上に置かれている場合、ユーザがこの机と、周囲の接地されている物体に触れると、この複数のセルフパワーデバイス60の漏れ電流の電流量を合算した電流量がこの机を介してユーザの体に流れることで、ユーザが不快に感じることがあることを知見した。
そこで、本実施形態においては、ホスト装置1が、ホスト装置1に対してUSB接続された接続デバイス50それぞれから漏れ出る電流の電流量を合わした総電流量を概算する電流量概算処理を行うように構成されている。
Next, before describing the configuration of the server 90, a current leaking from the connection device 50 (leakage current) will be described.
The connection device 50 that is USB-connected to the host device 1 includes a connection device in which leakage current flows through the user's body when the user touches the casing (exterior) of the connection device 50. However, even in such a connection device, since the upper limit value of the leakage current is generally defined, the amount of current leaking from one connection device 50 is very small. For this reason, even if this leakage current flows into the user's body, the user is very unlikely to perceive this leakage current.
However, the inventor of the present application determines the leakage current from the connection device 50 depending on the configuration and number of the connection devices 50 that are USB-connected to the host device 1 and the environment in which the connection device 50 is installed. It has been found that depending on the amount of leakage current flowing to the body, the user may feel this leakage current and feel uncomfortable. For example, when a plurality of self-powered devices 60 are USB-connected to the host apparatus 1 and these self-powered devices 60 are placed on a conductive desk, the user is connected to the desk and the surrounding ground. It has been found that when a touched object is touched, the current amount of the leakage currents of the plurality of self-powered devices 60 flows to the user's body through this desk, and the user may feel uncomfortable. .
Therefore, in the present embodiment, the host device 1 performs a current amount estimation process that approximates the total current amount obtained by adding the current amounts of currents leaked from the connection devices 50 connected to the host device 1 by USB connection. It is configured.

サーバ90は、この電流量概算処理の際に参照されるデータベース95を備えている。データベース95は、図3(d)に示すように、接続デバイス50の機種を識別する識別情報である、「idVendor」及び「idProduct」と、その接続デバイス50から漏れ出る電流の電流量とを関連付けて記憶する。なお、本実施形態では、接続デバイス50のうちセルフパワーデバイス60の識別情報と、当該セルフパワーデバイス60から漏れ出る電流の電流量とのみが関連付けて記憶されている。
また、サーバ90は、ホスト装置1から後述する電流量送信要求を受信したときに、データベース95を参照して、当該電流量送信要求に含まれる「idVendor」及び「idProduct」に関連付けられた電流量を抽出し、当該電流量を示す電流量情報を送信元のホスト装置1に対して送信する。
The server 90 includes a database 95 referred to in the current amount estimation process. As shown in FIG. 3D, the database 95 associates “idVendor” and “idProduct”, which are identification information for identifying the model of the connection device 50, and the amount of current leaking from the connection device 50. And remember. In the present embodiment, only the identification information of the self-power device 60 in the connection device 50 and the amount of current leaking from the self-power device 60 are stored in association with each other.
Further, when the server 90 receives a later-described current amount transmission request from the host device 1, the server 90 refers to the database 95, and the current amount associated with “idVendor” and “idProduct” included in the current amount transmission request. And the current amount information indicating the current amount is transmitted to the host device 1 that is the transmission source.

次に、接続デバイス50のCPU71が、ROM72に記憶された制御プログラム72aに従って実行する処理の一例について、図5(a)を参照しつつ説明する。なお、図5(a)の動作フローの開始時における状態は、接続デバイス50がホスト装置1に対してUSB接続された直後である。
CPU71は、USB制御回路76がUSBケーブル5を介してホスト装置1からディスクリプタ送信要求を受信すると(A1)、USB制御回路76を制御して、自身のディスクリプタをUSBケーブル5を介してホスト装置1に送信する(A2:識別情報送信処理、電力情報送信処理)。これにより、接続デバイス50からホスト装置1に対して、識別情報である「idVendor」及び「idProduct」、並びに電力情報である「bmAttributes」等が送信されることになる。以上、接続デバイス50の処理について説明した。
Next, an example of processing executed by the CPU 71 of the connection device 50 in accordance with the control program 72a stored in the ROM 72 will be described with reference to FIG. The state at the start of the operation flow in FIG. 5A is immediately after the connection device 50 is USB-connected to the host device 1.
When the USB control circuit 76 receives a descriptor transmission request from the host device 1 via the USB cable 5 (A1), the CPU 71 controls the USB control circuit 76 to transfer its own descriptor via the USB cable 5 to the host device 1. (A2: identification information transmission process, power information transmission process). As a result, “idVendor” and “idProduct” that are identification information, “bmAttributes” that is power information, and the like are transmitted from the connected device 50 to the host apparatus 1. The processing of the connection device 50 has been described above.

次に、ホスト装置1のCPU21が、ROM22に記憶された制御プログラム22aに従って実行する処理の一例について、図5(b)を参照しつつ説明する。なお、図5(b)の動作フローの開始時における状態は、ホスト装置1に対して複数の接続デバイス50がUSB接続されており、ホスト装置1のRAM73に記憶されたディスクリプタテーブル23aには、USB接続されている接続デバイス50についての、「idVendor」及び「idProduct」、並びに電力情報である「bmAttributes」が登録された状態である。   Next, an example of processing executed by the CPU 21 of the host device 1 according to the control program 22a stored in the ROM 22 will be described with reference to FIG. The state at the start of the operation flow in FIG. 5B is that a plurality of connection devices 50 are USB-connected to the host device 1, and the descriptor table 23 a stored in the RAM 73 of the host device 1 includes In this state, “idVendor” and “idProduct” and “bmAttributes” that is power information are registered for the connection device 50 connected by USB.

まず、CPU21は、ホスト装置1に対してUSB接続されている接続デバイス50の数が増加した(ホスト装置1に対して新たに接続デバイス50がUSB接続された)ことをUSB制御回路27が検知したか否かを判断する(S1)。接続デバイス50の数が増加したことを検知したと判断した場合(S1:YES)には、CPU21は、USB制御回路27を制御して、新たにUSB接続された接続デバイス50に対してディスクリプタ送信要求を送信する(S2)。その後、CPU21は、USB制御回路27を介して、新たにUSB接続された接続デバイス50から送信されたディスクリプタを受信する(S3:電力情報受信処理、識別情報受信処理)。これにより、CPU21は、新たにUSB接続された接続デバイス50の特性や属性などを正しく認識することができる。そして、CPU21は、受信したディスクリプタに含まれる、識別情報である「idVendor」及び「idProduct」、並びに電力情報である「bmAttributes」を、新たにUSB接続された接続デバイス50としてRAM23に記憶されたディスクリプタテーブル23aに追加する(S4:電力情報集約処理、識別情報集約処理)。これにより、ディスクリプタテーブル23aには、ホスト装置1に対して現在USB接続されている接続デバイス50についての、「idVendor」「idProduct」、及び「bmAttributes」が集約されて登録されることになる。このステップS4の処理が終了すると、ステップS7の処理に移る。   First, in the CPU 21, the USB control circuit 27 detects that the number of connection devices 50 that are USB-connected to the host device 1 has increased (the connection device 50 is newly connected to the host device 1 by USB). It is determined whether or not (S1). If it is determined that the number of connected devices 50 has increased (S1: YES), the CPU 21 controls the USB control circuit 27 to transmit a descriptor to the newly connected USB-connected device 50. A request is transmitted (S2). Thereafter, the CPU 21 receives the descriptor transmitted from the newly connected USB device 50 via the USB control circuit 27 (S3: power information reception process, identification information reception process). As a result, the CPU 21 can correctly recognize the characteristics and attributes of the connection device 50 newly connected by USB. Then, the CPU 21 stores the identification information “idVendor” and “idProduct” and the power information “bmAttributes” included in the received descriptor in the RAM 23 as a newly connected USB-connected device 50. The information is added to the table 23a (S4: power information aggregation process, identification information aggregation process). As a result, “idVendor”, “idProduct”, and “bmAttributes” of the connection device 50 that is currently USB-connected to the host device 1 are collectively registered in the descriptor table 23a. When the process of step S4 ends, the process proceeds to step S7.

一方で、ステップS1の処理において、USB接続されている接続デバイス50の数が増加したことを検知していないと判断した場合(S1:NO)には、CPU21は、ホスト装置1に対してUSB接続されている接続デバイス50の数が減少したことをUSB制御回路27が検知したか否かを判断する(S5)。接続デバイス50の数が減少したことを検知していないと判断した場合(S5:NO)には、ホスト装置1に対してUSB接続されている接続デバイス50の数は変更されていないとして、ステップS1の処理に戻る。一方で、接続デバイス50の数が減少したと判断した場合(S5:YES)には、CPU21は、ホスト装置1とのUSB接続が解除された接続デバイス50に係る「idVendor」「idProduct」、及び「bmAttributes」をRAM23に記憶されたディスクリプタテーブル23aから削除する(S6)。これにより、ディスクリプタテーブル23aには、ホスト装置1に対して現在USB接続されている接続デバイス50についての、「idVendor」「idProduct」、及び「bmAttributes」のみが登録されていることになる。このステップS6の処理が終了すると、ステップS7の処理に移る。ステップS7では、CPU21は、RAM23に記憶されたディスクリプタテーブル23aに基づいて、ホスト装置1に対してUSB接続された接続デバイス50それぞれから漏れ出る電流の電流量を合した総電流量を概算する電流量概算処理を行う。電流量概算処理については、後で詳細に説明する。   On the other hand, if it is determined in step S1 that the increase in the number of connected devices 50 connected by USB has not been detected (S1: NO), the CPU 21 makes a USB connection to the host device 1. It is determined whether or not the USB control circuit 27 detects that the number of connected connection devices 50 has decreased (S5). If it is determined that the decrease in the number of connected devices 50 has not been detected (S5: NO), it is determined that the number of connected devices 50 that are USB-connected to the host device 1 has not been changed. The process returns to S1. On the other hand, if it is determined that the number of connected devices 50 has decreased (S5: YES), the CPU 21 performs “idVendor”, “idProduct”, and the “idVendor”, “idProduct” related to the connected device 50 with which the USB connection with the host device 1 has been released, and “BmAttributes” is deleted from the descriptor table 23a stored in the RAM 23 (S6). As a result, only “idVendor”, “idProduct”, and “bmAttributes” are registered in the descriptor table 23 a for the connection device 50 that is currently USB-connected to the host device 1. When the process of step S6 ends, the process proceeds to step S7. In step S <b> 7, the CPU 21 estimates the total current amount that is the sum of the current amounts of the currents leaking from the connection devices 50 connected to the host device 1 by USB based on the descriptor table 23 a stored in the RAM 23. Perform the amount estimation process. The current amount estimation process will be described later in detail.

次に、CPU21は、電流量概算処理により概算された総電流量が第2電流量以上であるか否かを判断する(S8)。ここで、第2電流量とは、この第2電流量の電流がユーザの人体に流れたときに、ユーザが感受し得る電流量であり、本実施形態では1mAである。そして、総電流量が第2電流量未満であると判断した場合(S8:NO)には、総電流量はユーザが感受しえない電流量であるとして、ステップS1の処理に戻る。一方で、総電流量が第2電流量以上であると判断した場合(S8:YES)には、CPU21は、入出力制御回路26を制御して、漏れ電流の総電流量が第2電流量以上であることをユーザに報知する報知画面をディスプレイ12に表示する(S9)。また、このとき、各接続デバイス50から漏れ出る電流の電流量を示す画面や、ホスト装置1に対して接続された何れかの接続デバイス50をフレーム接地させることを促す画面、接続デバイス50を導電性の机上に置かないように注意を促す画面等をディスプレイ12に表示させてもよい。また、変形例として、スピーカやブザー(共に不図示)から報知音を発生させることでユーザに報知してもよい。このステップS9の処理が終了すると、ステップS1の処理に戻る。以上、ホスト装置1の処理について説明した。   Next, the CPU 21 determines whether or not the total current amount estimated by the current amount estimation process is equal to or greater than the second current amount (S8). Here, the second current amount is a current amount that can be perceived by the user when the current of the second current amount flows through the user's human body, and is 1 mA in the present embodiment. If it is determined that the total current amount is less than the second current amount (S8: NO), the total current amount is determined as a current amount that cannot be perceived by the user, and the process returns to step S1. On the other hand, when determining that the total current amount is equal to or greater than the second current amount (S8: YES), the CPU 21 controls the input / output control circuit 26 so that the total current amount of the leakage current is the second current amount. A notification screen for notifying the user of the above is displayed on the display 12 (S9). At this time, a screen indicating the amount of current leaking from each connection device 50, a screen for prompting any one of the connection devices 50 connected to the host apparatus 1 to be grounded to the frame, and conducting the connection device 50 A screen or the like that calls attention not to be placed on the sex desk may be displayed on the display 12. As a modification, the user may be notified by generating a notification sound from a speaker or a buzzer (both not shown). When the process of step S9 ends, the process returns to step S1. The processing of the host device 1 has been described above.

次に、電流量概算処理について説明する。ここで、本願の発明者は、ホスト装置1に対してUSB接続される接続デバイス50がバスパワーデバイス80である場合には、バスパワーデバイス80の機種や製品に拘わらず漏れ出る電流の電流量は第1電流量未満である一方、接続デバイス50がセルフパワーデバイス60である場合には、接続デバイス50から漏れ出る電流の電流量が第1電流量以上となり、且つセルフパワーデバイス60機種や製品によって漏れ出る電流の電流量が異なることを知見した。そこで、電流量概算処理では、接続デバイス50がセルフパワーデバイス60である場合にはサーバ90に記憶されたデータベース95を参照することで漏れ出る電流の電流量を正確に求める一方で、接続デバイス50がバスパワーデバイス80である場合には、データベース95を参照せずに一律に当該接続デバイス50から漏れ出る電流の電流量が第1電流量未満であるとする。なお、第1電流量とは、上記第2電流量よりも極めて小さい電流量である。以下、電流量概算処理について、図6(a)を参照しつつ詳細に説明する。   Next, the current amount estimation process will be described. Here, when the connection device 50 connected by USB to the host device 1 is the bus power device 80, the inventor of the present application indicates the amount of current leaked regardless of the model or product of the bus power device 80. Is less than the first current amount, but when the connection device 50 is the self-power device 60, the amount of current leaking from the connection device 50 is equal to or greater than the first current amount, and the self-power device 60 models and products It was found that the amount of leaked current differs depending on Therefore, in the current amount estimation process, when the connection device 50 is the self-power device 60, the current amount of the leaked current is accurately obtained by referring to the database 95 stored in the server 90, while the connection device 50. Is a bus power device 80, it is assumed that the amount of current leaking uniformly from the connection device 50 without referring to the database 95 is less than the first current amount. The first current amount is a current amount that is extremely smaller than the second current amount. Hereinafter, the current amount estimation process will be described in detail with reference to FIG.

電流量概算処理では、まず、CPU21は、RAM23に記憶されている電流量テーブル23bを初期化する(B1)。次に、CPU21は、ホスト装置1に対してUSB接続されている接続デバイス50のうちの一つを、処理対象の接続デバイス50に設定する(B2)。次に、CPU21は、RAM23に記憶されたディスクリプタテーブル23aから、処理対象の接続デバイス50に対応する電力情報である「bmAttributes」を抽出し、当該「bmAttributes」の第6ビット目を参照して、処理対象の接続デバイス50がバスパワーデバイス80であるか否かを判断する(B3)。バスパワーデバイス80であると判断した場合(B3:YES)には、処理対象の接続デバイス50から漏れ出る電流の電流量が第1電流量未満であるとして、RAM23に記憶された電流量テーブル23bに登録し(B4)、ステップB7の処理に移る。一方で、ステップB3の処理において、処理対象の接続デバイス50がバスパワーデバイス80ではないと判断した場合(B3:NO)には、処理対象の接続デバイス50がセルフパワーデバイス60であり、漏れ出る電流の電流量が第1電流量以上であるとして、CPU21は、ディスクリプタテーブル23aから、処理対象の接続デバイス50に対応する識別情報である「idVendor」及び「idProduct」を抽出し、ネットワーク制御回路25を制御して、これらを含む電流量送信要求を、サーバ90に送信する(B5)。その後、CPU21は、ネットワーク制御回路25を介して、サーバ90から電流量情報を受信して、当該電流量情報が示す電流量を、処理対象の接続デバイス50から漏れ出る電流の電流量であるとして電流量テーブル23bに登録して(B6)、ステップB7の処理に移る。   In the current amount estimation process, first, the CPU 21 initializes a current amount table 23b stored in the RAM 23 (B1). Next, the CPU 21 sets one of the connection devices 50 that are USB-connected to the host device 1 to the connection device 50 to be processed (B2). Next, the CPU 21 extracts “bmAttributes”, which is power information corresponding to the connection device 50 to be processed, from the descriptor table 23a stored in the RAM 23, and refers to the sixth bit of the “bmAttributes”. It is determined whether or not the connection device 50 to be processed is the bus power device 80 (B3). When it is determined that the power source is the bus power device 80 (B3: YES), the current amount table 23b stored in the RAM 23 is determined that the amount of current leaking from the processing target connection device 50 is less than the first current amount. (B4), the process proceeds to step B7. On the other hand, if it is determined in step B3 that the connection device 50 to be processed is not the bus power device 80 (B3: NO), the connection device 50 to be processed is the self-power device 60 and leaks out. Assuming that the current amount is equal to or greater than the first current amount, the CPU 21 extracts “idVendor” and “idProduct”, which are identification information corresponding to the connection device 50 to be processed, from the descriptor table 23a, and the network control circuit 25 And a current amount transmission request including these is transmitted to the server 90 (B5). Thereafter, the CPU 21 receives current amount information from the server 90 via the network control circuit 25, and assumes that the current amount indicated by the current amount information is the current amount of current leaking from the connection device 50 to be processed. Registration is made in the current amount table 23b (B6), and the process proceeds to step B7.

ステップB7の処理では、CPU21は、ホスト装置1に対してUSB接続されている接続デバイス50の全てが、処理対象の接続デバイス50として設定されたか否かを判断する。そして、処理対象の接続デバイス50として未だ設定されていない接続デバイスがあると判断した場合(B7:NO)には、ステップB2の処理に戻り、新たに処理対象の接続デバイス50を設定する。一方で、接続デバイス50の全てが、処理対象の接続デバイス50として設定されたと判断した場合(B7:YES)には、CPU21は、電流量テーブル23bに登録された、接続デバイス50それぞれの漏れ電流の電流量を合算して総電流量を求める(B8)。なお、本実施形態では、バスパワーデバイス80それぞれから漏れ出る電流の正確な電流量は分からないため、一律に、上記第1電流量未満の所定の電流量であるものとして概算する。以上、電流量概算処理について説明した。   In the process of step B <b> 7, the CPU 21 determines whether all the connection devices 50 that are USB-connected to the host device 1 are set as the connection devices 50 to be processed. If it is determined that there is a connection device that has not yet been set as the connection device 50 to be processed (B7: NO), the process returns to step B2, and a new connection device 50 to be processed is set. On the other hand, when it is determined that all of the connection devices 50 are set as the connection devices 50 to be processed (B7: YES), the CPU 21 leaks each of the connection devices 50 registered in the current amount table 23b. The total current amount is obtained by adding the current amounts (B8). In the present embodiment, since the exact amount of current leaking from each of the bus power devices 80 is not known, it is roughly estimated that the current amount is a predetermined current amount less than the first current amount. The current amount estimation process has been described above.

以上、本実施形態によると、ホスト装置1と接続デバイス50それぞれとの間で送受信されるディスクリプタに含まれる「bmAttributes」を参照することで、それぞれの接続デバイス50がセルフパワーデバイス60であるかバスパワーデバイス80であるかを判断する。そして、接続デバイス50がセルフパワーデバイス60である場合には、データベース95を参照することで、当該接続デバイス50から漏れ出る電流の電流量を正確に求める。一方で、接続デバイス50がバスパワーデバイス80である場合には、データベース95を参照せずに一律に当該接続デバイス50から漏れ出る電流の電流量が第1電流量未満であるとする。これにより、漏れ電流の総電流量の概算を早く正確に行うことができる。   As described above, according to the present embodiment, by referring to “bmAttributes” included in the descriptors transmitted / received between the host device 1 and the connection device 50, whether each connection device 50 is the self-power device 60 or the bus. It is determined whether it is the power device 80. When the connection device 50 is the self-power device 60, the current amount of current leaking from the connection device 50 is accurately obtained by referring to the database 95. On the other hand, when the connection device 50 is the bus power device 80, it is assumed that the amount of current that leaks uniformly from the connection device 50 without referring to the database 95 is less than the first current amount. As a result, the total amount of leakage current can be estimated quickly and accurately.

次に、電流量概算処理の変形例について説明する。上述の実施形態では、電流量概算処理に際して、処理開始時に電流量テーブル23bを初期化し、ホスト装置1に対してUSB接続されている全ての接続デバイス50についての漏れ電流の電流量を導出していたが、本変形例では、処理開始時に電流量テーブル23bを初期化しない。そして、ホスト装置1に対して新たに接続デバイス50がUSB接続された場合には、当該新たに接続デバイスについての漏れ電流の電流量のみを導出して、電流量テーブル23bに追加する。一方で、ホスト装置1との間でUSB接続が解除された接続デバイス50がある場合には、当該接続デバイス50についての電流量を電流量テーブル23bから削除する。以下、本変形例の電流量概算処理について、図6(b)を参照しつつ説明する。   Next, a modification of the current amount estimation process will be described. In the above embodiment, in the current amount estimation process, the current amount table 23b is initialized at the start of processing, and the current amount of leakage current for all the connected devices 50 connected to the host apparatus 1 by USB is derived. However, in this modification, the current amount table 23b is not initialized at the start of processing. When the connection device 50 is newly connected to the host apparatus 1 by USB, only the amount of leakage current for the connection device is newly derived and added to the current amount table 23b. On the other hand, when there is a connection device 50 in which the USB connection with the host device 1 is released, the current amount for the connection device 50 is deleted from the current amount table 23b. Hereinafter, the current amount estimation process of the present modification will be described with reference to FIG.

ホスト装置1に対してUSB接続されている接続デバイス50の数が増加した場合(C1:YES)には、CPU21は、新たにUSB接続された接続デバイス50を処理対象の接続デバイス50として設定し、上述のステップB3〜B6と略同様なステップC2〜C5の処理を行って、ステップC7の処理に移る。これにより、新たにUSB接続された接続デバイス50についての漏れ電流の電流量が電流量テーブル23bに登録される。一方で、ホスト装置1に対してUSB接続されている接続デバイス50の数が減少した場合(C1:NO)には、ホスト装置1とのUSB接続が解除された接続デバイス50についての漏れ電流の電流量を電流量テーブル23bから削除して(C6)、ステップC7の処理に移る。ステップC7の処理では、CPU21は、電流量テーブル23bに登録された、接続デバイス50それぞれの漏れ電流の電流量を合算して総電流量を求める。以上、本変形例に係る電流量概算処理について説明した。
以上、本変形例では、ホスト装置1に対してUSB接続されている接続デバイス50の数が変更された際に、その変更の前後においてホスト装置1との間でUSB接続が継続されている接続デバイス50については、電流量概算処理においては漏れ電流の電流量の導出が行わずに、電流量テーブル23bに既に登録されている電流量が用いられる。その結果、電流量概算処理の処理時間を短くすることができる。
When the number of connection devices 50 connected by USB to the host apparatus 1 increases (C1: YES), the CPU 21 sets the connection device 50 newly connected by USB as the connection device 50 to be processed. Steps C2 to C5 that are substantially the same as Steps B3 to B6 described above are performed, and the process proceeds to Step C7. As a result, the amount of leakage current for the connection device 50 newly connected by USB is registered in the current amount table 23b. On the other hand, when the number of connection devices 50 that are USB-connected to the host device 1 decreases (C1: NO), the leakage current of the connection device 50 that is disconnected from the USB connection with the host device 1 is reduced. The current amount is deleted from the current amount table 23b (C6), and the process proceeds to step C7. In the process of step C7, the CPU 21 calculates the total current amount by adding the current amounts of the leakage currents of the connection devices 50 registered in the current amount table 23b. The current amount estimation process according to this modification has been described above.
As described above, in this modification, when the number of connection devices 50 that are USB-connected to the host device 1 is changed, the USB connection with the host device 1 is continued before and after the change. For the device 50, the current amount already registered in the current amount table 23b is used in the current amount estimation process without deriving the current amount of the leakage current. As a result, the processing time for the current amount estimation processing can be shortened.

(第2実施形態)
次に、本発明の第2実施形態に係るUSB接続システム100について説明する。第2実施形態において第1実施形態と異なる点は、第1実施形態ではホスト装置1が電流量概算処理を実行していたが、第2実施形態では接続デバイス50が電流量概算処理を行う。
ここで、本願の発明者は、ホスト装置1に対してUSB接続されるセルフパワーデバイス60の数が所定値未満であるときには、ホスト装置1に対してUSB接続される接続デバイス50の数に依らずに、漏れ電流の総電流量が第2電流量未満になることを知見した。詳細には、セルフパワーデバイス60の数が10未満であるときには、漏れ電流の総電流量が第2電流量(1mA)未満になることを知見した。そこで、本実施形態では、ホスト装置1に対してUSB接続されるセルフパワーデバイス60の数が10未満であるときには、データベース95を参照せずに一律に当該接続デバイス50から漏れ出る電流の総電流量が第2電流量未満であるとする。
また、本願の発明者は、セルフパワーデバイス60の数が所定値以上(本実施形態では10以上)の場合でも、接続デバイス50に共通の基準電位が接地されている場合には、接続デバイス50それぞれから漏れ出る電流は接続デバイス50の種類及び数に依らず第3電流量未満となることを知見した。そこで、本実施形態では、基準電位が接地されている場合には、電流量概算処理を実行せずに、総電流量が第3電流量未満であると概算する。なお、第3電流量は第2電流量よりも小さい電流量である。また、本実施形態では、ホスト装置1に対してUSB接続されるセルフパワーデバイス60のうち、少なくとも1つのセルフパワーデバイス60は、上記基準電位が接地されているか否かを検出するための接地検出手段を備えている。以下においては、接地検出手段を備えているセルフパワーデバイス60が上述の電流量概算処理を実行するものとして説明する。また、第1実施形態と同一の箇所については同一の符号を付し、その説明を適宜省略する。
(Second Embodiment)
Next, the USB connection system 100 according to the second embodiment of the present invention will be described. The second embodiment is different from the first embodiment in that the host device 1 executes current amount estimation processing in the first embodiment, but the connection device 50 performs current amount estimation processing in the second embodiment.
Here, the inventor of the present application depends on the number of connection devices 50 that are USB-connected to the host device 1 when the number of self-power devices 60 that are USB-connected to the host device 1 is less than a predetermined value. It was found that the total amount of leakage current was less than the second current amount. Specifically, it has been found that when the number of self-power devices 60 is less than 10, the total amount of leakage current is less than the second current amount (1 mA). Therefore, in the present embodiment, when the number of self-powered devices 60 connected to the host apparatus 1 by USB is less than 10, the total current that leaks uniformly from the connected device 50 without referring to the database 95. It is assumed that the amount is less than the second current amount.
In addition, even if the number of the self-power devices 60 is equal to or greater than a predetermined value (10 or more in the present embodiment), the inventor of the present application can connect the connection device 50 if the common reference potential is grounded to the connection device 50. It has been found that the current leaking from each of them is less than the third current amount regardless of the type and number of the connected devices 50. Therefore, in the present embodiment, when the reference potential is grounded, it is estimated that the total current amount is less than the third current amount without executing the current amount estimating process. Note that the third current amount is smaller than the second current amount. In the present embodiment, among the self-powered devices 60 that are USB-connected to the host device 1, at least one self-powered device 60 detects whether or not the reference potential is grounded. Means. In the following description, it is assumed that the self-power device 60 having the ground detection means executes the above-described current amount estimation process. Moreover, the same code | symbol is attached | subjected about the location same as 1st Embodiment, and the description is abbreviate | omitted suitably.

本実施形態に係るセルフパワーデバイス60における制御装置61は、図7(a)に示すように、接地検出制御回路77、及びネットワーク制御回路78を更に備えている。ネットワーク制御回路78は、ネットワークポート66に接続されたLANケーブル6を介して、サーバ90等の外部装置とインターネット7を経由したネットワーク通信を行うための制御回路である。また、セルフパワーデバイス60は、パルス生成回路65を更に備えている。本実施形態では、パルス生成回路65と接地検出制御回路77とで接地検出手段を構成している。   The control device 61 in the self-power device 60 according to the present embodiment further includes a ground detection control circuit 77 and a network control circuit 78 as shown in FIG. The network control circuit 78 is a control circuit for performing network communication with an external device such as the server 90 via the Internet 7 via the LAN cable 6 connected to the network port 66. The self power device 60 further includes a pulse generation circuit 65. In the present embodiment, the pulse generation circuit 65 and the ground detection control circuit 77 constitute a ground detection means.

パルス生成回路65は、図7(b)に示すように、第1コンデンサC1、第2コンデンサC2、電流経路41及び信号変換回路42を含む。第1コンデンサC1は、第1電極C1p1及び第2電極C1p2を有し、第1電極C1p1が外部電源3の一端に接続され、第2電極C1p2が電流経路41に接続される。第2コンデンサC2は、第1電極C2p1及び第2電極C2p2を有し、第1電極C2p1が外部電源3の他端に接続され、第2電極C2p2が電流経路41に接続される。また、外部電源3の他端は接地されている。   As shown in FIG. 7B, the pulse generation circuit 65 includes a first capacitor C1, a second capacitor C2, a current path 41, and a signal conversion circuit. The first capacitor C1 includes a first electrode C1p1 and a second electrode C1p2, the first electrode C1p1 is connected to one end of the external power supply 3, and the second electrode C1p2 is connected to the current path 41. The second capacitor C2 includes a first electrode C2p1 and a second electrode C2p2, the first electrode C2p1 is connected to the other end of the external power supply 3, and the second electrode C2p2 is connected to the current path 41. The other end of the external power supply 3 is grounded.

電流経路41は、第1コンデンサC1の第2電極C1p2と第2コンデンサC2の第2電極C2p2との間に直列に接続され、外部電源3から出力される交流電流Iacが外部電源3に戻る際に、交流電流Iacを経由させるとともに、後述する接続点電圧Vdsを生成する。また、電流経路41は、信号変換回路42及び基準電位線Lgdに接続される。この基準電位線Lgdは、USBポート68のグランド端子に接続されている。このため、基準電位線Lgdの基準電位Vgdは、ホスト装置1に対してUSB接続されている接続デバイス50に共通の基準電位となる。   The current path 41 is connected in series between the second electrode C1p2 of the first capacitor C1 and the second electrode C2p2 of the second capacitor C2, and when the alternating current Iac output from the external power supply 3 returns to the external power supply 3 In addition, an alternating current Iac is passed through and a connection point voltage Vds described later is generated. The current path 41 is connected to the signal conversion circuit 42 and the reference potential line Lgd. The reference potential line Lgd is connected to the ground terminal of the USB port 68. Therefore, the reference potential Vgd of the reference potential line Lgd is a reference potential common to the connection device 50 that is USB-connected to the host device 1.

信号変換回路42は、電流経路41により生成された接続点電圧Vdsを、パルス信号Pzcに変換する回路である。信号変換回路42は、トランジスタQ1及び抵抗R1を含む。トランジスタQ1はベース電圧によってスイッチング動作するスイッチングトランジスタとして利用される。トランジスタQ1のコレクタCは抵抗R1の一端に接続され、ベースBが電流経路41に接続され、エミッタEは基準電位線Lgdに接続される。抵抗R1はプルアップ抵抗であり、その他端は3.3Vの直流電源に接続されている。トランジスタQ1は、ベースBに供給されるベース電圧に応じてオン・オフされる。また、パルス信号Pzcは、トランジスタQ1のコレクタCから出力され、トランジスタQ1がオン時にはゼロVとなり、トランジスタQ1がオフ時に3.3Vとなる。   The signal conversion circuit 42 is a circuit that converts the connection point voltage Vds generated by the current path 41 into a pulse signal Pzc. The signal conversion circuit 42 includes a transistor Q1 and a resistor R1. The transistor Q1 is used as a switching transistor that performs a switching operation by a base voltage. The collector C of the transistor Q1 is connected to one end of the resistor R1, the base B is connected to the current path 41, and the emitter E is connected to the reference potential line Lgd. The resistor R1 is a pull-up resistor, and the other end is connected to a 3.3V DC power source. The transistor Q1 is turned on / off according to the base voltage supplied to the base B. The pulse signal Pzc is output from the collector C of the transistor Q1, and becomes zero V when the transistor Q1 is on, and 3.3 V when the transistor Q1 is off.

電流経路41は、ダイオードD1〜D4からなるブリッジ回路、及び、抵抗R2、R3を含む。ダイオードD1及びダイオードD3のカソードは第1接続点Nd1において接続され、ダイオードD1のアノードは第2コンデンサC2の第2電極C2p2に接続され、ダイオードD3のアノードは第1コンデンサC1の第2電極C1p2に接続される。また、ダイオードD2及びダイオードD4のアノードは第3接続点Nd3において接続され、ダイオードD2のカソードは第2コンデンサC2の第2電極C2p2に接続され、ダイオードD4のカソードは第1コンデンサC1の第2電極C1p2に接続される。また、抵抗R2の一端がダイオードD1のカソードに接続され、抵抗R3の一端が基準電位線Lgdに接続される。抵抗R2と抵抗R3とによる第2接続点Nd2がトランジスタQ1のベースBに接続される。ここで、抵抗R2と抵抗R3は電流経路を形成するとともに、抵抗R2はトランジスタQ1のベース電流を調整する機能を有する。   The current path 41 includes a bridge circuit including diodes D1 to D4 and resistors R2 and R3. The cathodes of the diode D1 and the diode D3 are connected at the first connection point Nd1, the anode of the diode D1 is connected to the second electrode C2p2 of the second capacitor C2, and the anode of the diode D3 is connected to the second electrode C1p2 of the first capacitor C1. Connected. The anodes of the diode D2 and the diode D4 are connected at the third connection point Nd3, the cathode of the diode D2 is connected to the second electrode C2p2 of the second capacitor C2, and the cathode of the diode D4 is the second electrode of the first capacitor C1. Connected to C1p2. One end of the resistor R2 is connected to the cathode of the diode D1, and one end of the resistor R3 is connected to the reference potential line Lgd. A second connection point Nd2 formed by the resistors R2 and R3 is connected to the base B of the transistor Q1. Here, the resistors R2 and R3 form a current path, and the resistor R2 has a function of adjusting the base current of the transistor Q1.

ここで、ホスト装置1にUSB接続される接続デバイス50のうちの何れかがフレーム接地されており、基準電位Vgdが接地されている場合には、交流電流Iacが正の半周期(以下、正サイクル時)においては、交流電流Iacは、外部電源3から、第1コンデンサC1、ダイオードD3、抵抗R2、抵抗R3の順に流れ、接地を介して、外部電源3に戻る。なお、交流電流Iacの一部は、トランジスタQ1のベース・エミッタ間にも流れる。一方、交流電流Iacが負の半周期(負サイクル時)においては、交流電流Iacは、外部電源3から、接地を介して、ダイオードD4、第1コンデンサC1の順に流れ、外部電源3に戻る。   Here, when any of the connection devices 50 connected to the host apparatus 1 by USB is frame grounded and the reference potential Vgd is grounded, the alternating current Iac is positive half cycle (hereinafter, positive In the cycle), the alternating current Iac flows from the external power source 3 in the order of the first capacitor C1, the diode D3, the resistor R2, and the resistor R3, and returns to the external power source 3 through the ground. Part of the alternating current Iac also flows between the base and emitter of the transistor Q1. On the other hand, in the negative half cycle (in the negative cycle) of the alternating current Iac, the alternating current Iac flows from the external power supply 3 through the ground in the order of the diode D4 and the first capacitor C1, and returns to the external power supply 3.

従って、基準電位Vgdが接地されている場合には、図8(a)に示すように、交流電流Iacが正サイクル時において、第1接続点Nd1の接続点電圧Vdsが0.6Vを超えると、トランジスタQ1がオンされてパルス信号PzcがゼロVになり、接続点電圧Vdsが0.6Vを下回ると、トランジスタQ1がオフされてパルス信号Pzcが3.3Vになる。また、交流電流Iacが負サイクル時においては、接続点電圧Vdsが常に0.6Vを下回るため、パルス信号Pzcが3.3Vになる。   Therefore, when the reference potential Vgd is grounded, as shown in FIG. 8A, when the connection voltage Vds at the first connection point Nd1 exceeds 0.6 V in the positive cycle, the alternating current Iac is in the positive cycle. When the transistor Q1 is turned on and the pulse signal Pzc becomes zero V, and the node voltage Vds falls below 0.6V, the transistor Q1 is turned off and the pulse signal Pzc becomes 3.3V. Further, when the alternating current Iac is in a negative cycle, the connection point voltage Vds is always lower than 0.6V, so that the pulse signal Pzc becomes 3.3V.

これに対して、ホスト装置1にUSB接続される接続デバイス50の何れもフレーム接地されておらず、基準電位Vgdが接地されない場合は以下のようになる。正サイクル時において、交流電流Iacは、外部電源3から、第1コンデンサC1、ダイオードD3、抵抗R2、抵抗R3、基準電位線Lgd、ダイオードD2、第2コンデンサC2の順に流れ、外部電源3に戻る。一方、負サイクル時においては、交流電流Iacは、外部電源3から、第2コンデンサC2、ダイオードD1、抵抗R2、抵抗R3、基準電位線Lgd、ダイオードD4、第1コンデンサC1の順に流れ、外部電源3に戻る。このように、正サイクル時及び負サイクル時の電流経路が逆になるだけで、交流電流Iacは正サイクル時及び負サイクル時においてトランジスタQ1のベース・エミッタ間に流れる。   On the other hand, when none of the connection devices 50 that are USB-connected to the host apparatus 1 are frame grounded and the reference potential Vgd is not grounded, the following occurs. During the positive cycle, the alternating current Iac flows from the external power source 3 in the order of the first capacitor C1, the diode D3, the resistor R2, the resistor R3, the reference potential line Lgd, the diode D2, and the second capacitor C2, and returns to the external power source 3. . On the other hand, in the negative cycle, the alternating current Iac flows from the external power source 3 in the order of the second capacitor C2, the diode D1, the resistor R2, the resistor R3, the reference potential line Lgd, the diode D4, and the first capacitor C1. Return to 3. Thus, the AC current Iac flows between the base and emitter of the transistor Q1 in the positive cycle and the negative cycle only by reversing the current paths in the positive cycle and the negative cycle.

従って、基準電位Vgdが接地されていない場合において、図8(b)に示すように、交流電流Iacが正サイクル時及び負サイクル時は共に、第1接続点Nd1の接続点電圧Vdsが0.6Vを超えると、トランジスタQ1がオンされてパルス信号PzcがゼロVになり、接続点電圧Vdsが0.6Vを下回ると、トランジスタQ1がオフされてパルス信号Pzcが3.3Vになる。このため、基準電位Vgdが接地されている場合と大地接地されていない場合とでは、パルス信号Pzcのパルス周期は大きく異なることになる。そこで、本実施形態においては、接地検出制御回路77が、パルス生成回路65により生成されたパルス信号Pzcのパルス周期に基づいて、基準電位Vgdが接地されているか否かを検出する。   Therefore, when the reference potential Vgd is not grounded, as shown in FIG. 8B, the node voltage Vds at the first node Nd1 is 0. 0 when the alternating current Iac is in the positive cycle and the negative cycle. When the voltage exceeds 6V, the transistor Q1 is turned on and the pulse signal Pzc becomes zero V. When the node voltage Vds is less than 0.6V, the transistor Q1 is turned off and the pulse signal Pzc becomes 3.3V. For this reason, the pulse period of the pulse signal Pzc differs greatly between when the reference potential Vgd is grounded and when it is not grounded. Therefore, in the present embodiment, the ground detection control circuit 77 detects whether or not the reference potential Vgd is grounded based on the pulse period of the pulse signal Pzc generated by the pulse generation circuit 65.

次に、本実施形態に係る、ホスト装置1のCPU21が、ROM22に記憶された制御プログラム22aに従って実行する処理の一例について、図9を参照しつつ説明する。
CPU21は、上述のステップS1〜S6の処理と略同様なステップD1〜D6の処理を行う。これにより、これにより、RAM23に記憶されるディスクリプタテーブル23aには、ホスト装置1に対して現在USB接続されている接続デバイス50についての、「idVendor」「idProduct」、及び「bmAttributes」が登録されることになる。この後、CPU21は、USB制御回路27を制御して、RAM23に記憶されるディスクリプタテーブル23aを、USBケーブル5を介して電流量概算処理を行うセルフパワーデバイス60に対して送信する(D7)。以上、ホスト装置1の処理について説明した。
Next, an example of processing executed by the CPU 21 of the host device 1 according to the present embodiment in accordance with the control program 22a stored in the ROM 22 will be described with reference to FIG.
CPU21 performs the process of step D1-D6 substantially the same as the process of the above-mentioned step S1-S6. Thereby, “idVendor”, “idProduct”, and “bmAttributes” of the connection device 50 that is currently USB-connected to the host apparatus 1 are registered in the descriptor table 23 a stored in the RAM 23. It will be. Thereafter, the CPU 21 controls the USB control circuit 27 to transmit the descriptor table 23a stored in the RAM 23 to the self-power device 60 that performs current amount estimation processing via the USB cable 5 (D7). The processing of the host device 1 has been described above.

次に、本実施形態に係る、セルフパワーデバイス60のCPU71が、ROM72に記憶された制御プログラム72aに従って実行する処理の一例について、図10を参照しつつ説明する。
まず、CPU71は、USB制御回路76がUSBケーブル5を介してホスト装置1からディスクリプタテーブル23aを受信したか否かを判断する(E1)。ディスクリプタテーブル23aを受信していないと判断した場合(E1:NO)には、ディスクリプタテーブル23aの受信待ちを行う。一方で、ディスクリプタテーブル23aを受信したと判断した場合(E1:YES)には、受信したディスクリプタテーブル23aをRAM73に記憶する(E2)。このようにホスト装置1からディスクリプタテーブル23aを受信することで、ホスト装置1と接続デバイス50それぞれとの間で送受信される電力情報及び識別情報を集約することができる(電力情報集約処理、識別情報集約処理)。
Next, an example of processing executed by the CPU 71 of the self-power device 60 according to the present embodiment in accordance with the control program 72a stored in the ROM 72 will be described with reference to FIG.
First, the CPU 71 determines whether or not the USB control circuit 76 has received the descriptor table 23a from the host device 1 via the USB cable 5 (E1). When it is determined that the descriptor table 23a has not been received (E1: NO), reception of the descriptor table 23a is waited. On the other hand, if it is determined that the descriptor table 23a has been received (E1: YES), the received descriptor table 23a is stored in the RAM 73 (E2). By receiving the descriptor table 23a from the host device 1 in this way, it is possible to collect power information and identification information transmitted and received between the host device 1 and each connected device 50 (power information aggregation processing, identification information). Aggregation processing).

次に、CPU71は、RAM73に記憶されたディスクリプタテーブル23aの、接続デバイス50それぞれに対応する電力情報を参照することで、ホスト装置1に対してUSB接続されているセルフパワーデバイス60の数を判断するセルフパワーデバイス数判断処理を行う(E3)。そして、判断したセルフパワーデバイス60の数が10未満である場合(E4:YES)には、CPU71は、電流量概算処理を実行せずに、ホスト装置1に対してUSB接続された接続デバイス50から漏れ出る電流の総電流量が第2電流量未満であると概算し、入出力制御回路75を制御して、タッチパネル63に総電流量が第2電流量未満である旨を示す画面を表示させて(E5)、ステップE1の処理に戻る。   Next, the CPU 71 refers to the power information corresponding to each of the connected devices 50 in the descriptor table 23 a stored in the RAM 73 to determine the number of self-power devices 60 that are USB-connected to the host device 1. The number of self-powered devices to be determined is determined (E3). If the determined number of self-powered devices 60 is less than 10 (E4: YES), the CPU 71 does not execute the current amount estimation process, and the connected device 50 is USB-connected to the host device 1. Approximate that the total amount of current leaking from the second current amount is less than the second current amount, and control the input / output control circuit 75 to display on the touch panel 63 a screen indicating that the total current amount is less than the second current amount (E5), and the process returns to step E1.

一方で、導出したセルフパワーデバイス60の数が10以上である場合(E4:NO)には、CPU71は、接地検出制御回路77を制御して、接続デバイス50共通の基準電位Vgdが接地されているか否かを検出する接地検出処理を行う(E6)。そして、基準電位Vgdが接地されていると検出した場合(E7:YES)には、CPU71は、ホスト装置1に対してUSB接続された接続デバイス50から漏れ出る電流の総電流量が第3電流量未満であると概算し、入出力制御回路75を制御して、総電流量が第3電流量未満である旨を示す画面をタッチパネル63に表示させて(E8)、ステップE1の処理に戻る。
一方で、基準電位Vgdが接地されていないと検出した場合(E7:NO)には、CPU71は、電流量概算処理を実行する(E9)。この電流量概算処理は、第1実施形態で説明したホスト装置1が実行する電流量概算処理と略同様なので説明を省略する。この後、CPU71は、入出力制御回路75を制御して、電流量概算処理で概算した総電流量を示す画面をタッチパネル63に表示させて(E10)、ステップE1の処理に戻る。以上、セルフパワーデバイス60の処理について説明した。
On the other hand, when the number of derived self-power devices 60 is 10 or more (E4: NO), the CPU 71 controls the ground detection control circuit 77 to ground the reference potential Vgd common to the connection device 50. A grounding detection process for detecting whether or not there is is performed (E6). When it is detected that the reference potential Vgd is grounded (E7: YES), the CPU 71 determines that the total amount of current leaking from the connection device 50 connected to the host device 1 by USB connection is the third current. It is estimated that the amount is less than the amount, the input / output control circuit 75 is controlled, and a screen indicating that the total amount of current is less than the third amount of current is displayed on the touch panel 63 (E8), and the processing returns to step E1. .
On the other hand, when it is detected that the reference potential Vgd is not grounded (E7: NO), the CPU 71 executes current amount estimation processing (E9). Since this current amount estimation process is substantially the same as the current amount estimation process executed by the host device 1 described in the first embodiment, the description thereof is omitted. Thereafter, the CPU 71 controls the input / output control circuit 75 to display on the touch panel 63 a screen showing the total current amount estimated in the current amount estimation processing (E10), and returns to the processing in step E1. The processing of the self power device 60 has been described above.

以上、本実施形態によると、ホスト装置1に対してUSB接続されるセルフパワーデバイス60の数が10未満であるときには、データベース95を参照せずに一律に当該接続デバイス50から漏れ出る電流の総電流量が第2電流量未満であるとすることで、漏れ電流の総電流量を早く概算することができる。加えて、セルフパワーデバイス60の数が10以上の場合でも、共通の基準電位Vgdが接地されている場合には、電流量概算処理を実行せずに、総電流量が第3電流量未満であると概算することで、漏れ電流の総電流量の概算を早く行うことができる。   As described above, according to the present embodiment, when the number of self-powered devices 60 that are USB-connected to the host device 1 is less than 10, the total current that leaks uniformly from the connected device 50 without referring to the database 95. By assuming that the current amount is less than the second current amount, the total amount of leakage current can be estimated quickly. In addition, even when the number of self-power devices 60 is 10 or more, if the common reference potential Vgd is grounded, the total current amount is less than the third current amount without executing the current amount estimation process. By estimating that there is, it is possible to quickly estimate the total amount of leakage current.

以上、本発明の好適な実施の形態について説明したが、本発明は上述の実施の形態に限られるものではなく、特許請求の範囲に記載した限りにおいて様々な変更が可能なものである。例えば、第1実施形態において、接続デバイス50が、第2実施形態と同様に電流量概算処理を実行するように構成されていてもよい。同様に、第2実施形態において、ホスト装置1が電流量概算処理を実行するように構成されていてもよい。   The preferred embodiments of the present invention have been described above. However, the present invention is not limited to the above-described embodiments, and various modifications can be made as long as they are described in the claims. For example, in the first embodiment, the connection device 50 may be configured to execute a current amount estimation process as in the second embodiment. Similarly, in the second embodiment, the host device 1 may be configured to execute a current amount estimation process.

また、上述の実施形態では、データベース95はサーバ90が備えていたが、特にこれに限定されるものではなく、例えば、接続デバイス50やホスト装置1がデータベース95を備えていてもよい。
また、上述の実施形態では、ホスト装置1に対して接続デバイス50がUSB接続された際に、デバイスディスクリプタ及びコンフィギュレーションディスクリプタが同時に接続デバイス50からホスト装置1に対して送信されるように構成されていたが、別々のタイミングで送信されるように構成されていてもよい。即ち、接続デバイスの識別情報及び電力情報が別々のタイミングで送信されるように構成されていてもよい。また、ホスト装置1は、接続デバイス50から先に電力情報のみを受信し、当該電力情報に基づき接続デバイス50がセルフパワーデバイス60であると判断した場合のみ、当該接続デバイス50に対して識別情報の送信要求を行って識別情報を受信するように構成されていてもよい。
また、第2実施形態において、セルフパワーデバイス60は、セルフパワーデバイス数判断処理を実行せずに、接続検出処理のみを実行するように構成されていてもよい。即ち、セルフパワーデバイス60の数が所定値未満の場合でも、基準電位Vgdが接地されていない場合には電流量概算処理を実行するように構成されていてもよい。同様に、接続検出処理を実行せずに、セルフパワーデバイス数判断処理のみを実行するように構成されていてもよい。即ち、セルフパワーデバイス60の数が所定値以上の場合には、一律に電流量概算処理を実行するように構成されていてもよい。また、第2実施形態においては、セルフパワーデバイス60は、セルフパワーデバイス数判断処理を実行した後に接地検出処理を実行していたが、接地検出処理を実行し、その検出結果が、基準電位Vgdが接地されていないことを示す場合にのみ、セルフパワーデバイス数判断処理を実行するように構成されていてもよい。
In the above-described embodiment, the database 95 is provided in the server 90. However, the database 95 is not particularly limited thereto. For example, the connection device 50 or the host apparatus 1 may include the database 95.
In the above-described embodiment, when the connection device 50 is USB-connected to the host device 1, the device descriptor and the configuration descriptor are simultaneously transmitted from the connection device 50 to the host device 1. However, it may be configured to be transmitted at different timings. In other words, the connection device identification information and the power information may be transmitted at different timings. Further, the host device 1 receives only the power information from the connected device 50 first, and only when the connected device 50 determines that the connected device 50 is the self-power device 60 based on the power information, the host device 1 identifies the connected device 50 with the identification information. May be configured to receive the identification information.
In the second embodiment, the self power device 60 may be configured to execute only the connection detection process without executing the self power device number determination process. That is, even when the number of self-powered devices 60 is less than a predetermined value, the current amount estimation process may be executed when the reference potential Vgd is not grounded. Similarly, it may be configured to execute only the self-power device number determination process without executing the connection detection process. In other words, when the number of self-powered devices 60 is equal to or greater than a predetermined value, the current amount estimation process may be uniformly executed. In the second embodiment, the self power device 60 executes the ground detection process after executing the self power device number determination process. However, the self power device 60 executes the ground detection process, and the detection result is the reference potential Vgd. It may be configured to execute the self-power device number determination process only when indicates that is not grounded.

1 ホスト装置
50 接続デバイス
60 セルフパワーデバイス
80 バスパワーデバイス
85 データベース
100 USB接続システム
1 Host device 50 Connection device 60 Self power device 80 Bus power device 85 Database 100 USB connection system

Claims (7)

ホスト装置と、
前記ホスト装置に対してUSB接続される少なくとも1つの接続デバイスと、
前記ホスト装置に対してUSB接続可能な前記接続デバイスのうちの自己電源から電力供給を受けるセルフパワーデバイスの識別情報と、このセルフパワーデバイスから漏れ出る電流の電流量とを関連付けて記憶するデータベースと
を備え、
前記接続デバイスは、
当該接続デバイスが、前記セルフパワーデバイス及び前記ホスト装置からUSB接続を介して電力供給を受けるバスパワーデバイスの何れであるかを示す電力情報を前記ホスト装置に送信する電力情報送信処理を実行可能であり、
前記接続デバイスのうちの少なくとも前記セルフパワーデバイスは、
当該セルフパワーデバイスの前記識別情報を前記ホスト装置に送信する識別情報送信処理を実行可能であり、
前記ホスト装置は、
前記接続デバイスそれぞれから前記電力情報を受信する電力情報受信処理と、
前記接続デバイスのうちの前記セルフパワーデバイスから前記識別情報を受信する識別情報受信処理とを実行可能であり、
前記ホスト装置、及び前記接続デバイスのうちの少なくとも何れかが、
前記ホスト装置と前記接続デバイスそれぞれとの間で送受信される前記電力情報を集約する電力情報集約処理と、
前記ホスト装置と前記セルフパワーデバイスそれぞれとの間で送受信される前記識別情報を集約する識別情報集約処理と、
前記電力情報集約処理及び前記識別情報集約処理により集約された前記電力情報及び前記識別情報に基づいて、前記接続デバイスそれぞれから漏れ出る電流の電流量を合わした総電流量を概算する電流量概算処理とを実行可能であり、
前記電流量概算処理は、
前記接続デバイスそれぞれから漏れ出る電流の電流量について、
前記電力情報に基づき前記バスパワーデバイスであると判断した前記接続デバイスについては、当該接続デバイスから漏れ出る電流の電流量が第1電流量未満であるとし、
前記電力情報に基づき前記セルフパワーデバイスであると判断した前記接続デバイスについては、当該接続デバイスから漏れ出る電流の電流量が第1電流量以上であるとして、前記データベースを参照して、当該接続デバイスの前記識別情報に関連付けられた前記電流量を、当該接続デバイスから漏れ出る電流の電流量とすることを特徴とするUSB接続システム。
A host device;
At least one connection device connected by USB to the host device;
A database for associating and storing identification information of a self-powered device that receives power supply from a self-power supply among the connected devices capable of USB connection to the host device, and a current amount of current leaking from the self-powered device; With
The connection device is:
It is possible to execute power information transmission processing for transmitting power information indicating whether the connection device is a self-powered device or a bus power device receiving power supply from the host device via a USB connection to the host device. Yes,
At least the self-powered device of the connection devices is
An identification information transmission process for transmitting the identification information of the self-powered device to the host device can be executed,
The host device is
A power information reception process for receiving the power information from each of the connected devices;
An identification information receiving process for receiving the identification information from the self-powered device of the connected devices can be executed,
At least one of the host device and the connection device is
Power information aggregation processing for aggregating the power information transmitted and received between the host device and each of the connected devices;
An identification information aggregation process for aggregating the identification information transmitted and received between the host device and each of the self-power devices;
Based on the power information and the identification information aggregated by the power information aggregation process and the identification information aggregation process, a current amount estimation process that approximates a total current amount that combines the current amounts of currents leaking from the connected devices. And is feasible
The current amount estimation process is:
About the amount of current leaking from each of the connected devices,
For the connection device determined to be the bus power device based on the power information, the amount of current leaking from the connection device is less than the first current amount,
For the connection device determined to be the self-power device based on the power information, the connection device is referred to by referring to the database on the assumption that the amount of current leaking from the connection device is equal to or greater than the first current amount. The USB connection system, wherein the amount of current associated with the identification information is a current amount of current leaking from the connected device.
前記ホスト装置、及び前記接続デバイスのうちの少なくとも何れかは、
前記電力情報集約処理により集約された前記電力情報に基づき、前記ホスト装置に対してUSB接続される前記セルフパワーデバイスの数が所定値以上であるか否かを判断するセルフパワーデバイス数判断処理を更に実行可能であり、
前記セルフパワーデバイス数判断処理により前記セルフパワーデバイスの数が所定値未満であると判断した場合には、前記電流量概算処理を実行せずに前記総電流量が第2電流量未満であると概算し、
前記セルフパワーデバイス数判断処理により前記セルフパワーデバイスの数が前記所定値以上であると判断した場合には、前記電流量概算処理を実行して前記総電流量を概算することを特徴とする請求項1に記載のUSB接続システム。
At least one of the host device and the connection device is:
Self power device number determination processing for determining whether or not the number of the self power devices USB-connected to the host device is equal to or greater than a predetermined value based on the power information aggregated by the power information aggregation processing. Is further feasible,
When it is determined that the number of self-power devices is less than a predetermined value by the self-power device number determination process, the total current amount is less than a second current amount without executing the current amount estimation process. Approximate,
When the number of self-power devices is determined to be greater than or equal to the predetermined value by the self-power device number determination process , the current amount estimation process is executed to estimate the total current amount. Item 4. The USB connection system according to Item 1.
前記所定値が10であることを特徴とする請求項2に記載のUSB接続システム。   The USB connection system according to claim 2, wherein the predetermined value is 10. 前記ホスト装置に対してUSB接続される前記接続デバイスそれぞれは、共通の基準電位に接続されており、
前記接続デバイスのうちの少なくとも1つは、
前記基準電位が接地されているか否かを検出するための接地検出手段を有しており、
前記ホスト装置、及び前記接続デバイスのうちの少なくとも何れかが、
前記電力情報集約処理により集約された前記電力情報に基づき、前記ホスト装置に対してUSB接続される前記セルフパワーデバイスの数が所定値以上であるか否かを判断するセルフパワーデバイス数判断処理と、
前記接地検出手段に前記基準電位が接地されているか否かを検出させる接地検出処理とを更に実行可能であり、
前記セルフパワーデバイス数判断処理により前記セルフパワーデバイスの数が所定値未満であると判断した場合には、前記電流量概算処理を実行せずに前記総電流量が第2電流量未満であると概算し、
前記セルフパワーデバイス数判断処理により前記セルフパワーデバイスの数が前記所定値以上であると判断した場合には、前記接地検出処理を実行し、
前記接地検出処理により前記基準電位が接地されていると前記接地検出手段が検出した場合には、前記電流量概算処理を実行せずに、前記総電流量が第3電流量未満であると概算し、
前記接地検出処理により前記基準電位が接地されていないと前記接地検出手段が検出した場合には、前記電流量概算処理を実行して前記総電流量を概算することを特徴とする請求項1に記載のUSB接続システム。
Each of the connection devices that are USB-connected to the host device is connected to a common reference potential,
At least one of the connected devices is
Having ground detection means for detecting whether or not the reference potential is grounded;
At least one of the host device and the connection device is
A self-power device number determination process for determining whether the number of the self-power devices USB-connected to the host device is greater than or equal to a predetermined value based on the power information aggregated by the power information aggregation process; ,
It is possible to further execute a ground detection process for causing the ground detection means to detect whether or not the reference potential is grounded,
When it is determined that the number of self-power devices is less than a predetermined value by the self-power device number determination process, the total current amount is less than a second current amount without executing the current amount estimation process. Approximate,
When it is determined that the number of the self power devices is equal to or greater than the predetermined value by the self power device number determination process , the ground detection process is executed.
When the ground detection means detects that the reference potential is grounded by the ground detection processing, the total current amount is estimated to be less than the third current amount without executing the current amount estimation processing. And
2. The total current amount is estimated by executing the current amount estimation process when the ground detection means detects that the reference potential is not grounded by the ground detection processing. The described USB connection system.
少なくとも1つの接続デバイスがUSB接続されるホスト装置であって、
前記接続デバイスそれぞれから、当該接続デバイスが自己電源から電力供給を受けるセルフパワーデバイス及び前記ホスト装置からUSB接続を介して電力供給を受けるバスパワーデバイスの何れであるかを示す電力情報を受信する電力情報受信処理と、
前記接続デバイスのうちの前記セルフパワーデバイスから当該セルフパワーデバイスの識別情報を受信する識別情報受信処理と、
前記電力情報受信処理により前記接続デバイスそれぞれから受信した前記電力情報を集約する電力情報集約処理と、
前記識別情報受信処理により前記セルフパワーデバイスから受信した前記識別情報を集約する識別情報集約処理と、
前記電力情報集約処理及び前記識別情報集約処理により集約された前記電力情報及び前記識別情報に基づいて、前記接続デバイスそれぞれから漏れ出る電流の電流量を合わした総電流量を概算する電流量概算処理と
を実行し、
前記電流量概算処理は、
前記接続デバイスそれぞれから漏れ出る電流の電流量について、
前記電力情報に基づき前記バスパワーデバイスであると判断した前記接続デバイスについては、当該接続デバイスから漏れ出る電流の電流量が所定電流量未満であるとし、
前記電力情報に基づき前記セルフパワーデバイスであると判断した前記接続デバイスについては、当該接続デバイスから漏れ出る電流の電流量が前記所定電流量以上であるとして、前記セルフパワーデバイスの識別情報と、このセルフパワーデバイスから漏れ出る電流の電流量とが関連付けて記憶されたデータベースを参照して、当該接続デバイスの前記識別情報に関連付けられた前記電流量を、当該接続デバイスから漏れ出る電流の電流量とすることを特徴とするホスト装置。
A host device to which at least one connection device is connected by USB;
Power for receiving from each of the connected devices power information indicating whether the connected device is a self-powered device that receives power from its own power supply or a bus-powered device that receives power from the host device via a USB connection Information reception processing;
An identification information reception process for receiving identification information of the self-power device from the self-power device of the connection devices;
A power information aggregation process for aggregating the power information received from each of the connected devices by the power information reception process;
An identification information aggregation process for aggregating the identification information received from the self-power device by the identification information reception process;
Based on the power information and the identification information aggregated by the power information aggregation process and the identification information aggregation process, a current amount estimation process that approximates a total current amount that combines the current amounts of currents leaking from the connected devices. And run
The current amount estimation process is:
About the amount of current leaking from each of the connected devices,
For the connection device determined to be the bus power device based on the power information, the amount of current leaking from the connection device is less than a predetermined amount of current,
For the connection device that is determined to be the self-power device based on the power information, assuming that the amount of current leaking from the connection device is greater than or equal to the predetermined current amount, the identification information of the self-power device, and this With reference to a database stored in association with the current amount of current leaking from the self-powered device, the current amount associated with the identification information of the connected device is set as the current amount of current leaking from the connected device. And a host device.
複数の接続デバイスがUSB接続されるホスト装置に対してUSB接続される接続デバイスであって、
前記ホスト装置が前記接続デバイスそれぞれから受信した、当該接続デバイスが自己電源から電力供給を受けるセルフパワーデバイス及び前記ホスト装置からUSB接続を介して電力供給を受けるバスパワーデバイスの何れであるかを示す電力情報を前記ホスト装置から受信して集約する電力情報集約処理と、
前記ホスト装置が前記接続デバイスのうちの前記セルフパワーデバイスから受信した、当該セルフパワーデバイスの識別情報を前記ホスト装置から受信して集約する識別情報集約処理と、
前記電力情報集約処理及び前記識別情報集約処理により集約された前記電力情報及び前記識別情報に基づいて、前記接続デバイスそれぞれから漏れ出る電流の電流量を合わした総電流量を概算する電流量概算処理と
を実行し、
前記電流量概算処理は、
前記接続デバイスそれぞれから漏れ出る電流の電流量について、
前記電力情報に基づき前記バスパワーデバイスであると判断した前記接続デバイスについては、当該接続デバイスから漏れ出る電流の電流量が所定電流量未満であるとし、
前記電力情報に基づき前記セルフパワーデバイスであると判断した前記接続デバイスについては、当該接続デバイスから漏れ出る電流の電流量が前記所定電流量以上であるとして、前記セルフパワーデバイスの識別情報と、このセルフパワーデバイスから漏れ出る電流の電流量とが関連付けて記憶されたデータベースを参照して、当該接続デバイスの前記識別情報に関連付けられた前記電流量を、当該接続デバイスから漏れ出る電流の電流量とすることを特徴とする接続デバイス。
A connection device that is USB-connected to a host device to which a plurality of connection devices are USB-connected,
Indicates whether the host device received from each of the connected devices is a self-powered device that receives power supply from a self-power supply or a bus-powered device that receives power supply from the host device via a USB connection Power information aggregation processing for receiving and aggregating power information from the host device;
An identification information aggregation process in which the host device receives from the host device the identification information of the self-power device received from the self-power device of the connected devices and aggregates the identification information of the self-power device;
Based on the power information and the identification information aggregated by the power information aggregation process and the identification information aggregation process, a current amount estimation process that approximates a total current amount that combines the current amounts of currents leaking from the connected devices. And run
The current amount estimation process is:
About the amount of current leaking from each of the connected devices,
For the connection device determined to be the bus power device based on the power information, the amount of current leaking from the connection device is less than a predetermined amount of current,
For the connection device that is determined to be the self-power device based on the power information, assuming that the amount of current leaking from the connection device is greater than or equal to the predetermined current amount, the identification information of the self-power device, and this With reference to a database stored in association with the current amount of current leaking from the self-powered device, the current amount associated with the identification information of the connected device is set as the current amount of current leaking from the connected device. A connection device characterized by:
複数の接続デバイスがUSB接続されるホスト装置に対してUSB接続される接続デバイスに実行させる制御プログラムであって、
前記接続デバイスに、
前記ホスト装置が前記接続デバイスそれぞれから受信した、当該接続デバイスが自己電源から電力供給を受けるセルフパワーデバイス及び前記ホスト装置からUSB接続を介して電力供給を受けるバスパワーデバイスの何れであるかを示す電力情報を前記ホスト装置から受信して集約する電力情報集約処理と、
前記ホスト装置が前記接続デバイスのうちの前記セルフパワーデバイスから受信した、当該セルフパワーデバイスの識別情報を前記ホスト装置から受信して集約する識別情報集約処理と、
前記電力情報集約処理及び前記識別情報集約処理により集約された前記電力情報及び前記識別情報に基づいて、前記接続デバイスそれぞれから漏れ出る電流の電流量を合わした総電流量を概算する電流量概算処理と
を実行させ、
前記電流量概算処理は、
前記接続デバイスそれぞれから漏れ出る電流の電流量について、
前記電力情報に基づき前記バスパワーデバイスであると判断した前記接続デバイスについては、当該接続デバイスから漏れ出る電流の電流量が所定電流量未満であるとし、
前記電力情報に基づき前記セルフパワーデバイスであると判断した前記接続デバイスについては、当該接続デバイスから漏れ出る電流の電流量が前記所定電流量以上であるとして、前記セルフパワーデバイスの識別情報と、このセルフパワーデバイスから漏れ出る電流の電流量とが関連付けて記憶されたデータベースを参照して、当該接続デバイスの前記識別情報に関連付けられた前記電流量を、当該接続デバイスから漏れ出る電流の電流量とすることを特徴とする制御プログラム。
A control program to be executed by a USB connected device to a host device to which a plurality of connected devices are USB connected,
In the connection device,
Indicates whether the host device received from each of the connected devices is a self-powered device that receives power supply from a self-power supply or a bus-powered device that receives power supply from the host device via a USB connection Power information aggregation processing for receiving and aggregating power information from the host device;
An identification information aggregation process in which the host device receives from the host device the identification information of the self-power device received from the self-power device of the connected devices and aggregates the identification information of the self-power device;
Based on the power information and the identification information aggregated by the power information aggregation process and the identification information aggregation process, a current amount estimation process that approximates a total current amount that combines the current amounts of currents leaking from the connected devices. And execute
The current amount estimation process is:
About the amount of current leaking from each of the connected devices,
For the connection device determined to be the bus power device based on the power information, the amount of current leaking from the connection device is less than a predetermined amount of current,
For the connection device that is determined to be the self-power device based on the power information, assuming that the amount of current leaking from the connection device is greater than or equal to the predetermined current amount, the identification information of the self-power device, and this With reference to a database stored in association with the current amount of current leaking from the self-powered device, the current amount associated with the identification information of the connected device is set as the current amount of current leaking from the connected device. A control program characterized by:
JP2014073283A 2014-03-31 2014-03-31 USB connection system, host device, connection device, and control program Active JP6375667B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2014073283A JP6375667B2 (en) 2014-03-31 2014-03-31 USB connection system, host device, connection device, and control program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2014073283A JP6375667B2 (en) 2014-03-31 2014-03-31 USB connection system, host device, connection device, and control program

Publications (2)

Publication Number Publication Date
JP2015194444A JP2015194444A (en) 2015-11-05
JP6375667B2 true JP6375667B2 (en) 2018-08-22

Family

ID=54433594

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2014073283A Active JP6375667B2 (en) 2014-03-31 2014-03-31 USB connection system, host device, connection device, and control program

Country Status (1)

Country Link
JP (1) JP6375667B2 (en)

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR101128352B1 (en) * 2005-02-18 2012-03-26 삼성전자주식회사 Usb controller and method for controlling the suspend mode of the same
US8145800B2 (en) * 2008-12-31 2012-03-27 Fresenius Medical Card Holdings, Inc. Identifying when a USB self-powered device is connected to a medical device by triggering an alert about a potential risk to patient
CN101963835B (en) * 2009-07-24 2013-04-24 鸿富锦精密工业(深圳)有限公司 Electronic equipment and method for dynamically allocating USB port power
JP5790007B2 (en) * 2011-02-09 2015-10-07 株式会社リコー Information processing apparatus, information processing apparatus control method, and program

Also Published As

Publication number Publication date
JP2015194444A (en) 2015-11-05

Similar Documents

Publication Publication Date Title
US20200195019A1 (en) Electronic device, method of controlling charging by electronic device, and method of supplying power by power supply device
US9244543B1 (en) Method and device for replacing stylus tip
JP6229884B2 (en) Device monitoring device, device monitoring system, registration terminal, and device monitoring method
EP3171480B1 (en) Method for identifying types of cables, power adaptor and cable
US11429198B2 (en) Terminal device control method and terminal device
CN104793733A (en) Interactive user gesture inputs
US10211859B2 (en) Adjustment work assisting system
CN105576753A (en) Information processing method and electronic equipment
TWI431468B (en) System, method and non-transitory computer-readable storage medium for customizing a scsi error response received from a scsi target in a storage network environment
CN109144582A (en) Wake-up circuit and electronic equipment
JP6375667B2 (en) USB connection system, host device, connection device, and control program
CN105323145A (en) Malicious information identification method, device and system
CN106301804B (en) A kind of server that realizing Wake on LAN, system and method
CN109269628B (en) Method for monitoring motor vibration, terminal device and computer readable storage medium
CN104868509B (en) A kind of control method and external battery
WO2018094894A1 (en) Detection circuit and detection method for on-the-go device, and terminal
CN211264302U (en) Processing circuit and electronic equipment for multiple power supply ports
TW523670B (en) Network interface card driving system supporting multiple types of physical layers and the method thereof
CN112214433A (en) Terminal device, control method thereof, auxiliary device, and storage medium
CN104407883B (en) A kind of control method and electronic equipment
US11604617B2 (en) Printer connectable to a network and an information processing terminal
CN112906512B (en) Method, device and storage medium for determining joints of human body
JP7244576B2 (en) Information processing device and program
US10038805B2 (en) Information processing apparatus, information processing system, and non-transitory computer-readable medium
CN113284509A (en) Method and device for acquiring accuracy of voice annotation and electronic equipment

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20170327

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20180112

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20180123

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20180226

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: 20180626

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20180709

R150 Certificate of patent or registration of utility model

Ref document number: 6375667

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150