WO2011150871A2 - 一种对usb设备供电的方法与系统 - Google Patents

一种对usb设备供电的方法与系统 Download PDF

Info

Publication number
WO2011150871A2
WO2011150871A2 PCT/CN2011/075542 CN2011075542W WO2011150871A2 WO 2011150871 A2 WO2011150871 A2 WO 2011150871A2 CN 2011075542 W CN2011075542 W CN 2011075542W WO 2011150871 A2 WO2011150871 A2 WO 2011150871A2
Authority
WO
WIPO (PCT)
Prior art keywords
usb device
host
power supply
power
status information
Prior art date
Application number
PCT/CN2011/075542
Other languages
English (en)
French (fr)
Other versions
WO2011150871A3 (zh
Inventor
颜志军
Original Assignee
华为终端有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 华为终端有限公司 filed Critical 华为终端有限公司
Priority to PCT/CN2011/075542 priority Critical patent/WO2011150871A2/zh
Priority to EP11789250.5A priority patent/EP2629173A4/en
Priority to CN201180000581.3A priority patent/CN102301305B/zh
Publication of WO2011150871A2 publication Critical patent/WO2011150871A2/zh
Publication of WO2011150871A3 publication Critical patent/WO2011150871A3/zh
Priority to US13/890,831 priority patent/US20130254580A1/en

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F1/00Details not covered by groups G06F3/00 - G06F13/00 and G06F21/00
    • G06F1/26Power supply means, e.g. regulation thereof
    • G06F1/266Arrangements to supply power to external peripherals either directly from the computer or under computer control, e.g. supply of power through the communication port, computer controlled power-strips
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F1/00Details not covered by groups G06F3/00 - G06F13/00 and G06F21/00
    • G06F1/26Power supply means, e.g. regulation thereof
    • G06F1/263Arrangements for using multiple switchable power supplies, e.g. battery and AC
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F1/00Details not covered by groups G06F3/00 - G06F13/00 and G06F21/00
    • G06F1/26Power supply means, e.g. regulation thereof
    • G06F1/30Means for acting in the event of power-supply failure or interruption, e.g. power-supply fluctuations
    • HELECTRICITY
    • H02GENERATION; CONVERSION OR DISTRIBUTION OF ELECTRIC POWER
    • H02JCIRCUIT ARRANGEMENTS OR SYSTEMS FOR SUPPLYING OR DISTRIBUTING ELECTRIC POWER; SYSTEMS FOR STORING ELECTRIC ENERGY
    • H02J7/00Circuit arrangements for charging or depolarising batteries or for supplying loads from batteries

Definitions

  • USB Universal Serial Bus
  • USB is a serial bus standard for connecting computer systems to external devices. It is also a technical specification for input and output interfaces and is widely used in information communication products such as personal computers and mobile devices. USB supports hot plugging, which is mainly used for data communication between the host and external devices. Now it has gradually become a standardized interface for charging functions of small terminal electronic devices.
  • USB cable to power the terminal electronic device with USB interface through the computer.
  • the equipment with high endurance capability cannot guarantee the power supply of the computer itself, such as tablets and portable computers without external power supply; the other is fixedly powered by the USB device itself, which is insufficient in the USB device.
  • the computer cannot power the device, causing the USB device to run out of power.
  • the present invention provides a method and system for powering a USB device, which can dynamically adjust the power supply mode of the host to the USB device, and ensure that the host itself continues The power supply to the USB device is achieved in the case of the flight capability.
  • the embodiment of the invention provides a system capable of dynamically adjusting a power supply mode of a host to a USB device, including a USB device and a host.
  • the USB device and the host respectively include an information collecting unit, a storage unit, a control unit, a communication unit, and a power supply unit.
  • the information collecting unit is configured to collect power supply state information
  • the storage unit is configured to store power supply state information and the monitoring program code
  • the control unit is used for determining the power supply mode and controlling the switching of the power supply mode
  • the communication unit is used for communication
  • the power supply unit is used for supplying power.
  • the embodiment of the invention further provides a method for dynamically adjusting a power supply mode of a host device to a USB device, including:
  • the USB device starts the monitoring process, collects the power status information of the USB device, and the host starts the monitoring process to collect the power supply status information of the host;
  • the USB device communicates with the host through a USB cable, and the USB device reports the power status information of the USB device to the host;
  • FIG. 1 is a schematic diagram of a system for supplying power to a USB device
  • FIG. 4 is a schematic diagram of a method for the host to determine whether to change the power supply mode of the USB device
  • FIG. 5 is a schematic diagram of how to determine whether the host supplies power to the USB device
  • FIG. 6 is a schematic diagram of a method for dynamically switching a power supply mode of a USB device.
  • the system includes a USB device and a host.
  • the USB device is connected to the host through a USB cable, and both ends of the USB cable are respectively connected to the USB device and the host through a USB interface.
  • the main board can supply 5V for the USB interface and the current is 500mA.
  • the USB device includes:
  • the information collecting unit 101 is configured to collect the power supply status information of the USB device and report it to the control unit 104.
  • the power supply status information includes a battery voltage of the USB device, a total battery capacity of the USB device, a current capacity of the USB device battery, a minimum power required for the USB device to operate normally, and the power supply status information of the USB device is not limited thereto, and may also be included herein. Information not listed.
  • the information collection unit can collect USB power status information in real time, or collect power status information at fixed time intervals (such as 5 minutes).
  • the storage unit 102 is configured to store power state information of the USB device and a code required for the monitoring process run by the control unit 104.
  • the storage unit 102 is represented by a memory and an external memory.
  • the USB device power supply status information collected by the information collecting unit 101 is usually directly stored in the memory for the control unit 104 to read, write, and use.
  • the code required for the monitoring process is stored in the external memory.
  • the USB device monitors the process program code into the memory and runs the process under the control of the control unit 104.
  • the communication unit 103 is configured to cooperate with the communication unit 108 under the control of the control unit 105 to complete communication between the USB device and the host.
  • the USB device and the host are connected by a USB cable, and the USB cable is respectively connected to the USB device and the host through the USB interface.
  • the standard USB interface has four pins, and the definition is as follows: VBUS, provided Positive 5V power supply; Data-, data transmission/reception; Data+, data transmission/reception; GND, ground.
  • the pin VBUS is used to power the USB device through the USB cable, and the pins Data - and Data+ are used for data communication.
  • the power supply unit 104 is configured to supply power to the USB device under the control of the control unit 105.
  • the USB device is represented as a rechargeable battery (such as a lithium battery) for directly supplying power to the USB device; or as hardware, for the host to supply power to the USB device through the hardware charging circuit when the USB device itself has insufficient battery power .
  • the control unit 105 is configured to control the cooperative operation of each unit of the USB device, receive an instruction issued by the host, and control switching of the power supply mode of the USB device.
  • the control unit behaves as a processor chip, and the processor runs a USB device monitoring process to control the other four units in the USB device to work together by issuing instructions. And receive the instructions issued by the host to complete the tasks required by the host.
  • the switching of the power supply mode is controlled, and the method of controlling the power supply mode switching will be described in detail in the embodiment described in FIG.
  • the host includes:
  • the information collecting unit 106 is configured to collect power supply status information of the host and report it to the control unit 110.
  • the power supply status information includes whether the host uses an external power supply, and when the host power supply is not used, the host battery voltage, the total battery capacity of the host battery, the current capacity of the host battery, and the minimum power required for the normal operation of the host are also included. Etc. Of course, the host power supply status information is not limited thereto, and may also include information not listed here.
  • the information collecting unit 106 can collect the power supply status information of the host in real time, and can also collect the power supply status information of the host at a fixed time interval (for example, 5 minutes).
  • the storage unit 107 is configured to store power state information of the host and a code required for the monitoring process run by the control unit 110.
  • the storage unit 107 is represented by the memory and the memory in the host.
  • the host power supply status information collected by the information collecting unit 106 is usually directly stored in the memory for the control unit 110 to read, write, and use.
  • the code required to monitor the process is stored in the external memory. When the host is running, the host monitors the process code to the memory and runs the control under the control of the control unit 108.
  • the communication unit 108 is configured to complete communication between the host and the USB device by cooperating with the communication unit 103 under the control of the control unit 110.
  • the structure and function of the communication unit 108 are similar to those of the foregoing communication unit 103, and are not described herein again.
  • the power supply unit 109 is configured to supply power to the host under the control of the control unit 110, where the battery is represented as a rechargeable battery (such as a lithium battery) for directly supplying power to the host; or as an external power supply (such as an external power adapter) ), used for external DC or AC power to power the host.
  • the control unit 1 10 is configured to control the cooperative work of each unit of the host, determine the power supply mode, and control the switching of the power supply mode of the USB device.
  • the control unit is represented by a CPU (Central Processing Unit), and the CPU runs a monitoring process, and controls the other three units to work together by issuing commands, and the collected power status information of the host and the USB reported by the USB device.
  • CPU Central Processing Unit
  • the device power supply status information is calculated, and the decision is made to the USB device power supply mode, and when the power supply mode of the USB device needs to be changed, the control is to switch the power supply mode of the USB device, and the decision whether to allow power supply to the USB device and control the power supply to the USB device
  • the method of switching the mode will be described in detail in the embodiments described in FIGS. 3 and 4.
  • 2 is a schematic diagram of a method for communicating a USB device with a host power supply status information, where the information communication method includes:
  • the USB device collects power supply status information of the USB device, and the process is completed by the foregoing information collecting unit 101.
  • the USB device analyzes the power supply status information, and the process is performed by the foregoing control unit 104.
  • the analysis process includes whether the current power of the USB device battery is sufficient to ensure normal operation of the USB device.
  • the USB device reports the power supply status information of the USB device to the host, and the process is completed by the foregoing communication unit 104 under the control of the foregoing control unit 105.
  • the host monitoring program collects power state information of the host, and the process is completed by the foregoing information collecting unit 204.
  • the host analyzes and processes the power supply status information of the host and the power status information of the USB device reported by the USB device.
  • the process is performed by the foregoing control unit 110.
  • the analysis process includes determining whether to allow the host to supply power to the USB device and controlling the USB device.
  • the method of switching the power supply mode, whether the decision allows the power supply to the USB device, and the method for controlling the switching of the power supply mode of the USB device will be described in detail in the embodiments described in FIG. 3 and FIG. 4;
  • FIG. 3 is a schematic diagram of a method for a host to determine whether to allow power to a USB device, and the steps include: 301, the host is powered on, and the power is turned on;
  • the host is powered on, and the monitoring software program is loaded from the hard disk, the monitoring process is started, and the power state information of the host is monitored;
  • step 303 Determine, according to the host power supply status information collected in step 302, whether the host is powered by an external power source. If the host is powered by an external power source, the host supplies power to the USB device, so go to step 306; if not, the host is powered by the battery. When the host and the USB device current power state information together to determine whether the conditions for allowing the USB device to supply power, so go to step 304;
  • step 304 According to the rules established by the monitoring program, evaluate the current power supply status information of the host and the USB device, and determine whether the condition for allowing the USB device to be powered is satisfied. If yes, go to step 306, otherwise, go to step 305; A method of satisfying the power supply to the USB device will be described in detail in the embodiment described in FIG. 4;
  • the host sends a command to the USB device to notify the USB device that the host device is not allowed to supply power to the USB device.
  • the host sends a command to the USB device to notify the USB device to allow the host to supply power to the USB device.
  • the USB device After receiving the notification that the host does not allow the USB device to supply power, the USB device supplies power to the USB device by using the battery;
  • the host After receiving the notification that the host is allowed to be a USB device, the host supplies power to the USB device.
  • the default USB device is activated and connected to the host through a USB cable, and the USB device has started the monitoring process and performs power supply status information with the host.
  • FIG. 4 is a schematic diagram of a method for the host to determine whether to change the power supply mode of the USB device, and how to determine whether the host allows power to the USB device has been described in FIG. 3, in order to more clearly disclose the method proposed by the present invention, further in this figure NOTE: When the host power supply status changes, how to determine whether the host allows power to the USB device, the steps include:
  • the host and the USB device are powered on, powered on, and connected through a USB cable;
  • the host and the USB device are powered on, and the monitoring software program is loaded from the storage unit. Monitor the process and monitor the power status information of the host and the USB device;
  • step 403 judging whether the power supply mode of the host changes according to the power supply status information of the host monitored in real time, if it is to step 404, if not, go to step 405;
  • step 408 judging the way of changing the power supply mode of the host, if it is changed from the battery power of the host to the external power supply, go to step 408, if it is changed from the external power supply to the power supply of the host itself, then go to step 405;
  • step 406 determines whether the battery of the USB device reaches the low battery alarm state, if yes, go to step 407, otherwise go to step 405;
  • the USB device prompts the user whether it needs to be powered by the host, and can be selected by the user, if the user selects yes, go to step 408, otherwise go to step 405;
  • the power supply mode of the USB device is switched from the battery power of the USB device to the power supply of the USB device by the host.
  • steps 401 and 402 are not necessary, and only the host and the USB device have to be activated, and the two are connected by a USB cable, and the two have respectively started the monitoring process and can communicate the power status information.
  • FIG. 5 is a schematic diagram of how to determine whether the host supplies power to the USB device.
  • a method for determining whether the host is allowed to supply power to the USB device and whether to change the power supply mode of the USB device is provided. The method is judged according to the rules set in the monitoring program. The rule is divided into two steps: initial judgment and dynamic judgment, specifically:

