CN213518241U - Circuit for switching DFP and UFP based on USB-C port - Google Patents

Circuit for switching DFP and UFP based on USB-C port Download PDF

Info

Publication number
CN213518241U
CN213518241U CN202023173822.XU CN202023173822U CN213518241U CN 213518241 U CN213518241 U CN 213518241U CN 202023173822 U CN202023173822 U CN 202023173822U CN 213518241 U CN213518241 U CN 213518241U
Authority
CN
China
Prior art keywords
usb
port
operational amplifier
ufp
amplifier
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
CN202023173822.XU
Other languages
Chinese (zh)
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.)
Fujian Fuchang Weikong Electronic Technology Co ltd
Original Assignee
Fuzhou Wecon Electronic Technology 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 Fuzhou Wecon Electronic Technology Co ltd filed Critical Fuzhou Wecon Electronic Technology Co ltd
Priority to CN202023173822.XU priority Critical patent/CN213518241U/en
Application granted granted Critical
Publication of CN213518241U publication Critical patent/CN213518241U/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Power Sources (AREA)

Abstract

The utility model relates to a circuit design technical field especially relates to a circuit based on DFP and UFP are switched to USB-C port. The current sensing amplifier mainly comprises a PMOS tube Q1, a resistor R11, a current sensing amplifier U3, an operational amplifier U2C, an operational amplifier U5B and a USB-C port, and is formed by the electrical connection relationship among all components; when only the CPU/MCU chip of USB OTG function will adopt USB type C hardware port form, can pass through to add the utility model discloses a circuit based on DFP is switched to USB-C port and UFP makes USB type C can directly bypass special protocol chip, realizes DFP/UFP's automatic switch-over.

Description

