[go: up one dir, main page]

TW201515358A - USB device with power supply mode switching function - Google Patents

USB device with power supply mode switching function Download PDF

Info

Publication number
TW201515358A
TW201515358A TW102124079A TW102124079A TW201515358A TW 201515358 A TW201515358 A TW 201515358A TW 102124079 A TW102124079 A TW 102124079A TW 102124079 A TW102124079 A TW 102124079A TW 201515358 A TW201515358 A TW 201515358A
Authority
TW
Taiwan
Prior art keywords
pin
switch
usb device
usb
turned
Prior art date
Application number
TW102124079A
Other languages
Chinese (zh)
Inventor
hai-long Cheng
Original Assignee
Hon Hai Prec Ind Co 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 Hon Hai Prec Ind Co Ltd filed Critical Hon Hai Prec Ind Co Ltd
Priority to TW102124079A priority Critical patent/TW201515358A/en
Publication of TW201515358A publication Critical patent/TW201515358A/en

Links

Landscapes

  • Power Sources (AREA)

Abstract

The present invention provides a USB device with power supply mode switching function. The USB device includes a USB interface. The USB interface includes a VBUS pin and an ID pin. The ID pin is grounded via a pull-down resistor. The USB device further includes a first switch and a second switch. The first switch includes a Vin pin, a Vout pin, and an En pin. The Vin pin is connected to a work voltage VDD5V of the USB device. The Vout pin is connected to the VBUS pin and an end of the second switch. The VBUS pin is connected to a power source Vcc of the USB device via he second switch. When the voltage at the ID pin is logic high, the voltage at the EN pin is set to be logic high, the first switch is turned on, and the second switch is turned off. When the voltage at the ID pin is logic low, the voltage at the EN pin is set to be logic low, the first switch is turned off, and the second is turned on.

Description

具有供電模式切換功能的USB裝置USB device with power mode switching function

本發明涉及USB裝置,特別涉及一種具有供電模式切換功能的USB裝置。The present invention relates to a USB device, and more particularly to a USB device having a power mode switching function.

USB OTG裝置具有USB從屬設備(device)功能和有限的USB主機(host)功能。在充當USB device的時候,USB OTG裝置有PC(Personal Computer, PC)端USB匯流排供電,這種電源方案一般稱為匯流排供電(bus-power)。在充當USB host的時候,USB OTG裝置必須使用電池給下游裝置供電,這種電源方案一般稱為自供電(self-power)。因此,有必要提供一種具有簡單的切換電路的USB OTG裝置,以將USB OTG裝置在匯流排供電及自供電間進行切換。The USB OTG device has a USB slave device function and a limited USB host function. When acting as a USB device, the USB OTG device has a USB (Personal Computer, PC) USB bus, and this power solution is generally called bus-power. When acting as a USB host, the USB OTG device must use a battery to power downstream devices. This power scheme is generally referred to as self-power. Therefore, it is necessary to provide a USB OTG device with a simple switching circuit to switch the USB OTG device between the bus power supply and the self-power supply.

有鑒於此,本發明提供一種具有供電模式切換功能的USB裝置,以解決上述技術問題。In view of this, the present invention provides a USB device having a power mode switching function to solve the above technical problem.

一種具有供電模式切換功能的USB裝置,所述USB裝置包括一USB介面,所述USB介面包括一VBUS引腳及一ID引腳,所述ID引腳通過一下拉電阻接地,所述USB裝置還包括一第一開關及一第二開關,所述第一開關包括一Vin引腳、一Vout引腳及一EN引腳,所述Vin引腳與所述USB裝置的工作電壓VDD5V連接,所述Vout引腳與所述VBUS引腳及所述第二開關的一端連接,所述VBUS引腳通過所述第二開關連接所述USB裝置的電源電壓Vcc,所述ID引腳的電平變為邏輯高電平時,所述EN引腳被設置為高電平,所述第一開關導通,所述第二開關截止,所述ID引腳的電平變為邏輯低電平時,所述EN引腳被設置為低電平,所述第一開關截止,所述第二開關導通。A USB device having a power mode switching function, the USB device includes a USB interface, the USB interface includes a VBUS pin and an ID pin, and the ID pin is grounded through a pull-down resistor, and the USB device further The first switch includes a Vin pin, a Vout pin and an EN pin, and the Vin pin is connected to an operating voltage VDD5V of the USB device. a Vout pin is connected to one end of the VBUS pin and the second switch, and the VBUS pin is connected to a power voltage Vcc of the USB device through the second switch, and a level of the ID pin is changed. When the logic level is high, the EN pin is set to a high level, the first switch is turned on, the second switch is turned off, and the level of the ID pin becomes a logic low level, the EN lead The foot is set to a low level, the first switch is turned off, and the second switch is turned on.

