An adapter power identification method, an adapter, an electronic device, and a storage medium
Patent Information
- Application Number
- CN202511735018.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-11-24
- Publication Date
- 2026-10-30
AI Technical Summary
随着技术发展,更高功率的新机型需求日益凸显,而现有方案无法支持这些功率的适配器的准确识别
[0016]本公开的适配器功率识别方法、适配器、电子设备及存储介质,通过引入开关元件切换识别引脚的接地路径,结合初始电压与目标电压的双重判断,突破了传统固定下拉电阻方案受上拉电压限制的瓶颈,可支持已有档位之外的多档位功率识别,满足电子设备对高功率适配器的识别需求;第一阈值范围的设定与现有方案保持一致,确保电子设备能准确识别旧电源、新电源的传统功率模式,避免了兼容性恶化问题,同时可通过第二阈值范围识别新适配器,再通过开关元件断开后的目标电压实现识别,确保新旧电源与机型间均能正常匹配,在扩展了功率识别档位的同时保障了新旧适配器的兼容性。此外,本公开的适配器功率识别方法无需增加PD协议IC,避免了硬件成本上升和轻载损耗增加;无需提高上拉电压,因此无需更换高成本MCU,沿用现有硬件电路即可实现功能升级,大幅降低了设计成本和开发难度;延迟预设时长的设计可避免适配器接入初期的暂态电压导致的识别误差,确保目标电压能准确反映适配器实际功率,提升功率识别的精度,进而避免新机型使用旧电源时的过载风险,保障设备运行安全。
Smart Images