Abstract

在终端技术领域,提供了一种对USB设备供电的方法与系统。该系统包括USB设备与主机。USB设备通过USB线缆与主机连接。主机可通过USB线缆为USB设备供电。该方法包括,当主机供电状态发生改变时,可自动切换USB设备供电方式;当USB设备电量低时,可根据监控程序所设定的规则对USB设备与主机的供电状态信息综合分析,选择适当的供电方式并实现供电方式动态切换。能够在不断开连接的情况下动态切换供电方式,在保证主机自身续航能力的情况下保证了对USB设备的电力供应。

Description

一种对 USB设备供电的方法与系统 技术领域 本发明涉及终端技术领域,尤其涉及一种对 USB设备供电的方法与系
背景技术 随着科学技术的不断发展,集成电路工艺水平的不断提升,现在的终 端电子设备体积越来越小,功能越来越强,同时移动互联网业务、 移动通 讯业务以及手机游戏等的飞速发展,也使得人们越来越多的使用小型终端 电子设备来接入网络或进行娱乐,从而对终端产品的电池续航能力有了更
1¾的要求。
USB ( Universal Serial Bus ,通用串行总线)是连接计算机系统与外 部设备的一个串口总线标准,也是一种输入输出接口技术规范,被广泛应 用于个人电脑和移动设备等信息通讯产品。 USB支持热插拨,主要用于主 机与外接设备的数据通信,现在也逐渐成为小型终端电子设备充电功能的 标准化接口。
现在人们正越来越多的选用 USB线缆通过计算机来对具有 USB接口 的终端电子设备进行供电,当前计算机对 USB设备的供电方式有两种,一 种是固定地由计算机对 USB设备供电,这种方式对于续航能力要求高的设 备无法保证计算机自身的电力供应,如未外接电源的平板电脑和便携计算 机等;另一种是固定地由 USB设备自己供电,这种方式在 USB设备电量 不足时,计算机无法给设备供电,导致 USB设备电量耗尽无法继续使用。
综上所述,在现有技术中 ,还没有一种方法能够实现在保证计算机自 身续航能力的情况下实现对 USB设备的电量供应。 发明内容
鉴于现有技术方法的不足,本发明提出了一种对 USB设备供电的方法 与系统,能够动态的调整主机对 USB设备的供电方式,在保证主机自身续 航能力的情况下实现对 USB设备的电力供应。 本发明实施例提供一种能够动态调整主机对 USB设备供电方式的系 统,包括 USB设备和主机, USB设备和主机都分别包括信息收集单元、 存 储单元、 控制单元、 通信单元、 供电单元。
其中信息收集单元用于收集供电状态信息,存储单元用于存储供电状 态信息和监控程序代码,控制单元用于决策供电方式以及控制供电方式的 切换,通信单元用于通信,供电单元用于供应电力。
本发明实施例还提供一种动态调整主机对 USB设备供电方式的方法, 包括:
USB设备启动监控进程,收集 USB设备供电状态信息,主机启动监控 进程,收集主机供电状态信息;
USB设备与主机通过 USB线缆通信,USB设备向主机上报 USB设备 的供电状态信息;
主机对 USB设备与主机的供电状态信息进行分析处理,决策对 USB 设备的供电方式并按需要动态切换供电方式。 以上技术方案在不断开 USB设备与主机连接的情况下,依据 USB设 备与主机的供电状态信息动态调整主机对 USB设备的供电方式,在保证主 机自身续航能力的情况下实现对 USB设备的电力供应。 附图说明 图 1为对 USB设备供电的系统示意图 ;
图 2为 USB设备与主机供电状态信息通信的方法示意图 ;
图 3为主机判断是否允许给 USB设备供电的方法示意图 ;
图 4为主机判断是否改变对 USB设备供电方式的方法示意图 ; 图 5是如何判断主机是否给 USB设备供电的规则示意图;
图 6为对 USB设备供电方式动态切换的方法示意图。 具体实肺式 为使本发明的目的、 技术方案和优点更加清楚,下面将结合附图对本 发明作进一步地详细描述。 图 1是对 USB设备供电的系统示意图 ,该系统包括 USB设备和主机, 所述 USB设备与所述主机通过 USB线缆连接, USB线缆两端通过 USB 接口分别与 USB设备和主机连接。主机主板可以为 USB接口提供 5V电压, 限额供电流为 500mA。
所述 USB设备包括:
信息收集单元 101 ,用于收集 USB设备的供电状态信息,并上报给控 制单元 104。所述供电状态信息包括 USB设备电池电压、 USB设备电池总 容量、 USB设备电池当前容量、 USB设备正常运行所需最低电量等,当然 所述 USB设备供电状态信息不限于此,还可能包括此处未列出的信息。信 息收集单元可实时收集 USB供电状态信息,也可按固定时间间隔(如 5分 钟)收集供电状态信息。
存储单元 102 ,用于存储所述 USB设备的供电状态信息,以及控制单 元 104所运行的监控进程所需代码。在所述 USB设备中存储单元 102表现 为内存和外存,上述信息收集单元 101所收集的 USB设备供电状态信息通 常直接存储在内存中 ,供控制单元 104读写和运算使用。 监控进程所需代 码存储于外存中 ,当 USB设备运行时,读取 USB设备监控进程程序代码 到内存中并在控制单元 104的控制下运行该进程。
通信单元 103 ,用于在控制单元 105的控制下与通信单元 108协作, 完成 USB设备与主机之间的通信。本实施例中 ,USB设备与主机之间是通 过 USB线缆连接的, USB线缆两端通过 USB接口分别与 USB设备和主 机连接,标准 USB接口有四个管脚,定义如下: VBUS ,提供正 5V电源; Data- ,数据发送 /接收; Data+ ,数据发送 /接收; GND ,接地。 其中管脚 VBUS用于通过 USB线缆为 USB设备供电,管脚 Data -、 Data+共同用于 数据通信。
供电单元 104 ,用于在控制单元 105的控制下为 USB设备供电,在所 述 USB设备中表现为可充电电池(如锂电池),用于直接为 USB设备供电; 或表现为硬件,用于在 USB设备自身电池电量不足时,主机通过所述硬件 充电电路为 USB设备供电。
控制单元 105 ,用于控制 USB设备各单元的协同工作,接收主机下发 的指令,控制 USB设备供电方式的切换。 本实施例中控制单元表现为处理 器芯片,处理器运行 USB设备监控进程,通过发布指令控制 USB设备中 其他四个单元协同工作。 并接收主机下发的指令,完成主机所要求的任务。 在供电方式需要改变时,控制供电方式的切换,所述控制供电方式切换的 方法将在图 5所述实施例中详细说明。
所述主机包括:
信息收集单元 106 ,用于收集主机的供电状态信息,并上报给控制单 元 110。 所述供电状态信息包括主机是否使用外部电源供电, 当不使用外 部电源供电而使用主机自身电池供电时还需包括主机电池电压、 主机电池 总容量、 主机电池当前容量、 主机正常运行所需最低电量等, 当然所述主 机供电状态信息不限于此,还可能包括此处未列出的信息。 信息收集单元 106可实时收集主机供电状态信息,也可按固定时间间隔(如 5分钟)收 集主机供电状态信息。
存储单元 107,用于存储所述主机的供电状态信息,以及控制单元 110 所运行的监控进程所需代码。 在所述主机中存储单元 107表现为内存和外 存,上述信息收集单元 106所收集的主机供电状态信息通常直接存储在内 存中 ,供控制单元 110读写和运算使用。监控进程所需代码存储于外存中, 当主机运行时,读取主机监控进程程序代码到内存中并在控制单元 108的 控制下运行该进程。
通信单元 108 ,用于通过在控制单元 1 10的控制下与通信单元 103协 作,完成主机与 USB设备之间的通信。通信单元 108与前述通信单元 103 的结构与功能相似,在此不再赘述。
供电单元 109 ,用于在控制单元 110的控制下为主机供电,在所述主 机中表现为可充电电池(如锂电池),用于直接为主机供电;或表现为外部 电源(如外接电源适配器),用于外接直流或交流电源为主机供电。 控制单元 1 10 ,用于控制主机各单元的协同工作,决策供电方式以及 控制为 USB设备供电方式的切换。 本实施例中控制单元表现为 CPU ( Central Processing Unit,中央处理器), CPU运行监控进程,通过发布指 令控制其他三个单元协同工作,对所收集到的主机供电状态信息和 USB设 备上报的 USB设备供电状态信息进行运算操作,决策为 USB设备供电方 式,并在为 USB设备供电方式需要改变时,控制为 USB设备供电方式的 切换,所述决策是否允许对 USB设备供电以及控制对 USB设备供电方式 的切换的方法将在图 3与图 4所述实施例中详细说明。 图 2是 USB设备与主机供电状态信息通信的方法示意图 ,所述信息通 信方法包括:
201、 USB设备收集 USB设备的供电状态信息,此过程由前述信息收 集单元 101完成;
202、 USB设备对供电状态信息进行分析处理,此过程由前述控制单 元 104完成,所述分析处理包括 USB设备电池当前电量是否足以保证 USB 设备正常运行;
203、 USB设备向主机上报 USB设备的供电状态信息,此过程由前述 通信单元 104在前述控制单元 1 05的控制下完成;
204、 主机监控程序收集主机的供电状态信息,此过程由前述信息收集 单元 204完成;
205、主机对主机供电状态信息和 USB设备上报的 USB设备供电状态 信息进行分析处理,此过程由前述控制单元 110完成,此处的分析处理包 括决策是否允许主机对 USB设备供电以及控制对 USB设备供电方式的切 换,所述决策是否允许对 USB设备供电以及控制对 USB设备供电方式的 切换的方法将在图 3与图 4所述实施例中做详细说明 ;
206、 主机向 USB设备下达指令、 通知主机对 USB供电方式,此过程 由前述通信单元 108在前述控制单元 110的控制下完成。 图 3是主机判断是否允许给 USB设备供电的方法示意图 ,步骤包括: 301、 主机开机,接通电源;
302、 主机上电,从硬盘中加载监控软件程序,启动监控进程,监控主 机的供电状态信息;
303、根据前述步骤 302收集的主机供电状态信息判断主机是否由外部 电源供电,若是即当主机由外部电源供电时,由主机为 USB设备供电,所 以转步骤 306;若否即主机由自身电池供电时,则需由主机与 USB设备当 前的供电状态信息共同判断是否满足允许给 USB设备供电的条件,所以转 步骤 304;
304、 根据监控程序所制定的规则 ,对主机和 USB设备当前的供电状 态信息进行评估,判断是否满足允许给 USB设备供电的条件,若是则转步 骤 306 ,若否则转步骤 305;此处判断是否满足允许给 USB设备供电的方 法将在图 4所述实施例中详细说明 ;
305、 主机向 USB设备发送命令,通知 USB设备不允许主机为 USB 设备供电;
306、 主机向 USB设备发送命令,通知 USB设备允许主机为 USB设 备供电。
307、 当收到主机不允许为 USB设备供电的通知后, USB设备用自身 电池为 USB设备供电;
308、当收到主机允许为 USB设备的通知后,由主机为 USB设备供电。 在此实施例中,为简便起见,默认 USB设备已启动并通过 USB线缆 与主机连接,且 USB设备已启动监控进程,并与主机进行供电状态信息的
图 4是主机判断是否改变对 USB设备供电方式的方法示意图 ,在图 3 中已经说明了如何判断主机是否允许给 USB设备供电,为了更清楚的公开 本发明提出的方法,在此图中进一步的说明当主机供电状态发生变化时如 何判断主机是否允许给 USB设备供电,步骤包括:
401、 主机与 USB设备开机,接通电源,并通过 USB线缆连接;
402、 主机与 USB设备上电,并从存储单元中加载监控软件程序,启 动监控进程,监控主机与 USB设备的供电状态信息;
403、根据实时监控的主机的供电状态信息判断主机的供电方式是否发 生改变,若是转步骤 404 ,若否转步骤 405;
404、 判断主机供电方式的改变方式,如果是由主机自身电池供电改变 为外部电源供电,转步骤 408 ,如果是由外部电源供电改变为主机自身电 池供电,则转步骤 405;
405、 继续监控主机与 USB设备的供电状态信息;
406、根据 USB设备监控程序所制定的规则,判断 USB设备的电池是 否到达低电量报警状态,若是则转步骤 407 ,若否则转步骤 405;
407、 USB设备提示用户是否需要由主机供电,并可由用户进行选择, 若用户选择是则转步骤 408 ,若否则转步骤 405;
408、 USB设备的供电方式由 USB设备自身电池供电切换为由主机为 USB设备供电。
在该实施例中,步骤 401与 402并非必需,只须保证主机与 USB设备 已启动,二者通过 USB线缆连接,且二者已分别启动监控进程,并可进行 供电状态信息的通信。 同时,需要说明的是,此方法示意图中 ,当主机与 USB设备处于 405至 408的任何一种状态中时,若主机供电状态发生改变, 则转至步骤 403。 图 5是如何判断主机是否给 USB设备供电的规则示意图,在图 3与图 4所述实施例中给出了主机是否允许给 USB设备供电以及是否需要改变对 USB设备供电方式的判断方法,该方法是根据监控程序中设定的规则来判 断的,该规则分为初始判断和动态判断两步,具体为 :
初步判断:仅以主机的供电方式作为判断依据,若主机是由外部电源 供电,则由主机为 USB设备供电; 由否则需进一步动态判断;
动态判断:当主机由自身电池供电时,分以下情况:当 USB设备电池 电力足够保证自身正常运行时,由 USB设备自身电池供电;当 USB设备 电池电力不能保证其正常运行时,请求主机进行供电,主机判断自身电池 电力供应情况,若主机自身电池电力足以保证二者正常运行,则由主机为 USB设备供电,若主机自身电池电力不足以保证二者正常运行,则在主机 或 USB设备上弹出提示,并由用户选择是否由主机对 USB设备供电。
对照图 5来具体说明判断规则的流程,步骤为 :
501、 判断主机是否由外部电源供电,若是转步骤 502 ,若否则转步骤 503;
502、 当主机由外部电源供电时,默认由主机为 USB设备供电;
503、 当主机由自身电池供电时,则不默认由主机为 USB设备供电, 需要根据主机与 USB设备的供电状态信息共同决策供电方式;判断 USB 设备电池的电量是否足够保证自身的正常运行,若是则转步骤 506 ,若否 则转步骤 504;
504 ,当 USB设备电池电量不足够保证自身正常运行时,主机对主机 电池电量进行判断,判断主机电池电量是否足够保证 USB设备与主机二者 的正常运行,若是,则转步骤 502 ,由主机为 USB设备供电,若否则转步 骤 505;
505、 当主机电量不足够保证 USB设备与主机二者的正常运行时,主 机或者 USB设备提示用户 ,由用户选择是否由主机供电,若是,则转 502 , 由主机为 USB设备供电,若否则转步骤 506;
506、 若用户选择不由主机为 USB设备供电,只 USB设备继续使用自 身电池供电。
判断主机和 USB设备电池电力是否能保证自身正常运行的规则,可由 用户制定:如电池当前电量占总电量百分比高于某阈值(如 20% ) ,才认为 电力足够保证自身正常运行;或者当前电量绝对值需高于某阈值(如 USB 设备为 100mA ,主机为 500mA ) ,才认为电力足够保证自身正常运行。 其 中各阈值在硏发监控程序时即由硏发人员设定,也可由用户在监控程序中 通过程序所提供的参数修改接口自主设定。
需要说明的是,判断是否需要改变供电方式的规则不仅限于此。 图 6是对 USB设备供电方式动态切换的方法示意图 ,在图 3与图 4中 已说明在何种情况下需要切换供电方式,为了更清楚的公开本发明所提出 的方法,本图进一步说明了在 USB设备需要改变供电方式时,USB设备和 主机是如何共同协作实现供电方式的动态切换的 ,在此假定当前状态处于 主机为 USB设备供电。 具体流程如下:
601、 主机通过前述供电单元 104的硬件充电电路给 USB设备供电, 此时 USB设备保持在由主机为其供电的状态;
602、 主机判断 USB设备供电方式是否需要从由主机对其供电改变为 由其自身电池供电,若是转步骤 603 ,若否转步骤 601 ;所述判断按图 4 所述实施例的方法进行。
603、 切换对 USB设备的供电方式, 由主机为其供电电切换至其自身 电池供电;
604、 USB设备关闭主机为其供电的硬件充电电路,此过程在前述 USB 设备控制单元 105的控制下完成;
606、 USB设备供电方式保持在由其自身电池供电状态,直到对其供 电方式需要改变时;
606、主机判断对 USB设备供电方式是否需要从由 USB设备自身电池 供电改变为由主机对 USB设备供电,若是转步骤 607 ,若否则转步骤 605;
607、切换对 USB设备的供电方式,由 USB设备自身电池供切换至主 机为 USB设备供电电;
608、 USB设备打开主机为其供电的硬件充电电路,此过程在前述 USB 设备控制单元 105的控制下完成;;
此示意图是一个循环状态图 ,左边是对 USB设备供电方式由主机供电 切换到 USB设备自身电池供电,右边是对 USB设备供电方式由 USB设备 自身电池供电切换到主机供电。 USB设备的供电状态可处于示意图中任一 阶段,并可动态转换,为了简便起见,在示意图和方法说明中 ,假定从步 骤 601开始。 实现上述方法实施例的全部或部分步骤可以通过程序指令相关的硬件 来完成,前述的程序可以存储于一计算机可读取存储介质中 ,该程序在执 行时,执行包括上述方法实施例的步骤;而前述的存储介质包括: ROM、 RAM, 磁碟或者光盘等各种可以存储程序代码的介质。
以上所述,仅为本发明较佳的具体实施方式,但本发明的保护范围并 不局限于此,任何熟悉本技术领域的技术人员在本发明掲露的技术范围内 可轻易想到的变化或替换,都应涵盖在本发明的保护范围之内。 因此,本 发明的保护范围应该以权利要求的保护范围为准。