本發明中,當需要從USB裝置獲得電能的外部電子設備插入USB介面時,USB裝置的工作電壓VDD5V通過第一開關提供電能至VBUS引腳,以使外部電子設備從USB裝置獲得電能。當可提供電能至USB裝置的外部電子設備插入USB介面時,外部電子設備提供的電能通過VBUS引腳傳送至電源電壓Vcc,即USB裝置從外部電子設備獲得電能。本發明提供了一種具有簡單切換電路的USB裝置,以將USB裝置在匯流排供電及自供電間進行自動切換。In the present invention, when an external electronic device that needs to obtain power from the USB device is inserted into the USB interface, the operating voltage VDD5V of the USB device supplies power to the VBUS pin through the first switch to enable the external electronic device to obtain power from the USB device. When an external electronic device that can supply power to the USB device is plugged into the USB interface, the power provided by the external electronic device is transmitted to the power supply voltage Vcc through the VBUS pin, that is, the USB device obtains power from the external electronic device. The invention provides a USB device with a simple switching circuit for automatically switching a USB device between a busbar power supply and a self-power supply.

100‧‧‧USB裝置100‧‧‧USB device

10‧‧‧USB介面10‧‧‧USB interface

20‧‧‧第一開關20‧‧‧First switch

30‧‧‧第二開關30‧‧‧Second switch

40‧‧‧控制晶片40‧‧‧Control chip

圖1為本發明一種實施方式中具有供電模式切換功能的USB裝置的電路圖。1 is a circuit diagram of a USB device having a power supply mode switching function according to an embodiment of the present invention.

請參考圖1,本實施方式中的USB裝置100包括一USB介面10、一第一開關20、一第二開關30及一控制晶片40。USB介面10包括VBUS引腳、D-引腳、D+引腳、ID引腳以及GND引腳。ID引腳通過一下拉電阻R1接地,用於偵測插入USB介面10的電子設備的類型。當需要從USB裝置100獲得電能的電子設備插入USB介面10(例如U盤)時,ID引腳的電平變為邏輯高電平,當可提供電能至USB裝置100的電子設備插入USB介面10(例如USB電源適配器)時,ID引腳的電平變為邏輯低電平。Referring to FIG. 1 , the USB device 100 in this embodiment includes a USB interface 10 , a first switch 20 , a second switch 30 , and a control chip 40 . The USB interface 10 includes a VBUS pin, a D- pin, a D+ pin, an ID pin, and a GND pin. The ID pin is grounded through a pull-up resistor R1 for detecting the type of electronic device plugged into the USB interface 10. When an electronic device that needs to obtain power from the USB device 100 is plugged into the USB interface 10 (for example, a USB flash drive), the level of the ID pin becomes a logic high level, and when an electronic device that can supply power to the USB device 100 is inserted into the USB interface 10 When (such as a USB power adapter), the level of the ID pin changes to a logic low level.

第一開關20包括一Vin引腳、一Vout引腳及一EN引腳。EN引腳為邏輯高電平時,第一開關20導通,EN引腳為邏輯低電平時,第一開關20截止。Vin引腳與USB裝置100的工作電壓VDD5V連接,Vout引腳與第二開關30的一端及VBUS引腳連接。在本實施方式中,Vout引腳通過一二極體D與VBUS引腳連接,Vout引腳與二極體D的陽極連接,VBUS引腳與二極體D的陰極連接。在本實施方式中,控制晶片40連接於ID引腳及EN引腳之間。控制晶片40在ID引腳的電平為邏輯高電平時,輸出一高電平脈衝至EN引腳,使EN引腳變為邏輯高電平,第一開關20導通,以及在ID引腳的電平為邏輯低電平時,輸出一低電平脈衝至EN引腳,使EN引腳變為邏輯低電平,第一開關20截止。在其他實施方式中,EN引腳也可直接與ID引腳連接。The first switch 20 includes a Vin pin, a Vout pin and an EN pin. When the EN pin is at a logic high level, the first switch 20 is turned on, and when the EN pin is at a logic low level, the first switch 20 is turned off. The Vin pin is connected to the operating voltage VDD5V of the USB device 100, and the Vout pin is connected to one end of the second switch 30 and the VBUS pin. In this embodiment, the Vout pin is connected to the VBUS pin through a diode D, the Vout pin is connected to the anode of the diode D, and the VBUS pin is connected to the cathode of the diode D. In the present embodiment, the control wafer 40 is connected between the ID pin and the EN pin. The control chip 40 outputs a high level pulse to the EN pin when the level of the ID pin is a logic high level, causing the EN pin to become a logic high level, the first switch 20 is turned on, and at the ID pin. When the level is logic low, a low level pulse is output to the EN pin, causing the EN pin to be logic low and the first switch 20 is turned off. In other embodiments, the EN pin can also be directly connected to the ID pin.

