充电器、数据线、充电设备和电子设备Chargers, cables, charging equipment and electronic equipment
相关申请的交叉引用CROSS-REFERENCE TO RELATED APPLICATIONS
本申请主张在2020年7月14日在中国提交的中国专利申请号No.202010673758.7的优先权,其全部内容通过引用包含于此。This application claims priority to Chinese Patent Application No. 202010673758.7 filed in China on Jul. 14, 2020, the entire contents of which are incorporated herein by reference.
技术领域technical field
本申请属于通信技术领域,具体涉及一种充电器、数据线、充电设备和电子设备。The present application belongs to the field of communication technologies, and specifically relates to a charger, a data cable, a charging device and an electronic device.
背景技术Background technique
随着科技的发展,快速充电的应用越来越广泛。With the development of science and technology, the application of fast charging is becoming more and more extensive.
在相关技术中,通常采用电力输送(Power Delivery,PD)协议对笔记本电脑等设备进行快速充电,为支持PD协议充电,充电器需要采用配置通道(Configuration Channel,CC)信号线进行通信,该支持PD协议充电的充电器通常采用第三标准(Type-C)接口,并搭配Type-C to Type-C的数据线。对于采用第一标准(Type-A或者Standard-A)接口的充电器,由于其通过D+/D-信号线进行通信,从而不能够支持PD协议充电。但是,当前使用最广泛的数据线为具有Type-A接口的数据线,从而使得常规的数据线上的Type-A接口与支持PD协议充电的充电器上的Type-C接口不匹配。In related technologies, the Power Delivery (PD) protocol is usually used to quickly charge devices such as laptops. In order to support PD protocol charging, the charger needs to use a Configuration Channel (CC) signal line for communication. The PD protocol charging charger usually uses the third standard (Type-C) interface and is equipped with a Type-C to Type-C data cable. For the charger using the first standard (Type-A or Standard-A) interface, since it communicates through the D+/D- signal line, it cannot support PD protocol charging. However, currently the most widely used data cable is a data cable with a Type-A interface, so that the Type-A interface on a conventional data cable does not match the Type-C interface on a charger that supports PD protocol charging.
发明内容SUMMARY OF THE INVENTION
本申请实施例的目的是提供一种充电器、数据线、充电设备和电子设备,能够解决采用Type-A接口的数据线与支持PD协议的充电器的充电接口不匹配的问题。The purpose of the embodiments of the present application is to provide a charger, a data cable, a charging device and an electronic device, which can solve the problem that the data cable using the Type-A interface does not match the charging interface of the charger supporting the PD protocol.
为了解决上述技术问题,本申请是这样实现的:In order to solve the above technical problems, this application is implemented as follows:
第一方面,本申请实施例提供了一种充电器,包括:第一Type-A接口和协议控制模块;In a first aspect, an embodiment of the present application provides a charger, including: a first Type-A interface and a protocol control module;
所述第一Type-A接口包括CC引脚、数据引脚、VBUS引脚和GND引 脚,所述CC引脚以及所述VBUS引脚与所述协议控制模块的第一端连接,所述数据引脚与所述协议控制模块的第二端连接;The first Type-A interface includes a CC pin, a data pin, a VBUS pin and a GND pin, and the CC pin and the VBUS pin are connected to the first end of the protocol control module, and the the data pin is connected with the second end of the protocol control module;
在所述充电器通过数据线与待充电设备连接的情况下,若所述协议控制模块获取经所述CC引脚传输的通信信号,则所述充电器对所述待充电设备进行PD充电;若所述协议控制模块获取经所述数据引脚传输的通信信号,则所述充电器用于对所述待充电设备进行非PD充电。When the charger is connected to the device to be charged through a data cable, if the protocol control module acquires the communication signal transmitted through the CC pin, the charger performs PD charging on the device to be charged; If the protocol control module acquires the communication signal transmitted through the data pin, the charger is used to perform non-PD charging on the device to be charged.
第二方面,本申请实施例提供了一种数据线,包括:第二Type-A接口、Type-C接口以及连接于所述第二Type-A接口与所述Type-C接口之间的线缆,所述线缆上设置有切换模块;In a second aspect, an embodiment of the present application provides a data cable, including: a second Type-A interface, a Type-C interface, and a cable connected between the second Type-A interface and the Type-C interface a cable, the cable is provided with a switching module;
所述第二Type-A接口和所述Type-C接口均包括CC引脚、数据引脚、VBUS引脚和GND引脚,且所述第二Type-A接口和所述Type-C接口中的数据引脚、VBUS引脚和GND引脚一一对应连接,所述线缆包括CC走线,所述CC走线的两端分别连接所述第二Type-A接口中的CC引脚和所述Type-C接口中的CC引脚;Both the second Type-A interface and the Type-C interface include CC pins, data pins, VBUS pins and GND pins, and the second Type-A interface and the Type-C interface are The data pins, VBUS pins and GND pins are connected in one-to-one correspondence, and the cable includes a CC line, and both ends of the CC line are respectively connected to the CC pins and the CC pins in the second Type-A interface. CC pin in the Type-C interface;
所述切换模块基于所述第二Type-A接口中的CC引脚上传输的电信号和所述数据引脚上传输的电信号,控制所述CC走线连通或者断开。The switching module controls the CC wiring to be connected or disconnected based on the electrical signal transmitted on the CC pin and the electrical signal transmitted on the data pin in the second Type-A interface.
第三方面,本申请实施例提供了一种充电设备,包括充电器和与所述充电器连接的数据线,所述充电器为第一方面的所述充电器,所述数据线为第二方面的所述数据线,所述Type-A接口和所述第二Type-A接口中的CC引脚、数据引脚、VBUS引脚以及GND引脚一一对应连接;In a third aspect, an embodiment of the present application provides a charging device, including a charger and a data cable connected to the charger, the charger is the charger of the first aspect, and the data cable is the second In the data line of the aspect, the CC pin, the data pin, the VBUS pin and the GND pin in the Type-A interface and the second Type-A interface are connected in one-to-one correspondence;
其中,在所述充电器与所述数据线连接的情况下,所述数据线中的切换模块基于所述第二Type-A接口中的CC引脚和所述数据引脚上传输的电信号,控制所述CC走线连通或者断开;Wherein, when the charger is connected to the data line, the switching module in the data line is based on the CC pin in the second Type-A interface and the electrical signal transmitted on the data pin , control the connection or disconnection of the CC line;
在所述充电设备与待充电设备连接时,若所述CC走线连通,则所述充电设备对待充电设备进行PD充电;若所述CC走线断开,则所述充电设备对待充电设备进行非PD充电。When the charging device is connected to the device to be charged, if the CC wiring is connected, the charging device performs PD charging on the device to be charged; if the CC wiring is disconnected, the charging device performs PD charging on the device to be charged Non-PD charging.
第四方面,本申请实施例提供了一种电子设备,所述电子设备为与第三方面的所述充电设备匹配的待充电设备,所述电子设备包括第二Type-C接口、第三电阻和电源单元,所述第二Type-C接口包括CC引脚、数据引脚、VBUS 引脚和GND引脚,且所述第二Type-C接口和所述第一Type-C接口中的CC引脚、数据引脚、VBUS引脚以及GND引脚一一对应连接,所述第二Type-C接口中的数据引脚还通过所述第三电阻连接至所述电源单元。In a fourth aspect, an embodiment of the present application provides an electronic device, the electronic device is a device to be charged that matches the charging device of the third aspect, and the electronic device includes a second Type-C interface, a third resistor and a power supply unit, the second Type-C interface includes a CC pin, a data pin, a VBUS pin and a GND pin, and the CC in the second Type-C interface and the first Type-C interface The pins, the data pins, the VBUS pins and the GND pins are connected in one-to-one correspondence, and the data pins in the second Type-C interface are also connected to the power supply unit through the third resistor.
本申请实施例提供的充电器,包括第一Type-A接口和协议控制模块,且所述第一Type-A接口包括CC引脚、数据引脚、VBUS引脚和GND引脚,所述CC引脚以及所述VBUS引脚与所述协议控制模块的第一端连接。这样,在与该充电器连接的数据线的Type-A接口也具有匹配的CC引脚时,充电器内的VBUS引脚能够通过CC引脚与支持PD充电的待充电设备内的电阻接地,从而使得CC引脚上的电信号产生变化,以供数据线或充电器获取该电信号,并据此确定该充电设备对待充电设备进行PD充电,此时,协议控制模块经CC引脚获取到充电信号,并且能够基于该CC引脚上传输的PD充电协议的通信信息,对待充电设备进行PD充电,从而使采用Type-A接口的数据线与本申请提供的充电器连接时,能够支持PD充电协议。The charger provided by the embodiment of the present application includes a first Type-A interface and a protocol control module, and the first Type-A interface includes a CC pin, a data pin, a VBUS pin and a GND pin, and the CC pin The pin and the VBUS pin are connected to the first end of the protocol control module. In this way, when the Type-A interface of the data cable connected to the charger also has a matching CC pin, the VBUS pin in the charger can be grounded with the resistor in the device to be charged that supports PD charging through the CC pin. Thereby, the electrical signal on the CC pin changes, so that the data line or the charger can obtain the electrical signal, and based on this, it is determined that the charging device is to perform PD charging on the device to be charged. At this time, the protocol control module obtains through the CC pin. The charging signal, and can perform PD charging on the device to be charged based on the communication information of the PD charging protocol transmitted on the CC pin, so that when the data line using the Type-A interface is connected to the charger provided by this application, it can support PD charging protocol.
附图说明Description of drawings
图1是本申请实施例提供的第一种充电设备的电路图;1 is a circuit diagram of a first charging device provided by an embodiment of the present application;
图2是本申请实施例提供的一种充电器的电路图;2 is a circuit diagram of a charger provided by an embodiment of the present application;
图3是本申请实施例提供的一种数据线的电路图;3 is a circuit diagram of a data line provided by an embodiment of the present application;
图4是本申请实施例提供的第二种充电设备的电路图;4 is a circuit diagram of a second charging device provided by an embodiment of the present application;
图5是本申请实施例提供的第三种充电设备的电路图;5 is a circuit diagram of a third charging device provided by an embodiment of the present application;
图6是本申请实施例提供的充电器中的Type-A母座的引脚示意图;6 is a schematic diagram of the pins of the Type-A female socket in the charger provided by the embodiment of the present application;
图7是本申请实施例提供的数据线中的Type-A接口的引脚示意图;7 is a schematic diagram of pins of a Type-A interface in a data line provided by an embodiment of the present application;
图8是本申请实施例提供的充电设备的工作流程图。FIG. 8 is a working flowchart of the charging device provided by the embodiment of the present application.
具体实施方式detailed description
下面将结合本申请实施例中的附图,对本申请实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例是本申请一部分实施例,而不是全部的实施例。基于本申请中的实施例,本领域普通技术人员在没有作出创造性劳动前提下所获得的所有其他实施例,都属于本申请保护的范围。The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative work fall within the protection scope of the present application.
本申请的说明书和权利要求书中的术语“第一”、“第二”等是用于区别类似的对象,而不用于描述特定的顺序或先后次序。应该理解这样使用的数据在适当情况下可以互换,以便本申请的实施例能够以除了在这里图示或描述的那些以外的顺序实施,且“第一”、“第二”等所区分的对象通常为一类,并不限定对象的个数,例如第一对象可以是一个,也可以是多个。此外,说明书以及权利要求中“和/或”表示所连接对象的至少其中之一,字符“/”,一般表示前后关联对象是一种“或”的关系。The terms "first", "second" and the like in the description and claims of the present application are used to distinguish similar objects, and are not used to describe a specific order or sequence. It is to be understood that the data so used are interchangeable under appropriate circumstances so that the embodiments of the present application can be practiced in sequences other than those illustrated or described herein, and distinguish between "first", "second", etc. The objects are usually of one type, and the number of objects is not limited. For example, the first object may be one or more than one. In addition, "and/or" in the description and claims indicates at least one of the connected objects, and the character "/" generally indicates that the associated objects are in an "or" relationship.
下面结合附图,通过具体的实施例及其应用场景对本申请实施例提供的充电器、数据线、充电设备和电子设备进行详细地说明。The charger, data cable, charging device, and electronic device provided by the embodiments of the present application will be described in detail below with reference to the accompanying drawings through specific embodiments and application scenarios thereof.
请同时参阅图1、图2和图3,其中,图1是本申请实施例提供的充电设备的电路图;图2是本申请实施例提供的充电器的电路图;图3是本申请实施例提供的数据线的电路图。Please refer to FIGS. 1 , 2 and 3 at the same time, wherein FIG. 1 is a circuit diagram of a charging device provided by an embodiment of the present application; FIG. 2 is a circuit diagram of a charger provided by an embodiment of the present application; FIG. 3 is a circuit diagram provided by an embodiment of the present application circuit diagram of the data line.
在应用中,本申请实施例提供的充电设备与本申请实施例提供的电子设备相互匹配(或者还可以称之为标配)。当本申请实施例提供的充电设备与本申请实施例提供的电子设备连接时,能够经数据引脚对该电子设备进行非PD充电或者经CC引脚对该电子设备进行PD充电。另外,当本申请实施例提供的充电设备与非标配的待充电设备连接时,也可以对该非标配的待充电设备进行PD充电或者非PD充电,具体的充电模式可以根据与非标配的待充电设备的充电协议协商确定。In application, the charging device provided by the embodiment of the present application and the electronic device provided by the embodiment of the present application are matched with each other (or may also be referred to as a standard configuration). When the charging device provided by the embodiment of the present application is connected to the electronic device provided by the embodiment of the present application, the electronic device can be non-PD charging through the data pin or PD charging can be performed on the electronic device through the CC pin. In addition, when the charging device provided in the embodiment of the present application is connected to a non-standard device to be charged, PD charging or non-PD charging can also be performed on the non-standard device to be charged. The charging protocol of the device to be charged is determined through negotiation.
在具体实施中,本申请实施例提供的充电设备能够通过检测数据引脚和CC引脚上的电信号,判断与其连接的待充电设备是否为标配的待充电设备。In specific implementation, the charging device provided by the embodiment of the present application can determine whether the device to be charged connected to the device to be charged is a standard device to be charged by detecting the electrical signals on the data pin and the CC pin.
其中,上述数据引脚可以是现有Type-C接口中具有的数据引脚,例如:D+引脚和D-引脚,在具体实施中,上述数据引脚还可以是其他引脚,例如:第三代通用串口总线(USB 3.0)中的信号传输引脚(TX引脚和RX引脚)等。为便于说明,如图1至图5所示实施例中仅以上述数据引脚包括D+引脚和D-引脚为例进行说明,在此不作具体限定。Wherein, the above-mentioned data pins can be data pins in the existing Type-C interface, such as: D+ pin and D- pin, in a specific implementation, the above-mentioned data pins can also be other pins, such as: Signal transmission pins (TX pin and RX pin) in the third-generation universal serial bus (USB 3.0). For convenience of description, in the embodiments shown in FIGS. 1 to 5 , only the above-mentioned data pins include D+ pins and D- pins are used as examples for description, which are not specifically limited herein.
具体的,如图1或图4所示,本申请实施例提供的电子设备3包第二Type-C接口,且该第二Type-C接口内的D+引脚、D-引脚、CC引脚、VBUS引脚以及GND引脚与数据线2的第一Type-C接口22内的D+引脚、D-引 脚、CC引脚、VBUS引脚以及GND引脚一一对应连接,且第二Type-C接口内的D+引脚通过第三电阻31(即上拉电阻)连接至电源单元32,第二Type-C接口内的CC引脚通过第四电阻33(即下拉电阻)连接至GND引脚。Specifically, as shown in FIG. 1 or FIG. 4 , the electronic device 3 provided in the embodiment of the present application includes a second Type-C interface, and the D+ pin, D- pin, and CC lead in the second Type-C interface are pin, VBUS pin and GND pin are connected to the D+ pin, D- pin, CC pin, VBUS pin and GND pin in the first Type-C interface 22 of the data line 2 in one-to-one correspondence, and the first The D+ pin in the two Type-C interfaces is connected to the power supply unit 32 through a third resistor 31 (ie, a pull-up resistor), and the CC pin in the second Type-C interface is connected to the power supply unit 32 through a fourth resistor 33 (ie, a pull-down resistor). GND pin.
在应用中,充电设备连通电源与电子设备3时,电源单元32能够向D+引脚提供电源,以改变D+引脚上的电信号,且CC引脚一端与充电器1内的目标电源121连接,另一端通过第四电阻33接地,同样能够改变CC引脚上的电信号。In the application, when the charging device is connected to the power supply and the electronic device 3, the power supply unit 32 can provide power to the D+ pin to change the electrical signal on the D+ pin, and one end of the CC pin is connected to the target power supply 121 in the charger 1 , and the other end is grounded through the fourth resistor 33, which can also change the electrical signal on the CC pin.
其中,D+引脚通过第三电阻31连接至电源单元32,使得充电设备基于D+引脚上的电信号获知与标配的待充电设备连接。Wherein, the D+ pin is connected to the power supply unit 32 through the third resistor 31, so that the charging device learns to be connected to the standard equipment to be charged based on the electrical signal on the D+ pin.
另外,CC引脚通过第四电阻33接地,使得充电设备基于CC引脚上的电信号获知与支持PD充电的待充电设备连接。In addition, the CC pin is grounded through the fourth resistor 33, so that the charging device learns to be connected to the device to be charged that supports PD charging based on the electrical signal on the CC pin.
需要说明的是,在具体实施中,本申请实施例提供的充电设备还能够与不支持PD充电的待充电设备标配,即本申请实施例提供的充电设备标配的待充电设备内的CC引脚不经过下拉电阻接地。另外,上述通过第三电阻31连接至电源单元32的数据引脚还可以是D-引脚,在此不作具体限定。It should be noted that, in the specific implementation, the charging device provided by the embodiment of the present application can also be equipped with a standard configuration of the device to be charged that does not support PD charging, that is, the charging device provided by the embodiment of the present application is equipped with a standard CC in the device to be charged. The pin is not connected to ground through a pull-down resistor. In addition, the above-mentioned data pin connected to the power supply unit 32 through the third resistor 31 may also be a D-pin, which is not specifically limited herein.
请参阅图1和图2,充电器1,包括:第一Type-A接口11和协议控制模块12;第一Type-A接口11包括CC引脚、数据引脚、VBUS引脚和GND引脚,协议控制模块12包括目标电源121,CC引脚以及目标电源121分别与协议控制模块12的第一端连接,数据引脚与协议控制模块12的第二端连接;Please refer to FIG. 1 and FIG. 2, the charger 1 includes: a first Type-A interface 11 and a protocol control module 12; the first Type-A interface 11 includes a CC pin, a data pin, a VBUS pin and a GND pin , the protocol control module 12 includes a target power supply 121, the CC pin and the target power supply 121 are respectively connected with the first end of the protocol control module 12, and the data pin is connected with the second end of the protocol control module 12;
在工作中,在充电器1通过数据线2与待充电设备连接的情况下,若协议控制模块12获取经CC引脚传输的通信信号,则充电器1对所述待充电设备进行PD充电;若协议控制模块12获取经数据引脚传输的通信信号,则充电器1用于对所述待充电设备进行非PD充电。During operation, when the charger 1 is connected to the device to be charged through the data line 2, if the protocol control module 12 obtains the communication signal transmitted through the CC pin, the charger 1 performs PD charging on the device to be charged; If the protocol control module 12 acquires the communication signal transmitted through the data pin, the charger 1 is used to perform non-PD charging on the device to be charged.
在具体实施中,上述PD充电可以理解为:基于PD通信协议的快速充电模式,该PD通信协议的通信信号经CC引脚传输。In a specific implementation, the above PD charging can be understood as a fast charging mode based on a PD communication protocol, and the communication signal of the PD communication protocol is transmitted through the CC pin.
需要说明的是,如图1所示实施例中将数据引脚标记为:D+引脚或者D-引脚(即D+/D-),另外,在实际应用中,第一Type-A接口中可以包括D+引脚和D-引脚,且D+引脚和D-引脚中的至少一个与切换模块24连接。It should be noted that, in the embodiment shown in FIG. 1, the data pins are marked as: D+ pins or D- pins (ie D+/D-). In addition, in practical applications, in the first Type-A interface A D+ pin and a D- pin may be included, and at least one of the D+ pin and the D- pin is connected to the switching module 24 .
另外,上述非PD充电可以是基于数据引脚传输的通信信号的充电模式, 例如:在数据引脚为D+引脚和D-引脚的情况下,该非PD充电可以是基于D+/D-通信协议(即经D+引脚和D-引脚传输的通信信号的通信协议)的充电信号进行充电的方式。具体的,协议控制模块12中可以预先配置有PD通信协议和预设通信协议,该预设通信协议为经数据引脚传输的通信信号的通信协议,在该充电器1通过标配的数据线与标配的待充电设备连接时,能够基于该预设通信协议对标配的待充电设备进行标配充电,其中,所述标配的待充电设备可以理解为:配置有本申请提供的充电设备的待充电设备,且该待充电设备中配置有上述预设通信协议。另外,上述协议控制模块12中还配置有通用的D+/D-通信协议,本实施方式中,非PD充电处理单元13能够通过D+引脚和D-引脚实现非PD充电协议中的通信过程,例如:数据负信号(DataMinus,DM)和数据正信号(Data Positive,DP)充电通信。In addition, the above-mentioned non-PD charging can be a charging mode based on the communication signal transmitted by the data pin. For example, in the case where the data pin is the D+ pin and the D- pin, the non-PD charging can be based on the D+/D- The charging method of the charging signal of the communication protocol (that is, the communication protocol of the communication signal transmitted through the D+ pin and the D- pin). Specifically, the protocol control module 12 may be pre-configured with a PD communication protocol and a preset communication protocol. The preset communication protocol is a communication protocol for communication signals transmitted through data pins. The charger 1 passes through a standard data cable. When connected to the standard equipment to be charged, the standard equipment to be charged can be charged as standard based on the preset communication protocol. The device to be charged of the device, and the device to be charged is configured with the above-mentioned preset communication protocol. In addition, the above-mentioned protocol control module 12 is also configured with a general D+/D- communication protocol. In this embodiment, the non-PD charging processing unit 13 can realize the communication process in the non-PD charging protocol through the D+ pin and the D- pin. , for example: data negative signal (DataMinus, DM) and data positive signal (Data Positive, DP) charging communication.
需要说明的是,上述DM和DP充电通信的具体原理与过程与现有技术中的DM和DP充电通信的具体原理与过程相同,在此不再具体阐述。It should be noted that the specific principle and process of the above-mentioned DM and DP charging communication are the same as the specific principle and process of the DM and DP charging communication in the prior art, and will not be described in detail here.
这样,在该充电器1通过数据线与非标配且不支持PD充电的待充电设备连接时,可以基于该通用的D+/D-通信协议对待充电设备进行普通充电。In this way, when the charger 1 is connected to a device to be charged that is not standard and does not support PD charging through a data cable, the device to be charged can be generally charged based on the general D+/D- communication protocol.
在具体实施中,上述目标电源121可以具体为:与电阻串联的电压源,该电压源可以是充电器1内的VBUS走线或者VBUS引脚,以在充电器1连接电源时,该目标电源121向CC引脚输送电流。In a specific implementation, the above-mentioned target power supply 121 may be specifically: a voltage source connected in series with a resistor, and the voltage source may be a VBUS line or a VBUS pin in the charger 1, so that when the charger 1 is connected to the power supply, the target power supply 121 carries current to the CC pin.
本申请实施例提供的充电器,包括第一Type-A接口和协议控制模块,且所述第一Type-A接口包括CC引脚、数据引脚、VBUS引脚和GND引脚,所述CC引脚以及所述VBUS引脚与所述协议控制模块的第一端连接。这样,在与该充电器连接的数据线的Type-A接口也具有匹配的CC引脚时,充电器内的VBUS引脚能够通过CC引脚与支持PD充电的待充电设备的第四电阻接地,从而使得CC引脚上的电信号产生变化,以供数据线或充电器获取该电信号,并据此确定该充电设备对待充电设备进行PD充电。此时,协议控制模块经CC引脚获取到充电信号,并且能够基于该CC引脚上传输的PD充电协议的通信信息,对待充电设备进行PD充电,从而使采用Type-A接口的数据线与本申请提供的充电器连接时,能够支持PD充电协议。The charger provided by the embodiment of the present application includes a first Type-A interface and a protocol control module, and the first Type-A interface includes a CC pin, a data pin, a VBUS pin and a GND pin, and the CC pin The pin and the VBUS pin are connected to the first end of the protocol control module. In this way, when the Type-A interface of the data cable connected to the charger also has a matching CC pin, the VBUS pin in the charger can be grounded with the fourth resistor of the device to be charged that supports PD charging through the CC pin , so that the electrical signal on the CC pin changes, so that the data line or the charger can obtain the electrical signal, and accordingly determine that the charging device performs PD charging on the device to be charged. At this time, the protocol control module obtains the charging signal through the CC pin, and can perform PD charging on the device to be charged based on the communication information of the PD charging protocol transmitted on the CC pin, so that the data line using the Type-A interface is connected to the When the charger provided in this application is connected, it can support the PD charging protocol.
如图1和图3所示,本申请实施例提供的数据线2,包括:第二Type-A 接口21、Type-C接口22以及连接于第二Type-A接口21与Type-C接口22之间的线缆23述线缆23上设置有切换模块24;第二Type-A接口21和Type-C接口22均包括CC引脚、数据引脚、VBUS引脚和GND引脚,且所述第二Type-A接口和Type-C接口22中的数据引脚、VBUS引脚和GND引脚一一对应连接,线缆23包括CC走线,所述CC走线的两端分别连接第二Type-A接口21中的CC引脚和Type-C接口22中的CC引脚。As shown in FIG. 1 and FIG. 3 , the data line 2 provided in the embodiment of the present application includes: a second Type-A interface 21 , a Type-C interface 22 , and a Type-C interface 22 connected to the second Type-A interface 21 and the Type-C interface 22 . The cable 23 between said cable 23 is provided with a switching module 24; the second Type-A interface 21 and the Type-C interface 22 both include CC pins, data pins, VBUS pins and GND pins, and all The data pins, VBUS pins and GND pins in the second Type-A interface and the Type-C interface 22 are connected in one-to-one correspondence, and the cable 23 includes a CC wiring, and the two ends of the CC wiring are respectively connected to the first one. Two CC pins in the Type-A interface 21 and CC pins in the Type-C interface 22 .
在工作中,切换模块24基于第二Type-A接口中的CC引脚上传输的电信号和数据引脚上传输的电信号,控制CC走线连通或者断开。In operation, the switching module 24 controls the connection or disconnection of the CC wiring based on the electrical signal transmitted on the CC pin and the electrical signal transmitted on the data pin in the second Type-A interface.
在具体实施中,在CC走线连通时,第二Type-A接口21中的CC引脚和Type-C接口22中的CC引脚连通;在CC走线断开时,第二Type-A接口21中的CC引脚和Type-C接口22中的CC引脚断开。另外,上述第二Type-A接口21可以与第一Type-A接口11匹配,例如:第一Type-A接口11为Type-A母座,第二Type-A接口21为Type-A公头,从而使得上述数据线2的第二Type-A接口21能够与充电器1的第一Type-A接口11匹配连接。In a specific implementation, when the CC wiring is connected, the CC pin in the second Type-A interface 21 is connected with the CC pin in the Type-C interface 22; when the CC wiring is disconnected, the second Type-A The CC pin in the interface 21 and the CC pin in the Type-C interface 22 are disconnected. In addition, the above-mentioned second Type-A interface 21 can be matched with the first Type-A interface 11, for example, the first Type-A interface 11 is a Type-A female socket, and the second Type-A interface 21 is a Type-A male connector , so that the second Type-A interface 21 of the data cable 2 can be matched and connected to the first Type-A interface 11 of the charger 1 .
当然,在具体实施中,上述第一Type-A接口11可以是公头,且上述第二Type-A接口21可以是母座,在此不作具体限定。Of course, in a specific implementation, the above-mentioned first Type-A interface 11 may be a male connector, and the above-mentioned second Type-A interface 21 may be a female socket, which is not specifically limited herein.
具体的,在本申请实施例提供的数据线2与本申请实施例提供的充电器1连接构成本申请实施例提供的充电设备时,第一Type-A接口11和第二Type-A接口21中的CC引脚、数据引脚、VBUS引脚以及GND引脚一一对应连接,具体的,第一Type-A接口11中的CC引脚与第二Type-A接口21中的CC引脚连接,第一Type-A接口11中的数据引脚与第二Type-A接口21中的数据引脚连接,第一Type-A接口11中的VBUS引脚与第二Type-A接口21中的VBUS引脚连接,第一Type-A接口11中的GND引脚与第二Type-A接口21中的GND引脚连接。Specifically, when the data cable 2 provided by the embodiment of the present application is connected with the charger 1 provided by the embodiment of the present application to form the charging device provided by the embodiment of the present application, the first Type-A interface 11 and the second Type-A interface 21 The CC pins, data pins, VBUS pins and GND pins are connected in one-to-one correspondence, specifically, the CC pins in the first Type-A interface 11 and the CC pins in the second Type-A interface 21 Connection, the data pin in the first Type-A interface 11 is connected with the data pin in the second Type-A interface 21, and the VBUS pin in the first Type-A interface 11 is connected with the second Type-A interface 21. The GND pin in the first Type-A interface 11 is connected with the GND pin in the second Type-A interface 21 .
其中,在充电器1与数据线2连接的情况下,数据线2中的切换模块24基于第二Type-A接口21中的CC引脚和数据引脚上传输的电信号,控制CC走线连通或者断开;具体的,在充电设备与待充电设备连接时,若CC走线连通,则所述充电设备对待充电设备进行PD充电;若CC走线断开,则所述充电设备对待充电设备进行非PD充电。Wherein, when the charger 1 is connected to the data line 2, the switching module 24 in the data line 2 controls the CC line based on the CC pin in the second Type-A interface 21 and the electrical signal transmitted on the data pin. Connected or disconnected; specifically, when the charging device is connected to the device to be charged, if the CC line is connected, the charging device performs PD charging on the device to be charged; if the CC line is disconnected, the charging device is to be charged The device performs non-PD charging.
在具体实施中,对数据线2的切换模块24基于第二Type-A接口21中的CC引脚和数据引脚上的电信号确定CC走线连通或者断开的工作原理进行以下说明:In a specific implementation, the following description is made to the working principle that the switching module 24 of the data line 2 determines that the CC wiring is connected or disconnected based on the CC pin in the second Type-A interface 21 and the electrical signal on the data pin:
情况一Case 1
若数据线2通过常规的充电器连接电源时,由于常规充电器的Type-A接口不具有CC引脚,从而在第二Type-A接口21中的CC引脚上不会有电流流过,从而可以据此控制CC走线断开,并通过数据引脚传输充电信号。If the data line 2 is connected to the power supply through a conventional charger, since the Type-A interface of the conventional charger does not have a CC pin, no current will flow through the CC pin in the second Type-A interface 21, In this way, the CC trace can be controlled to be disconnected, and the charging signal can be transmitted through the data pin.
其中,上述常规的充电器与现有技术中具有Type-A接口的充电器结构相同,在此不再赘述。Wherein, the above-mentioned conventional charger has the same structure as the charger with Type-A interface in the prior art, and details are not repeated here.
情况二 Case 2
本申请实施例提供的充电设备在与支持PD充电的非标配待充电设备连接时,第二Type-A接口21与第一Type-A接口11匹配连接,从而使第二Type-A接口21中的CC引脚上具有经目标电源121传输的电流,该电流经Type-C接口22中的CC引脚流向支持PD充电的待充电设备时,使得第二Type-A接口21中的CC引脚上检测到的电信号不同于与不支持PD充电的待充电设备时的电信号,从而可以据此控制CC走线连通,以对支持PD充电的非标配待充电设备进行PD充电。具体的,如图4所示,在数据线2的Type-C接口22还连接支持PD充电的电子设备3(例如:笔记本电脑等等)时,目标电源121传输的电流CC走线以及支持PD充电的待充电设备中的第四电阻33连接至接地端,从而使CC走线上的电压值发生改变,则充电设备基于该电压值确定与其连接的待充电设备支持PD充电,从而基于CC引脚与该待充电设备进行PD通信,以根据PD通信协议的通信内容确定PD充电参数,并据此对待充电设备进行PD充电。When the charging device provided in the embodiment of the present application is connected to a non-standard device to be charged that supports PD charging, the second Type-A interface 21 is matched and connected to the first Type-A interface 11 , so that the second Type-A interface 21 There is a current transmitted by the target power supply 121 on the CC pin of The electrical signal detected on the foot is different from the electrical signal of the device to be charged that does not support PD charging, so that the connection of the CC line can be controlled accordingly to perform PD charging on the non-standard device to be charged that supports PD charging. Specifically, as shown in FIG. 4 , when the Type-C interface 22 of the data line 2 is also connected to an electronic device 3 (eg, a notebook computer, etc.) that supports PD charging, the current CC route transmitted by the target power supply 121 and the PD support The fourth resistor 33 in the charging device to be charged is connected to the ground terminal, so that the voltage value on the CC trace changes, the charging device determines that the device to be charged connected to it supports PD charging based on the voltage value, so based on the CC lead. The feet perform PD communication with the device to be charged, so as to determine PD charging parameters according to the communication content of the PD communication protocol, and perform PD charging on the device to be charged accordingly.
情况三Case three
本申请实施例提供的充电设备在与不支持PD充电的待充电设备(例如:常规的手机等)时,由于该不支持PD充电的待充电设备无与CC引脚以及接地端连接的第四电阻,从而使第二Type-A接口21中的CC引脚上的电压值不同于连接支持PD充电的待充电设备时的电压值,则充电设备基于该电压值确定与其连接的待充电设备不支持PD充电,进而基于数据引脚与该待充 电设备进行非PD通信,以根据数据引脚上传输的通信信号确定充电参数,并据此对待充电设备进行非PD充电。When the charging device provided by the embodiment of the present application is connected to a device to be charged that does not support PD charging (for example, a conventional mobile phone, etc.), because the device to be charged that does not support PD charging does not have a fourth connection to the CC pin and the ground terminal resistor, so that the voltage value on the CC pin in the second Type-A interface 21 is different from the voltage value when the device to be charged that supports PD charging is connected, the charging device determines based on the voltage value that the device to be charged is not connected to it. Support PD charging, and then perform non-PD communication with the device to be charged based on the data pin, so as to determine charging parameters according to the communication signal transmitted on the data pin, and perform non-PD charging on the device to be charged accordingly.
情况四Case 4
如图4所示,本申请实施例提供的充电设备连接的电子设备3为标配的待充电设备时,该标配的待充电设备的Type-C接口中具有第三电阻31和与所述第三电阻31连接的电压源32,在数据线2上的Type-C接口22与标配的待充电设备连接时,数据引脚(图1中的D+引脚或者D-引脚)通过第三电阻31连接至电压源32,这样,能够在数据引脚上检测到与电压源32的输出电压对应的电压信号,充电设备可以据此确定与标配的待充电设备连接,从而据此控制CC走线断开,并基于数据引脚对标配的待充电设备进行预设协议的充电通信,以对标配的待充电设备进行标配充电。As shown in FIG. 4 , when the electronic device 3 connected to the charging device provided by the embodiment of the present application is a standard device to be charged, the Type-C interface of the standard device to be charged has a third resistor 31 and the The voltage source 32 connected to the third resistor 31, when the Type-C interface 22 on the data line 2 is connected to the standard equipment to be charged, the data pin (D+ pin or D- pin in FIG. 1) passes through the first The three resistors 31 are connected to the voltage source 32, so that a voltage signal corresponding to the output voltage of the voltage source 32 can be detected on the data pin, and the charging device can determine the connection with the standard equipment to be charged according to this, so as to control the The CC wiring is disconnected, and based on the data pin, the standard charging device to be charged is communicated with a preset protocol, so as to perform standard charging for the standard device to be charged.
情况五Case 5
本申请实施例提供的充电设备连接的待充电设备为非标配的待充电设备时,该非标配的待充电设备的Type-C接口中未设置第三电阻31和与所述第三电阻31连接的电压源32,在数据线2上的Type-C接口22与非标配的待充电设备连接时,数据引脚(图1中的D+/D-)未连接电压源,这样,能够使得数据引脚(图1中的D+/D-)上检测到的电压信号与连接标配的待充电设备时的电压信号不同,充电设备可以据此确定与非标配的待充电设备连接,从而检测第二Type-A接口21中的CC引脚上的电信号,并在根据该电信号确定与其连接的待充电设备支持PD充电时,控制CC执行连通;在根据第二Type-A接口21中的CC引脚上的电信号确定与其连接的待充电设备不支持PD充电时,控制CC走线断开。When the device to be charged connected to the charging device provided in the embodiment of the present application is a non-standard device to be charged, the Type-C interface of the non-standard device to be charged is not provided with the third resistor 31 and the third resistor The voltage source 32 connected to 31, when the Type-C interface 22 on the data line 2 is connected to the non-standard equipment to be charged, the data pin (D+/D- in Figure 1) is not connected to the voltage source, so that it can be So that the voltage signal detected on the data pin (D+/D- in Figure 1) is different from the voltage signal when the standard equipment to be charged is connected, the charging equipment can be determined to be connected to the non-standard equipment to be charged accordingly. Thereby, the electrical signal on the CC pin in the second Type-A interface 21 is detected, and when it is determined according to the electrical signal that the device to be charged supports PD charging, the CC is controlled to perform communication; When the electrical signal on the CC pin in 21 determines that the connected device to be charged does not support PD charging, the control CC line is disconnected.
需要说明的是,在充电设备连接的待充电设备为支持PD充电的标配待充电设备时,还可以预先设置PD充电和标配充电的优先级,以优先采用优先级别高的充电方式对支持PD充电的标配待充电设备进行充电,在该优先级别高的充电方式充电失败时,采用优先级别低的充电方式对支持PD充电的标配待充电设备进行充电,例如:若PD充电的优先级高于标配充电的优先级,则先检测第二Type-A接口21中的CC引脚上的电信号,并在确定与其连接的待充电设备支持PD充电时,控制CC走线连通,并对支持PD充电 的标配待充电设备进行PD充电;另外,在进行PD充电之后若PD充电中断或者失败,则控制CC走线断开,并检测数据引脚(图1中的D+/D-)上的电信号,并在确定与其连接的待充电设备为标配待充电设备时,基于数据引脚传输的预设通信协议的通信信号,对支持PD充电的标配待充电设备进行标配充电。It should be noted that when the device to be charged connected to the charging device is a standard device to be charged that supports PD charging, the priority of PD charging and standard charging can also be set in advance, so that the charging method with a higher priority is used to support the charging device. The standard equipment to be charged that supports PD charging is charged. When the charging method with a higher priority level fails to charge, the charging method with a lower priority level is used to charge the standard equipment to be charged that supports PD charging. If the priority of charging is higher than that of the standard charging, first detect the electrical signal on the CC pin in the second Type-A interface 21, and when it is determined that the device to be charged connected to it supports PD charging, control the connection of the CC line. And perform PD charging on the standard equipment to be charged that supports PD charging; in addition, if PD charging is interrupted or fails after PD charging, control the CC wiring to disconnect, and detect the data pins (D+/D in Figure 1). -), and when it is determined that the device to be charged connected to it is the standard device to be charged, based on the communication signal of the preset communication protocol transmitted by the data pin, the standard device to be charged that supports PD charging is marked. Comes with charging.
当然,在具体实施中,还可使PD充电的优先级低于标配充电的优先级,则可以先检测数据引脚(图1中的D+/D-)上的电信号,并在确定与其连接的待充电设备为标配待充电设备时,基于数据引脚传输的预设通信协议的通信信号,对标配待充电设备进行标配充电;在确定与其连接的待充电设备为非标配待充电设备时,检测第二Type-A接口21中的CC引脚上的电信号,并在确定与其连接的待充电设备支持PD充电时,控制CC走线连通,并对支持PD充电的标配待充电设备进行PD充电;在确定与其连接的待充电设备不支持PD充电时,控制CC走线断开,并基于数据引脚传输的通用通信协议的通信信号,对非标配待充电设备进行非PD充电(例如:通用协议的D+/D-充电)。Of course, in specific implementation, the priority of PD charging can also be made lower than that of standard charging, then the electrical signal on the data pin (D+/D- in Figure 1) can be detected first, and the electrical signal on the data pin (D+/D- in Fig. When the connected device to be charged is a standard device to be charged, the standard device to be charged is charged as standard based on the communication signal of the preset communication protocol transmitted by the data pin; when it is determined that the device to be charged connected to it is a non-standard device When the device to be charged is detected, the electrical signal on the CC pin in the second Type-A interface 21 is detected, and when it is determined that the device to be charged connected to it supports PD charging, the CC wiring is controlled to be connected, and the standard that supports PD charging is connected. Equip the device to be charged for PD charging; when it is determined that the device to be charged connected to it does not support PD charging, control the CC wiring to disconnect, and based on the communication signal of the general communication protocol transmitted by the data pin, the non-standard device to be charged will be charged. Perform non-PD charging (eg: D+/D- charging of common protocols).
需要说明的是,在具体实施中,本申请提供的充电设备连连接电源且未与待充电设备连接时,第二Type-A接口21中的CC引脚和数据引脚(图1中的D+/D-)上的电信号值与连接待充电设备时的电信号值不相同,从而可以据此控制充电设备在未连接待充电设备时,控制CC走线断开,且充电设备不传输电源。在充电设备连接待充电设备时,根据充电通信协商的充电参数传输电源。It should be noted that, in the specific implementation, when the charging device provided by the present application is connected to a power source and is not connected to the device to be charged, the CC pin and the data pin in the second Type-A interface 21 (D+ in FIG. 1 ) The electrical signal value on /D-) is different from the electrical signal value when the device to be charged is connected, so that the charging device can be controlled to disconnect the CC wire when the device to be charged is not connected, and the charging device does not transmit power . When the charging device is connected to the device to be charged, the power is transmitted according to the charging parameters negotiated by the charging communication.
本申请实施例提供的数据线2,能够根据第二Type-A接口21中的CC引脚和数据引脚(图1中的D+/D-)上的电信号确定与数据线连接的充电器是否支持PD充电,且是否支持标配充电的预设通信协议,以及确定与数据线连接的待充电设备是否为支持标配的非PD充电的标配充电,且是否支持PD充电,并据此控制CC走线连通或者断开,以在CC走线连通时,对待充电设备进行PD充电;在CC走线断开时,对待充电设备进行非PD充电,从而使得具有第二Type-A接口的数据线能够支持PD充电和非PD充电。The data line 2 provided in the embodiment of the present application can determine the charger connected to the data line according to the electrical signals on the CC pin and the data pin (D+/D- in FIG. 1 ) in the second Type-A interface 21 Whether it supports PD charging, and whether it supports the default communication protocol of standard charging, and whether the device to be charged connected to the data cable is a standard charging that supports standard non-PD charging, and whether it supports PD charging, and based on this Control the connection or disconnection of the CC line, so that when the CC line is connected, the device to be charged is charged by PD; when the CC line is disconnected, the device to be charged is non-PD charged, so that the device with the second Type-A interface is charged. The data line can support PD charging and non-PD charging.
作为一种可选的实施方式,如图4或图5所示,线缆23上还设置有第一 电阻231,切换模块24包括:控制单元241和第一开关242,第一电阻231的第一端与第二Type-A接口21中的VBUS引脚连接,第一开关242的第一端与第一电阻231的第二端连接,第一开关242的第二端与Type-C接口22中的CC引脚连接,控制单元241的输出端与第一开关242的控制端连接,控制单元241的输入端与第二Type-A接口21中的CC引脚和数据引脚分别连接;As an optional implementation manner, as shown in FIG. 4 or FIG. 5 , the cable 23 is further provided with a first resistor 231 , and the switching module 24 includes: a control unit 241 and a first switch 242 . One end is connected to the VBUS pin in the second Type-A interface 21 , the first end of the first switch 242 is connected to the second end of the first resistor 231 , and the second end of the first switch 242 is connected to the Type-C interface 22 The CC pin in the connection is connected, the output end of the control unit 241 is connected with the control end of the first switch 242, and the input end of the control unit 241 is connected with the CC pin and the data pin in the second Type-A interface 21 respectively;
其中,在CC走线连通的情况下,控制单元241控制第一开关242断开;在CC走线断开的情况下,控制单元241控制第一开关242闭合。Wherein, when the CC wire is connected, the control unit 241 controls the first switch 242 to turn off; when the CC wire is disconnected, the control unit 241 controls the first switch 242 to turn on.
其中,上述第一电阻231的电阻值可以是56KΩ(千欧姆)。Wherein, the resistance value of the first resistor 231 may be 56KΩ (kiloohm).
另外,上述控制单元241可以是微控制单元(Microcontroller Unit,MCU),该MCU的第一检测端与第二Type-A接口21中的CC引脚连接,MCU的第二检测端与数据引脚(图4中的D-引脚或者图5中的D+引脚)连接。In addition, the above-mentioned control unit 241 may be a Microcontroller Unit (MCU), the first detection end of the MCU is connected to the CC pin in the second Type-A interface 21, and the second detection end of the MCU is connected to the data pin (D- pin in Figure 4 or D+ pin in Figure 5) connection.
在具体实施中,在Type-C接口22中的CC引脚通过第一电阻231上拉至VBUS引脚,且数据线2与支持PD通信协议的待充电设备连接时,能够触发支持PD通信协议的待充电设备的PD通信功能。In a specific implementation, when the CC pin in the Type-C interface 22 is pulled up to the VBUS pin through the first resistor 231, and the data line 2 is connected to the device to be charged that supports the PD communication protocol, it can trigger the support of the PD communication protocol. The PD communication function of the device to be charged.
需要说明的是,上述切换模块24除了包括上述第一开关242之外,还可以包括其他切换单元,该切换单元的控制端与MCU连接,从而可以在MCU的控制下通过该切换单元实现切换第二Type-A接口21中的CC引脚和Type-C接口22中的CC引脚之间的连接状态。It should be noted that, in addition to the above-mentioned first switch 242, the above-mentioned switching module 24 may also include other switching units. The control end of the switching unit is connected to the MCU, so that the switching unit can be used to switch the first switch under the control of the MCU. The connection state between the CC pin in the Type-A interface 21 and the CC pin in the Type-C interface 22 .
进一步的,如图4或图5所示,切换模块24还包括:第二开关243、第三开关244和第二电阻245;控制单元241的输出端还与第二开关243的控制端以及第三开关244的控制端连接,第二开关243的第一端与第二Type-A接口21中的CC引脚连接,第二开关243的第二端与第二电阻245的第一端连接,第二电阻245的第二端与第二Type-A接口21中的GND引脚连接,第三开关244的第一端与第二Type-A接口21中的CC引脚连接,第三开关244的第二端与Type-C接口22中的CC引脚连接。Further, as shown in FIG. 4 or FIG. 5 , the switching module 24 further includes: a second switch 243 , a third switch 244 and a second resistor 245 ; the output end of the control unit 241 is also connected with the control end of the second switch 243 and the first The control terminals of the three switches 244 are connected, the first terminal of the second switch 243 is connected to the CC pin in the second Type-A interface 21 , the second terminal of the second switch 243 is connected to the first terminal of the second resistor 245 , The second end of the second resistor 245 is connected to the GND pin of the second Type-A interface 21 , the first end of the third switch 244 is connected to the CC pin of the second Type-A interface 21 , and the third switch 244 The second end is connected to the CC pin in the Type-C interface 22 .
在工作中,控制单元241基于第二Type-A接口21中的CC引脚和数据引脚上传输的电信号,控制第三开关244闭合且控制第一开关242和第二开关243断开,或者,控制单元241基于第二Type-A接口21中的CC引脚和 数据引脚上传输的电信号,控制第三开关244断开且控制第一开关242和第二开关243闭合。In operation, the control unit 241 controls the third switch 244 to close and controls the first switch 242 and the second switch 243 to open based on the electrical signals transmitted on the CC pin and the data pin in the second Type-A interface 21, Alternatively, the control unit 241 controls the third switch 244 to open and controls the first switch 242 and the second switch 243 to close based on the electrical signals transmitted on the CC pin and the data pin in the second Type-A interface 21 .
在一种实施方式中,上述第一开关242、第二开关243以及第三开关244可以是如图4中所示的切换开关;在另一种实施方式中,上述第一开关242、第二开关243以及第三开关244可以是如图5中所示的三极管。In one embodiment, the first switch 242 , the second switch 243 and the third switch 244 may be switches as shown in FIG. 4 ; in another embodiment, the first switch 242 , the second switch 242 , the second switch 244 The switch 243 and the third switch 244 may be triodes as shown in FIG. 5 .
当然,上述第一开关242、第二开关243以及第三开关244还可以是MOS管等其他晶体管,在此并不穷举。Of course, the above-mentioned first switch 242 , second switch 243 and third switch 244 may also be other transistors such as MOS transistors, which are not exhaustive here.
本实施方式中,将切换模块24设置为控制单元241和由所示控制单元241控制的第一开关242、第二开关243和第三开关244,能够简化切换模块24的结构和控制逻辑。In this embodiment, the switching module 24 is provided as the control unit 241 and the first switch 242 , the second switch 243 and the third switch 244 controlled by the illustrated control unit 241 , which can simplify the structure and control logic of the switching module 24 .
作为一种可选的实施方式,数据引脚包括D+引脚和D-引脚,控制单元241的输入端与所述D+引脚和所述D-引脚中的至少一个连接。As an optional implementation manner, the data pins include D+ pins and D- pins, and the input end of the control unit 241 is connected to at least one of the D+ pins and the D- pins.
在具体实施中,充电器1中的D+引脚和D-引脚均与协议控制模块12连接,以根据D+引脚和D-引脚上传输的充电信号对待充电设备进行基于D+/D-通信协议的充电方式。且D+引脚和D-引脚中的至少一个与控制单元241的输入端连接,例如:如图4所示中,D-引脚与控制单元241的输入端连接,或者如图5所示中,D+引脚与控制单元241的输入端连接。In a specific implementation, both the D+ pin and the D- pin in the charger 1 are connected to the protocol control module 12, so as to perform D+/D- based charging on the device to be charged according to the charging signal transmitted on the D+ pin and the D- pin. The charging method of the communication protocol. And at least one of the D+ pin and the D- pin is connected to the input end of the control unit 241, for example: as shown in FIG. 4, the D- pin is connected to the input end of the control unit 241, or as shown in FIG. 5 , the D+ pin is connected to the input end of the control unit 241 .
当然,在具体实施中,可以使D+引脚和D-引脚均与控制单元241的输入端连接。Of course, in a specific implementation, both the D+ pin and the D- pin can be connected to the input end of the control unit 241 .
具体的,第一Type-A接口11、第二Type-A接口21以及Type-C接口22均包括D+引脚和D-引脚,且第一Type-A接口11中的D+引脚、第二Type-A接口21中的D+引脚以及Type-C接口22中的D+引脚连通,第一Type-A接口11中的D-引脚、第二Type-A接口21中的D-引脚以及Type-C接口22中的D-引脚连通。Specifically, the first Type-A interface 11 , the second Type-A interface 21 and the Type-C interface 22 all include a D+ pin and a D- pin, and the D+ pin, the first Type-A interface 11 The D+ pin in the Type-A interface 21 and the D+ pin in the Type-C interface 22 are connected, the D-pin in the first Type-A interface 11 and the D-pin in the second Type-A interface 21 are connected. The pin and the D-pin in the Type-C interface 22 are connected.
本实施方式中,充电设备能够通过D+引脚和D-引脚传输DP/DM信号,以根据该DP/DM信号实现对待充电设备的非PD充电,且控制单元241能够检测到D+引脚和D-引脚上的电信号,以判断数据线2连接的待充电设备是否为标配的待充电设备。In this embodiment, the charging device can transmit the DP/DM signal through the D+ pin and the D- pin, so as to realize non-PD charging of the device to be charged according to the DP/DM signal, and the control unit 241 can detect the D+ pin and the D- pin. The electrical signal on the D-pin is used to judge whether the device to be charged connected to the data line 2 is a standard device to be charged.
作为一种可选的实施方式,在本申请实施例提供的充电设备与待充电设 备连接时,若所述待充电设备为第一待充电设备,则CC走线连通;若所述待充电设备为第二待充电设备,则CC走线断开;As an optional implementation manner, when the charging device provided in the embodiment of the present application is connected to the device to be charged, if the device to be charged is the first device to be charged, the CC line is connected; If it is the second device to be charged, the CC line is disconnected;
其中,切换模块24基于第二Type-A接口21中的CC引脚和数据引脚上传输的电信号确定所述待充电设备与所述充电设备不匹配且支持PD充电时,所述待充电设备为所述第一待充电设备;切换模块24基于第二Type-A接口21中的CC引脚和数据引脚上传输的电信号确定所述待充电设备与所述充电设备匹配或者所述待充电设备不支持PD充电时,所述待充电设备为所述第二待充电设备。Wherein, when the switching module 24 determines that the device to be charged does not match the charging device and supports PD charging based on the electrical signal transmitted on the CC pin and the data pin in the second Type-A interface 21, the device to be charged The device is the first device to be charged; the switching module 24 determines that the device to be charged matches the charging device or the When the device to be charged does not support PD charging, the device to be charged is the second device to be charged.
其中,所述待充电设备与所述充电设备匹配可以理解为:所述待充电设备和所述充电设备中均配置有预设通信协议,该预设通信协议的通信信号经数据引脚传输。The matching between the device to be charged and the charging device can be understood as: both the device to be charged and the charging device are configured with a preset communication protocol, and the communication signal of the preset communication protocol is transmitted through a data pin.
另外,在充电设备连接的待充电设备为非标配且不支持PD充电的待充电设备的情况下,采用经数据引脚传输的通用的DP/DM通信协议实现充电握手。In addition, when the device to be charged connected to the charging device is a non-standard device to be charged that does not support PD charging, a general DP/DM communication protocol transmitted through a data pin is used to implement the charging handshake.
本实施方式中,对标配的待充电设备,按照经数据引脚传输的预设通信协议进行充电握手;对于非标配且支持PD充电的待充电设备,按照CC引脚传输的PD通信协议进行充电握手;对于非标配且不支持PD充电的待充电设备,按照经数据引脚传输的通用通信协议进行充电握手,从而使得本申请实施例提供的充电设备能够适用于对多种待充电设备进行充电。In this embodiment, for the standard equipment to be charged, the charging handshake is performed according to the preset communication protocol transmitted through the data pin; for the equipment to be charged that is not standard and supports PD charging, the PD communication protocol transmitted by the CC pin is used. Carry out charging handshake; for devices to be charged that are not standard and do not support PD charging, the charging handshake is performed according to the general communication protocol transmitted through the data pin, so that the charging device provided by the embodiment of the present application can be applied to a variety of devices to be charged. device to charge.
作为一种可选的实施方式,在所述充电设备连接所述第一待充电设备时,切换模块24还经所述第二Type-A接口21中的CC引脚传输控制信号,所述控制信号用于控制所述充电器1在预设时间长度内停止经VBUS引脚输出电信号,并在所述充电器1经VBUS引脚输出电信号时,控制所述CC走线连通;As an optional implementation manner, when the charging device is connected to the first device to be charged, the switching module 24 also transmits a control signal via the CC pin in the second Type-A interface 21, and the control The signal is used to control the charger 1 to stop outputting an electrical signal via the VBUS pin within a preset time length, and control the CC wiring to be connected when the charger 1 outputs an electrical signal via the VBUS pin;
其中,在所述充电设备与待充电设备连接之前,所述切换模块24还控制所述CC走线断开。Wherein, before the charging device is connected to the device to be charged, the switching module 24 also controls the CC wiring to be disconnected.
在具体实施中,上述预设时间长度大于或者等于PD通信协议规定的电源间断时间。In a specific implementation, the above-mentioned preset time length is greater than or equal to the power interruption time specified by the PD communication protocol.
本实施方式中,通过切换模块24传输的控制信号触发充电器1在预设时 间长度内中断VBUS引脚上传输的电信号,并在该预设时间长度后恢复供电,以在通过PD通信协议对待充电设备进行充电时,符合PD通信协议的规定的电信号间断时间,避免了在充电器1内设置控制模块以控制充电器1在预设时间长度内中断VBUS引脚上传输的电信号,而造成的使充电器1结构复杂的问题。In this embodiment, the control signal transmitted by the switching module 24 triggers the charger 1 to interrupt the electrical signal transmitted on the VBUS pin within a preset time length, and restore power supply after the preset time length, so as to pass the PD communication protocol When charging the device to be charged, the electrical signal interruption time complies with the PD communication protocol, which avoids setting a control module in the charger 1 to control the charger 1 to interrupt the electrical signal transmitted on the VBUS pin within a preset time length. As a result, the structure of the charger 1 is complicated.
下面,以如图4或图5中所示的数据线2为例,对数据线2的切换模块24基于第二Type-A接口21中的CC引脚和数据引脚上的电信号将CC走线连通或者断开,的工作原理进行以下说明:Next, taking the data line 2 shown in FIG. 4 or FIG. 5 as an example, the switching module 24 for the data line 2 switches the CC pin of the second Type-A interface 21 and the electrical signal on the data pin to the CC pin The working principle of the connection or disconnection of the trace is as follows:
其中,如图4或图5中所示的充电器1连接电源时默认输出5V(伏特)电压,且目标电源121提供550mA(毫安)的恒定电流,第一电阻231的电阻值为56KΩ(千欧姆),第二电阻245的电阻值为5.1KΩ。Among them, when the charger 1 shown in FIG. 4 or FIG. 5 is connected to the power supply, the default output voltage is 5V (volts), and the target power supply 121 provides a constant current of 550mA (milliamperes), and the resistance value of the first resistor 231 is 56KΩ ( KΩ), the resistance value of the second resistor 245 is 5.1KΩ.
另外,与本申请提供的充电设备匹配连接的标配待充电设备3将Type-C接口22中的数据引脚经第三电阻31连接至电压源32,该第三电阻31的电阻值为10KΩ,且该电压源32的电压值为3.3V。另外,本申请提供的充电设备与支持PD充电的待充电设备连接时,Type-C接口22中的CC引脚还通过第四电阻33连接至接地端,该第四电阻33的电阻值为5.1KΩ。In addition, the standard equipment to be charged 3 matched with the charging equipment provided in this application connects the data pins in the Type-C interface 22 to the voltage source 32 via a third resistor 31, and the resistance value of the third resistor 31 is 10KΩ , and the voltage value of the voltage source 32 is 3.3V. In addition, when the charging device provided by the present application is connected to the device to be charged that supports PD charging, the CC pin in the Type-C interface 22 is also connected to the ground terminal through a fourth resistor 33, and the resistance value of the fourth resistor 33 is 5.1 KΩ.
情况一Case 1
若在数据引脚(D+引脚或者D-引脚)上检测到3.3V电压,则确定本申请实施例提供的充电设备与标配的待充电设备连接,且已经通过D+引脚和D-引脚上传输的DP/DM通信信号完成充电握手,此时切换模块24可以控制CC走线断开。If a voltage of 3.3V is detected on the data pin (D+ pin or D- pin), it is determined that the charging device provided in this embodiment of the application is connected to the standard to-be-charged device, and has passed the D+ pin and D- pin. The DP/DM communication signal transmitted on the pin completes the charging handshake, and at this time, the switching module 24 can control the CC wiring to be disconnected.
情况二 Case 2
若在第二Type-A接口21中的CC引脚上检测到1.68V电压,则切换模块24确定与数据线2连接的充电器(具体可以是如图4或图5中所示充电器1)和待充电设备均支持PD充电,从而在该待充电设备未通过DP/DM通信信号完成充电握手的情况下,切换模块24可以连通CC走线。If a voltage of 1.68V is detected on the CC pin in the second Type-A interface 21, the switching module 24 determines the charger connected to the data line 2 (specifically, the charger 1 shown in FIG. 4 or FIG. ) and the device to be charged both support PD charging, so that when the device to be charged does not complete the charging handshake through the DP/DM communication signal, the switching module 24 can connect the CC wiring.
情况三Case three
若在第二Type-A接口21中的CC引脚上检测到1.98V电压,则切换模块24确定数据线2连接的充电器为支持PD充电且与数据线2匹配的充电器 (具体可以是如图4或图5中所示充电器1),且未连接待充电设备,此时切换模块24可以断开CC走线。If a voltage of 1.98V is detected on the CC pin of the second Type-A interface 21, the switching module 24 determines that the charger connected to the data line 2 is a charger that supports PD charging and matches the data line 2 (specifically, it may be The charger 1) shown in FIG. 4 or FIG. 5 is not connected to the device to be charged. At this time, the switching module 24 can disconnect the CC wiring.
情况四Case 4
若在第二Type-A接口21中的CC引脚上检测到0.4V电压,则切换模块24确定数据线2连接的充电器为不支持PD充电的充电器或者与数据线2不匹配的充电器,此时切换模块24可以断开CC走线。If a 0.4V voltage is detected on the CC pin in the second Type-A interface 21, the switching module 24 determines that the charger connected to the data line 2 is a charger that does not support PD charging or a charger that does not match the data line 2 At this time, the switching module 24 can disconnect the CC wiring.
另外,在断开CC走线的同时,还可以断开如图4中所示的第二开关243。In addition, the second switch 243 as shown in FIG. 4 can also be turned off while the CC trace is disconnected.
需要说明的是,在实际应用中,上述第一电阻和第二电阻的电阻值、上述电流源输出的电流值、上述电压源输出的电压值等可以与上述参数不一致,仅需根据第二Type-A接口21中的CC引脚上检测到的电信号值和数据引脚上检测到的电信号值能够区分充电器和待充电设备是否支持PD充电,以及待充电设备是否为标配的待充电设备即可,在此不作具体限定。It should be noted that, in practical applications, the resistance values of the first resistor and the second resistor, the current value output by the current source, the voltage value output by the voltage source, etc. may be inconsistent with the above parameters. - The electrical signal value detected on the CC pin in the A interface 21 and the electrical signal value detected on the data pin can distinguish whether the charger and the device to be charged support PD charging, and whether the device to be charged is a standard standby A charging device is sufficient, which is not specifically limited here.
另外,如图6所示,在上述数据引脚为D+引脚和D-引脚的情况下,第一Type-A接口11的第一侧设置有GND引脚、D+引脚、D-引脚以及VBUS引脚,该第一Type-A接口11的第二侧设置有CC引脚,上述第一Type-A接口11的第一侧与第二侧为相对的两侧。In addition, as shown in FIG. 6 , in the case where the above-mentioned data pins are D+ pins and D- pins, the first side of the first Type-A interface 11 is provided with a GND pin, a D+ pin, and a D- pin. pin and VBUS pin, the second side of the first Type-A interface 11 is provided with a CC pin, and the first side and the second side of the first Type-A interface 11 are opposite sides.
相应的,如图7所示,第二Type-A接口21的第三侧设置有GND引脚、D+引脚、D-引脚以及VBUS引脚,该第二Type-A接口21的第四侧设置有CC引脚,上述第二Type-A接口21的第三侧与第四侧为相对的两侧。且在第一Type-A接口11与第二Type-A接口21连接时,第一Type-A接口11和第二Type-A接口21中的GND引脚对应连接,D+引脚对应连接,D-引脚对应连接,VBUS引脚对应连接,且CC引脚与CC引脚连接。Correspondingly, as shown in FIG. 7 , the third side of the second Type-A interface 21 is provided with a GND pin, a D+ pin, a D- pin and a VBUS pin. CC pins are provided on the side, and the third side and the fourth side of the second Type-A interface 21 are opposite sides. And when the first Type-A interface 11 is connected with the second Type-A interface 21, the GND pins in the first Type-A interface 11 and the second Type-A interface 21 are connected correspondingly, the D+ pins are connected correspondingly, and the D+ pins are connected correspondingly. - The pins are connected correspondingly, the VBUS pins are connected correspondingly, and the CC pins are connected to the CC pins.
这样,上述GND引脚、D+引脚、D-引脚以及VBUS引脚的分布位置与现有技术中的Type-A接口中的GND引脚、D+引脚、D-引脚以及VBUS引脚的分布位置相同,从而能够与常规的Type-A接口匹配连接,以实现GND引脚、D+引脚、D-引脚以及VBUS引脚的常规功能,使得本申请实施例提供的充电器1能够与具有常规的Type-A接口的数据线连接,且本申请实施例提供的数据线2能够与具有常规的Type-A接口的充电器连接。In this way, the distribution positions of the above-mentioned GND pins, D+ pins, D- pins and VBUS pins are the same as the GND pins, D+ pins, D- pins and VBUS pins in the Type-A interface in the prior art. The distribution positions are the same, so that they can be matched and connected with the conventional Type-A interface, so as to realize the conventional functions of the GND pin, the D+ pin, the D- pin and the VBUS pin, so that the charger 1 provided in the embodiment of the present application can be It is connected to a data line with a conventional Type-A interface, and the data line 2 provided in this embodiment of the present application can be connected to a charger with a conventional Type-A interface.
需要说明的是,上述第一Type-A接口11中各引脚的分布位置还可以交 换或者改变,在此不作具体限定,另外,进行非PD充电过程中,第一Type-A接口11中的VBUS引脚、GND引脚、D+引脚以及D-引脚的结构和工作原理与现有技术中的第一Type-A接口11中的VBUS引脚、GND引脚、D+引脚以及D-引脚的结构和工作原理相同,在此不再具体阐述。It should be noted that the distribution positions of the pins in the first Type-A interface 11 can also be exchanged or changed, which is not specifically limited here. The structures and working principles of the VBUS pin, GND pin, D+ pin and D- pin are the same as the VBUS pin, GND pin, D+ pin and D- pin in the first Type-A interface 11 in the prior art The structure and working principle of the pins are the same, and will not be described in detail here.
请参阅图8,以如图4或图5所示充电设备为例,对本申请实施例提供的充电设备的工作原理图进行举例说明,该充电设备具体可以执行以下过程:Referring to FIG. 8 , taking the charging device shown in FIG. 4 or FIG. 5 as an example, the working principle diagram of the charging device provided by the embodiment of the present application is illustrated as an example. The charging device may specifically perform the following processes:
步骤801、充电器连接电源时,协议控制模块控制充电器处于预设工作状态下。 Step 801 , when the charger is connected to a power source, the protocol control module controls the charger to be in a preset working state.
其中,上述预设工作状态下,VBUS引脚输出5V电压。Among them, in the above-mentioned preset working state, the VBUS pin outputs a 5V voltage.
步骤802、数据线上的MCU控制第一开关242和第二开关243导通,且第三开关244断开。In step 802, the MCU on the data line controls the first switch 242 and the second switch 243 to be turned on, and the third switch 244 is turned off.
步骤803、判断充电设备是否连接第一预设待充电设备。Step 803: Determine whether the charging device is connected to the first preset device to be charged.
其中,上述第一待充电设备可以是手机等不支持PD充电的设备。The above-mentioned first device to be charged may be a device that does not support PD charging, such as a mobile phone.
另外,在步骤803的判断结果为“是”的情况下执行步骤804,在步骤803的判断结果为“否”的情况下执行步骤805。In addition, if the determination result of step 803 is "YES", step 804 is performed, and if the determination result of step 803 is "NO", step 805 is performed.
步骤804、判断所述第一预设待充电设备是否为标配的待充电设备。Step 804: Determine whether the first preset device to be charged is a standard device to be charged.
其中,在步骤804的判断结果为“是”的情况下执行步骤806,在步骤804的判断结果为“否”的情况下执行步骤807。Wherein, when the judgment result of step 804 is "Yes", step 806 is executed, and when the judgment result of step 804 is "No", step 807 is executed.
步骤806、充电器通过D+引脚和D-引脚与待充电设备进行充电通信。 Step 806, the charger performs charging communication with the device to be charged through the D+ pin and the D- pin.
其中,上述充电器通过D+引脚和D-引脚与待充电设备进行充电通信也可以理解为:充电器对标配的待充电设备进行私有协议(也可以称之为:预设通信协议)的DP/DM充电通信。Among them, the above-mentioned charging communication between the charger and the device to be charged through the D+ pin and the D- pin can also be understood as: the charger performs a private protocol on the standard device to be charged (also called: a preset communication protocol) DP/DM charging communication.
步骤805、判断充电设备是否连接第二预设待充电设备。Step 805: Determine whether the charging device is connected to the second preset device to be charged.
在具体实施中,上述第二预设待充电设备可以是支持PD充电的笔记本电脑等,在此不作具体限定。In a specific implementation, the above-mentioned second preset device to be charged may be a notebook computer that supports PD charging, etc., which is not specifically limited herein.
另外,在步骤805的判断结果为“是”的情况下执行步骤807,在步805的判断结果为“否”的情况下重复执行步骤802。In addition, if the determination result of step 805 is "Yes", step 807 is performed, and if the determination result of step 805 is "No", step 802 is repeatedly performed.
步骤807、MCU通过CC引脚向充电器请求在预设时间长度内断开VBUS引脚。 Step 807, the MCU requests the charger to disconnect the VBUS pin within a preset time length through the CC pin.
其中,上述预设时间长度大于或者等于PD通信协议规定的电源中断时间。且在断开VBUS引脚期间,充电器不向外传输电源。Wherein, the above-mentioned preset time length is greater than or equal to the power interruption time specified by the PD communication protocol. And while the VBUS pin is disconnected, the charger does not transmit power to the outside.
808、在VBUS引脚恢复供电时,MCU控制第一开关242和第二开关243断开,且第三开关244连通。808. When the VBUS pin restores power, the MCU controls the first switch 242 and the second switch 243 to be disconnected, and the third switch 244 to be connected.
本申请实施例提供的充电设备,能够根据第二Type-A接口21中的CC引脚和数据引脚上检测到的电信号确定待充电设备是否为标配待充电设备,以及是否支持PD充电,从而根据待充电设备的需求连通CC引脚或者断开CC引脚,以实现与待充电设备之间的PD充电方式和非PD充电方式的切换,从而能够适用于多种待充电设备的不同充电方式。The charging device provided by the embodiment of the present application can determine whether the device to be charged is a standard device to be charged and whether it supports PD charging according to the electrical signals detected on the CC pin and the data pin of the second Type-A interface 21 , so as to connect the CC pin or disconnect the CC pin according to the needs of the device to be charged, so as to realize the switching between the PD charging mode and the non-PD charging mode between the device to be charged charging method.
需要说明的是,在本文中,术语“包括”、“包含”或者其任何其他变体意在涵盖非排他性的包含,从而使得包括一系列要素的过程、方法、物品或者装置不仅包括那些要素,而且还包括没有明确列出的其他要素,或者是还包括为这种过程、方法、物品或者装置所固有的要素。在没有更多限制的情况下,由语句“包括一个……”限定的要素,并不排除在包括该要素的过程、方法、物品或者装置中还存在另外的相同要素。此外,需要指出的是,本申请实施方式中的方法和电子设备的范围不限按示出或讨论的顺序来执行功能,还可包括根据所涉及的功能按基本同时的方式或按相反的顺序来执行功能,例如,可以按不同于所描述的次序来执行所描述的方法,并且还可以添加、省去、或组合各种步骤。另外,参照某些示例所描述的特征可在其他示例中被组合。It should be noted that, herein, the terms "comprising", "comprising" or any other variation thereof are intended to encompass non-exclusive inclusion, such that a process, method, article or device comprising a series of elements includes not only those elements, It also includes other elements not expressly listed or inherent to such a process, method, article or apparatus. Without further limitation, an element qualified by the phrase "comprising a..." does not preclude the presence of additional identical elements in a process, method, article or apparatus that includes the element. In addition, it should be noted that the scope of the methods and electronic devices in the embodiments of the present application is not limited to performing the functions in the order shown or discussed, but may also include performing functions in a substantially simultaneous manner or in the reverse order depending on the functions involved To perform functions, for example, the methods described may be performed in an order different from that described, and various steps may also be added, omitted, or combined. Additionally, features described with reference to some examples may be combined in other examples.
上面结合附图对本申请的实施例进行了描述,但是本申请并不局限于上述的具体实施方式,上述的具体实施方式仅仅是示意性的,而不是限制性的,本领域的普通技术人员在本申请的启示下,在不脱离本申请宗旨和权利要求所保护的范围情况下,还可做出很多形式,均属于本申请的保护之内。The embodiments of the present application have been described above in conjunction with the accompanying drawings, but the present application is not limited to the above-mentioned specific embodiments, which are merely illustrative rather than restrictive. Under the inspiration of this application, without departing from the scope of protection of the purpose of this application and the claims, many forms can be made, which all fall within the protection of this application.