Claims

权利要求
1.一种对 USB设备供电的方法,其特征在于,所述方法包括:
USB设备启动监控进程,收集 USB设备供电状态信息,主机启动监控 进程,收集主机供电状态信息;
USB设备与主机通过 USB线缆通信,USB设备向主机上报 USB设备 的供电状态信息;
主机对 USB设备和主机的供电状态信息进行分析处理,决策对 USB 设备的供电方式并按需要动态切换供电方式。
2.根据权利要求 1所述的对 USB设备供电的方法,其特征在于,所述 USB设备与主机的通信方法包括:
USB设备信息收集单元收集 USB设备的供电状态信息;
USB设备控制单元对 USB设备供电状态信息分析处理;
USB设备通信单元在 USB设备控制单元的控制下向主机上报 USB设 备供电状态信息;
主机信息收集单元收集主机的供电状态信息;
主机控制单元对主机供电状态信息和 USB设备上报的 USB设备供电 状态信息分析处理,决策是否允许主机对 USB设备供电以及控制对 USB 设备供电方式的切换;
主机通信单元在主机控制单元的控制下向 USB设备下达指令,通知对 USB设备供电方式。
3.根据权利要求 2所述的对 USB设备供电的方法,其特征在于,所述 USB设备与主机的通信过程中 ,主机信息收集单元收集主机的供电状态信 息并非必须要在权利要求 2中所述方法的前三个步骤完成之后进行,也可 与所述前三个步骤并行。
4.根据权利要求 3所述的对 USB设备供电的方法,其特征在于,判断 是否允许主机对 USB设备供电的方法包括:主机根据主机供电状态信息判 断若主机是由外部电源供电,则允许主机为 USB设备供电;若否,则根据 主机供电状态信息和 USB设备供电状态信息共同判断是否允许主机给 USB设备供电。
5.根据权利要求 4所述的对 USB设备供电的方法,其特征在于,当主 机供电状态发生变化时,若供电状态由自身电池供电改变为外部电源供电, 则允许主机为 USB设备供电;若供电状态由外部电源供电改变为由自身电 池供电,则根据主机供电状态信息和 USB设备供电状态信息共同判断是否 允许主机给 USB设备供电。
6.根据权利要求 4或 5所述的对 USB设备供电的方法,其特征在于, 根据主机供电状态信息和 USB设备供电状态信息共同判断是否允许主机给 USB设备供电的方法包括:
当 USB设备电池电力足够保证自身正常运行时,由 USB设备自身电 池供电;
当 USB设备电池电力不能保证其正常运行时,请求主机进行供电,主 机判断自身电池电力供应情况,若主机电池电力足以保证主机自身和 USB 设备二者正常运行,则由主机为 USB设备供电;
若主机自身电池电力不足以保证二者正常运行,则在主机或 USB设备 上弹出提示,并由用户选择是否由主机对 USB设备供电。
7.根据权利要求 6所述的对 USB设备供电的方法,其特征在于,判断 USB设备和主机电池电力是否足够保证自身正常运行的方法包括,判断电 池当前电量占总电量百分比或当前电量绝对值是否高于某阈值,若高于则 能够自身正常运行,若否则不能保证自身正常运行。
8.根据权利要求 7所述的对 USB设备供电的方法,其特征在于,判断 USB设备和主机电池电力是否足够保证自身正常运行的阈值在硏发监控程 序时由硏发人员设定,也可由用户在监控程序中通过程序所提供的参数修 改接口自主设定。
9.根据权利要求 8所述的对 USB设备供电的方法,其特征在于,动态 切换对 USB设备供电方式的方法包括:
当 USB设备处于由主机为其供电的状态时,若 USB设备供电方式需 要从由主机对其供电改变为由其自身电池供电,则将 USB设备的供电方式 由主机为其供电切换到由其自身电池供电,并关闭主机为其供电的硬件充 电电路,然后保持在 USB设备自身电池供电状态,直到对其供电方式需要 改变;
当 USB设备处于由自身电池供电的状态时,若 USB设备供电方式需 要从由其自身电池供电改变为由主机对其供电,则将 USB设备的供电方式 由其自身电池供电切换到由主机为其供电,并打开主机为 USB设备供电的 硬件充电电路,然后保持在主机为 USB设备供电状态,直到对其供电方式 需要改变。
10.—种对 USB设备供电的系统,其特征在于,包括 USB设备和主机, 所述 USB设备和主机分别都分别包括信息收集单元、存储单元、控制单元、 通信单元、 供电单元;其中信息收集单元用于收集供电状态信息,存储单 元用于存储供电状态信息和监控程序代码,控制单元用于决策供电方式以 及控制供电方式的切换,通信单元用于通信,供电单元用于供应电力。
11.根据权利要求 10所述的对 USB设备供电的系统,其特征在于,所 述 USB设备和主机通过 USB线缆连接, USB线缆两端通过 USB接口分 别与 USB设备和主机连接。
12.根据权利要求 11所述的对 USB设备供电的系统,其特征在于,所 述 USB设备和主机的通信单元为 USB接口的数据发送 /接收管脚,用于 USB设备与主机之间的数据通信。
13.根据权利要求 12所述的对 USB设备供电的系统,其特征在于,所 述 USB设备的供电单元为可充电电池或者硬件充电电路,其中可充电电池 直接为 USB设备供电,主机经由 USB线缆通过硬件充电电路为 USB设备 供电。
14.根据权利要求 13所述的对 USB设备供电的系统,其特征在于,所 述 USB设备的控制单元为处理器芯片,用于运行 USB设备监控进程;通 过发布指令控制 USB设备中其他四个单元协同工作;接收主机下发的指令 完成主机所要求的任务;在供电方式需要改变时控制供电方式的切换。
15.根据权利要求 14所述的对 USB设备供电的系统,其特征在于,所 述主机供电单元为可充电电池或外部电源,其中可充电电池直接为主机供 电,外部电源外接直流或交流电源为主机供电。
16.根据权利要求 10所述的对 USB设备供电的系统,其特征在于,所 述主机控制单元为中央处理器,用于运行主机监控进程;通过发布指令控 制主机中其他四个单元协同工作;对所收集到的主机供电状态信息和 USB 设备上报的 USB设备供电状态信息进行运算操作,决策为 USB设备供电 方式;在供电方式需要改变时控制供电方式的切换。
PCT/CN2011/075542 2011-06-09 2011-06-09 一种对usb设备供电的方法与系统 WO2011150871A2 (zh)