VBUS引腳還通過第二開關30與USB裝置100的電源電壓Vcc連接。當EN引腳為邏輯高電平時,第二開關30截止,當EN引腳為邏輯低電平時,第二開關30導通。在本實施方式中,第二開關30為一MOS管。MOS管的柵極連接於Vout引腳以及通過電阻R2、R3接地,源極連接於VBUS引腳,漏極連接於電源電壓Vcc。當第一開關20導通時,柵極端電壓為高電平,MOS管截止,當第一開關20截止時,柵極端電壓為低電平,MOS管導通。在本實施方式中,MOS管為P型MOS管。The VBUS pin is also connected to the power supply voltage Vcc of the USB device 100 through the second switch 30. When the EN pin is at a logic high level, the second switch 30 is turned off, and when the EN pin is at a logic low level, the second switch 30 is turned on. In the present embodiment, the second switch 30 is a MOS transistor. The gate of the MOS transistor is connected to the Vout pin and grounded through resistors R2 and R3. The source is connected to the VBUS pin, and the drain is connected to the power supply voltage Vcc. When the first switch 20 is turned on, the gate terminal voltage is at a high level, and the MOS transistor is turned off. When the first switch 20 is turned off, the gate terminal voltage is at a low level, and the MOS transistor is turned on. In the present embodiment, the MOS transistor is a P-type MOS transistor.

在本實施方式中,當需要從USB裝置100獲得電能的外部電子設備插入USB介面10時,USB裝置100的工作電壓VDD5V通過第一開關20提供電能至VBUS引腳,以使外部電子設備從USB裝置100獲得電能。當可提供電能至USB裝置100的外部電子設備插入USB介面10時,外部電子設備提供的電能通過VBUS引腳傳送至電源電壓Vcc,即USB裝置100從外部電子設備獲得電能。In the present embodiment, when an external electronic device that needs to obtain power from the USB device 100 is inserted into the USB interface 10, the operating voltage VDD5V of the USB device 100 supplies power to the VBUS pin through the first switch 20 to make the external electronic device from the USB. Device 100 obtains electrical energy. When an external electronic device that can supply power to the USB device 100 is inserted into the USB interface 10, the power provided by the external electronic device is transmitted to the power supply voltage Vcc through the VBUS pin, that is, the USB device 100 obtains power from the external electronic device.

本實施方式提供了一種具有簡單切換電路的USB裝置100,以將USB裝置100在匯流排供電及自供電間進行自動切換。The present embodiment provides a USB device 100 having a simple switching circuit for automatically switching the USB device 100 between the bus bar power supply and the self-power supply.

no

100‧‧‧USB裝置 100‧‧‧USB device

10‧‧‧USB介面 10‧‧‧USB interface

20‧‧‧第一開關 20‧‧‧First switch

30‧‧‧第二開關 30‧‧‧Second switch

40‧‧‧控制晶片 40‧‧‧Control chip

Claims (6)