Circuit for switching DFP and UFP based on USB-C port
Technical Field
The utility model relates to a circuit design technical field especially relates to a circuit based on DFP and UFP are switched to USB-C port.
Background
The USB Universal Serial Bus (Universal Serial Bus) is an emerging data communication method that gradually replaces other interface standards, and has been established by Intel, Compaq, Digital, IBM, Microsoft, NEC, and Northern Telecom, which have been incorporated by computer companies and communication companies in 1995, to form an industry standard. The USB bus is used as a high-speed serial bus, the extremely high transmission speed of the USB bus can meet the application environment requirement of high-speed data transmission, and the USB bus also has the advantages of simple power supply, plug and play support, hot plug and pull plug, port expansion, diversified transmission modes, compatibility, downward compatibility after upgrading of a compatible product and the like.
The USB Type-C, also called USB-C, is a hardware interface form of a Universal Serial Bus (USB), and the biggest characteristic in appearance is that the upper end and the lower end of the USB are completely consistent, which means that a user does not need to distinguish the front side and the back side of the USB compared with all the prior USB ports, and the USB Type-C and the USB-C can be inserted in both directions. The USB Type-C female header definition is shown in FIG. 1.
In the field of industrial application, the requirement for the USB is that the master-slave equipment switching function can be realized generally and the USB is completed by a USB _ ID signal; at present, in order to realize that a USB-C hardware interface form is adopted in a CPU/MCU which has a common USB function and does not contain a USB-C complete signal, a special chip is adopted in a general mode in the industry to monitor a CC signal of the USB-C, so that the switching of DFP/UFP functions is realized; the reason for using the special chip is that the USB-C hardware port has no USB _ ID signal; however, there are the following drawbacks:
1. a special chip is needed to monitor the voltage of CC1 and CC2, so that the cost of the USB-C interface is increased;
2. the monitoring result of the special chip is generally informed to the CPU through the I2C interface, which additionally occupies chip port resources and increases the complexity of software development.
SUMMERY OF THE UTILITY MODEL
In order to overcome the defects of the prior art, the present invention provides a circuit for switching between DFP and UFP based on USB-C port.
In order to solve the technical problem, the utility model discloses a technical scheme be:
a circuit for switching DFP and UFP based on USB-C port comprises a PMOS tube Q1, a resistor R11, a current sensing amplifier U3, an operational amplifier U2C, an operational amplifier U5B and a USB-C port;
the PMOS tube Q1 is electrically connected with a USB-C port through a resistor R11, the input end of a current sensing amplifier U3 is electrically connected with two ends of the resistor R11, the output end of the current sensing amplifier U3 is electrically connected with the positive input end of an operational amplifier U2C, the output end of the operational amplifier U2C is electrically connected with the controlled end of the PMOS tube Q1 and a peripheral CPU respectively, the USB-C port is electrically connected with the positive input end of an operational amplifier U5B, and the output end of the operational amplifier U5B is electrically connected with the peripheral CPU.
Furthermore, the drain of the PMOS transistor Q1 is connected to a 5V power supply, the source of the PMOS transistor Q1 is electrically connected to one end of a resistor R11, and the controlled end of the PMOS transistor Q1 is the gate of the PMOS transistor Q1.
Furthermore, the model of current sense amplifier U3 is IN212, the first pin of current sense amplifier U3 connects the 3V level, current sense amplifier U3's second pin ground connection, current sense amplifier U3's third pin connects the 5V power, current sense amplifier U3's fifth pin connects resistance R11 one end, current sense amplifier U3's fourth pin connects the resistance R11 other end, current sense amplifier U3's sixth pin is current sense amplifier U3's output.
Further, the inverting input terminal of the operational amplifier U2C is connected to 2.7V level, and the inverting input terminal of the operational amplifier U5B is connected to 4.5V level.
The beneficial effects of the utility model reside in that:
the utility model provides a circuit based on DFP and UFP are switched to USB-C port mainly comprises PMOS pipe Q1, resistance R11, current sense amplifier U3, operational amplifier U2C, operational amplifier U5B and USB-C port to form through the electric connection relation between each components and parts; when only the CPU/MCU chip of USB OTG function will adopt USB type C hardware port form, can pass through to add the utility model discloses a circuit based on DFP is switched to USB-C port and UFP makes USB type C can directly bypass special protocol chip, realizes DFP/UFP's automatic switch-over.
Drawings
FIG. 1 is a diagram illustrating a USB Type-C female header definition in the background art of the present invention;
fig. 2 is a connection diagram of a circuit for switching between DFP and UFP based on USB-C port according to the present invention.
Detailed Description
In order to explain the technical content, the objects and the effects of the present invention in detail, the following description is made with reference to the accompanying drawings in combination with the embodiments.
Name interpretation
DFP (Downstream cleansing Port): the downstream port, which may be understood as a master mode, DFP provides port voltage, data communication. A typical device is a PC.
Ufp (upstream Facing port): the uplink port can be understood as a slave device mode, and the UFP takes power from the port and can provide data. Typical devices are U disks, removable hard disks.
Referring to fig. 2, a circuit for switching DFP and UFP based on USB-C port of the present invention includes a PMOS transistor Q1, a resistor R11, a current sense amplifier U3, an operational amplifier U2C, an operational amplifier U5B, and a USB-C port;
the PMOS tube Q1 is electrically connected with a USB-C port through a resistor R11, the input end of a current sensing amplifier U3 is electrically connected with two ends of the resistor R11, the output end of the current sensing amplifier U3 is electrically connected with the positive input end of an operational amplifier U2C, the output end of the operational amplifier U2C is electrically connected with the controlled end of the PMOS tube Q1 and a peripheral CPU respectively, the USB-C port is electrically connected with the positive input end of an operational amplifier U5B, and the output end of the operational amplifier U5B is electrically connected with the peripheral CPU. The inverting input of the operational amplifier U2C is connected to the 2.7V level, and the inverting input of the operational amplifier U5B is connected to the 4.5V level. The drain electrode of the PMOS tube Q1 is connected with a 5V power supply in the device, the source electrode of the PMOS tube Q1 is electrically connected with one end of a resistor R11, and the controlled end of the PMOS tube Q1 is the grid electrode of the PMOS tube Q1.
The utility model provides a pair of operating principle based on circuit of USB-C port switching DFP and UFP does:
state 1: when the USB-C port is not connected to any device, at this time, no current exists in R11, a U3_ OUT voltage obtained according to the formula of INA212 is 0V × 1000+3V which is 3V and is greater than the reverse input voltage of the operational amplifier U2C by 2.7V, and then the USB _ ID outputs a +5V level, the CPU switches the USB-C to UFP, the Q1 PMOS transistor is turned off, the external output voltage of the USB-C port is 5V — 1V (Q1 body diode voltage), 4V is obtained and is less than the reverse input voltage of the operational amplifier U5B by 4V, the CPU monitors that the USB _ VBUS signal is low level, which indicates that the USB-C port waits for the external device to be connected;
state 2: when the USB-C port is accessed to a powered device, such as a U disk (the power consumption is at least 5V/50 milliampere); the power supply to the U disk is 4V at the beginning of the port; slightly small but with current flowing from the left to the right of R11 to the port, U3 INA212 detects voltage across R11, when current >3mA, assuming 4mA, according to the formula, U3_ OUT voltage is (-4mA × 0.1 Ω) × 1000+ 3V-2.6V; the reverse input voltage is 2.7V less than the operational amplifier U2C, and the USB _ ID outputs 0V level; the CPU switches the USB-C port into DFP, meanwhile, the Q1 PMOS tube is conducted, the voltage output of the USB-C port is 5V, the power supply returns to a normal value, and the CPU can normally communicate with the USB flash disk; when the USB flash disk device is unplugged, no voltage is applied to the two ends of the R11, and the CPU switches the USB-C port back to the UFP and returns to the state 1.
State 3: when the USB-C port is accessed to a host device, such as a PC; the PC supplies power to the equipment to be 5V voltage, the voltage of the USB port reaches 5V, but due to the unidirectional conductivity of a body diode when PMOS is cut off, no voltage is generated at the two ends of R11, USB _ ID is +5V level, the CPU switches the USB-C port to UFP, the voltage of the USB-C port is 5V greater than the reverse input voltage of operational amplifier U5B, the CPU monitors that the USB _ VBUS signal is high level, the host equipment access is detected, and the CPU is used as slave equipment to initiate a handshake protocol to communicate with the PC; when the host device is unplugged, no voltage is applied to the two ends of the R11, the state of the USB-C port is UFP unchanged, and the state returns to the state 1.
In the embodiment, the PMOS transistor Q1 is used for automatically adjusting the PMOS on-state according to the externally connected device; when power receiving equipment is accessed, the conduction voltage VBUS of the PMOS is 5V voltage, when power supply equipment such as a PC host computer is accessed, the PMOS tube is cut off, the body diode in the PMOS plays a function of unidirectional conduction to ensure that voltage provided when the power supply equipment is accessed cannot be reversely poured in, and the VBUS is 4V at the moment;
the function of the resistor R11: converting the current into voltage for detection;
the current sensing amplifier U3 is INA212 in model number, the gain of the amplifier is 1000 times, the function is to judge the condition of port current by detecting the voltage at the two ends of R11, and REF is reference voltage; the U3_ OUT voltage is the voltage across R11 × 1000+ VREF reference voltage;
the operational amplifier U2C is used for setting threshold voltage and adjusting detection sensitivity; the output signal is used as a USB ID signal, which not only controls whether the PMOS is conducted, but also informs the CPU of the mode required by the current USB port;
the operational amplifier U5B is used to detect the USB port voltage and output a signal as USB _ VBUS, which can be used to determine whether a master device is connected to the outside when the CPU is in the slave device mode.
IN this embodiment, the model of current sense amplifier U3 is IN212, the first pin of current sense amplifier U3 connects the 3V level, the second pin ground connection of current sense amplifier U3, the third pin of current sense amplifier U3 connects the 5V power, the fifth pin of current sense amplifier U3 connects resistance R11 one end, the fourth pin of current sense amplifier U3 connects the resistance R11 other end, the sixth pin of current sense amplifier U3 is current sense amplifier U3's output.
To sum up, the utility model provides a circuit based on DFP and UFP is switched to USB-C port mainly comprises PMOS pipe Q1, resistance R11, current sense amplifier U3, operational amplifier U2C, operational amplifier U5B and USB-C port to form through the electric connection relation between each components and parts; when only the CPU/MCU chip of USB OTG function will adopt USB type C hardware port form, can pass through to add the utility model discloses a circuit based on DFP is switched to USB-C port and UFP makes USB type C can directly bypass special protocol chip, realizes DFP/UFP's automatic switch-over.
The above mentioned is only the embodiment of the present invention, and not the limitation of the patent scope of the present invention, all the equivalent transformations made by the contents of the specification and the drawings, or the direct or indirect application in the related technical field, are included in the patent protection scope of the present invention.