Priority Applications (4)

Application Number Priority Date Filing Date Title
PCT/CN2011/075542 WO2011150871A2 (zh) 2011-06-09 2011-06-09 一种对usb设备供电的方法与系统
EP11789250.5A EP2629173A4 (en) 2011-06-09 2011-06-09 METHOD AND SYSTEM FOR OPERATING A USB DEVICE
CN201180000581.3A CN102301305B (zh) 2011-06-09 2011-06-09 一种对usb设备供电的方法与系统
US13/890,831 US20130254580A1 (en) 2011-06-09 2013-05-09 Method and System for Supplying Power to USB Device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2011/075542 WO2011150871A2 (zh) 2011-06-09 2011-06-09 一种对usb设备供电的方法与系统

Related Child Applications (1)

Application Number Title Priority Date Filing Date
US13/890,831 Continuation US20130254580A1 (en) 2011-06-09 2013-05-09 Method and System for Supplying Power to USB Device

Publications (2)

Publication Number Publication Date
WO2011150871A2 true WO2011150871A2 (zh) 2011-12-08
WO2011150871A3 WO2011150871A3 (zh) 2012-05-10

Family

ID=45067121

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2011/075542 WO2011150871A2 (zh) 2011-06-09 2011-06-09 一种对usb设备供电的方法与系统

