Electric tool battery pack Type-C interface supporting bidirectional fast charging and communication control method thereof
By combining a Type-C interface with a bidirectional DC-DC converter and a high-precision status detection module, bidirectional power transmission and data communication are supported. By combining a bidirectional DC-DC converter and a high-precision status detection module, the problem of interface specialization in traditional power tool battery packs is solved, enabling bidirectional power interaction between power tool battery packs and universal Type-C devices. This supports bidirectional intelligent charging and discharging, improving charging flexibility and safety.
Patent Information
- Application Number
- CN202511393099.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-09-27
- Publication Date
- 2026-01-13
Smart Images

Figure CN121332801A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of power tool battery, and in particular to a Type-C interface of a power tool battery pack supporting bidirectional fast charging and a communication control method thereof. BACKGROUND
[0002] With the development of intelligence and portability of power tools (such as electric drills, electric saws, lawn mowers, etc.), the performance requirements of the matching battery pack are increasingly improved. The traditional power tool battery pack has the following pain points: interface specialization: mostly using customized interfaces (such as XT60, Deans, etc.), which cannot be compatible with general Type-C devices, limiting the charging flexibility; one-way charging limitation: only supporting one-way charging of the battery pack by an external power supply, which cannot be used as a power supply for other low-power devices (such as mobile phones, flashlights); communication protocol is closed: the charging process relies on simple analog signals (such as resistance voltage division) to identify the charging state, lacks digital communication capability, and it is difficult to realize intelligent functions such as dynamic power adjustment and fault warning; insufficient safety detection: the existing scheme mostly realizes protection through hardware fuses or simple overvoltage / overcurrent detection, lacks real-time algorithm monitoring of battery state (such as SOC, SOH) and communication link abnormalities, and is prone to charging failure or safety accidents due to occasional faults (such as data packet loss, poor contact). In view of the above problems, the existing technology needs to be improved. SUMMARY
[0003] In view of the deficiencies in the prior art, the purpose of the present application is to provide a Type-C interface of a power tool battery pack supporting bidirectional fast charging and a communication control method thereof.
[0004] To achieve the above purpose, the present application provides the following technical scheme: a Type-C interface of a power tool battery pack supporting bidirectional fast charging, comprising
[0005] Type-C physical interface: a 24-pin interface conforming to the USB Type-C 2.1 standard, multiplexing the following pin functions:
[0006] 1) CC1 / CC2 pin: for device role identification, initial power negotiation and custom asynchronous serial communication;
[0007] 2) VBUS pin: bidirectional power transmission channel, supporting multiple voltage grades of 5V / 9V / 12V / 15V / 20V and power output within 100W;
[0008] 3) D+ / D- pin: compatible with USB 2.0 data transmission (for firmware upgrade or debugging);
[0009] 4) SBU1 / SBU2 pin: extended low-rate auxiliary communication, transmitting internal state data such as battery pack single cell voltage and internal resistance;
[0010] Bidirectional DC-DC converter: connected between the VBUS pin and the battery cell group, using a 1MHz Buck-Boost topology, supporting dynamic adjustment of power transmission direction according to the device role (buck when charging, boost when discharging), input / output ripple ≤50mV, maximum support 100W power conversion;
[0011] State detection module: includes:
[0012] 1) Voltage sampling circuit: using a 16-bit ADC, accuracy ±1%, real-time acquisition of VBUS bus voltage and cell group total voltage;
[0013] 2) Hall current sensor: accuracy ±0.5%, sampling frequency 1kHz, monitoring charging / discharging current;
[0014] 3) NTC temperature sensor: accuracy ±0.5℃, placed on the surface of the cell group and the key position of the PCB, sampling frequency 1Hz;
[0015] Main control MCU: integrated ARM Cortex-M0+ core, built-in USB PD 3.0 protocol stack, coupled with CC1 / CC2 pins, bidirectional DC-DC converter and state detection module, used for role recognition, power negotiation, state synchronization and algorithm detection;
[0016] Protection circuit: including N-channel enhancement mode MOSFET (on-resistance ≤10mΩ), over-voltage protection (OVP, threshold 5.5V), over-current protection (OCP, threshold 120% negotiation current), over-temperature protection (OTP, threshold 55℃) and short-circuit protection (SCP, response time ≤10μs) modules, controlled by the MCU to shut down power transmission.
[0017] In some embodiments, the role recognition logic of the CC1 / CC2 pins includes the following:
[0018] a) Charging mode judgment: when the MCU detects that any CC pin is grounded through a 5.1kΩ pull-down resistor, it determines that the battery pack is a slave device and enters the charging state;
[0019] b) Discharge mode judgment: when the MCU detects that any CC pin is connected to 3.3V through a 10kΩ pull-up resistor, it determines that the battery pack is a master device and enters the discharging state;
[0020] c) Unknown device detection: if no standard resistor is detected, the MCU sends a 1kHz, 50% duty cycle pulse signal through the CC pin, and if a matching pulse is received from the opposite end within 100ms, it enters the custom device negotiation process.
[0021] In some embodiments, the control logic of the bidirectional DC-DC converter is:
[0022] Charging mode: MCU adjusts the duty cycle of the Buck-Boost converter according to the negotiated charging voltage, and reduces the VBUS voltage to the charging voltage allowed by the battery pack;
[0023] Discharging mode: MCU adjusts the duty cycle of the Boost-Buck converter according to the requested voltage of the powered device, and boosts the battery pack voltage to the negotiated output voltage.
[0024] In some embodiments, the sampling data of the state detection module is buffered in the on-chip RAM of the MCU, and the sampling frequency is synchronized with the algorithm processing period (1kHz voltage / current data for real-time protection, 1Hz temperature data for state estimation).
[0025] In some embodiments, the self-checking function of the master MCU: after power-on, it automatically detects the connectivity of the state detection module, protection circuit and Type-C interface. If a fault is detected, it enters "safety lock mode", which only allows recovery through a specific reset operation.
[0026] To achieve the above purpose, the application also provides the following technical scheme: a communication control method for a Type-C interface of a power tool battery pack supporting bidirectional fast charging, according to the Type-C interface of the power tool battery pack, comprising the following steps:
[0027] a) Role identification: the master MCU judges whether the battery pack is a slave device (charging) or a master device (discharging) through the level or pulse signal of CC1 / CC2 pins;
[0028] b) Power negotiation:
[0029] Charging mode: the battery pack sends the supported charging protocol and maximum accepted power through the CC pin, and the charger returns the matching charging voltage / current;
[0030] Discharging mode: the battery pack sends the maximum output power and supported discharging protocol (customized extension protocol) through the CC pin, and the powered device returns the requested power;
[0031] c) State synchronization:
[0032] Charging mode: the slave device feeds back the SOC (state of charge, accuracy ±2%), SOH (state of health, accuracy ±3%), current temperature and abnormal flag to the master device every 100ms;
[0033] Discharging mode: the master device feeds back the remaining available capacity (accuracy ±5%), output voltage ripple (<50mV) and temperature to the slave device every 100ms;
[0034] d) Algorithm detection and protection: full-cycle safety control is achieved through data verification, state estimation, and anomaly detection.
[0035] In some embodiments, the algorithm detection in step d) includes:
[0036] ① Data verification: CRC-16 verification is used for all data frames transmitted through the CC pin. If the receiving end fails to verify for three consecutive times, it triggers "communication failure protection" and cuts off the power transmission.
[0037] ② State estimation: SOC is estimated using the extended Kalman filter (EKF) algorithm, which combines the ampere-hour integration method and the open circuit voltage (OCV) method. The state equation is based on the battery equivalent circuit model (Thevenin model), and the observation equation integrates voltage and current sampling data. The SOC estimation error is ≤3%.
[0038] ③ Anomaly detection:
[0039] Charging anomaly: monitor voltage jump (VBUS fluctuation >20% within 10ms), current surge (charging current exceeds negotiated value by 50% within 50ms), temperature gradient anomaly (temperature difference between three NTC sensors on the surface of the cell group >5℃);
[0040] Discharge anomaly: monitor load surge (discharge current drops from 10A to 2A within 100ms), voltage drop (output voltage is 10% lower than the negotiated value for 50ms);
[0041] When an anomaly is detected, the MCU immediately triggers protection and sends an error code through the CC pin.
[0042] In some embodiments, the charging mode state synchronization in step c) includes:
[0043] If the battery pack detects SOC ≥95% or SOH ≤80%, it sends a "terminate charging" flag, and the charger stops outputting;
[0044] If the charger detects VBUS voltage anomaly (e.g., exceeding 5V), it sends a "charging failure" instruction, and the battery pack cuts off the charging circuit.
[0045] In some embodiments, the discharge mode state synchronization in step c) includes:
[0046] If the host device requests power exceeds the rated output of the battery pack, the battery pack sends a "power insufficient" flag, and the host device adjusts the load;
[0047] If the battery pack detects discharge current >110% of the rated value or temperature >50℃, it immediately cuts off the discharge circuit and sends an "overcurrent / overtemperature" error code, and the host device displays a fault prompt.
[0048] In some embodiments, the communication control method further comprises a fault recovery mechanism:
[0049] Transient fault (such as current spike caused by load mutation): after the fault disappears (100 ms of normal detection in a row), automatically restore communication and power transmission;
[0050] Permanent fault (such as SOC estimation deviation > 10% caused by cell damage): manual reset of the battery pack (5s long press of the power key) or the opposite end device (restart of the charger / power receiver) is required, and after the error flag is cleared, the role identification and power negotiation are re-executed.
[0051] Compared with the prior art, the application has the beneficial effects that: bidirectional power transmission and data communication are realized through the Type-C physical interface, the charging and discharging direction is dynamically adjusted in combination with the bidirectional DC-DC converter, and the full-cycle safety control is realized in cooperation with the state detection module and the protection circuit, and the application has the advantages of being compatible with general Type-C devices, realizing bidirectional intelligent charging and discharging, and improving the safety monitoring capability.
[0052] The details of one or more embodiments of the present application are presented in the following drawings and description to make the other features, purposes and advantages of the present application more clear, concise and easy to understand, and to make the present application more fully described and understood through the embodiments of the present application. BRIEF DESCRIPTION OF DRAWINGS
[0053] Fig. 1 The schematic diagram of the module connection of the present application is shown in the figure;
[0054] Fig. 2 The flow chart of the method of the present application is shown in the figure;
[0055] Fig. 3 The algorithm detection flow chart of the present application is shown in the figure. DETAILED DESCRIPTION
[0056] The technical solutions in the embodiments of the present application will be described clearly and completely in the following with reference to the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative labor are within the protection scope of the present application.
[0057] In traditional power tool battery pack systems, the specialized interface leads to limited compatibility of charging devices, which cannot establish bidirectional power transmission with universal Type-C devices, and the unidirectional charging architecture restricts the functional expansion of the battery pack as a mobile power supply. The closed communication protocol makes the charging process lack dynamic power negotiation capability, which cannot adjust power transmission parameters in real time based on the battery state, and the hardware protection mechanism cannot effectively identify data link anomalies and cell level faults, resulting in reduced system safety margin.
[0058] For example, in outdoor work scenarios, users need to carry a dedicated charger and a mobile power supply device at the same time. When the power tool battery pack runs out of power, it cannot be charged in an emergency through a universal Type-C power bank. In the reverse power supply scenario, the battery pack cannot supply power to low-power devices, limiting the ability of devices to work together. During the charging process, due to the lack of digital communication protocol, the charger cannot obtain the temperature gradient distribution data of the cell group in real time, and when the local cell overheats, the hardware protection circuit may trigger a false action due to response delay, causing the charging to be interrupted.
[0059] If the above problems are not solved, the physical incompatibility of the specialized interface and the universal device will significantly reduce the adaptability of the charging scene, and the unidirectional power transmission architecture will limit the functional reuse value of the battery pack. The closed communication protocol makes the charging process unable to achieve dynamic power optimization based on the battery health state, exacerbating the aging rate of the cell group. The detection blind spot of the hardware protection mechanism for soft faults such as data packet loss and contact impedance anomalies may cause overvoltage and overcurrent protection failure, and then lead to the risk of cell thermal runaway.
[0060] In the face of the above problems, the present application first explores the possibility of using a universal physical interface to address the lack of interface compatibility. The traditional specialized interface cannot interoperate with Type-C devices, so the present application considers reusing the pin functions of the standard Type-C interface to achieve bidirectional power transmission by redefining the communication protocol. For the limitations of the unidirectional charging architecture, the present application studies the bidirectional DC-DC topology structure, which dynamically adjusts the voltage conversion direction to meet the charging and discharging requirements. In terms of closed communication protocol, the present application attempts to combine digital communication protocol with analog signal detection to expand the data transmission capability using existing pins. Regarding the deficiency of insufficient safety detection, the present application designs a multi-dimensional state detection system, integrates high-precision sensors and real-time algorithm processing mechanisms, and realizes the cooperative control of hardware protection and software monitoring.
[0061] For this purpose, as Figs. 1 to 3As shown, the present application proposes: a power tool battery pack Type-C interface supporting bidirectional fast charging, including a Type-C physical interface: a 24-pin interface conforming to the USB Type-C 2.1 standard, multiplexing the following pin functions: CC1 / CC2 pins for device role identification, initial power negotiation, and custom asynchronous serial communication; VBUS pin as a bidirectional power transmission channel, supporting multiple voltage and power outputs; D+ / D- pins compatible with USB 2.0 data transmission; SBU1 / SBU2 pins extending low-rate auxiliary communication, transmitting battery pack internal state data; a bidirectional DC-DC converter connected between the VBUS pin and the battery pack cell group, adopting a Buck-Boost topology, supporting dynamic adjustment of power transmission direction, with input and output ripple controlled within a set threshold; a state detection module containing a voltage sampling circuit, a Hall current sensor, and an NTC temperature sensor, respectively collecting bus voltage, charging and discharging current, and temperature data; a master MCU integrating an ARM Cortex-M0+ core, with a built-in USB PD 3.0 protocol stack, coupled with CC1 / CC2 pins, bidirectional DC-DC converter, and state detection module; a protection circuit containing MOSFET, over-voltage protection, over-current protection, over-temperature protection, and short-circuit protection modules, controlled by the MCU to shut off power transmission.
[0062] Among them, the Type-C physical interface refers to a 24-pin interface conforming to the USB Type-C 2.1 standard, which can be implemented by multiplexing CC1 / CC2, VBUS, D+ / D-, and SBU1 / SBU2 pin functions, solving the compatibility problem caused by the specialization of traditional power tool battery pack interfaces. Among them, the bidirectional DC-DC converter refers to a power conversion module connected between the VBUS pin and the battery pack cell group, which can be implemented by a 1MHz Buck-Boost topology to dynamically adjust the direction of bidirectional power transmission, solving the limitation that traditional battery packs cannot support bidirectional charging and discharging. Among them, the state detection module refers to a data acquisition unit containing a voltage sampling circuit, a Hall current sensor, and an NTC temperature sensor, which can be implemented by a 16-bit ADC, a ±0.5% precision Hall sensor, and a ±0.5℃ precision temperature sensor to achieve high-precision real-time monitoring, solving the problem of insufficient safety detection in traditional solutions. Among them, the master MCU refers to a control unit integrating an ARM Cortex-M0+ core and a USB PD 3.0 protocol stack, which can execute protocol communication and algorithm control by coupling CC pins, bidirectional DC-DC converter, and state detection module, solving the problem of dynamic power adjustment failure caused by the lack of digital communication capability in traditional solutions. Among them, the protection circuit refers to a hardware module containing N-channel enhancement MOSFET and multiple protection mechanisms, which can quickly shut off power transmission by OVP, OCP, OTP, and SCP functions, solving the safety hazard of insufficient response speed of traditional hardware fuse protection.
[0063] The core innovation of the present application is to realize the bidirectional power interaction between the electric tool battery pack and the general Type-C device through the combination design of Type-C physical interface and bidirectional DC-DC converter, and to construct an intelligent battery system supporting dynamic power negotiation, real-time state synchronization and multi-dimensional safety protection by combining a high-precision state detection module and a protocolized master MCU.
[0064] The working process and principle of the present application are as follows: the Type-C physical interface adopts a standard 24-pin design, and multiple pins are multiplexed to realize multifunction. The CC1 / CC2 pins are used for device role identification and power negotiation, and the resistance value is detected to determine the charging or discharging mode. The VBUS pin is used as a bidirectional power transmission channel and supports multi-voltage output. The D+ / D- pins are compatible with USB 2.0 data transmission. The SBU1 / SBU2 pins extend low-rate communication and transmit internal battery state data.
[0065] The bidirectional DC-DC converter adopts a Buck-Boost topology and is connected with the VBUS pin and the battery cell group. In the charging mode, the VBUS voltage is stepped down to the cell charging voltage; in the discharging mode, the cell voltage is stepped up to the negotiated output voltage. The converter operating frequency is 1 MHz, the input and output ripple is controlled within 50 mV, and the maximum power conversion is supported up to 100 W.
[0066] The state detection module includes a voltage sampling circuit, a Hall current sensor and an NTC temperature sensor. The voltage sampling circuit uses a 16-bit ADC with an accuracy of ±1% and real-time acquisition of VBUS and cell group voltage. The Hall current sensor has an accuracy of ±0.5% and a sampling frequency of 1 kHz for monitoring the charging and discharging current. The NTC temperature sensor has an accuracy of ±0.5℃ and is arranged on the surface of the cell group and the key positions of the PCB with a sampling frequency of 1 Hz.
[0067] The master MCU integrates an ARM Cortex-M0+ core, a built-in USB PD 3.0 protocol stack, and is connected with the CC pin, DC-DC converter and state detection module. The MCU performs functions such as role identification, power negotiation, state synchronization and algorithm detection.
[0068] The protection circuit includes MOSFET, OVP, OCP, OTP and SCP modules. The MOSFET on-resistance is ≤10 mΩ. The OVP threshold is 5.5 V, the OCP threshold is 120% of the negotiated current, the OTP threshold is 55℃, and the SCP response time is ≤10 μs. The protection circuit is controlled by the MCU and shuts off the power transmission in abnormal conditions.
[0069] The working process of each module is as follows: the MCU identifies the device role through the CC pin, and negotiates the power. The state detection module collects voltage, current and temperature data in real time, and the MCU controls the DC-DC converter to adjust the power transmission parameters according to these data, and executes the algorithm detection. When an abnormality is detected, the MCU triggers the protection circuit to cut off the power transmission. The whole process realizes the cooperative control of bidirectional fast charging, intelligent protection and state monitoring.
[0070] As a preferred embodiment, the scheme of the application is implemented as follows: the Type-C physical interface adopts a standard 24-pin design, wherein the CC1 / CC2 pins are connected to the GPIO port of the MCU through an internal resistance network. The VBUS pin is connected to the input end of the bidirectional DC-DC converter after passing through an ESD protection circuit. The D+ / D- pins are connected to the USB interface of the MCU through a USB transceiver. The SBU1 / SBU2 pins are connected to the UART interface of the MCU after passing through a level conversion circuit.
[0071] The bidirectional DC-DC converter adopts a synchronous rectification Buck-Boost topology, and the main switch tube adopts a GaN device to improve the efficiency. The control circuit adopts a digital control mode, and the PWM signal is generated by the MCU. LC filter circuits are arranged at the input and output ends to suppress the ripple.
[0072] In the state detection module, the voltage sampling circuit adopts a resistance division + operational amplifier buffering mode, and the ADC adopts a Texas Instruments ADS1115 chip. The Hall current sensor adopts an Allegro ACS712 chip. The NTC temperature sensor adopts an EPCOS B57861S series. The analog outputs of these sensors are connected to the ADC port of the MCU after passing through a signal conditioning circuit.
[0073] The main control MCU adopts an ST STM32L071 series, which has a built-in 512 KB Flash and 128 KB RAM. The peripheral circuit includes a 32.768 kHz low-speed crystal oscillator and a 16 MHz high-speed crystal oscillator, as well as a reset and debugging interface.
[0074] In the protection circuit, the MOSFET adopts an Infineon IPT015N10N5 chip. The OVP / OCP / OTP protection is realized by an analog comparator, and the SCP protection is realized by a special protection IC. The trigger signal of the protection circuit is connected to the interrupt port of the MCU, and directly controls the gate of the MOSFET.
[0075] The MCU firmware adopts the FreeRTOS operating system to realize multi-task concurrent processing. The USB PD protocol stack adopts the open-source FUSB302 stack, which is customized and modified to support custom messages. The algorithm part is realized by C language, including Kalman filtering, fault detection and other modules.
[0076] Through the above scheme, the application realizes the compatibility of the electric tool battery pack and the general Type-C device, solves the problem of charging device limitation caused by the traditional special interface. The application of the bidirectional DC-DC converter and the digital communication protocol enables the battery pack to have bidirectional power transmission capability, and expands the function as a mobile power supply. The multi-dimensional state detection and real-time algorithm processing mechanism improve the safety of the charging process, effectively identify the data link exception and the cell level fault. These improvements significantly improve the charging flexibility, functional diversity and use safety of the battery pack, and overcome the shortcomings of the traditional scheme in compatibility, function expansion and safety protection.
[0077] In some of the above schemes of the application, when the host MCU performs role recognition through the CC pin, the traditional method only relies on fixed resistance detection to judge the device role, which cannot effectively identify non-standard devices or scenarios with resistance deviation, resulting in insufficient compatibility or misjudgment risk.
[0078] The application further proposes a CC pin role recognition scheme including the following logic: charging mode judgment: when the MCU detects that any CC pin is grounded through a 5.1kΩ pull-down resistor, it is determined that the battery pack is a slave device, and enters the charging state; discharging mode judgment: when the MCU detects that any CC pin is connected to 3.3V through a 10kΩ pull-up resistor, it is determined that the battery pack is a master device, and enters the discharging state; unknown device detection: if no standard resistor is detected, the MCU sends a 1kHz, 50% duty cycle pulse signal through the CC pin, and if a matching pulse is received from the opposite end within 100ms, it enters the custom device negotiation process.
[0079] Among them, the charging mode judgment uses a 5.1kΩ pull-down resistor as a slave device identification mark, which matches the standard of the USB PD specification; the discharging mode judgment uses a 10kΩ pull-up resistor as a master device identification mark, which is set higher than the pull-up resistor value of the standard power supply device to avoid confusion with conventional chargers; the unknown device detection uses a 1kHz pulse signal as a handshake protocol, and the pulse duty cycle is set to 50% to balance the signal recognition sensitivity and anti-interference ability, and the 100ms timeout window ensures fast response.
[0080] Specifically, when the battery pack is connected to an external device, the master MCU first scans the CC pin level state. If a voltage division value formed by a 5.1kΩ pull-down resistor is detected on the CC pin, the charging mode is triggered immediately, and the PD protocol negotiation process is started. If a voltage division value formed by a 10kΩ pull-up resistor is detected on the CC pin, the discharging mode is activated, and the power supply state configuration is entered. When an abnormal resistance value is detected, the MCU switches to the active detection mode, periodically sends a 1kHz square wave signal and monitors the reflected pulse. If a response pulse that meets the phase relationship is captured within 100ms, a custom communication link is established, and extended protocol parameters are transmitted through the SBU pin. This identification mechanism combines hardware resistance detection and software protocol detection to dynamically determine the role of the device, while being compatible with standard devices and customized devices, avoiding power transmission interruptions caused by interface adaptation problems.
[0081] As a preferred embodiment, the scheme of the application is implemented as follows:
[0082] The role identification logic of the CC1 / CC2 pin includes the following steps:
[0083] Charging mode judgment: The master MCU samples the CC1 and CC2 pin voltages through the internal ADC. When the voltage of any CC pin is detected to be 0.25V, it is determined that the pin is grounded through a 5.1kΩ pull-down resistor, and the battery pack enters the slave device charging state.
[0084] Discharging mode judgment: The master MCU samples the CC1 and CC2 pin voltages through the internal ADC. When the voltage of any CC pin is detected to be 1.65V, it is determined that the pin is connected to 3.3V through a 10kΩ pull-up resistor, and the battery pack enters the master device discharging state.
[0085] Unknown device detection: If the CC1 and CC2 pin voltages do not meet the above conditions, the MCU configures the GPIO output mode, sends a 1kHz, 50% duty cycle square wave signal through the CC1 pin. At the same time, configure the CC2 pin as input mode, start a 100ms timer. If a matching 1kHz square wave signal is detected on the CC2 pin before the timer expires, it is determined to be a custom device, and the negotiation process is entered.
[0086] Through the above technical scheme, the application realizes the compatible connection of the battery pack with various devices. Through accurate voltage detection and pulse signal interaction, the charger, powered device or custom device can be reliably identified, avoiding safety hazards caused by incorrect connection. At the same time, the custom device detection mechanism reserves an interface for future expansion of new devices, improving the compatibility and scalability of the system.
[0087] In some of the above schemes of the present application, the bidirectional DC-DC converter needs to dynamically adjust the power transmission direction according to the device role, but in actual application, if the converter duty cycle cannot be accurately adjusted according to the negotiated charging voltage or the requested voltage of the powered device, it may lead to reduced power transmission efficiency or device damage.
[0088] The present application further proposes that the control logic of the bidirectional DC-DC converter is: in the charging mode, the MCU adjusts the duty cycle of the Buck-Boost converter according to the negotiated charging voltage, and reduces the VBUS voltage to the charging voltage allowed by the battery pack; in the discharging mode, the MCU adjusts the duty cycle of the Boost-Buck converter according to the requested voltage of the powered device, and boosts the battery pack voltage to the negotiated output voltage.
[0089] Among them, the Buck-Boost converter adopts a step-down topology in the charging mode, and reduces the 5V / 9V / 12V / 15V / 20V multi-voltage input by VBUS to the charging voltage range of the battery pack through adjusting the duty cycle. The Boost-Buck converter adopts a step-up topology in the discharging mode, and boosts the nominal voltage of the battery pack to the voltage step requested by the powered device. The duty cycle adjustment is based on the PWM control module built-in the MCU, and the adjustment accuracy can reach 0.1%, ensuring that the output voltage ripple is ≤50mV. The charging voltage allowed range is set according to the chemical type of the battery pack, for example, the lithium battery pack is set to 3.0-4.2V / cell, and the nickel-hydrogen battery pack is set to 1.0-1.5V / cell.
[0090] Specifically, in the charging mode, the MCU calculates the target step-down ratio and generates the corresponding PWM duty cycle signal after obtaining the voltage value of the charger output through the USB PD protocol. For example, when the charger outputs 20V, if the battery pack needs to be charged at 16V, the duty cycle is adjusted to 80%. In the discharging mode, the MCU analyzes the voltage request of the powered device, for example, 12V output demand, when the battery pack voltage is 10.8V, the duty cycle is adjusted to 90% to realize step-up. The converter working frequency is fixed at 1MHz, the inductance volume is reduced through high-frequency switching, and the conversion efficiency is improved to more than 95% through synchronous rectification technology. During voltage adjustment, the state detection module feedbacks the VBUS voltage and the battery pack voltage in real time, forming a closed-loop control to compensate for the voltage deviation caused by load fluctuation.
[0091] As a preferred embodiment, the scheme of the application is implemented as follows: the bidirectional DC-DC converter adopts a synchronous rectification Buck-Boost topology structure, including four N-channel MOSFET switches, one inductor and two capacitors. In the charging mode, the MCU adjusts the switching timing and duty cycle of the MOSFET according to the negotiated charging voltage, and reduces the VBUS voltage to the allowed charging voltage of the battery pack. For example, when the VBUS is 20V and the battery pack charging voltage is 16.8V, the Buck-Boost converter works in Buck mode, and the duty cycle is set to 84%. In the discharging mode, the MCU adjusts the switching timing and duty cycle of the MOSFET according to the requested voltage of the powered device, and boosts the battery pack voltage to the negotiated output voltage. For example, when the battery pack voltage is 14.4V and the output voltage needs to be 20V, the Buck-Boost converter works in Boost mode, and the duty cycle is set to 72%. The switching frequency of the converter is set to 1MHz to reduce the ripple and improve the efficiency.
[0092] Through the above technical scheme, the application realizes bidirectional power transmission between the battery pack and the external device. In the charging mode, it can be flexibly adjusted according to the output voltage of different chargers, improving the charging compatibility. In the discharging mode, it can power devices of various voltage levels, expanding the application scenarios of the battery pack. At the same time, the high-frequency Buck-Boost topology structure ensures high efficiency and low ripple of voltage conversion, improving the energy utilization rate of the overall system.
[0093] In some of the above schemes of the application, the state detection module collects battery pack operation data through multiple types of sensors, but the difference in sampling frequency of different sensors causes mismatch in data processing period, which may cause real-time protection delay or state estimation error, and frequent data access operations increase the MCU computing load, affecting the system response speed.
[0094] The application further proposes that the sampling data of the state detection module is buffered in the on-chip RAM of the MCU, and the sampling frequency is synchronized with the algorithm processing period, 1kHz voltage / current data is used for real-time protection, and 1Hz temperature data is used for state estimation.
[0095] Among them, the voltage sampling circuit collects VBUS bus and battery pack voltage at a frequency of 1kHz through a 16-bit ADC, and the data is directly stored in the circular buffer area of the RAM; the Hall current sensor monitors the charging and discharging current at the same frequency, and the sampling value and the voltage data form a real-time data set. The NTC temperature sensor collects the surface temperature of the battery and the PCB temperature at a frequency of 1Hz, and the data is stored in a separate storage area of the RAM. The MCU scheduler reads the voltage and current data at a period of 1ms and reads the temperature data at a period of 1s, realizing the time alignment of sampling and processing period.
[0096] Specifically, the voltage and current data are collected, cached and processed in each 1ms processing cycle to ensure that the overvoltage or overcurrent event can trigger the protection action within 10ms. The temperature data is collected and stored in each 1s cycle, and is input into the state estimation algorithm after being filtered by the sliding average filter. The data cache adopts a double buffering mechanism, and when the front buffer area receives new sampling data, the rear buffer area provides the MCU for reading and processing to avoid the risk of data coverage. The RAM allocation strategy physically isolates the high-frequency data area from the low-frequency data area to prevent memory access conflicts. The synchronization mechanism is realized by a timer interrupt, and the ADC conversion triggers DMA transmission to the specified RAM address, and the current sensor data is written synchronously through the SPI interface. The voltage and current data processing delay is reduced to less than 1ms, the temperature data storage space is reduced by 90%, and the CPU utilization of the MCU is reduced by 15%.
[0097] As a preferred embodiment, the scheme of the application is implemented as follows:
[0098] The sampling data collected by the state detection module is cached in the on-chip RAM of the master MCU. The voltage and current data are sampled at a frequency of 1kHz for real-time protection. The temperature data is sampled at a frequency of 1Hz for state estimation.
[0099] In specific implementation, the master MCU uses an STM32L071KB chip with 20KB of built-in RAM. The voltage sampling data occupies 4 bytes, the current sampling data occupies 4 bytes, and the temperature sampling data occupies 2 bytes. The amount of data generated per second is: (4+4)1000+21=8002 bytes
[0100] The MCU saves the sampling data of the last 10 seconds in the circular buffer, which occupies a total of: 8002*10=80020 bytes≈78.14KB
[0101] Considering that the RAM also needs to store other runtime data, the buffer size can be set to 64KB, which can store about 8 seconds of sampling data.
[0102] The sampling data storage adopts a double buffering mechanism:
[0103] Buffer A is used for data collection
[0104] Buffer B is used for data processing
[0105] The roles of the two buffers are exchanged every 500ms
[0106] This mechanism can ensure that data collection and processing do not interfere with each other and improve the real-time performance of the system.
[0107] The real-time protection algorithm is executed every 1 ms, and the latest voltage and current data are read to make overvoltage and overcurrent judgments. The state estimation algorithm is executed every 1 s, and the sampling data in 500 ms are read to calculate SOC and SOH.
[0108] Through the above technical solutions, the application realizes efficient management and utilization of sampling data. The sampling frequency is synchronized with the algorithm processing period, which can ensure the real-time and effectiveness of the data. The high-frequency sampling of 1 kHz provides sufficient data support for real-time protection, while the low-frequency temperature sampling of 1 Hz balances the calculation overhead and precision requirements. The double buffering mechanism further improves the real-time response capability of the system, so that data acquisition and processing can be performed in parallel, avoiding the problems of data loss or processing delay. This data management method provides a reliable data basis for subsequent protection algorithms and state estimation algorithms, which helps to improve the safety and reliability of the battery management system.
[0109] In some of the above schemes of the application, the main control MCU may cause system misoperation due to abnormal hardware modules or poor interface contact during operation. The traditional scheme does not set a power-on self-test mechanism, and there is a risk of cascading protection failure caused by uninitialization failure.
[0110] The application further proposes a self-checking function of the main control MCU: after power-on, the connectivity of the state detection module, the protection circuit and the Type-C interface is automatically detected. If a fault is detected, the safe lock mode is entered, and only a specific reset operation is allowed to recover.
[0111] The connectivity detection of the state detection module includes sending a standard test current signal to the Hall current sensor, and if the feedback current value deviates from the preset value by more than ±1%, it is determined to be abnormal; the protection circuit detection is performed by driving the MOSFET for 10 ms conduction test, and if the conduction voltage drop exceeds 0.1 V, it is determined to be invalid; the Type-C interface detection uses the CC pin to send a 0.5 V test level, and if the receiving end level fluctuation exceeds ±5%, it is determined to be poor contact. When the safe lock mode is activated, the MCU will cut off the enable signal of the bidirectional DC-DC converter, and lock the MOSFET of the protection circuit to the off state. The specific reset operation needs to meet the double verification of physical key pressing for 5 seconds and reset command sent by external equipment at the same time.
[0112] Specifically, the power-on self-test process is executed synchronously in the system initialization phase. First, the open-circuit voltage of the battery pack is read by the voltage sampling circuit. If the voltage value is out of the range of 2.5-4.2V per cell, the battery pack is marked as abnormal. Then, a 1A test current is injected into the Hall sensor, and the ADC conversion data is collected synchronously to verify the linearity. Finally, a test pulse is sent through the CC pin to verify the interface impedance characteristics. When the NTC sensor is detected to be open-circuit or the MOSFET gate drive is detected to be invalid, the MCU immediately freezes the PWM output and records the fault code to the non-volatile memory. In the safety lock mode, all power transmission channels are cut off by hardware, and only the 3.3V standby power is maintained to indicate the fault state, effectively preventing accidental activation of the battery pack in abnormal state. This mechanism reduces the probability of system malfunction caused by undetected faults to less than 0.1% through the double protection of hardware detection and software verification.
[0113] As a preferred embodiment, the scheme of the present application is implemented as follows:
[0114] After power-on, the master MCU automatically executes the self-test program. The self-test program first detects the function of the state detection module, including the voltage sampling circuit, the Hall current sensor, and the NTC temperature sensor. The MCU verifies the working state of each sensor by sending a test signal to the sensor and reading the return value.
[0115] Next, the MCU detects the connectivity of the protection circuit. The MCU sends a switching signal to the MOSFET and verifies the conduction state of the MOSFET by sampling the VBUS voltage change. The MCU also sends an analog trigger signal to the over-voltage protection, over-current protection, and over-temperature protection modules to detect whether they can respond normally and cut off the circuit.
[0116] Finally, the MCU detects the connectivity of the Type-C interface. The MCU sends a test pulse through the CC1 / CC2 pin and detects whether a matching response signal can be received at the D+ / D- pin.
[0117] If any module or circuit is detected to be faulty during the self-test process, the MCU will immediately enter the "safety lock mode". In this mode, all charging and discharging functions are disabled, and only the most basic power display function is retained. At this time, only through a specific reset operation can the lock state be released. For example, the user needs to press the power key and the mode switching key at the same time for 5 seconds, and the MCU detects the operation to re-execute the self-test program and try to restore the normal working state.
[0118] Through the technical solution, the application realizes the comprehensive self-checking function of the battery pack, improves the reliability and safety of the system. By automatically detecting the working state of the key module at each start, potential hardware faults can be found in time, and system abnormalities or safety hazards caused by local faults can be avoided. At the same time, the design of the "safety lock mode" ensures that the system can immediately enter a safe state when a fault is detected, preventing more serious damage caused by the continued operation of faulty components. The specific reset operation mechanism provides a way for users to troubleshoot and recover the system while ensuring safety.
[0119] In some of the above schemes of the application, a structure design of a power tool battery pack Type-C interface supporting bidirectional fast charging is proposed. However, in the process of realizing bidirectional power transmission and communication, there are problems such as unclear device role switching, lack of dynamic adjustment mechanism for power negotiation, untimely state data synchronization, and incomplete safety detection algorithm coverage, which result in the inability to effectively compatible multiple scene applications and guarantee the safety of the whole cycle operation.
[0120] The application further proposes a communication control method of a power tool battery pack Type-C interface supporting bidirectional fast charging, including the following steps: role identification, power negotiation, state synchronization, and algorithm detection and protection.
[0121] Among them, the role identification judges the device role by detecting the level or pulse signal of the CC pin, detects the 5.1kΩ pull-down resistor in the charging mode, detects the 10kΩ pull-up resistor in the discharging mode, and uses a 1kHz duty cycle of 50% pulse signal for unknown device detection and matching response; the power negotiation sends the charging protocol and the maximum accepted power in the charging mode, and sends the output power and the extended protocol in the discharging mode; the state synchronization transmits the SOC, SOH, temperature and abnormal flag with a period of 100ms, the device feedbacks the battery state in the charging mode, and the host device feedbacks the output parameters in the discharging mode; the algorithm detection and protection realizes safety control through data verification, state estimation and abnormality detection, the data verification uses CRC-16 verification and triggers communication fault protection, the state estimation uses an extended Kalman filter algorithm to fuse the ampere-hour integration method and the open circuit voltage method, and the abnormality detection covers voltage jump, current jump and temperature gradient monitoring.
[0122] Specifically, the master MCU executes role recognition logic after the device is connected. If a 5.1kΩ pull-down resistor is detected on the CC pin, the charging mode is activated, the USB PD 3.0 protocol supported charging parameters are sent through the CC pin, and the charger returns the matching voltage and current values. If a 10kΩ pull-up resistor is detected, the discharging mode is activated, and the battery pack sends the maximum output power of the custom extension protocol, and the powered device returns the request value. During state synchronization, the battery pack sends SOC, SOH and temperature data to the charger every 100ms in charging mode, and triggers the termination charging instruction when SOC≥95% or SOH≤80%. In discharging mode, the battery pack receives the remaining capacity and output voltage ripple feedback from the powered device, and sends a power insufficient flag when the request power is out of limit. Algorithm detection and protection ensure communication data integrity through CRC-16 check, and immediately cut off power transmission if three consecutive checks fail. The extended Kalman filter algorithm estimates SOC based on the Thevenin model by fusing voltage and current data, with an error control within 3%. The abnormality detection module monitors voltage fluctuation, current mutation and temperature gradient in real time, and triggers the protection mechanism and sends an error code when the VBUS voltage fluctuation exceeds 20% or the cell temperature difference is greater than 5℃.
[0123] As a preferred embodiment, the scheme of the application is implemented as follows:
[0124] The communication control method of the power tool battery pack Type-C interface supporting bidirectional fast charging includes the following steps:
[0125] Role recognition: The master MCU determines whether the battery pack is a slave device or a master device through the level or pulse signal of the CC1 / CC2 pin. Specifically, the MCU detects the CC pin voltage. If a 5.1kΩ pull-down resistor is detected, it is determined as a slave device entering the charging state. If a 10kΩ pull-up resistor is detected, it is determined as a master device entering the discharging state. If no standard resistor is detected, the MCU sends a 1kHz, 50% duty cycle pulse signal, and enters the custom device negotiation if a matching pulse is received within 100ms.
[0126] Power negotiation: In charging mode, the battery pack sends the supported charging protocol and maximum accepted power through the CC pin, such as PD3.0 protocol, 100W maximum power. The charger returns the matching charging voltage / current, such as 20V / 5A. In discharging mode, the battery pack sends the maximum output power and supported discharging protocol, and the powered device returns the request power.
[0127] State synchronization: In charging mode, the slave device feeds back SOC, SOH, current temperature and abnormality flag to the master device every 100ms. For example, SOC 75%, SOH 95%, temperature 35℃, no abnormality. In discharging mode, the master device feeds back the remaining available capacity, output voltage ripple and temperature to the slave device every 100ms.
[0128] Algorithm detection and protection: full-cycle safety control is realized through data verification, state estimation and anomaly detection. Data verification adopts CRC-16 algorithm, and communication failure protection is triggered when data verification fails for three times in succession. State estimation adopts EKF algorithm to estimate SOC by integrating ampere-hour method and OCV method. Anomaly detection includes multiple indexes such as voltage jump, current mutation and temperature gradient anomaly.
[0129] Through the above technical solutions, the bidirectional fast charging function of the electric tool battery pack is realized, and the charging flexibility is improved. Dynamic power adjustment and real-time state synchronization are realized through digital communication, and the intelligent degree of the charging process is enhanced. The charging safety is improved by adopting multiple algorithm detection mechanisms, and the charging failure or safety accidents caused by accidental faults are effectively prevented.
[0130] In some solutions of the application, the safety control of the battery pack is realized through the state detection module and the main control MCU. However, there are problems of lack of data integrity verification, insufficient state estimation accuracy and imperfect anomaly detection mechanism in the data communication process, which may cause false protection or delayed response due to communication errors or algorithm deviation.
[0131] The application further proposes an algorithm detection scheme comprising the following steps: data verification adopts CRC-16 verification, and communication failure protection is triggered when the receiving end fails three times in succession; state estimation adopts extended Kalman filter algorithm to integrate ampere-hour method and open circuit voltage method, and SOC estimation is realized based on Thevenin model; anomaly detection includes voltage jump, current mutation and temperature gradient anomaly monitoring in charging mode, and load mutation and voltage drop monitoring in discharging mode, and protection is triggered and error code is sent when anomaly is detected.
[0132] Among them, CRC-16 verification adopts polynomial 0x8005 to generate 16-bit check code, and the check code is attached before data frame transmission, and the receiving end calculates the check result in real time through a shift register. The extended Kalman filter algorithm constructs a state equation based on the equivalent circuit model of the battery cell, takes the voltage and current sampling values as observation inputs, and updates the SOC estimation value through iteration prediction and correction. Multiple threshold values are set for anomaly detection: the voltage jump threshold is set to fluctuate more than 20% of the nominal value within 10ms, the current mutation threshold is set to exceed 50% of the negotiated value within 50ms, and the temperature gradient anomaly threshold is set to the temperature difference of three sensors on the surface of the battery cell group exceeding 5℃.
[0133] Specifically, in the charging mode, the host MCU performs CRC check every time it receives a frame of data, and if the check fails for three consecutive times, the power transmission is cut off to avoid incorrect data causing control logic disorder. In the SOC estimation process, the algorithm is based on real-time collected voltage and current data, calculates the polarization voltage and ohmic voltage drop through the Thevenin model, and combines the ampere-hour integration method to accumulate the electric quantity, and finally outputs the SOC value with an error of ≤3%. The abnormality detection module runs voltage, current and temperature monitoring threads in parallel, and when it detects that the VBUS voltage drops from 20V to 16V within 10ms, it immediately triggers the overvoltage protection and sends error code 0x01 to the charger. In the discharging mode, if the output voltage drops from 12V to 10.8V within 50ms, the MCU cuts off the MOSFET within 10μs and sends error code 0x02 to the powered device, while saving the fault log to the non-volatile memory.
[0134] As a preferred embodiment, the scheme of the application is implemented as follows:
[0135] The algorithm detection includes three parts: data verification, state estimation and abnormality detection.
[0136] The data verification adopts the CRC-16 verification algorithm. A 16-bit CRC verification code is appended at the end of each data frame transmitted through the CC pin. The receiving end performs CRC-16 calculation on the received data and compares it with the received verification code. If the verification fails for three consecutive times, the "communication fault protection" mechanism is triggered to immediately cut off the power transmission.
[0137] The state estimation adopts the extended Kalman filter (EKF) algorithm. The state equation is established based on the Thevenin equivalent circuit model, including state variables such as SOC and polarization voltage. The observation equation integrates voltage and current sampling data. The algorithm is iterated every 1ms, and the SOC estimation value is updated according to the prediction and correction steps. At the same time, it is corrected by combining the open circuit voltage method, and the final SOC estimation error is controlled within 3%.
[0138] The abnormality detection is divided into two types: charging abnormality and discharging abnormality. The charging abnormality detection includes: 1) voltage jump detection: VBUS voltage is sampled every 10ms, and if the difference between the adjacent two sampling voltages exceeds 20% of the current voltage, it is determined to be abnormal. 2) Current sudden change detection: average charging current is calculated every 50ms, and if it exceeds 50% of the negotiated value, it is determined to be abnormal. 3) Temperature gradient detection: read the temperature of three NTC sensors every 1s, and if the maximum temperature difference exceeds 5℃, it is determined to be abnormal.
[0139] The discharge anomaly detection includes: 1) load mutation detection: the average discharge current is calculated every 100 ms, and if it decreases from 10 A to below 2 A, it is determined to be abnormal. 2) Voltage drop detection: the output voltage is sampled every 50 ms, and if it is continuously below the negotiated value of 10%, it is determined to be abnormal.
[0140] When any anomaly is detected, the MCU immediately triggers the protection mechanism, cuts off the power transmission, and sends the corresponding error code through the CC pin.
[0141] Through the above technical solutions, the present application realizes real-time monitoring and protection of the whole process of battery charging and discharging. The data verification mechanism effectively prevents misoperation caused by communication errors. The state estimation algorithm improves the accuracy of SOC estimation, providing a reliable basis for charging and discharging management. Multi-dimensional anomaly detection timely discovers potential safety hazards and avoids dangerous situations such as overcharging and overdischarging. This significantly improves the safety and reliability of the battery pack and prolongs the service life of the battery.
[0142] In some of the above schemes of the present application, there is a lack of effective termination condition and fault feedback mechanism in the charging mode state synchronization process, which may lead to overcharging of the battery or failure to timely handle the charger end voltage anomaly, posing a safety hazard.
[0143] The present application further proposes that in the charging mode state synchronization, if the battery pack detects SOC≥95% or SOH≤80%, a terminate charging flag is sent to make the charger stop outputting; if the charger detects that the VBUS voltage exceeds 5V, a charging fault instruction is sent to make the battery pack cut off the charging circuit.
[0144] The threshold of SOC≥95% is set based on the inflection point characteristics of the lithium battery charging curve to prevent capacity overestimation caused by polarization effect; the threshold of SOH≤80% corresponds to the critical point of battery capacity decay to the initial value, avoiding deep discharge accelerating aging. The VBUS voltage anomaly detection uses a window comparator circuit, which triggers protection when the bus voltage exceeds the 5.5V reference. The terminate charging flag uses the Alert Message format in the USB PD protocol, containing a 2-byte error code field.
[0145] Specifically, during the charging process, the state detection module collects the total voltage of the battery cell group through a 16-bit ADC every 100 ms, and combines the ampere-hour integration method to calculate the SOC value. When the SOC reaches 95%, the main control MCU sends a PD control message containing an error code 0x0012 through the CC pin, triggering the charger to enter the Soft Reset state. For SOH judgment, the MCU calls the historical cycle count data and the current resistance measurement value, and generates an SOH alarm flag when the capacity attenuation exceeds 20%. The charger end uses a differential amplifier to monitor the VBUS voltage to ground, and when a threshold of 5V is detected, a Manchester encoded fault instruction is sent through the SBU1 pin, and the battery pack protection circuit turns off the MOSFET switch within 10μs. This mechanism cooperates with the dynamic voltage regulation function of the bidirectional DC-DC converter, and can cut off the energy transmission path at the initial stage of voltage anomaly, avoiding irreversible damage caused by the blowing of hardware fuses.
[0146] As a preferred embodiment, the scheme of the application is implemented as follows: in the charging mode, the main control MCU obtains the SOC value and the battery health status SOH value corresponding to the total voltage of the battery cell group through the state detection module in real time. When the SOC value reaches 95%, the main control MCU sends a state data frame containing a "terminate charging" flag to the charger through the CC pin, and the charger stops the VBUS voltage output immediately after receiving the flag. If the health status SOH of the battery cell group decreases to 80% due to cycle aging, the main control MCU also triggers the terminate charging process. At the same time, the voltage monitoring circuit inside the charger continuously detects the VBUS bus voltage, and when the VBUS voltage exceeds 5V, a communication message containing a "charging fault" instruction is sent through the CC pin, and the battery pack main control MCU controls the MOSFET of the protection circuit to disconnect the charging circuit after receiving the instruction.
[0147] Through the above technical scheme, the application realizes dynamic safety control of the charging process, effectively prevents capacity attenuation or thermal runaway risk of the battery caused by overcharging, and at the same time, quickly responds to external power supply equipment abnormalities through a bidirectional communication mechanism, avoids irreversible damage to the internal circuit of the battery caused by abnormal voltage, and significantly improves the safety and system reliability of the charging process.
[0148] In some of the above schemes of the application, the battery pack in the discharge mode may cause safety hazards due to the request power of the main device exceeding the rated output or the occurrence of overcurrent and overtemperature of the battery pack itself. The existing scheme lacks a dynamic power adjustment and abnormal fast response mechanism for the discharge process, which cannot terminate abnormal discharge or notify the main device to adjust the load in time.
[0149] The application further proposes that, in the discharge mode state synchronization process, if the master device requests power exceeds the rated output of the battery pack, the battery pack sends a "power insufficient" flag, and the master device adjusts the load; if the battery pack detects that the discharge current is 110% of the rated value or the temperature is 50°C, the discharge circuit is immediately cut off and a "overcurrent / overtemperature" error code is sent, and the master device displays a fault prompt.
[0150] The monitoring of the power requested by the master device is realized by the master MCU analyzing the power request data received by the CC pin, and the rated output value of the battery pack is stored in the on-chip Flash of the MCU; the detection of the discharge current uses a Hall current sensor to sample in real time and compare with the preset 110% rated current threshold, and the temperature detection is realized by arranging an NTC sensor on the surface of the cell group, and the temperature data is transmitted to the MCU at a sampling frequency of 1 Hz; the transmission of the error code is based on a custom asynchronous serial communication protocol, and a 16-bit data frame containing the error type and severity level is transmitted through the CC pin.
[0151] Specifically, in the discharge mode, after the master MCU receives the power request of the master device through the CC pin, it compares it with the rated output power of the battery pack in real time. When it detects that the requested power exceeds the rated value, the MCU generates a "power insufficient" flag and sends it to the master device through the CC pin, triggering the load adjustment logic of the master device. At the same time, the MCU continuously monitors the discharge current data provided by the Hall current sensor and the temperature data of the NTC sensor. If the discharge current exceeds 110% of the rated value or the temperature reaches 50°C, the MCU immediately controls the MOSFET in the protection circuit to shut down the discharge circuit and sends an error code containing the error type (overcurrent or overtemperature) and the timestamp through the CC pin. After receiving the error code, the master device analyzes and displays the corresponding fault prompt information, such as feedbacking the abnormal state through the LED indicator or the display screen. In this process, the detection accuracy of the current and temperature is guaranteed by the ±0.5% accuracy of the Hall sensor and the ±0.5°C accuracy of the NTC sensor, respectively, ensuring the reliability of the abnormality judgment; the transmission of the error code uses CRC-16 check to avoid misjudgment caused by communication interference. In this way, the battery pack realizes real-time monitoring and rapid protection of load abnormalities and internal states during discharge, effectively preventing device damage or safety accidents caused by overloading or overheating.
[0152] As a preferred embodiment, the scheme of the application is implemented as follows: when the power tool battery pack is powered as a master device to power a powered device, the master MCU continuously monitors the discharge current and the surface temperature of the battery cell group. If it is detected that the discharge current reaches 110% of the rated value 15A, i.e. 16.5A, or the temperature measured by any one of the three NTC sensors exceeds 50°C, the MCU immediately controls the MOSFET in the protection circuit to break the discharge circuit, and sends a hexadecimal error code containing the error type and the fault timestamp through the CC pin. After receiving the error code, the powered device displays the prompt information "overcurrent protection triggered" or "temperature abnormality" on the display screen, and stops obtaining power from the battery pack. After troubleshooting, the operator needs to press the battery pack power key for 5 seconds to clear the error flag, and the system re-executes the role recognition and power negotiation process.
[0153] Through the above technical scheme, the application realizes rapid response and visual feedback of abnormal state in the discharge process, effectively avoiding the risk of battery cell damage caused by overcurrent or overheating. Through the mechanism of actively cutting off the discharge circuit and error information synchronization, the problems of lagging protection action and non-transparent fault cause in the traditional scheme are solved, and the safety and reliability of the collaborative work between devices are improved.
[0154] In some of the above schemes of the application, the power tool battery pack has the problem of single recovery strategy in the fault recovery process. The existing technology cannot distinguish between transient faults and permanent faults, which may cause the system to frequently trigger the protection mechanism due to transient interference, or cause safety hazards when blindly recovering from permanent faults.
[0155] The application further proposes a fault recovery mechanism, including the handling of transient faults and permanent faults. After the transient fault disappears, the communication and power transmission are automatically restored after 100 ms of continuous detection; the permanent fault needs to be manually reset by the battery pack or the opposite device, and the error flag is cleared to re-execute the role recognition and power negotiation.
[0156] Among them, the transient fault is defined as a current spike caused by a sudden change in load, and a 100 ms continuous detection window is set to determine whether the fault has disappeared. The permanent fault is defined as a deviation of more than 10% in SOC estimation caused by battery cell damage, which needs to be reset by pressing the power key for 5 seconds or restarting the device. The automatic recovery mechanism uses a loop detection logic to reinitialize the communication link and power transmission channel after the fault disappears. The manual reset operation forcibly clears the error flag memory and triggers the system self-checking process.
[0157] Specifically, when detecting a current spike caused by a load mutation, the current sensor monitors the current rate of change within 50 ms in real time. If the current value returns to the normal range within 100 ms and remains stable, the MCU removes the protection state and restores power transmission. For SOC estimation deviation caused by cell damage, the system compares the estimation results of the ampere-hour integration method and the open-circuit voltage method, and locks the system when the deviation exceeds 10%. At this time, the user needs to trigger the hardware reset circuit by pressing the physical button for 5 seconds, or restart the charger / power receiver to clear the error state. After the reset operation is performed, the system re-executes the role recognition protocol, sends the device capability declaration through the CC pin, and re-negotiates the power parameters based on the latest state data. This mechanism implements differentiated management by distinguishing fault types, avoiding false protection caused by transient interference, and ensuring operational safety in the case of permanent failure.
[0158] As a preferred embodiment, the scheme of the application is implemented as follows: when a permanent failure of more than 10% SOC estimation deviation of the cell group is detected, the battery pack master MCU writes a fault flag into the non-volatile memory and cuts off all power transmission paths. At this time, the user needs to press the physical power button on the battery pack shell for more than 5 seconds to trigger the hardware reset signal to clear the fault flag; if the fault source is abnormal communication at the power receiver end, the power supply module of the power receiver needs to be restarted to send a negotiation request again. After the reset operation is completed, the system re-executes the CC pin level detection process, and if a valid pull-up or pull-down resistor signal is detected, it enters the standard charging or discharging mode, and if the detection fails for three consecutive times, it triggers the safety lock again.
[0159] Through the above technical scheme, the application can effectively distinguish between transient interference and device failure, reduce unnecessary manual intervention, and ensure safety. For occasional communication packet loss or current spike problems, the system maintains power transmission continuity through an automatic recovery mechanism; for irreversible failures such as cell aging or hardware damage, forced manual reset operation can prevent the device from running repeatedly in an abnormal state. At the same time, the active error code reporting mechanism enables users or maintenance personnel to quickly locate the fault type, significantly improving device maintenance efficiency.
[0160] The above embodiments only express several implementation manners of the application, and the description is more specific and detailed, but it cannot be understood as a limitation on the scope of the patent. It should be noted that for ordinary skilled persons in the art, without departing from the concept of the application, some modifications and improvements can be made, which are within the protection scope of the application. Therefore, the protection scope of the patent of the application should be subject to the appended claims.
[0161] While embodiments of the application have been shown and described, it is to be understood that the embodiments described are merely exemplary of the principles and application of the present application. Numerous modifications and adaptions can be effected without departing from the spirit and scope of the present application, which is not limited to the exact construction and arrangement described. It is intended, therefore, to cover all modifications and adaptions that fall within the scope of the claims and their equivalents.
Claims
1. A power tool battery pack Type-C interface supporting bidirectional fast charging, characterized in that: Comprise Type-C physical interface: 24-pin interface conforming to USB Type-C 2.1 standard, multiplexing the following pin functions: 1) CC1 / CC2 pins: used for device role identification, initial power negotiation, and custom asynchronous serial communication; 2) VBUS pin: bidirectional power transmission channel, supporting multiple voltage grades of 5V / 9V / 12V / 15V / 20V and power output within 100W; 3) D+ / D- pins: compatible with USB 2.0 data transmission (used for firmware upgrade or debugging); 4) SBU1 / SBU2 pins: extended low-rate auxiliary communication, transmitting internal state data such as battery pack cell voltage and internal resistance; Bidirectional DC-DC converter: connected between the VBUS pin and the battery pack cell group, using a 1MHz Buck-Boost topology, supporting dynamic adjustment of power transmission direction (buck when charging, boost when discharging) according to the device role, input / output ripple ≤50mV, maximum supporting 100W power conversion; State detection module: 1) Voltage sampling circuit: using a 16-bit ADC with an accuracy of ±1%, real-time acquisition of VBUS bus voltage and cell group total voltage; 2) Hall current sensor: accuracy ±0.5%, sampling frequency 1kHz, monitoring charging / discharging current; 3) NTC temperature sensor: accuracy ±0.5℃, placed on the surface of the cell group and key positions on the PCB, sampling frequency 1Hz; Master MCU: integrated ARM Cortex-M0+ core, built-in USB PD 3.0 protocol stack, coupled with CC1 / CC2 pins, bidirectional DC-DC converter, and state detection module, used for role identification, power negotiation, state synchronization, and algorithm detection; Protection circuit: including N-channel enhancement mode MOSFET (on-resistance ≤10mΩ), over-voltage protection (OVP, threshold 5.5V), over-current protection (OCP, threshold 120% negotiated current), over-temperature protection (OTP, threshold 55℃), and short-circuit protection (SCP, response time ≤10μs) modules, controlled by the MCU to shut down power transmission.
2. The power tool battery pack Type-C interface supporting bidirectional fast charging according to claim 1, wherein: The role identification logic of the CC1 / CC2 pins includes the following: a) Charging mode determination: when the MCU detects that any CC pin is grounded through a 5.1kΩ pull-down resistor, it determines that the battery pack is a slave device and enters the charging state; b) Discharging mode determination: when the MCU detects that any CC pin is connected to 3.3V through a 10kΩ pull-up resistor, it determines that the battery pack is a master device and enters the discharging state; c) Unknown device detection: if no standard resistor is detected, the MCU sends a 1kHz, 50% duty cycle pulse signal through the CC pin, and if a matching pulse is received from the opposite end within 100ms, it enters the custom device negotiation process.
3. The power tool battery pack Type-C interface supporting bidirectional fast charging of claim 1, wherein: The control logic of the bidirectional DC-DC converter is: Charging mode: the MCU adjusts the duty cycle of the Buck-Boost converter according to the negotiated charging voltage, reducing the VBUS voltage to the allowable charging voltage of the cell group; Discharge mode: MCU adjusts the duty cycle of the Boost-Buck converter according to the request voltage of the powered device to boost the voltage of the battery pack to the negotiated output voltage.
4. The power tool battery pack Type-C interface supporting bidirectional fast charging of claim 1, wherein: The sampling data of the state detection module is buffered in the on-chip RAM of the MCU, and the sampling frequency is synchronized with the algorithm processing period (1 kHz voltage / current data for real-time protection, 1 Hz temperature data for state estimation).
5. The power tool battery pack Type-C interface supporting bidirectional fast charging of claim 1, wherein: The self-checking function of the master MCU: after power-on, it automatically detects the connectivity of the state detection module, protection circuit and Type-C interface. If a fault is detected, it enters the "safety lock mode" and only allows recovery through a specific reset operation. 6.A communication control method of a power tool battery pack Type-C interface supporting bidirectional fast charging, the power tool battery pack Type-C interface according to any one of claims 1-5, characterized in that: Comprising the following steps: a) Role identification: the master MCU determines whether the battery pack is a slave device (charging) or a master device (discharging) through the level or pulse signal of CC1 / CC2 pins; b) Power negotiation: Charging mode: the battery pack sends the supported charging protocol and maximum accepted power through the CC pin, and the charger returns the matching charging voltage / current; Discharge mode: the battery pack sends the maximum output power and supported discharge protocol (customized extension protocol) through the CC pin, and the powered device returns the request power; c) State synchronization: Charging mode: the slave device feeds back the SOC (state of charge, accuracy ±2%), SOH (state of health, accuracy ±3%), current temperature and abnormal flag to the master device every 100ms; Discharge mode: the master device feeds back the remaining available capacity (accuracy ±5%), output voltage ripple (<50mV) and temperature to the slave device every 100ms; d) Algorithm detection and protection: realize full-cycle safety control through data verification, state estimation and abnormality detection.
7. The communication control method of claim 6, wherein the method further comprises: The algorithm detection in step d) includes: ① Data verification: all data frames transmitted through the CC pin are verified by CRC-16, and the receiving end triggers "communication fault protection" and cuts off power transmission if 3 consecutive verification failures occur; ② State estimation: uses the Extended Kalman Filter (EKF) algorithm to estimate SOC by integrating the ampere-hour method and the open circuit voltage (OCV) method, the state equation is based on the battery equivalent circuit model (Thevenin model), and the observation equation is fused with voltage and current sampling data, with SOC estimation error ≤3%; ③ Abnormality detection: Charging abnormality: monitor voltage jump (VBUS fluctuation >20% within 10ms), current surge (charging current exceeds negotiated value by 50% within 50ms), temperature gradient anomaly (temperature difference between 3 NTC sensors on the surface of the battery pack >5℃); Discharge anomaly: monitor load surge (discharge current drops from 10A to 2A within 100ms), voltage drop (output voltage is lower than the negotiated value by 10% for 50ms); When an anomaly is detected, the MCU immediately triggers protection and sends an error code through the CC pin.
8. The communication control method of claim 6, wherein the method further comprises: The charging mode state synchronization in step c): If the battery pack detects that SOC ≥95% or SOH ≤80%, it sends a "terminate charging" flag, and the charger stops outputting; If the charger detects that the VBUS voltage is abnormal (such as exceeding 5V), it sends a "charging fault" instruction, and the battery pack cuts off the charging circuit.
9. The communication control method of claim 6, wherein the method further comprises: The discharge mode state synchronization in the step c) is as follows: If the power requested by the master device exceeds the rated output of the battery pack, the battery pack sends a "power shortage" flag, and the master device adjusts the load; If the battery pack detects that the discharge current is greater than 110% of the rated value or the temperature is greater than 50°C, the discharge circuit is immediately cut off and an "overcurrent / overtemperature" error code is sent, and the master device displays a fault prompt.
10. The communication control method of claim 6, wherein the method further comprises: It also includes a fault recovery mechanism: Transient fault (such as current spike caused by sudden load change): after the fault disappears (100 ms of normal detection in a row), automatically restore communication and power transmission; Permanent fault (such as SOC estimation deviation > 10% caused by cell damage): manual reset of the battery pack (5s long press of the power key) or the opposite device (restart of the charger / power receiver) is required, and after the error flag is cleared, the role identification and power negotiation are performed again.