一種具有供電模式切換功能的USB裝置,所述USB裝置包括一USB介面,所述USB介面包括一VBUS引腳及一ID引腳,所述ID引腳通過一下拉電阻接地,其改良在於,所述USB裝置還包括一第一開關及一第二開關,所述第一開關包括一Vin引腳、一Vout引腳及一EN引腳,所述Vin引腳與所述USB裝置的工作電壓VDD5V連接,所述Vout引腳與所述VBUS引腳及所述第二開關的一端連接,所述VBUS引腳通過所述第二開關連接所述USB裝置的電源電壓Vcc,所述ID引腳的電平變為邏輯高電平時,所述EN引腳被設置為高電平,所述第一開關導通,所述第二開關截止,所述ID引腳的電平變為邏輯低電平時,所述EN引腳被設置為低電平,所述第一開關截止,所述第二開關導通。A USB device having a power mode switching function, the USB device includes a USB interface, the USB interface includes a VBUS pin and an ID pin, and the ID pin is grounded through a pull-down resistor, and the improvement is The USB device further includes a first switch and a second switch, the first switch includes a Vin pin, a Vout pin and an EN pin, and the Vin pin and the USB device operate at a voltage of VDD5V. Connected, the Vout pin is connected to one end of the VBUS pin and the second switch, and the VBUS pin is connected to the power voltage Vcc of the USB device through the second switch, the ID pin When the level becomes a logic high level, the EN pin is set to a high level, the first switch is turned on, the second switch is turned off, and when the level of the ID pin becomes a logic low level, The EN pin is set to a low level, the first switch is turned off, and the second switch is turned on. 如申請專利範圍第1項所述的具有供電模式切換功能的USB裝置,其中,所述EN引腳與所述ID引腳連接。A USB device having a power supply mode switching function according to claim 1, wherein the EN pin is connected to the ID pin. 如申請專利範圍第1項所述的具有供電模式切換功能的USB裝置,其特徵在於,所述USB裝置還包括一控制晶片,所述控制晶片連接於所述EN引腳及所述ID引腳之間,所述控制晶片在所述ID引腳變為邏輯高電平時,輸出邏輯高電平至所述EN引腳,以及在所述ID引腳變為邏輯低電平時,輸出邏輯低電平至所述EN引腳。The USB device with a power mode switching function according to claim 1, wherein the USB device further includes a control chip, and the control chip is connected to the EN pin and the ID pin. Between the control chip, when the ID pin becomes a logic high level, a logic high level is output to the EN pin, and when the ID pin becomes a logic low level, the output logic is low. Flat to the EN pin. 如申請專利範圍第1項所述的具有供電模式切換功能的USB裝置,其特徵在於,所述第二開關為一MOS管,所述MOS管的柵極連接於所述Vout引腳並接地,源極連接於所述VBUS引腳,漏極連接於所述電源電壓Vcc。The USB device with a power supply mode switching function according to claim 1, wherein the second switch is a MOS transistor, and a gate of the MOS transistor is connected to the Vout pin and grounded. The source is connected to the VBUS pin, and the drain is connected to the power supply voltage Vcc. 如申請專利範圍第1項所述的具有供電模式切換功能的USB裝置,其特徵在於,所述MOS管為P型MOS管。A USB device having a power supply mode switching function according to claim 1, wherein the MOS transistor is a P-type MOS transistor. 如申請專利範圍第1項所述的具有供電模式切換功能的USB裝置,其特徵在於,所述Vout引腳通過一二極體與所述VBUS引腳連接,所述Vout引腳連接所述二極體的陽極。The USB device with a power supply mode switching function according to claim 1, wherein the Vout pin is connected to the VBUS pin through a diode, and the Vout pin is connected to the second The anode of the polar body.
TW102124079A 2013-07-04 2013-07-04 USB device with power supply mode switching function TW201515358A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
TW102124079A TW201515358A (en) 2013-07-04 2013-07-04 USB device with power supply mode switching function

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
TW102124079A TW201515358A (en) 2013-07-04 2013-07-04 USB device with power supply mode switching function

Publications (1)

Publication Number Publication Date
TW201515358A true TW201515358A (en) 2015-04-16

Family

ID=53437771

Family Applications (1)

Application Number Title Priority Date Filing Date
TW102124079A TW201515358A (en) 2013-07-04 2013-07-04 USB device with power supply mode switching function

Country Status (1)

Country Link
TW (1) TW201515358A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106326739A (en) * 2016-08-09 2017-01-11 珠海溢思得瑞科技创新研究院有限公司 Safety protection equipment, data interface, core equipment and safety protection method
TWI620070B (en) * 2016-03-01 2018-04-01 聯發科技(新加坡)私人有限公司 Method and system for switching role of usb otg device

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
TWI620070B (en) * 2016-03-01 2018-04-01 聯發科技(新加坡)私人有限公司 Method and system for switching role of usb otg device
CN106326739A (en) * 2016-08-09 2017-01-11 珠海溢思得瑞科技创新研究院有限公司 Safety protection equipment, data interface, core equipment and safety protection method

Similar Documents

Publication Publication Date Title
CN104253459A (en) USB device with power supply mode switching function
JP5941135B2 (en) Electronic device having USB interface and USB communication activation method
US9018798B2 (en) Power supply circuit
TW201329727A (en) USB charge controlling circuit
CN103576816B (en) Switching on and shutting down control circuit
CN102810884B (en) Charging circuit
TW201347407A (en) Identifying circuit for USB
TW201348939A (en) Power control circuit for USB
CN204376697U (en) The circuit of electric equipment and reduction Switching Power Supply stand-by power consumption
CN104076899A (en) Energy-saving circuit
TW201416845A (en) Motherboard
TW201423354A (en) Power supply circuit for USB
TWI583134B (en) Interface supply circuit
TW201515358A (en) USB device with power supply mode switching function
TW201422919A (en) Circuit for controlling fan
TW201321955A (en) Power control device and electronic device using the same
TWI593211B (en) Control circuit and electronic device using the same
CN204116848U (en) A kind of many power control circuits
CN104345857B (en) Short-circuit protection circuit
CN106020402A (en) Central processing unit protection circuit
CN203311194U (en) Power-on time sequence control circuit based on CPLD
TWI580156B (en) Interface supply circuit
CN104124663A (en) Voltage protection circuit
TW201430576A (en) Electronic device
CN103678234B (en) A kind of interface circuit of the multiple usb type of compatibility