Country Status (4)

Country Link
US (1) US20130254580A1 (zh)
EP (1) EP2629173A4 (zh)
CN (1) CN102301305B (zh)
WO (1) WO2011150871A2 (zh)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103176938A (zh) * 2011-12-26 2013-06-26 三星电子株式会社 通用串行总线主机及其电能管理方法
TWI463298B (zh) * 2012-01-19 2014-12-01 Asmedia Technology Inc 外接式電子裝置

Families Citing this family (14)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104137020B (zh) * 2011-12-29 2017-12-15 英特尔公司 包括在电源设备中的有线通信连接器
CN103257597B (zh) * 2012-02-20 2016-03-02 联想(北京)有限公司 控制方法和电子设备
CN103297149A (zh) * 2012-02-29 2013-09-11 深圳光启创新技术有限公司 一种基于usb的光通信方法和接收装置
CN102868820A (zh) 2012-09-19 2013-01-09 中兴通讯股份有限公司 移动终端、数据通信主设备和移动终端充电系统及方法
CN104345859B (zh) * 2013-07-29 2017-09-01 联想(北京)有限公司 一种供电的方法及供电设备和一种充电的方法及电子设备
KR102216484B1 (ko) * 2014-02-18 2021-02-17 삼성전자주식회사 충전 제어 방법 및 그 장치
US9635056B2 (en) * 2014-05-15 2017-04-25 Dell Products L.P. Cable management and security system
CA2851983C (en) * 2014-05-21 2016-08-16 Blackberry Limited Management of power delivered over a port
FR3023392B1 (fr) * 2014-07-03 2016-07-29 Peugeot Citroen Automobiles Sa Procede de securisation de la coupure d'alimentation d'un equipement usb
US10320128B2 (en) 2014-11-19 2019-06-11 Dell Products L.P. Information handling system multi-purpose connector guide pin structure
US9791906B2 (en) 2014-11-19 2017-10-17 Dell Products L.P. Information handling system multi-purpose connector guide pin structure
US9891680B2 (en) * 2014-11-19 2018-02-13 Dell Products L.P. Information handling system multi-purpose connector guide pin structure
CN106802872A (zh) * 2016-12-16 2017-06-06 华勤通讯技术有限公司 一种通过usb接口进行设备间充电的方法和终端
JP7325185B2 (ja) * 2018-12-27 2023-08-14 キヤノン株式会社 電子機器、制御方法、プログラム

