CN111030247A - Switching circuit for switching host mode and device mode of type C - Google Patents

Switching circuit for switching host mode and device mode of type C Download PDF

Info

Publication number
CN111030247A
CN111030247A CN201911396146.1A CN201911396146A CN111030247A CN 111030247 A CN111030247 A CN 111030247A CN 201911396146 A CN201911396146 A CN 201911396146A CN 111030247 A CN111030247 A CN 111030247A
Authority
CN
China
Prior art keywords
pin
switching
usb
type
resistor
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.)
Pending
Application number
CN201911396146.1A
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.)
Shenzhen Yijing Virtual Reality Technology Co ltd
Original Assignee
Shenzhen Yijing Virtual Reality 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 Shenzhen Yijing Virtual Reality Technology Co ltd filed Critical Shenzhen Yijing Virtual Reality Technology Co ltd
Priority to CN201911396146.1A priority Critical patent/CN111030247A/en
Publication of CN111030247A publication Critical patent/CN111030247A/en
Pending legal-status Critical Current

Links

Images

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
    • 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
    • H02J7/0029Circuit arrangements for charging or depolarising batteries or for supplying loads from batteries with safety or protection devices or circuits

Landscapes

  • Engineering & Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Hardware Design (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Power Engineering (AREA)
  • Power Sources (AREA)

Abstract

The invention provides a switching circuit for switching between a host mode and a device mode in type C, and belongs to the technical field of USB. The intelligent charging system comprises a type C interface, a USB mode switching module, a DSP, a power management module, a charging module connected with the power management module and a battery connected with the charging module, wherein the DSP is respectively connected with the USB mode switching module and the power management module, the power management module supplies power to the whole circuit, and the USB mode switching module is respectively connected with the charging module and the type C interface. The invention has the beneficial effects that: the method has the advantages of simple design, low cost and simple software modification and maintenance.

Description

Switching circuit for switching host mode and device mode of type C
Technical Field
The invention relates to the technical field of USB interfaces, in particular to a switching circuit for switching between a host mode and a device mode according to type C.
Background
The existing mobile platform only supports one type C interface, and the interface has the functions of connecting a computer, charging and externally connecting slave equipment. Because only one type C interface is provided, the requirements of simultaneously supporting a plurality of USB peripherals and charging and connecting a computer for debug and data transmission cannot be met, so that the USB interface charging device has great limitation and is difficult to realize diversified requirements of products. .
Disclosure of Invention
In order to solve the problems in the prior art, the invention provides a switching circuit for switching between a host mode and a device mode by type C.
The intelligent charging system comprises a type C interface, a USB mode switching module, a DSP, a power management module, a charging module connected with the power management module and a battery connected with the charging module, wherein the DSP is respectively connected with the USB mode switching module and the power management module, the power management module supplies power to the whole circuit, and the USB mode switching module is respectively connected with the charging module and the type C interface.
The invention is further improved and also comprises a USB expansion module which is respectively connected with the DSP and the USB mode switching module and is used for expanding the USB signals given by the DSP into a plurality of paths of USB signals.
The USB expansion module comprises a HUB HUB, more than 2 USB interfaces respectively connected with the HUB HUB, a boosting unit and an overcurrent protection unit, wherein the HUB HUB is respectively connected with a DSP and a USB mode switching module, the boosting unit and the overcurrent protection unit respectively provide a stable power supply for the HUB HUB and the USB interfaces, the input end of the boosting unit is electrically connected with the output end of a power management module, the output end of the boosting unit is electrically connected with the input end of the overcurrent protection unit, the output end of the overcurrent protection unit is electrically connected with the USB interfaces, and the boosting unit is further connected with the DSP through a signal line.
The USB mode switching module comprises an insertion detection circuit, a VBUS power source path management circuit and a USBDM/DP switching circuit, wherein the input end of the insertion detection circuit is connected with a type C interface, the output end of the insertion detection circuit is connected with the input end of a DSP, the input ends of the VBUS power source path management circuit and the USB DM/DP switching circuit are respectively connected with the output end of the DSP, and the USB DM/DP switching circuit is also respectively connected with the type C interface and a USB expansion module.
The insertion detection circuit comprises a switch tube Q1, a resistor R1, a resistor R2, a resistor R3 and a capacitor C2, wherein the source of the switch tube Q1 is grounded, the drain of the switch tube Q1 is respectively connected with one end of a resistor R1, a grounded capacitor C2 and a detection pin of a DSP, the other end of the resistor R1 is connected with a 1.8V power supply, the grid of the switch tube Q1 is respectively connected with one ends of the resistor R2 and the resistor R3, the other end of the resistor R3 is grounded, and the other end of the resistor R2 is connected with a VBUS pin of a type C interface.
The VBUS power source path management circuit comprises switching tubes Q2-Q5, a peripheral resistor-capacitor device thereof and a diode D1, wherein,
the drain of the switching tube Q4 is respectively connected with the grid of the switching tube Q2, the grid of the switching tube Q3 and the charging IC, the source of the switching tube Q4 is grounded, the grid is respectively connected with one end of a lower resistor R7, one end of a resistor R14 and one end of a resistor R6, the other end of the resistor R14 is connected with the cathode of a diode D1, the anode of the diode D1 is connected with a host mode enable pin of the DSP,
the source electrode of the switching tube Q2 is connected with a VBUS pin of a type C interface, the source electrode of the switching tube Q3 is connected with the charging module, the drain electrode of the switching tube Q2 is connected with the source electrode of the switching tube Q3 and is connected with the drain electrode of the switching tube Q4 through a resistor R4, the source electrode of the switching tube Q2 is connected with the base electrode through a C3, and the source electrode of the switching tube Q3 is connected with the base electrode through a C4.
The source electrode of the switch tube Q5 is grounded, the drain electrode is connected with a VBUS pin of the type C interface, and the grid electrode is respectively connected with a grounding resistor R9 and a mode switching pin of the DSP through a resistor R8.
In a further improvement of the present invention, the USB DM/DP switching circuit comprises a switching chip U1 for switching CC signals and a switching chip U2 for switching USB _ DM/DP signals, wherein,
the switching chip U1 is provided with an HSD 2-pin 6 and an HSD2+ pin 7 which are used for deceiving a system into a host mode, wherein the HSD 2-pin 6 or the HSD2+ pin 7 is respectively provided with a ground resistor, the resistance value of the ground resistor is 5.1k ohm, the switching chip further comprises a D + pin 1 and a D-pin 2 which are connected with a charging module, an SEL pin 10 connected with a mode switching pin of a DSP, an OE pin 8 and a GND pin 3 which are respectively grounded, a VCC pin 9 connected with a power supply, an HSD 1-pin 4 and an HSD1+ pin 5 which are connected with two CC pins of a type C interface;
the structure of the switching chip U2 is the same as that of the switching chip U1, wherein a D + pin 1 and a D-pin 2 of the switching chip U2 are respectively connected with a DSP, an HSD 1-pin 4 and an HSD1+ pin 5 of the switching chip U2 are respectively connected with a DP pin and a DN pin of a type C interface, and an HSD 2-pin 6 or an HSD2+ pin 7 of the switching chip U2 are respectively connected with a HUB extension module.
The invention is further improved, a common mode inductor L1 is arranged between an HSD 1-pin 4 and an HSD1+ pin 5 of the switching chip U2, and a common mode inductor L2 is arranged between an HSD 2-pin 6 or an HSD2+ pin 7 of the switching chip U2.
The invention further improves the type C interface, which includes pins a1-a12 disposed on one side of the type C interface, and pins B1-B12 disposed on the other side of the type C interface, wherein the pin a1, the pin a12, the pin B1, and the pin B12 are grounded, the pins a2-3, A8, a10, a11, the pin B2-3, B8, B10, and B11 are suspended, the pins A4, a9, the pins B4, and B9 are VBUS pins, and connect to a VBUS _ TYPEC signal line, the pin A5 is a CC1 pin, the pin B5 is a CC2 pin, the pin A6 is a DP1 pin, the pin B6 is a DP2 pin, the pin a2 is a DN2 pin, the pin B2 is a USB signal pin B2, and the pin a tydp 2 is connected to a USB signal line.
The invention is further improved, the USB _ DP _ TYPEC signal line and the USB _ DM _ TYPEC signal line are respectively provided with a charging wire connected to the charging module through a resistor, and the CC1 pin, the CC2 pin, the USB _ DP _ TYPEC signal line and the USB _ DM _ TYPEC signal line are respectively provided with a grounded TVS tube.
Compared with the prior art, the invention has the beneficial effects that: the USB drive and charging part of the original system does not need to be modified, the host and device state switching of the type C interface can be completed only by adding a plurality of control pins, and meanwhile, the charging self-contained quick charging protocol is compatible, and the USB charging system has the advantages of simple design, low cost and simple software modification and maintenance.
Drawings
FIG. 1 is a schematic structural view of the present invention;
FIG. 2 is a schematic diagram of a type C interface circuit of the present invention;
FIG. 3 is a schematic diagram of an insertion detection circuit;
FIG. 4 is a schematic diagram of a VBUS power path management circuit;
FIG. 5 is a schematic diagram of a USB DM/DP switching circuit.
Detailed Description
The present invention will be described in further detail with reference to the accompanying drawings and examples. host and device modes
As shown in fig. 1, the present invention includes a type C interface, a USB mode switching module, a DSP, a power management module, a charging IC connected to the power management module, and a battery connected to the charging IC, wherein the DSP is respectively connected to the USB mode switching module and the power management module, the power management module supplies power to the entire circuit, and the USB mode switching module is respectively connected to the charging IC and the type C interface.
The USB expansion module is connected with the DSP and the USB mode switching module respectively. USB expansion module includes concentrator HUB, the USB interface more than 2 that link to each other with concentrator HUB respectively, still includes step up unit, overcurrent protection unit, wherein, concentrator HUB links to each other with DSP and USB mode switch module respectively, step up unit and overcurrent protection unit do respectively concentrator HUB and USB interface provide stabilizing power supply, step up unit input and power management module output electric connection, step up unit output and overcurrent protection unit's input electric connection, overcurrent protection unit output and USB interface electric connection, step up the unit and still pass through the signal line and link to each other with DSP.
the type C interface is used for software downloading, debug, data transmission and charging functions, the battery supplies power to the whole system, and the charging IC of the charging module provides charging, USB HOST 5V power supply and current path management functions. The power management module provides various power supplies required by the platform, the DPS is responsible for controlling peripheral devices and carrying out USB communication, and the USB mode switching module provides USB insertion detection, power supply paths of USB host and device modes, USB signals and CC signals. And the USB expansion module is responsible for expanding the USB signals given by the DSP into a plurality of paths of USB signals.
The USB interface extension device is in a device mode (slave device mode) by default in a power-off state and a software downloading state, the USB signal is connected to the type C interface by default, the power-off charging and downloading functions can be executed, the default switching to a host mode (master device mode) can be controlled after the device is started, and the HUB extension USB interface is used for connecting with an external device. When the computer is inserted into the type C port, the USB signal is automatically switched back to the type C port to be connected with the computer for data transmission and charging, and when the charger is connected into the type C port, the USB signal is automatically switched to the type C port to be charged (if the charging IC and the charger support quick charging, the charging can enter a quick charging state). In the embodiment, several buttons can be added on the software application interface, and the host and device states of the USB can be switched easily through the buttons.
The invention resets the type C interface and the USB mode switching module, the USB driving and charging part of the original software system is not required to be modified, the DSP, the power management module and the charging module are not subjected to any hardware modification, the host and device state switching of the type C interface can be completed only by adding a plurality of control pins, and the invention is compatible with the self-carried charging protocol, and has the advantages of simple design, low cost and simple software modification and maintenance. The USB expansion module is compatible with finished products of hubs on the market.
The core of the present invention will be described in detail below.
As shown in fig. 2, the type C interface of this example includes pins a1-a12 disposed on one side of the type C interface, and pins B1-B12 disposed on the other side of the type C interface, where pin a1, pin a12, pin B1, and pin B12 are grounded, pins a2-3, A8, a10, a11, pin B2-3, B8, B10, B11 are suspended, pins A4, a9, pins B4, and B9 are VBUS pins, and connect VBUS _ TYPEC signal lines, pin A5 is a CC1 pin, pin B5 is a CC2 pin, pin A6 is a DP1 pin, pin B6 is a DP2 pin, pin A7 is a DN1 pin, and pin B7 is a DN2 pin.
The purpose of using the Type C interface in the embodiment is to match with the quick charging function of the charging IC, so that the requirement of quick charging high voltage and large current is met.
Pin A6 and pin B6 short circuit of type C interface described in this example, connect USB _ DP _ TYPEC signal line, pin A7 and pin B7 short circuit are connected USB _ DM _ TYPEC signal line, can avoid type C's positive and negative problem of inserting, walk the branching of DM, DP at PCB and try hard to try short, signal transmission is more stable. And the USB _ DP _ TYPEC signal line and the USB _ DM _ TYPEC signal line are respectively provided with a charging wire connected to the charging IC through a resistor, and the USB signal is branched to the charging IC through the resistor and used for sending a quick charging protocol signal. And a grounded TVS tube is arranged on the CC1 pin, the CC2 pin, the USB _ DP _ TYPEC signal line and the USB _ DM _ TYPEC signal line respectively and is used for EOS (electrical overstress) protection.
A capacitor C1 and a surge tube ED1 are connected to a VBUS signal wire of type C, the capacitor C1 is used for eliminating pulses on the VBUS to enable the VBUS voltage to be as smooth as possible, and the surge tube ED1 is used for eliminating surges on the VBUS.
As shown in fig. 3-5, the USB mode switching module of this embodiment includes an insertion detection circuit, a VBUS power path management circuit, and a USB DM/DP switching circuit, wherein an input end of the insertion detection circuit is connected to the type C interface, an output end of the insertion detection circuit is connected to an input end of the DSP, input ends of the VBUS power path management circuit and the USB DM/DP switching circuit are respectively connected to an output end of the DSP, and the USB DM/DP switching circuit is further connected to the type C interface and the USB expansion module, respectively. The following is a detailed description of the working principle of these 3 parts.
As shown in fig. 3, the insertion detection circuit includes a switch Q1, a resistor R1, a resistor R2, a resistor R3, and a capacitor C2, wherein a source of the switch Q1 is grounded, a drain of the switch Q1 is respectively connected to one end of a resistor R1, a grounded capacitor C2, and a detection pin of the DSP, the other end of the resistor R1 is connected to a 1.8V power supply, a gate of the switch Q1 is respectively connected to one ends of the resistor R2 and the resistor R3, the other end of the resistor R3 is grounded, and the other end of the resistor R2 is connected to a VBUS pin of the type C interface.
The circuit provides a trigger signal TYPEC _ PLUG _ IN _ DETECT to the DSP to report whether a computer or a charger is inserted into the type C port. TYPEC _ PLUG _ IN _ DETECT being low indicates that a computer or charger is plugged IN, and TYPEC _ PLUG _ IN _ DETECT being high indicates that a USB device is unplugged.
Resistor R1 is connected to VDD _1V8 voltage for providing a stable 1.8V pull-up level for TYPEC _ PLUG _ IN _ DETECT, and capacitor C2 is used for decoupling filtering TYPEC _ PLUG _ IN _ DETECT. The VBUS _ TYPEC voltage is the VBUS voltage received when the type C interface is connected to a computer or a USB, and considering that the VBUS _ TYPEC voltage rises to 12V (QC3.0 protocol) when a charging IC (charging IC for short) of the charging module has a quick charging function, at this time, the resistor R3 is grounded to divide the VBUS _ TYPEC voltage, so that the gate voltage Vgs of the switching tube Q1 does not exceed the maximum operating voltage range. The resistor R2 plays a role in limiting current and avoids large current pulses generated on the grid of the switch tube Q1.
When a computer or a charger is plugged IN, VBUS _ TYPEC is at a high level, the voltage divided by R2 and R3 is added to the gate of Q1, the Vgs voltage is at a high level, the source and the drain of Q1 are grounded, so that TYPEC _ PLUG _ IN _ DETECT is at a low level, and the DSP can judge that the computer or the charger is plugged IN by detecting that the level of TYPEC _ PLUG _ IN _ DETECT is low. When the USB line is pulled out, VBUS _ TYPEC is at low level, Vgs level of Q1 is low, Q1 is cut off, TYPEC _ PLUG _ IN _ DETECT is at high level, and the DSP can judge that the computer or the charger is pulled out by detecting that the level on TYPEC _ PLUG _ IN _ DETECT is high.
As shown in fig. 4, the VBUS power path management circuit of this example includes switching transistors Q2-Q5 and their peripheral resistive-capacitive devices, and a diode D1, wherein,
the drain of the switch tube Q4 is respectively connected with the gate of the switch tube Q2, the gate of the switch tube Q3, one end of the capacitor C3, one end of the capacitor C4 and the charging IC, the source of the switch tube Q4 is grounded, the gate is respectively connected with one end of the lower resistor R7, one end of the resistor R14 and one end of the resistor R6, the other end of the resistor R14 is connected with the cathode of the diode D1, the anode of the diode D1 is connected with the host mode enable pin of the DSP,
the source electrode of the switching tube Q2 is connected with a VBUS pin of a type C interface, the source electrode of the switching tube Q3 is connected with a charging IC, the drain electrode of the switching tube Q2 is connected with the source electrode of the switching tube Q3 and is connected with the drain electrode of the switching tube Q4 through a resistor R4, the source electrode of the switching tube Q2 is connected with the base electrode through a C3, and the source electrode of the switching tube Q3 is connected with the base electrode through a C4.
The source of the switch tube Q5 is grounded, the drain is connected with one end of a resistor R6 and connected with the VBUS pin of the type C interface through a resistor R5, and the gate is respectively connected with a grounded resistor R9 and the mode switching pin of the DSP through a resistor R8.
The operation principle of the VBUS power source path management circuit is as follows:
when the gate of the NMOS switching transistor Q4 is low, the switching transistor Q4 is turned off, and at this time, the USB line is inserted, and VBUS _ TYPEC supplies 5V power, and the voltage is conducted from the drain of the switching transistor Q2 to the source through the body diode, and since the resistor R4 connects the source and the gate of the switching transistor Q2 and the switching transistor Q3, Vgs of the switching transistor Q3 is 0V, and the switching transistor Q3 is turned off, and VBUS does not have voltage. Similarly, when VBUS is supplied with 5V power, Q2 is turned off when Vgs of the switching transistor Q2 is 0V, and VBUS _ TYPEC also has no voltage. The gate of the NMOS switch Q4 is controlled to be at a high level, the source and the drain of the switch Q4 are turned on to ground, the gates of the switch Q2 and the switch Q3 are at a low level, if one of VBUS _ TYPEC and VBUS has a high voltage, the switch Q2 and the switch Q3 are turned on, and the VBUS power path is established.
The TYPE _ HOST _ EN pin is controlled by The DSP, and when The OTG (On-The-Go, which is mainly applied to The connection among various devices or mobile devices for data exchange.) function of The TYPE C interface needs to be opened, The TYPE _ HOST _ EN pin can be controlled to be high, The switch tube Q4 is opened, The grids of The switch tube Q2 and The switch tube Q3 are low, a VBUS power supply path is ready to be established, and meanwhile, The USB _ TYPE _ SEL pin needs to be controlled to be low, and CC and USB _ DM/DP signals are switched to a TYPE C seat (see The operational principle of The USB BDM/DP switching circuit). At this time, the OTG device is inserted, the CC recognizes the device type and informs the charging IC to provide 5V voltage, and informs the DSP to start the USB handshake protocol.
Because the voltage on VBUS _ TYPEC can reach 12V in the fast charging state, the voltage on the grid electrode of Q4 can be about 3V after the voltage is divided by resistors R5, R6 and R7, and the voltage of 3V is prevented from flowing back to the DSP by the action of D1.
The USB _ TYPE _ SEL pin is controlled by the DSP, when the USB _ TYPE _ SEL pin is high voltage, the switch tube Q5 is switched on, the drain electrode of the switch tube Q5 is low level, because the drain electrode of the switch tube Q5 is connected with the grid electrode of the switch tube Q4 through the resistor R6, the grid electrode of the switch tube Q4 is low level at the moment, the switch tube Q4 is cut off, thereby the switch tube Q2 and the switch tube Q3 are cut off, the VBUS power supply path is closed (meanwhile, when the USB _ TYPE _ SEL pin is high, the CC can be switched to the 5.1k resistor grounding trapping system to enter a host mode, and meanwhile, the USB _ DM/DP signal can be switched to the HUB module to form a HUB extended multi-USB port mode, see the working principle of the USB DM/DP switching circuit). Resistor R9 is pulled down to ground by default, keeping USB _ TYPE _ SEL low by default.
As shown in fig. 5, the USB DM/DP switching circuit of this example includes a switching chip U1 for switching CC signals and a switching chip U2 for switching USB _ DM/DP signals, wherein,
the switching chip U1 is provided with an HSD 2-pin 6 and an HSD2+ pin 7 for deceiving a system into a host mode, wherein the HSD 2-pin 6 or the HSD2+ pin 7 is respectively provided with a ground resistor, the resistance value of the ground resistor is 5.1k ohm, the switching chip further comprises a D + pin 1 and a D-pin 2 connected with a charging IC, an SEL pin 10 connected with a mode switching pin of a DSP, an OE pin 8 and a GND pin 3 which are respectively grounded, a VCC pin 9 connected with a power supply, an HSD 1-pin 4 connected with two CC pins of a type C interface, and an HSD1+ pin 5.
The structure of the switching chip U2 is the same as that of the switching chip U1, wherein a D + pin 1 and a D-pin 2 of the switching chip U2 are respectively connected with a DSP, an HSD 1-pin 4 and an HSD1+ pin 5 of the switching chip U2 are respectively connected with a DP pin and a DN pin of a type C interface, and an HSD 2-pin 6 or an HSD2+ pin 7 of the switching chip U2 are respectively connected with a HUB extension module.
Preferably, a common mode inductor L1 is arranged between the HSD 1-pin 4 and the HSD1+ pin 5 of the switching chip U2, and a common mode inductor L2 is arranged between the HSD 2-pin 6 or the HSD2+ pin 7 of the switching chip U2. The common mode inductor L1 and the common mode inductor L2 are used for eliminating common mode interference on the USB DM/DP and ensuring the USB signal quality.
In this example, the VSYS _ PWR power line is provided with decoupling filter capacitors C5 and C6, one end of which is grounded, for filtering the power supply pins of the switching chips U1 and U2. Current-limiting resistors are further arranged on SEL pins of the switching chip U1 and the switching chip U2 respectively, and instantaneous large current is prevented from being generated on the USB _ TYPE _ SEL pin.
The working principle of the embodiment is as follows:
the switching chip U1 and the switching chip U2 are powered by the system, and once the system is provided with a battery, VSYS _ PWR has voltage output, so that the switching chips U1 and U2 can work in a shutdown state. The switching chip U1 is used for switching the CC signal of type C, and the switching chip U2 is used for switching the signal of USB _ DM/DP. In the power-off state, the 8 th pin OE of the switching chip U1 is grounded, the 10 th pin SEL is grounded through the pull-down of R9 (see VBUS power path management circuit principle part), the CC signal is switched to the 4 th and 5 th pins of U1 by U1 to communicate with the type C interface, and similarly, the USB3_ HS _ DM/DP signal is switched to the 4 th and 5 th pins of U2 by the switching chip U2 to communicate with the type C interface, so that the downloading function of the original system can be maintained.
After the system is started up, the DPS can control the USB _ TYPE _ SEL to be high-level output to switch the CC signal to the 6 th pin and the 7 th pin of the U1 to trap the system to enter a host mode through the 5.1K resistor, and meanwhile, because the USB _ TYPE _ SEL is high, the switching chip U2 can switch the USB DM/DP signal to the 6 th pin and the 7 th pin of the U2 to be provided for the USB expansion module, and the system can mount various device devices. When the system is IN a power-on state, a charger or a connected computer is inserted, the DSP sets the USB _ TYPE _ SEL to be low after detecting that the TYPE _ PLUG _ IN _ DETECT level becomes low, the U1 and the U2 are controlled to switch CC and USB _ DM/DP signals to a TYPE C seat, and the DSP can judge the TYPE of the access equipment through the CC signals and carry out a fast charging protocol or a data connection protocol through the USB _ DM/DP.
Since only one of the CC1 and the CC2 needs to be connected with a resistor of 5.1K to trick the system into a host mode, the R12 in this example is a reserved non-attached device, and the R11 is a resistor of 5.1K.
The invention realizes the state switching between the host state and the device state of the type C interface by using a simple circuit, the host state can be connected with the USB HUB to expand a plurality of USB interfaces, and a plurality of USB peripherals can be connected at the same time; the device state can be charged by a charger and connected with a computer for software downloading, data transmission and debug, and the diversified design requirements of products are met.
The above-described embodiments are intended to be illustrative, and not restrictive, of the invention, and all changes that come within the meaning and range of equivalency of the claims are therefore intended to be embraced therein.

Claims (10)

1. The utility model provides a switching circuit of type C switching host and device mode which characterized in that: comprises a type C interface, a USB mode switching module, a DSP, a power supply management module, a charging module connected with the power supply management module and a battery connected with the charging module, wherein,
the DSP is respectively connected with a USB mode switching module and a power management module, the power management module supplies power to the whole circuit, the USB mode switching module is respectively connected with the charging module and the type C interface,
the type C interface is used for data transmission and charging function, and the battery supplies power for whole circuit, and the module of charging provides to charge, USBHOST 5V power supply and current path management function, and power management module provides the various power supplies that the platform needs, and DPS is responsible for controlling peripheral device and carrying out USB communication, and USB mode switches the module and is used for type C mode switch.
2. The switching circuit for switching between host and device modes of type C according to claim 1, wherein: the USB expansion module is respectively connected with the DSP and the USB mode switching module and expands the USB signals given by the DSP into a plurality of paths of USB signals.
3. The type C switching circuit of switching between host and device modes of claim 2, wherein: USB expansion module includes concentrator HUB, the USB interface more than 2 that link to each other with concentrator HUB respectively, still includes step up unit, overcurrent protection unit, wherein, concentrator HUB links to each other with DSP and USB mode switch module respectively, step up unit and overcurrent protection unit do respectively concentrator HUB and USB interface provide stabilizing power supply, step up unit input and power management module output electric connection, step up unit output and overcurrent protection unit's input electric connection, overcurrent protection unit output and USB interface electric connection, step up the unit and still pass through the signal line and link to each other with DSP.
4. The switching circuit of type C switching host and device modes according to claim 2 or 3, wherein: the USB mode switching module comprises an insertion detection circuit, a VBUS power source path management circuit and a USB DM/DP switching circuit, wherein the input end of the insertion detection circuit is connected with a type C interface, the output end of the insertion detection circuit is connected with the DSP input end, the input ends of the VBUS power source path management circuit and the USB DM/DP switching circuit are respectively connected with the DSP output end, and the USB DM/DP switching circuit is further respectively connected with the type C interface and the USB expansion module.
5. The type C switching circuit for switching between host and device modes of claim 4, wherein: the insertion detection circuit comprises a switch tube Q1, a resistor R1, a resistor R2, a resistor R3 and a capacitor C2, wherein the source of the switch tube Q1 is grounded, the drain of the switch tube Q1 is respectively connected with one end of a resistor R1, a grounded capacitor C2 and a detection pin of a DSP, the other end of the resistor R1 is connected with a 1.8V power supply, the grid of the switch tube Q1 is respectively connected with one ends of the resistor R2 and the resistor R3, the other end of the resistor R3 is grounded, and the other end of the resistor R2 is connected with a VBUS pin of a type C interface.
6. The type C switching circuit for switching between host and device modes of claim 4, wherein: the VBUS power source path management circuit comprises switching tubes Q2-Q5 and peripheral resistance-capacitance devices thereof, and a diode D1, wherein,
the drain of the switching tube Q4 is respectively connected with the grid of the switching tube Q2, the grid of the switching tube Q3 and the charging IC, the source of the switching tube Q4 is grounded, the grid is respectively connected with one end of a lower resistor R7, one end of a resistor R14 and one end of a resistor R6, the other end of the resistor R14 is connected with the cathode of a diode D1, the anode of the diode D1 is connected with a host mode enable pin of the DSP,
the source electrode of the switching tube Q2 is connected with a VBUS pin of the type C interface, and the source electrode of the switching tube Q3 is connected with the charging module. The drain of the switching tube Q2 is connected with the source of the switching tube Q3 and is connected with the drain of the switching tube Q4 through a resistor R4, the source of the switching tube Q2 is connected with the base through a C3, the source of the switching tube Q3 is connected with the base through a C4,
the source of the switch tube Q5 is grounded, the drain is connected to one end of the R6 and to the VBUS pin of the type C interface through a resistor R5, and the gate is connected to a ground resistor R9 and the mode switching pin of the DSP through a resistor R8, respectively.
7. The type C switching circuit for switching between host and device modes of claim 6, wherein: the USB DM/DP switching circuit includes a switching chip U1 for switching CC signals and a switching chip U2 for switching USB _ DM/DP signals, wherein,
the switching chip U1 is provided with an HSD 2-pin 6 and an HSD2+ pin 7 which are used for deceiving a system into a host mode, wherein the HSD 2-pin 6 or the HSD2+ pin 7 is respectively provided with a ground resistor, the resistance value of the ground resistor is 5.1k ohm, the switching chip further comprises a D + pin 1 and a D-pin 2 which are connected with a charging module, an SEL pin 10 connected with a mode switching pin of a DSP, an OE pin 8 and a GND pin 3 which are respectively grounded, a VCC pin 9 connected with a power supply, an HSD 1-pin 4 and an HSD1+ pin 5 which are connected with two CC pins of a type C interface;
the structure of the switching chip U2 is the same as that of the switching chip U1, wherein a D + pin 1 and a D-pin 2 of the switching chip U2 are respectively connected with a DSP, an HSD 1-pin 4 and an HSD1+ pin 5 of the switching chip U2 are respectively connected with a DP pin and a DN pin of a type C interface, and an HSD 2-pin 6 or an HSD2+ pin 7 of the switching chip U2 are respectively connected with a HUB extension module.
8. The type C switching circuit of switching between host and device modes of claim 8, wherein: a common-mode inductor L1 is arranged between an HSD 1-pin 4 and an HSD1+ pin 5 of the switching chip U2, and a common-mode inductor L2 is arranged between an HSD 2-pin 6 or an HSD2+ pin 7 of the switching chip U2.
9. The switching circuit of type C switching host and device modes according to claim 2 or 3, wherein: the type C interface comprises pins A1-A12 and B1-B12, wherein the pins A1, A12, B1 and B12 are arranged on one side of the type C interface and grounded, the pins A2-3, A8, A10, A11, B2-3, B8, B10 and B11 are suspended, the pins A4, A9, B4 and B9 are VBUS pins and are connected with a VBUS _ TYPEC signal line, the pin A5 is a CC1 pin, the pin B5 is a CC2 pin, the pin A6 is a DP1 pin, the pin B6 is a DP2 pin, the pin A2 is a DN2 pin, the pin B2 is a DN2 pin, the pin A2 and the pin B2 of the type C interface are connected with a USB TYPEC signal line, and the USB signal line is connected with the USB TYPEC signal line.
10. The type C switching circuit of switching between host and device modes of claim 9, wherein: USB _ DP _ TYPEC signal line and USB _ DM _ TYPEC signal line are last to be equipped with respectively through the charging wire that resistance is connected to the module of charging, be equipped with the TVS pipe of a ground connection on CC1 pin, CC2 pin, USB _ DP _ TYPEC signal line and the USB _ DM _ TYPPEC signal line respectively.
CN201911396146.1A 2019-12-30 2019-12-30 Switching circuit for switching host mode and device mode of type C Pending CN111030247A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201911396146.1A CN111030247A (en) 2019-12-30 2019-12-30 Switching circuit for switching host mode and device mode of type C

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201911396146.1A CN111030247A (en) 2019-12-30 2019-12-30 Switching circuit for switching host mode and device mode of type C

Publications (1)

Publication Number Publication Date
CN111030247A true CN111030247A (en) 2020-04-17

Family

ID=70195932

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201911396146.1A Pending CN111030247A (en) 2019-12-30 2019-12-30 Switching circuit for switching host mode and device mode of type C

Country Status (1)

Country Link
CN (1) CN111030247A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111525648A (en) * 2020-05-19 2020-08-11 上海摩勤智能技术有限公司 Multifunctional base, electronic terminal and multi-joint switching method
CN112799985A (en) * 2021-04-14 2021-05-14 智道网联科技(北京)有限公司 USB interface control method, USB control circuit and intelligent networking equipment mainboard

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111525648A (en) * 2020-05-19 2020-08-11 上海摩勤智能技术有限公司 Multifunctional base, electronic terminal and multi-joint switching method
CN112799985A (en) * 2021-04-14 2021-05-14 智道网联科技(北京)有限公司 USB interface control method, USB control circuit and intelligent networking equipment mainboard

Similar Documents

Publication Publication Date Title
JP5903401B2 (en) Power distribution in the cable
CN202872406U (en) Interface multiplexing circuit and mobile terminal
US8464078B2 (en) Delay circuit with reset feature
TW201939299A (en) Programmable VBUS discharge in USB power delivery
CN105790356A (en) Data line having charging circuit
CN103208822A (en) Universal serial bus (USB) charging control circuit
CN114026773A (en) Communication failure indication between a primary controller and a secondary controller in a secondary controlled flyback converter
WO2019209466A1 (en) Dynamic vconn swapping in dual-powered type-c cable applications
CN111030247A (en) Switching circuit for switching host mode and device mode of type C
CN211480954U (en) Switching circuit for switching host mode and device mode of type C
CN206225721U (en) A kind of switching device and communication system
CN111800709A (en) Automatic power on/off circuit and bluetooth headset
CN112952485B (en) Compatible charging cable and control method thereof
CN106411360A (en) Communication equipment and communication system
CN105207279A (en) Charge and discharge circuit and mobile terminal
CN208836436U (en) Anti-static circuit for data line
CN202257555U (en) USB (Universal Serial Bus) terminal
CN106612184B (en) Signal generating device and communication equipment
CN219739991U (en) Power supply circuit and power supply device
CN219627364U (en) Hot plug protection circuit and meter applying same
CN220367592U (en) Switching circuit, circuit switching device and terminal equipment
CN218603468U (en) Burning isolation circuit and debugging system
CN216772407U (en) Signal switching circuit based on Type-C interface
CN114003531B (en) USB Type C interface circuit and terminal equipment
CN115189322B (en) Electronic tag chip and charging cable

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
CB02 Change of applicant information

Address after: 518000 Eighth Floor, 2 Chunggu Building, Meisheng Huigu Science Park, 83 Dabao Road, 33 Shanghe Community, Baoan District, Shenzhen City, Guangdong Province

Applicant after: SHENZHEN YIJING VIRTUAL REALITY TECHNOLOGY Co.,Ltd.

Address before: 5 / F-2, building 6, Meisheng Huigu Science Park, 83 Dabao Road, 33 Shanghe community, Xin'an street, Bao'an District, Shenzhen, Guangdong 518000

Applicant before: SHENZHEN YIJING VIRTUAL REALITY TECHNOLOGY Co.,Ltd.

CB02 Change of applicant information