Figure CN123019153A_ABST
Abstract
Description
Technical Field
[0001] This disclosure relates to the field of power management technology, and in particular to an adapter power identification method, an adapter, an electronic device, and a storage medium. Background Technology
[0002] Existing laptop adapters use a fixed pull-down resistor and a voltage divider with the laptop system to identify power levels, but this is limited by the pull-up voltage and can only identify a maximum of seven power levels. With technological advancements, the demand for higher power in newer models is increasingly evident, and existing solutions cannot accurately identify adapters with these power ratings.
[0003] Continuing to reuse the old resistor values will lead to poor compatibility between the old and new power supplies and the device model. That is, the old model cannot recognize the new power supply and thus cannot achieve the maximum performance of the device; when the new machine uses the old power supply, it may be overloaded for a long time due to recognition errors, which may easily cause the adapter to malfunction.
[0004] In addition, in existing interface solutions, if the power identification capability is expanded by adding a PowerDelivery Integrated Circuit (PD protocol IC), the cost of the adapter will increase, and the light-load loss will also increase. If the power identification is expanded by increasing the pull-up voltage, for example from 3.3V to 5V, the high-cost microcontroller unit (MCU) needs to be replaced, which increases the design cost and difficulty. Summary of the Invention
[0005] This disclosure provides an adapter power identification method, an adapter, an electronic device, and a storage medium to at least solve the above-mentioned technical problems existing in the prior art.
[0006] A first aspect of this disclosure provides an adapter power identification method, the method comprising: Obtain the initial voltage on the identification pin of the adapter when the adapter is connected to the electronic device; In response to the initial voltage being within a first threshold range, the power rating of the adapter is determined based on the initial voltage; In response to the initial voltage being within a second threshold range, it is determined that the identification pin sequentially forms a low-impedance ground path without identification resistance through the switching element and the common ground of the adapter; the switching element is controlled to open after a preset time, so that the identification pin sequentially forms a ground path containing the identification resistor through the identification resistor and the common ground of the adapter; the target voltage on the identification pin is obtained, and the power level of the adapter is determined based on the target voltage; Wherein, the first threshold range is a voltage range determined based on the voltage division relationship formed by the identification resistor and the internal circuit structure of the adapter without switching elements. The second threshold range is a voltage range determined based on the voltage division relationship formed by the conducting switching element and the internal circuit structure of the adapter; the first threshold range and the second threshold range together cover all possible voltages of the identification pin after the adapter is connected.
[0007] In one possible implementation, determining the power level of the adapter based on the initial voltage in response to the initial voltage being within a first threshold range includes: The power level corresponding to the initial voltage is determined according to the first mapping relationship; The first mapping relationship is used to characterize the correspondence between multiple preset voltage thresholds and multiple power levels within the first threshold range.
[0008] In one possible implementation, determining the power rating of the adapter based on the target voltage includes: The power level corresponding to the target voltage is determined based on the second mapping relationship; The second mapping relationship is used to characterize the correspondence between multiple preset voltage thresholds and multiple power levels that may appear on the identification pin after the switching element is turned off; The multiple preset voltage thresholds in the first mapping relationship and the multiple preset voltage thresholds in the second mapping relationship include at least one identical voltage threshold, and the power level corresponding to the identical voltage threshold in the first mapping relationship is different from the power level corresponding to the same voltage threshold in the second mapping relationship.
[0009] In one possible implementation, the preset duration includes a base duration, which is based on the time required for the switching element within the adapter to switch from a conducting state to a disconnected state.
[0010] In one embodiment, the preset duration further includes a buffer duration, which is used to ensure that the electronic device obtains the target voltage after the switching element is turned off and the voltage across the identification resistor has reached a stable state.
[0011] A second aspect of this disclosure provides an adapter for implementing the adapter power identification method described in the above-described embodiments, the adapter including an identification pin, an identification resistor, a switching element, a common ground, and a control module; One end of the identification resistor is connected to the identification pin, and the other end is connected to the first end of the switching element; The second end of the switching element is connected to the common ground; The control module is electrically connected to the switching element and is used to control the switching element to switch between an on state and an off state; The on / off state of the switching element is used to change the grounding impedance path of the identification pin, thereby changing the voltage on the identification pin so that external electronic equipment can detect and determine the power level.
[0012] In one possible implementation, the control module is configured to: When the adapter is not connected to an electronic device, the switching element is controlled to remain in the on state; When the adapter is connected to the electronic device, the switching element is controlled to disconnect after a preset time, so that the identification pin is changed from being connected to the common ground in a low-impedance manner through the switching element to being connected to the common ground through the identification resistor. The initial voltage generated on the identification pin when the switching element is turned on and the target voltage generated after the switching element is turned off are used by the electronic device to determine the power level of the adapter.
[0013] In one possible implementation, the control module includes a timer, and the control module is configured to: In response to detecting the output current generated when the adapter is connected to an electronic device, the timer is started to count for a preset duration.
[0014] According to a third aspect of this disclosure, an electronic device is provided, comprising: At least one processor; and A memory communicatively connected to the at least one processor; wherein, The memory stores instructions that can be executed by the at least one processor to enable the at least one processor to perform the adapter power identification method described in this disclosure.
[0015] According to a fourth aspect of this disclosure, a non-transitory computer-readable storage medium is provided storing computer instructions for causing the computer to perform the adapter power identification method described in this disclosure.
[0016] The adapter power identification method, adapter, electronic device, and storage medium disclosed herein overcome the bottleneck of traditional fixed pull-down resistor schemes limited by pull-up voltage by introducing a switching element to switch the grounding path of the identification pin and combining the dual judgment of initial voltage and target voltage. It can support power identification of multiple levels beyond the existing levels, meeting the identification needs of electronic devices for high-power adapters. The setting of the first threshold range is consistent with the existing scheme, ensuring that electronic devices can accurately identify the traditional power modes of old and new power supplies, avoiding compatibility deterioration issues. At the same time, new adapters can be identified through the second threshold range, and identification is achieved through the target voltage after the switching element is disconnected, ensuring normal matching between old and new power supplies and models. While expanding the power identification levels, it also ensures the compatibility of old and new adapters. Furthermore, the adapter power identification method disclosed herein does not require the addition of a PD protocol IC, thus avoiding increased hardware costs and light-load losses; it does not require increasing the pull-up voltage, therefore eliminating the need to replace the high-cost MCU, and the existing hardware circuit can be used to achieve functional upgrades, significantly reducing design costs and development difficulty; the design of a preset delay duration can avoid identification errors caused by transient voltages in the initial stage of adapter connection, ensuring that the target voltage can accurately reflect the actual power of the adapter, improving the accuracy of power identification, thereby avoiding the overload risk when a new model uses an old power supply, and ensuring the safe operation of the equipment.
[0017] It should be understood that the description in this section is not intended to identify key or essential features of the embodiments of this disclosure, nor is it intended to limit the scope of this disclosure. Other features of this disclosure will become readily apparent from the following description. Attached Figure Description
[0018] The above and other objects, features, and advantages of this disclosure will become readily apparent from the following detailed description of exemplary embodiments, taken in conjunction with the accompanying drawings. Several embodiments of this disclosure are illustrated in the drawings by way of example and not limitation, in which: In the accompanying drawings, the same or corresponding reference numerals indicate the same or corresponding parts.
[0019] Figure 1 A schematic diagram illustrating the implementation flow of the adapter power identification method according to an embodiment of this disclosure is shown; Figure 2 A logic block diagram of the adapter power identification method according to an embodiment of the present disclosure is shown; Figure 3 A circuit diagram of an adapter connected to an electronic device according to an embodiment of this disclosure is shown; Figure 4 A schematic diagram of the composition structure of an electronic device according to an embodiment of the present disclosure is shown. Detailed Implementation
[0020] To make the objectives, features, and advantages of this disclosure more apparent and understandable, the technical solutions in the embodiments of this disclosure will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of this disclosure, and not all of them. All other embodiments obtained by those skilled in the art based on the embodiments of this disclosure without creative effort are within the scope of protection of this disclosure.
[0021] Reference Figure 1 As shown, this disclosure provides an adapter power identification method, which includes: Step S11: Obtain the initial voltage on the adapter's identification pin when the adapter is connected to the electronic device; Step S121: In response to the initial voltage being within the first threshold range, determine the power level of the adapter based on the initial voltage; Step S122: In response to the initial voltage being within the second threshold range, the identification pin is determined to form a low-impedance ground path without identification resistance through the common ground of the switching element and the adapter in sequence. Step S1221: Control the switching element to disconnect after a preset time, so that the identification pin forms a grounding path containing the identification resistor through the identification resistor and the common ground of the adapter in sequence; Step S1222: Obtain the target voltage on the identification pin and determine the power rating of the adapter based on the target voltage.
[0022] The first threshold range is a voltage interval determined by the voltage divider relationship between the identification resistor of the adapter without switching elements and the internal circuit structure. The second threshold range is a voltage interval determined by the voltage divider relationship between the conducting switching elements and the internal circuit structure of the adapter. The first and second threshold ranges together cover all possible voltages on the identification pin after the adapter is connected.
[0023] In this embodiment, for step S11, obtaining the initial voltage on the adapter's identification pin when the adapter is connected to the electronic device, when the adapter is connected to the electronic device through the interface, the detection module of the electronic device will collect the voltage divider at the adapter's identification pin in real time and use this voltage as the initial voltage. Taking a laptop computer as an example, the laptop computer's detection module can be integrated into the existing system circuit without adding additional hardware. There are two cases when determining the threshold range of the initial voltage and determining the power level: case one is that the initial voltage is in the first threshold range, and case two is that the initial voltage is in the second threshold range. These two cases correspond to steps S121 and S122, respectively. Steps S121 and S122 are explained in detail below: In step S121, in response to the initial voltage being within the first threshold range, the power level of the adapter is determined based on the initial voltage. The control unit of the electronic device, such as an existing MCU, compares the collected initial voltage with the preset first threshold range. The first threshold range corresponds to the voltage range of a traditional power level, and this range is set consistently with existing solutions to ensure compatibility with older models and power supplies. If the initial voltage is within the first threshold range, it indicates that the current adapter is a traditional power level adapter, or that a new adapter is adapted to a traditional power mode. The control unit will directly determine the adapter's power level based on the preset correspondence between the initial voltage and the power level.
[0024] In step S122, in response to the initial voltage being within the second threshold range, it is determined that the identification pin forms a low-impedance ground path without identification resistance through the switching element and the adapter's common ground. That is, since the switching element of the new adapter is turned on in the initial state, if the initial voltage is within the preset second threshold range, it indicates that the current adapter may be a new adapter that supports higher power, and the voltage divider of the new adapter exceeds the first threshold range corresponding to the traditional power level. At this time, step S1221 is executed, controlling the switching element to turn off after a preset time, so that the identification pin forms a ground path containing the identification resistor through the identification resistor and the adapter's common ground. Then, step S1222 is executed, acquiring the target voltage on the identification pin, and determining the power level of the adapter based on the target voltage. That is, the control unit will trigger a delay mechanism, delaying for a preset time, and then acquiring the voltage divider at the adapter's identification pin again through the detection module, using this voltage as the target voltage. The reason for setting the preset delay time here is that when the new adapter is initially connected to the electronic device, its internal circuit may be in a transient state, and the voltage divider has not yet stabilized. Direct acquisition may lead to identification errors. The preset duration can be set according to the adapter's circuit characteristics, such as 50ms-200ms, to ensure stable circuit state switching. Delaying the preset duration ensures that the acquired target voltage accurately reflects the voltage division characteristics corresponding to the adapter's actual power. After acquiring the target voltage, the control unit determines the adapter's power level based on the preset correspondence between the target voltage and high power levels. This correspondence can be flexibly set according to the power requirements of new models, thereby enabling multi-level identification exceeding traditional power levels. It should be noted that the first and second threshold ranges together cover all possible voltages on the identification pin after the adapter is connected to the electronic device, ensuring that regardless of whether the adapter is an older type without a switching element or a newer type with a switching element, the voltage on its identification pin falls within the corresponding threshold range, achieving complete power identification. For newer adapters with switching elements, when the switching element is on, the identification pin is directly grounded through the switching element. At this time, there is no identification resistor, the impedance is extremely low, and the voltage division is approximately 0V. However, due to the slight impedance of the circuit, the actual voltage may be slightly greater than 0V. Therefore, this voltage range can be defined as the second threshold range.
[0025] In summary, the adapter power identification method disclosed herein overcomes the bottleneck of traditional fixed pull-down resistor schemes limited by pull-up voltage by introducing a switching element to switch the grounding path of the identification pin and combining the dual judgment of initial voltage and target voltage. It can support power identification of multiple levels beyond the existing levels, meeting the identification needs of electronic devices for high-power adapters. The setting of the first threshold range is consistent with the existing scheme, ensuring that electronic devices can accurately identify the traditional power modes of old and new power supplies, avoiding compatibility degradation issues. At the same time, new adapters can be identified through the second threshold range, and identification is achieved through the target voltage after the switching element is disconnected, ensuring normal matching between old and new power supplies and models. While expanding the power identification levels, it also ensures the compatibility of old and new adapters. Furthermore, the adapter power identification method disclosed herein does not require the addition of a PD protocol IC, thus avoiding increased hardware costs and light-load losses; it does not require increasing the pull-up voltage, therefore eliminating the need to replace the high-cost MCU, and the existing hardware circuit can be used to achieve functional upgrades, significantly reducing design costs and development difficulty; the design of a preset delay duration can avoid identification errors caused by transient voltages in the initial stage of adapter connection, ensuring that the target voltage can accurately reflect the actual power of the adapter, improving the accuracy of power identification, thereby avoiding the overload risk when a new model uses an old power supply, and ensuring the safe operation of the equipment.
[0026] In one embodiment, step S121, in response to the initial voltage being within a first threshold range, determining the power level of the adapter based on the initial voltage, includes: Step S1211: Determine the power level corresponding to the initial voltage according to the first mapping relationship; The first mapping relationship is used to characterize the correspondence between multiple preset voltage thresholds and multiple power levels within the first threshold range.
[0027] In this embodiment, when the control unit of the electronic device determines that the collected initial voltage is within a first threshold range, it identifies the adapter power by determining the power level corresponding to the initial voltage according to a first mapping relationship. The first mapping relationship is a pre-set data correspondence rule stored in the control unit of the electronic device. Its function is to clearly characterize the one-to-one correspondence between multiple preset voltage thresholds within the first threshold range and multiple power levels. The multiple preset voltage thresholds within the first threshold range are several continuous or discrete voltage sub-ranges or specific voltage values within the first threshold range; the multiple power levels are the power levels supported by traditional adapters, such as 45W, 65W, 90W, 135W, 170W, 230W, and 300W, etc. Each voltage sub-range or specific voltage value corresponds to a power level, and this correspondence is completely consistent with the power identification logic of the existing fixed pull-down resistor voltage divider scheme to ensure compatibility between new and old devices and power supplies. For example, if the first threshold range is set to 0.234V~3.122V, the corresponding first mapping relationship can be set as follows: The voltage sub-range is 0.234V~0.663V, corresponding to a power rating of 45W; The voltage sub-range is 0.693V~1.134V, corresponding to a power rating of 65W; The voltage sub-range is 1.172V~1.618V, corresponding to a power rating of 90W; The voltage sub-range is 1.663V~2.109V, corresponding to a power rating of 135W; The voltage sub-range is 2.149V~2.590V, corresponding to a power rating of 170W; The voltage sub-range is 2.651V~2.929V, corresponding to a power rating of 230W; The voltage range is 2.945V to 3.122V, corresponding to a power rating of 300W.
[0028] It is understandable that the parameters of the first mapping relationship mentioned above, such as the voltage sub-range and the corresponding power level, can be flexibly adjusted according to the traditional adapter specifications of different brands and models of electronic devices. However, its core logic is to ensure that older models can directly identify adapters with traditional power levels through the fixed correspondence between voltage and power, while newer models can also use this rule when identifying older power supplies, thus avoiding compatibility issues.
[0029] Taking a scenario where a laptop is connected to a traditional 230W adapter as an example, after the adapter is connected to the laptop, the detection module immediately collects the interface voltage divider and obtains an initial voltage of 2.763V. The MCU compares 2.763V with the first threshold range (such as the aforementioned 0.234V~3.122V) and confirms that it belongs to the first threshold range. The MCU retrieves the preset first mapping table and finds that 2.763V belongs to the voltage sub-range of "2.651V~2.929V", which corresponds to a power level of 230W. The MCU sends the 230W power level signal to the power management module, which then limits the maximum power supply of the computer to 230W to ensure that the computer operates within the adapter's capacity and avoids adapter overload.
[0030] Reference Figure 2 As shown, in one possible implementation, step S1222, obtaining the target voltage on the identification pin and determining the power level of the adapter based on the target voltage, includes: Step S12221: Determine the power level corresponding to the target voltage according to the second mapping relationship.
[0031] The second mapping relationship is used to characterize the correspondence between multiple preset voltage thresholds and multiple power levels that may appear on the identification pin after the switching element is turned off; the multiple preset voltage thresholds in the first mapping relationship and the multiple preset voltage thresholds in the second mapping relationship include at least one of the same voltage thresholds, and the power level corresponding to the same voltage threshold in the first mapping relationship is different from the power level corresponding to the same voltage threshold in the second mapping relationship.
[0032] In this embodiment, when the control unit determines that the initial voltage is within the second threshold range, it needs to obtain the target voltage after a preset delay, and then complete the identification of the new adapter based on the logic of determining the power level according to the second mapping relationship. The second mapping relationship is another set of voltage and power data correspondence rules stored in the control unit in parallel with the first mapping relationship. Its function is to characterize the one-to-one correspondence between multiple preset voltage thresholds and multiple power levels that may appear on the identification pin after the switching element is turned off. Among them, the multiple preset voltage thresholds refer to several continuous or discrete voltage sub-intervals or specific voltage values. The value range of this set of voltages completely matches the second threshold range. In order to adapt to new and more precise power requirements, the design of multiple preset voltage thresholds can reuse some values in the first mapping relationship, that is, there is an intersection with the multiple preset voltage thresholds in the first mapping relationship. The multiple power levels in the second mapping relationship refer to new power levels that are higher than the traditional existing power levels, such as 60W, 80W, 100W, 140W, 180W, 245W and 330W, etc., to meet the precise requirements of the new model for the power adapter. To expand the power levels without changing the hardware circuitry, such as increasing the pull-up voltage or adding a PD protocol IC, the second mapping relationship is designed with voltage reuse but different power levels compared to the first mapping relationship. That is, the multiple preset voltage thresholds in the first mapping relationship and the multiple preset voltage thresholds in the second mapping relationship contain at least one identical voltage value or overlapping voltage sub-range, but the power levels corresponding to this identical voltage value are completely different in the two mapping relationships. For example, combining the parameters of the first mapping relationship mentioned above, the second threshold range can be set to 0~0.207V, and the corresponding second mapping relationship can be set as follows: The voltage sub-range is 0.234V~0.663V, corresponding to a power rating of 60W; The voltage sub-range is 0.693V~1.134V, corresponding to a power rating of 80W; The voltage sub-range is 1.172V~1.618V, corresponding to a power rating of 100W; The voltage sub-range is 1.663V~2.109V, corresponding to a power rating of 140W; The voltage sub-range is 2.149V~2.590V, corresponding to a power rating of 180W; The voltage sub-range is 2.651V~2.929V, corresponding to a power rating of 245W; The voltage range is 2.945V to 3.122V, corresponding to a power rating of 330W.
[0033] It should be noted that this method first distinguishes the adapter type—whether it's a traditional or new adapter—by determining the initial voltage threshold range. If the initial voltage is within the first threshold range, the first mapping relationship is used directly; if the initial voltage is within the second threshold range, the second mapping relationship is used after a preset delay. This ensures that even if two mappings have the same voltage value, confusion is avoided through the dual logic of threshold range and delay determination. This reuses existing voltage detection hardware while also expanding the power range.
[0034] The following is a more detailed explanation of step S12221, which involves determining the power level corresponding to the target voltage based on the second mapping relationship: (1) Once the control unit confirms that the initial voltage is within the second threshold range, the control unit immediately starts the delay mechanism and waits for a preset time, such as 100ms to 200ms. The specific value can be determined by adjusting according to the transient characteristics of the adapter circuit. The target voltage collected after the delay can truly reflect the stable output characteristics of the adapter and avoid mismatch of the first mapping relationship due to transient voltage. (2) After the delay ends, the detection module collects the voltage divider at the adapter interface again to obtain the target voltage. Then the control unit can filter the target voltage to remove circuit noise interference and ensure the accuracy of the voltage data. (3) The control unit compares the filtered target voltage with multiple preset voltage thresholds in the second mapping relationship to determine the voltage sub-interval to which the target voltage belongs, and then retrieves the corresponding multiple power levels. (4) The control unit sends the determined high power level signal to the power management module of the electronic device. The power management module then adjusts the power supply strategy, such as increasing the current output limit or unlocking the high power charging mode, to ensure that the new model can make full use of the performance of the high power adapter, while avoiding overload caused by power misjudgment.
[0035] Taking the scenario of a laptop connected to a newly designed 245W adapter as an example, after the adapter is connected to the laptop, the detection module immediately collects the interface voltage divider and obtains an initial voltage of 0.116V. The MCU compares 2.763V with the first threshold range (such as the aforementioned 0.234V~3.122V) and the second threshold range (such as the aforementioned 0~0.207V), and determines that it belongs to the second threshold range. The control unit starts a delay. After the delay ends, the detection module collects the target voltage as 2.763V. The control unit retrieves the preset second mapping table and finds that 2.763V belongs to the voltage sub-range of "2.651V~2.929V". The power level corresponding to this sub-range is 245W. The MCU sends the 245W power level signal to the power management module. The power management module then adjusts the upper limit of the CPU and GPU to the level adapted to 245W, and sets the current protection threshold to ensure that the adapter outputs stably within the 245W range, so as to give full play to the performance of the new model and avoid overload.
[0036] In one possible implementation, the preset duration includes a base duration, which is based on the time required for the switching element within the adapter to switch from an on state to an off state.
[0037] In this embodiment, the preset duration is primarily a base duration. The base duration is not subjectively set but is strictly calculated based on the time required for the switching elements within the adapter to switch from a conducting state to an off state, i.e., the off-time of the switching elements. The switching elements within the adapter, such as MOSFETs and IGBTs, are core components for voltage regulation and power output. When the adapter is connected to an electronic device, the switching elements are in a conducting state, resulting in a small initial voltage measured at the moment of connection, which cannot reflect the stable voltage corresponding to the adapter's true power. Therefore, the base duration must at least cover the complete process of the switching elements switching from a conducting state to an off state, ensuring that after the delay, the switching elements are off, allowing for the measurement of a stable target voltage.
[0038] In one embodiment, the preset duration further includes a buffer duration, which is used to ensure that the electronic device obtains the target voltage after the switching element is turned off and the voltage across the identification resistor has reached a stable state.
[0039] In this embodiment, a delayed instruction of "waiting for the adaptation action to complete" is sent to the MCU of the laptop computer. That is, starting from the detection that the initial voltage is within the second threshold range, the MCU waits for a period of time slightly longer than the time required for the adapter to operate itself, ensuring that the adapter has fully completed the critical actions before performing the second voltage sampling. Therefore, the core of the buffer duration design is to compensate for the time difference. By measuring the switching element operation and the total time for stabilizing the voltage of the identification resistor in different batches of adapters, the maximum value can be taken and an additional 10% to 20% redundancy can be added as the buffer duration. For example, if the longest measured time for the adapter to complete the two critical actions is 98ms (95ms for switching element operation and 3ms for stabilizing the voltage of the identification resistor), then the base duration of the MCU is set to 95ms, and the buffer duration is set to 5ms, which is 2ms more redundant than the actual time for stabilizing the voltage of the identification resistor, resulting in a total delay duration of 100ms.
[0040] Reference Figure 3 As shown, this disclosure also provides an adapter for implementing the adapter power identification method in the aforementioned embodiments. The adapter includes an identification pin, an identification resistor, a switching element, a common ground, and a control module. One end of the identification resistor is connected to the identification pin, and the other end is connected to a first terminal of the switching element. The second terminal of the switching element is connected to the common ground. The control module is electrically connected to the switching element and is used to control the switching element to switch between a conducting state and an off state. The on / off state of the switching element is used to change the grounding impedance path of the identification pin, causing a change in the voltage on the identification pin, which is then detected by an external electronic device to determine the power level.
[0041] In this embodiment, the identification pin is also known as the ID pin. The identification pin is the core interface for power identification signal interaction between the adapter and the electronic device. One end of the pin connects to the ID detection pin of the electronic device, and the other end is grounded through a specific circuit path. The switching of the grounding path is controlled by the on / off state of the switching element. The identification pin uses metal contacts that conform to industry interface standards, possessing low contact resistance and oxidation resistance to ensure the stability of voltage signal transmission. Electrically, one end directly connects to the ID detection port of the electronic device, and the other end connects to the switching circuit composed of the identification resistor and the switching element, forming a complete signal loop. The identification resistor, as a key component for adapter power identification, has its resistance value preset according to the adapter's power rating. It is used to form a voltage divider with the circuit at the electronic device end, and the voltage divider value reflects the adapter's power characteristics. The selection of the identification resistor value must consider the identification requirements of both traditional power levels and newly added high-power levels, ensuring that a voltage signal conforming to the preset threshold range can be output under different switching states. The switching element can be an electronic component with fast switching characteristics, such as a MOSFET or transistor, connected in series between the identification resistor and the common ground. Its on / off state directly affects the voltage divider circuit structure of the identification resistor. When the switching element is on, the identification resistor is grounded through the switching element, forming the first voltage divider circuit; when the switching element is off, the identification resistor is connected to the common ground through another path, forming the second voltage divider circuit, such as through a pull-down resistor at the electronic device. The voltage division in the two states is significantly different, providing a basis for power identification of the electronic device. The control module can use a low-cost MCU or dedicated logic circuit, electrically connected to the switching element, such as connected to the gate of the MOSFET, and responsible for controlling the on / off state of the switching element. The control module has a built-in timing unit and control logic, which can automatically execute switching control commands according to the status of the electronic device connected to the adapter.
[0042] In summary, the adapter disclosed herein enables resistor reuse, meaning that the same identification resistor can distinguish between two power ratings of the adapter without requiring a new resistor for the new power rating or an additional PD protocol IC. Functional expansion can be achieved solely through the identification resistor, ordinary switching elements, and a low-cost control module. This results in low hardware costs, eliminates the need for significant modifications to the existing adapter's overall structure, facilitates mass production, and reduces hardware variability costs. By coordinating the identification resistor and switching elements, different voltage division characteristics are formed in the on and off states of the switch. Combined with the delayed sampling strategy of the electronic device, this overcomes the power rating limitations of traditional fixed resistor solutions, supporting power ratings across a wider range.
[0043] In one embodiment, the control module is configured to: maintain the switching element in a conducting state when the adapter is not connected to the electronic device; and, when the adapter is connected to the electronic device, control the switching element to turn off after a preset time, causing the identification pin to switch from being connected to the common ground via the switching element in a low-impedance manner to being connected to the common ground via the identification resistor. The initial voltage generated on the identification pin when the switching element is on and the target voltage generated after the switching element is off are used by the electronic device to determine the power rating of the adapter.
[0044] In this embodiment, the control module is configured to perform the following key operations to cooperate with the power identification process of the electronic device: (1) On-time control upon connection: When the adapter is connected to the electronic device via the identification pin and begins to supply power, the control module immediately detects the connection signal, for example, through voltage detection or interface trigger signal, and outputs a control signal at the first moment to put the switching element into the on state. Preferably, the adapter is on by default, that is, the switching element of the adapter is always on when the electronic device is not connected, and is only turned off when a control signal is received. At this time, the identification resistor is grounded through the on switching element, and the initial voltage output by the voltage divider circuit will fall within the second threshold range preset by the electronic device, transmitting a signal to the electronic device that "it may be a new adapter".
[0045] (2) Delayed disconnection control: When the delay time reaches the preset duration, the control module outputs a switching signal to control the switching element to switch from the on state to the off state. At this time, the voltage divider circuit of the identification resistor changes, and the voltage gradually stabilizes to the target voltage corresponding to the actual power of the adapter. The electronic device can accurately identify the power level by acquiring this target voltage.
[0046] The following example illustrates the scenario where a laptop recognizes 230W and 245W adapters.
[0047] Both the 230W and 245W adapters use a 4640Ω identification resistor. By adding switching control logic to the high-power adapter (245W adapter), it outputs a dynamic signal that changes over time, while the traditional 230W adapter always maintains a static signal. The electronic device identifies the power by detecting the difference in the time characteristics of the signal. Specifically, the 4640Ω identification resistor in the traditional 230W adapter is directly connected between the adapter's ID pin and ground. From the moment the electronic device is connected, the voltage at the ID pin remains stable at 2.763V. This initial 2.763V is formed by the pull-up circuit on the electronic device side and the voltage divider of the identification resistor, resulting in a signal characteristic of "stable upon insertion, voltage unchanged." The new 245W adapter also uses a 4640Ω identification resistor, but a switching element controlled by the adapter's MCU is connected in series in the resistor path, forming a time-segmented signal. In the initial stage, the switch is closed and conducting, and the ID pin is directly short-circuited to ground through the switch. The equivalent resistance is close to 0Ω, and the voltage divider is close to 0V, which meets the low-voltage characteristics. In the delayed stage, the adapter MCU controls the switch to open, and the ID pin is grounded through a 4640Ω identification resistor. The voltage divider stabilizes at 2.763V, consistent with the stable voltage of a traditional 230W adapter. Therefore, the electronic device can identify the 245W adapter by detecting the dynamic characteristics from the initial low voltage to the stable voltage after the delay; and it can identify the 230W adapter by detecting the static characteristic of always being stable at 2.763V. Furthermore, when the switching element is in the conducting state, the input and output terminals of the switching element are fully connected. At this time, the grounding path of the identification pin is: identification pin → switching element → ground. Since the equivalent resistance of the switching element after conduction is extremely low, it can be regarded as the identification pin being directly grounded through a short-circuit path. At this time, the voltage of the identification pin is close to 0V, with only a small conduction voltage drop, forming an "initial low-voltage signal" used to trigger the second threshold range identification process of the electronic device. For example, when the 245W adapter is initially connected, after the switching element is turned on, the identification pin is directly grounded through the switching element. The electronic device detects that the voltage of the identification pin is 0.116V, determines that it is within the second threshold range (such as 0~0.207V), and starts the delayed sampling process.
[0048] When the switching element is in the open state, its input and output terminals are completely isolated. At this time, the grounding path of the identification pin switches to: identification pin → identification resistor → ground. The resistance value of the identification resistor is preset according to the adapter's power rating; for example, a 245W adapter corresponds to 4640Ω. Electronic devices typically have built-in pull-up resistors and pull-up voltages. The voltage on the identification pin is determined by the voltage division relationship between the pull-up resistor and the identification resistor, forming a target voltage signal used by the electronic device to accurately identify the power.
[0049] Therefore, by controlling the grounding path of the identification pin through a switching element, the same identification resistor can play different roles at different stages simply by switching the path. This avoids designing new resistor values for new power levels and reduces hardware diversity costs. The significant difference between the "near 0V" voltage in the on-state and the "stable voltage divider" voltage in the off-state allows electronic devices to easily determine the adapter type based on the initial voltage, avoiding signal confusion. Traditional adapters have no switching element; the identification pin is always grounded through the identification resistor, outputting a stable voltage divider. New adapters also output the same voltage divider after a delay, ensuring that older devices can recognize new adapters and guaranteeing compatibility.
[0050] In one embodiment, the control module includes a timer configured to start the timer for a preset duration in response to detecting an output current generated when the adapter is connected to the electronic device.
[0051] In this embodiment, the control module has a built-in timer. When the adapter is plugged into the electronic device's interface, the electronic device immediately draws an initial operating current from the adapter (even when the device is powered off, there will be a small standby current). The control module detects the generation of this output current to determine that the adapter has actually been connected and started supplying power. Only then does it start the timer to begin timing for a preset duration. This output current-based triggering design effectively avoids false start of the timer due to partial contact at the interface without forming a valid power supply circuit, ensuring that the timing start point is completely synchronized with the actual start time of the adapter.
[0052] According to embodiments of this disclosure, this disclosure also provides an electronic device and a readable storage medium.
[0053] Figure 4 A schematic block diagram of an example electronic device 800 that can be used to implement embodiments of the present disclosure is shown. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device may also represent various forms of mobile devices, such as personal digital processors, cellular phones, smartphones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely illustrative and are not intended to limit the implementation of the present disclosure described and / or claimed herein.
[0054] like Figure 4As shown, device 800 includes a computing unit 801, which can perform various appropriate actions and processes based on a computer program stored in read-only memory (ROM) 802 or a computer program loaded from storage unit 808 into random access memory (RAM) 803. RAM 803 may also store various programs and data required for the operation of device 800. The computing unit 801, ROM 802, and RAM 803 are interconnected via bus 804. Input / output (I / O) interface 805 is also connected to bus 804.
[0055] Multiple components in device 800 are connected to I / O interface 805, including: input unit 806, such as keyboard, mouse, etc.; output unit 807, such as various types of monitors, speakers, etc.; storage unit 808, such as disk, optical disk, etc.; and communication unit 809, such as network card, modem, wireless transceiver, etc. Communication unit 809 allows device 800 to exchange information / data with other devices through computer networks such as the Internet and / or various telecommunications networks.
[0056] The computing unit 801 can be a variety of general-purpose and / or special-purpose processing components with processing and computing capabilities. Some examples of the computing unit 801 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various special-purpose artificial intelligence (AI) computing chips, various computing units running machine learning model algorithms, a digital signal processor (DSP), and any suitable processor, controller, microcontroller, etc. The computing unit 801 performs the various methods and processes described above, such as the adapter power identification method. For example, in some embodiments, the adapter power identification method may be implemented as a computer software program tangibly contained in a machine-readable medium, such as storage unit 808. In some embodiments, part or all of the computer program may be loaded and / or installed on device 800 via ROM 802 and / or communication unit 809. When the computer program is loaded into RAM 803 and executed by the computing unit 801, one or more steps of the adapter power identification method described above may be performed. Alternatively, in other embodiments, the computing unit 801 may be configured to perform the adapter power identification method by any other suitable means (e.g., by means of firmware).
[0057] Various embodiments of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field-programmable gate arrays (FPGAs), application-specific integrated circuits (ASICs), application-specific standard products (ASSPs), systems-on-a-chip (SoCs), payload-programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various embodiments may include implementations in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which may be a dedicated or general-purpose programmable processor, capable of receiving data and instructions from a storage system, at least one input device, and at least one output device, and transmitting data and instructions to the storage system, the at least one input device, and the at least one output device.
[0058] The program code used to implement the adapter power identification method of this disclosure can be written in any combination of one or more programming languages. This program code can be provided to a processor or controller of a general-purpose computer, special-purpose computer, or other programmable data processing device, such that when executed by the processor or controller, the program code causes the functions / operations specified in the flowcharts and / or block diagrams to be implemented. The program code can be executed entirely on a machine, partially on a machine, as a standalone software package partially on a machine and partially on a remote machine, or entirely on a remote machine or server.
[0059] In the context of this disclosure, a machine-readable medium can be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, apparatus, or device. A machine-readable medium can be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium can be, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination of the foregoing. More specific examples of machine-readable storage media include electrical connections based on one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination of the foregoing.
[0060] To provide interaction with a user, the systems and techniques described herein can be implemented on a computer having: a display device for displaying information to the user (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor); and a keyboard and pointing device (e.g., a mouse or trackball) through which the user provides input to the computer. Other types of devices can also be used to provide interaction with the user; for example, feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including sound input, voice input, or tactile input).
[0061] The systems and technologies described herein can be implemented in computing systems that include backend components (e.g., as a data server), or computing systems that include middleware components (e.g., an application server), or computing systems that include frontend components (e.g., a user computer with a graphical user interface or web browser through which a user can interact with implementations of the systems and technologies described herein), or any combination of such backend, middleware, or frontend components. The components of the system can be interconnected via digital data communication of any form or medium (e.g., a communication network). Examples of communication networks include local area networks (LANs), wide area networks (WANs), and the Internet.
[0062] Computer systems can include clients and servers. Clients and servers are generally located far apart and typically interact via communication networks. Client-server relationships are created by computer programs running on the respective computers and having a client-server relationship with each other. Servers can be cloud servers, servers in distributed systems, or servers incorporating blockchain technology.
[0063] It should be understood that the various forms of processes shown above can be used to rearrange, add, or delete steps. For example, the steps described in this disclosure can be executed in parallel, sequentially, or in different orders, as long as the desired result of the technical solution of this disclosure can be achieved, and this is not limited herein.
[0064] Furthermore, the terms "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include at least one of that feature. In the description of this disclosure, "a plurality of" means two or more, unless otherwise explicitly specified.
[0065] The above description is merely a specific embodiment of this disclosure, but the scope of protection of this disclosure is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this disclosure should be included within the scope of protection of this disclosure. Therefore, the scope of protection of this disclosure should be determined by the scope of the claims.
Claims
1. A method for identifying adapter power, characterized in that, The method includes: Obtain the initial voltage on the identification pin of the adapter when the adapter is connected to the electronic device; In response to the initial voltage being within a first threshold range, the power rating of the adapter is determined based on the initial voltage; In response to the initial voltage being within a second threshold range, it is determined that the identification pin sequentially forms a low-impedance ground path without identification resistance through the switching element and the common ground of the adapter; the switching element is controlled to open after a preset time, so that the identification pin sequentially forms a ground path containing the identification resistor through the identification resistor and the common ground of the adapter; the target voltage on the identification pin is obtained, and the power level of the adapter is determined based on the target voltage; Wherein, the first threshold range is a voltage range determined based on the voltage division relationship formed by the identification resistor and the internal circuit structure of the adapter without switching elements. The second threshold range is a voltage range determined based on the voltage division relationship formed by the conducting switching element and the internal circuit structure of the adapter; the first threshold range and the second threshold range together cover all possible voltages of the identification pin after the adapter is connected.
2. The adapter power identification method according to claim 1, characterized in that, The step of determining the power rating of the adapter based on the initial voltage in response to the initial voltage being within a first threshold range includes: The power level corresponding to the initial voltage is determined according to the first mapping relationship; The first mapping relationship is used to characterize the correspondence between multiple preset voltage thresholds and multiple power levels within the first threshold range.
3. The adapter power identification method according to claim 2, characterized in that, Determining the power rating of the adapter based on the target voltage includes: The power level corresponding to the target voltage is determined based on the second mapping relationship; The second mapping relationship is used to characterize the correspondence between multiple preset voltage thresholds and multiple power levels that may appear on the identification pin after the switching element is turned off; The plurality of preset voltage thresholds in the first mapping relationship and the plurality of preset voltage thresholds in the second mapping relationship include at least one identical voltage threshold, and the power level corresponding to the identical voltage threshold in the first mapping relationship is different from the power level corresponding to the same voltage threshold in the second mapping relationship.
4. The adapter power identification method according to claim 1, characterized in that, The preset duration includes a base duration, which is based on the time required for the switching element in the adapter to switch from a conducting state to a disconnected state.
5. The adapter power identification method according to claim 4, characterized in that, The preset duration also includes a buffer duration, which is used to ensure that the electronic device obtains the target voltage after the switching element is turned off and the voltage across the identification resistor has reached a stable state.
6. An adapter for implementing the adapter power identification method according to any one of claims 1-5, characterized in that, The adapter includes identification pins, identification resistors, switching elements, a common ground, and a control module; One end of the identification resistor is connected to the identification pin, and the other end is connected to the first end of the switching element; The second end of the switching element is connected to the common ground; The control module is electrically connected to the switching element and is used to control the switching element to switch between an on state and an off state; The on / off state of the switching element is used to change the grounding impedance path of the identification pin, thereby changing the voltage on the identification pin so that external electronic equipment can detect and determine the power level.
7. The adapter according to claim 6, characterized in that, The control module is configured as follows: When the adapter is not connected to an electronic device, the switching element is controlled to remain in the on state; When the adapter is connected to the electronic device, the switching element is controlled to disconnect after a preset time, so that the identification pin is changed from being connected to the common ground in a low-impedance manner through the switching element to being connected to the common ground through the identification resistor. The initial voltage generated on the identification pin when the switching element is turned on and the target voltage generated after the switching element is turned off are used by the electronic device to determine the power level of the adapter.
8. The adapter according to claim 6, characterized in that, The control module includes a timer, and the control module is configured to: In response to detecting the output current generated when the adapter is connected to an electronic device, the timer is started to count for a preset duration.
9. An electronic device, characterized in that, include: At least one processor; as well as A memory communicatively connected to the at least one processor; wherein, The memory stores instructions that can be executed by the at least one processor to enable the at least one processor to perform the adapter power identification method according to any one of claims 1-5.
10. A non-transitory computer-readable storage medium storing computer instructions, characterized in that, The computer instructions are used to cause the computer to execute the adapter power identification method according to any one of claims 1-5.