Family Cites Families (15)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CA2374342C (en) * 2001-03-01 2005-12-20 Research In Motion Limited System and method for powering and charging a mobile communication device
KR100671755B1 (ko) * 2001-04-25 2007-01-22 엘지전자 주식회사 범용직렬버스를 이용한 전원 제어방법
JP3558059B2 (ja) * 2001-08-10 2004-08-25 セイコーエプソン株式会社 電源制御回路及び電子機器
US6653813B2 (en) * 2002-03-21 2003-11-25 Thomson Licensing, S.A. Apparatus and method for the power management of operatively connected modular devices
CN1253773C (zh) * 2004-03-31 2006-04-26 李明 一种基于软硬件协同管理的电源管理方法
US7581119B2 (en) * 2004-07-18 2009-08-25 Apple Inc. Method and system for discovering a power source on a peripheral bus
US7523338B2 (en) * 2005-10-13 2009-04-21 Research In Motion Limited Apparatus and method to support USB enumeration of a bus powered handheld device
US7877618B2 (en) * 2007-08-29 2011-01-25 Dell Products L.P. Systems and methods for power management
CN101393473A (zh) * 2007-09-21 2009-03-25 乐金电子(昆山)电脑有限公司 Usb外围设备的电源控制装置及控制方法
US8084987B2 (en) * 2008-02-13 2011-12-27 Active-Semi, Inc. USB port with smart power management
JP4575488B2 (ja) * 2008-10-31 2010-11-04 株式会社東芝 情報処理装置
JP2010140269A (ja) * 2008-12-11 2010-06-24 Sony Corp 端末装置、端末装置の制御方法及び制御プログラム
CN102388520B (zh) * 2009-02-27 2015-01-21 飞兆半导体公司 外围装置主机充电
CN101881993A (zh) * 2009-05-06 2010-11-10 鸿富锦精密工业(深圳)有限公司 电源适配器及其供电方法
CN101867222B (zh) * 2010-06-25 2012-12-26 无锡中星微电子有限公司 一种电池、usb和直流电源供电的切换电路

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
None
See also references of EP2629173A4

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103176938A (zh) * 2011-12-26 2013-06-26 三星电子株式会社 通用串行总线主机及其电能管理方法
TWI463298B (zh) * 2012-01-19 2014-12-01 Asmedia Technology Inc 外接式電子裝置