Claims (4)

1. A circuit for switching DFP and UFP based on USB-C port is characterized by comprising a PMOS tube Q1, a resistor R11, a current sensing amplifier U3, an operational amplifier U2C, an operational amplifier U5B and a USB-C port;
the PMOS tube Q1 is electrically connected with a USB-C port through a resistor R11, the input end of a current sensing amplifier U3 is electrically connected with two ends of the resistor R11, the output end of the current sensing amplifier U3 is electrically connected with the positive input end of an operational amplifier U2C, the output end of the operational amplifier U2C is electrically connected with the controlled end of the PMOS tube Q1 and a peripheral CPU respectively, the USB-C port is electrically connected with the positive input end of an operational amplifier U5B, and the output end of the operational amplifier U5B is electrically connected with the peripheral CPU.
2. The circuit of claim 1, wherein a drain of the PMOS transistor Q1 is connected to an internal 5V power supply, a source of the PMOS transistor Q1 is electrically connected to one end of a resistor R11, and a controlled end of the PMOS transistor Q1 is a gate of the PMOS transistor Q1.
3. The circuit of claim 2, wherein the type of the current sense amplifier U3 is IN212, the first pin of the current sense amplifier U3 is connected to 3V level, the second pin of the current sense amplifier U3 is connected to ground, the third pin of the current sense amplifier U3 is connected to 5V power, the fifth pin of the current sense amplifier U3 is connected to one end of a resistor R11, the fourth pin of the current sense amplifier U3 is connected to the other end of the resistor R11, and the sixth pin of the current sense amplifier U3 is the output end of a current sense amplifier U3.
4. The circuit of claim 3, wherein the inverting input of the operational amplifier U2C is connected to 2.7V level, and the inverting input of the operational amplifier U5B is connected to 4.5V level.
CN202023173822.XU 2020-12-25 2020-12-25 Circuit for switching DFP and UFP based on USB-C port Active CN213518241U (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202023173822.XU CN213518241U (en) 2020-12-25 2020-12-25 Circuit for switching DFP and UFP based on USB-C port

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202023173822.XU CN213518241U (en) 2020-12-25 2020-12-25 Circuit for switching DFP and UFP based on USB-C port

Publications (1)

Publication Number Publication Date
CN213518241U true CN213518241U (en) 2021-06-22

Family

ID=76428652

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202023173822.XU Active CN213518241U (en) 2020-12-25 2020-12-25 Circuit for switching DFP and UFP based on USB-C port

Country Status (1)

Country Link
CN (1) CN213518241U (en)

Similar Documents

Publication Publication Date Title
US8756358B2 (en) Method and device for identifying universal serial bus (USB) insertion or charger insertion of mobile terminal
US10241935B2 (en) Portable device, cable assembly, and USB system
CN102662898B (en) Host-slave compatibility method, device and system for USB (universal serial bus) device
CN112088472B (en) Double-interface switching circuit and Type-C concentrator
US20060080490A1 (en) USB controller with intelligent transmission mode switching function and the operating method thereof
WO2016204825A1 (en) A low-power type-c receiver with high idle noise and dc-level rejection
JP4400937B2 (en) USB device
CN102096620A (en) Method and device for detecting connection state of serial port, and communication system
CN205029143U (en) USBType -C conversion module
CN109428727A (en) The power-economizing method of power supply unit and Power over Ethernet
CN101179199A (en) Terminal and charging method thereof
CN108134599A (en) A kind of I3C bus control interfaces circuit
CN113568855B (en) Low-cost PCIE hot plug multimode compatible device
CN212649180U (en) Double-interface switching circuit and Type-C concentrator
CN213518241U (en) Circuit for switching DFP and UFP based on USB-C port
CN210573756U (en) USB master-slave state switching circuit
CN215986443U (en) CC of Type C detects functional circuit
CN115525099B (en) Terminal equipment and method for detecting keyboard access
CN206584273U (en) SATA and mini PCIE common plug device
CN112952485B (en) Compatible charging cable and control method thereof
CN114661646A (en) Serial port switching control circuit
CN202661559U (en) Host/device real-time detection circuit with USB interface
CN221041793U (en) Gating system of Type-C interface
CN109344016B (en) USB device capable of switching between host and device modes and switching method
CN211264303U (en) Intelligent module and USB2.0 switching circuit thereof

Legal Events

Date Code Title Description
GR01 Patent grant
GR01 Patent grant
CP01 Change in the name or title of a patent holder
CP01 Change in the name or title of a patent holder

Address after: 350000 building 10, Zone E, software park, Gulou District, Fuzhou City, Fujian Province

Patentee after: Fujian Fuchang Weikong Electronic Technology Co.,Ltd.

Address before: 350000 building 10, Zone E, software park, Gulou District, Fuzhou City, Fujian Province

Patentee before: FUZHOU WECON ELECTRONIC TECHNOLOGY CO.,LTD.