Also Published As

Publication number Publication date
US20130254580A1 (en) 2013-09-26
CN102301305B (zh) 2015-12-16
EP2629173A2 (en) 2013-08-21
WO2011150871A3 (zh) 2012-05-10
EP2629173A4 (en) 2013-12-18
CN102301305A (zh) 2011-12-28

Similar Documents

Publication Publication Date Title
WO2011150871A2 (zh) 一种对usb设备供电的方法与系统
CN103080868B (zh) 充电端口
EP2214077B1 (en) Method and device for charging of mobile devices
US10476288B2 (en) Power storage adapter for peak shift operation with a portable information handling system
US10181739B1 (en) Power storage adapter using high efficiency charging for low power states
JP4144891B2 (ja) モバイル電子デバイス内の充電状態を処理する方法および装置
JP5301008B1 (ja) 電子機器、充電制御装置および充電制御方法
CN109857243B (zh) 系统级芯片、通用串行总线主设备、系统及唤醒方法
JP5134037B2 (ja) 待機電力の低減が可能な情報機器および電力の制御方法
CN101566870B (zh) 计算机系统及其控制方法
WO2013152662A1 (zh) 一种终端设备的供电方法及其终端设备
JP4602459B2 (ja) 情報処理装置および電力制御方法
WO2011113349A1 (zh) 上网模块电源管理的方法和装置
EP3367538A1 (en) Smart power supply management for high standby power system
WO2011160572A1 (zh) 一种通过通用串行总线接口充电的方法和装置
WO2017022169A1 (ja) バッテリ制御装置、電子機器、バッテリパック及びバッテリ制御方法
CN103887570A (zh) 一种电源管理方法、电源管理系统和电子设备
JP2003079067A (ja) 電気機器、コンピュータ装置、電気機器における充電方法、コンピュータ装置における充電方法、およびプログラム
WO2012041242A1 (zh) 一种终端、终端系统及其充放电方法和放电方法
CN109491486A (zh) 一种切换输出功率的供电方法和供电电路及电子设备
CN104076892B (zh) 一种电源管理方法及电源管理系统
WO2015176430A1 (zh) 一种充电控制方法、装置、终端及计算机存储介质
CN117175752B (zh) 充电异常处理方法、设备、系统、存储介质及程序产品
CN115639903B (zh) 基于飞腾平台的计算机主板及计算机功耗控制方法
TW202335399A (zh) 改良型儲能裝置及改良型不斷電電子系統

Legal Events

Date Code Title Description
WWE Wipo information: entry into national phase

Ref document number: 201180000581.3

Country of ref document: CN

121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 11789250

Country of ref document: EP

Kind code of ref document: A2

WWE Wipo information: entry into national phase

Ref document number: 2011789250

Country of ref document: EP

NENP Non-entry into the national phase

Ref country code: DE