Power supply system and method, battery management unit and electric vehicle
Through pin multiplexing and relay connection in the battery management unit, the identification of the controller's upper and lower lines and battery power control are achieved, solving the problems of increased complexity and cost during starting of electric vehicles in the prior art, and improving the efficiency and accuracy of battery management.
Patent Information
- Application Number
- CN202411742360.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-29
- Publication Date
- 2025-03-04
AI Technical Summary
In the prior art, when starting an electric vehicle, it is necessary to install a small battery in the instrument or add the pins of the battery management unit and the wiring harness on the instrument, resulting in increased complexity and cost.
By multiplexing the pins in the battery management unit, the first pin and the second pin are configured as pins of the universal input and output port function before the controller is launched, and connected to the negative pole of the battery through a relay, the battery management unit can identify the upper and lower lines of the controller and battery power control.
It realizes that the controller is accurately judged without increasing the complexity and cost of the equipment, and controls the output and shutdown of the battery power accordingly, improving the efficiency and accuracy of battery management.
Smart Images

Figure CN119560660A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of power supply control technology, and in particular to a power supply system, method, battery management unit and electric vehicle. Background Art
[0002] In the prior art, the following two methods are usually used to start an electric vehicle: a small battery is installed on the instrument of the electric vehicle. The function of the small battery is to provide a temporary power supply for the instrument, so that when you need to ride the electric vehicle, you first start the instrument, and then transmit the power-on command to the battery through the instrument, so that the battery outputs power; the second method is to pull a control power-on line from the instrument to the battery. When you need to start the instrument, the instrument power button triggers the power-on line, and the battery management unit executes the corresponding power-on process and outputs power. In the first method of the prior art, the small battery in the instrument will be damaged or the power will be exhausted, so the small battery needs to be replaced and maintained. The second method requires additional pins to be added to the battery management unit and a new wiring harness to the instrument, which increases complexity and cost. Summary of the invention
[0003] In view of this, the embodiments of the present application provide a power supply system, method, battery management unit and electric vehicle, which can realize pin multiplexing of the first pin, the second pin of the battery management unit and the third pin and the fourth pin of the controller, and the battery management unit can identify whether the controller is online or offline.
[0004] In a first aspect, an embodiment of the present application provides a power supply system, including:
[0005] Battery management units, batteries and controllers;
[0006] The battery management unit comprises a first pin and a second pin;
[0007] The controller includes a third pin, a fourth pin and a relay;
[0008] The normally closed contact of the relay is connected to the fourth pin, and the other end of the relay is connected to the negative electrode of the battery;
[0009] When the controller is not connected to the battery management unit, the first pin and the second pin are configured as pins for realizing a general input and output port function; the level of the first pin is configured as a high level state, and the battery management unit detects that the first pin is a high level; the level of the second pin is configured as a low level state; and the normally closed contact of the relay remains closed;
[0010] After the controller is connected to the battery management unit, the first pin is connected to the fourth pin; the second pin is connected to the third pin;
[0011] The first pin, the second pin, the third pin and the fourth pin are serial communication pins.
[0012] In some embodiments, the first pin is a communication sending pin of the battery management unit; the second pin is a communication receiving pin of the battery management unit; the third pin is a communication sending pin of the controller, and the fourth pin is a communication receiving pin of the controller.
[0013] In a second aspect, an embodiment of the present application provides a power supply control method, which is applied to the above-mentioned power supply system, and the method includes:
[0014] When the battery management unit does not control the battery to supply power to the controller, real-time monitoring of the level state of the first pin;
[0015] If the level state of the first pin changes from the high level state to the low level state, controlling the battery to supply power to the controller;
[0016] If the level state of the first pin changes from the low level state to the high level state after the battery supplies power to the controller, determining whether the level state change complies with a preset rule;
[0017] If yes, it is determined that the controller is online; wherein, after the controller receives the power output by the battery, the controller configures the third pin and the fourth pin as pins for implementing a serial communication function, and configures the third pin to the high level state;
[0018] The first pin and the second pin are configured as pins for implementing a serial communication function.
[0019] In some embodiments, determining whether the level state change complies with a preset rule includes:
[0020] After the first pin changes from the high level state to the low level state, determining a first holding time for the first pin to maintain the low level state, and after the first pin changes from the low level state to the high level state, determining a second holding time for the first pin to maintain the high level state;
[0021] If the first holding time and the second holding time are both greater than or equal to a preset time, it is determined that the controller is online.
[0022] In some embodiments, after controlling the battery to supply power to the controller, the method further includes:
[0023] Obtain a power-on response instruction sent by the controller; wherein the power-on response instruction is a response instruction for the controller to open the normally closed contact of the relay after obtaining the power output by the battery.
[0024] In a third aspect, an embodiment of the present application provides a method for stopping power supply control, the method is a control method for stopping power supply after power supply based on the above-mentioned power supply control method, the method comprising:
[0025] monitoring the level state of the second pin in real time;
[0026] If the level state of the second pin changes from the high level state to the low level state, it is determined that the low level state of the second pin meets a preset rule;
[0027] If so, it is determined that the controller is offline, and the battery is controlled to stop supplying power to the controller.
[0028] In some embodiments, determining whether the low level state of the second pin meets a preset rule includes:
[0029] Determining a third holding time for the second pin to maintain a low level state;
[0030] If the third holding time is greater than or equal to the preset time, it is determined that the controller is offline.
[0031] In some embodiments, after controlling the battery to stop supplying power to the controller, the method further includes:
[0032] The first pin and the second pin are configured as pins for realizing a general input / output port function; and the level of the first pin is configured as a high level state, and the level of the second pin is configured as a low level state.
[0033] In a fourth aspect, an embodiment of the present application provides a battery management unit, which includes a processor and a memory, the memory stores a computer program, and the processor is used to execute the computer program to implement the above-mentioned power supply control method, or implement the above-mentioned power supply stop control method.
[0034] In a fifth aspect, an embodiment of the present application provides an electric vehicle, which includes the above-mentioned power supply system; the battery management unit in the power supply system is the above-mentioned battery management unit.
[0035] The embodiments of the present application have the following beneficial effects: before the controller is connected to the battery management unit, the first pin and the second pin are configured as pins for realizing the function of the general input and output port; the level of the first pin is configured as a high level state; the level of the second pin is configured as a low level state; and the normally closed contact of the relay is closed; after the controller is connected to the battery management unit, the level of the first pin changes from a high level state to a low level state. Through the change of the level state of the first pin, the battery management unit can know that the controller has been online, and then control the battery to power the controller. The level of the first pin will change from low to high again, confirming that the controller is online, and the battery management system controls the battery to continue to supply power to the outside. After the controller is offline, the battery management unit can directly determine that the controller is offline according to the change of the level state of the second pin, and then control the battery to stop supplying power to the controller. Further, after the controller is connected to the battery management unit and the battery has powered the controller, the first pin, the second pin, the third pin and the fourth pin are configured as pins for realizing the serial communication function, and then during the battery power supply process, the data interaction between the controller and the battery management unit is realized through these pins. BRIEF DESCRIPTION OF THE DRAWINGS
[0036] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required for use in the embodiments will be briefly introduced below. It should be understood that the following drawings only show certain embodiments of the present application and therefore should not be regarded as limiting the scope. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without paying creative work.
[0037] Figure 1 A first structural schematic diagram of a power supply system according to an embodiment of the present application is shown;
[0038] Figure 2 A second structural schematic diagram of a power supply system according to an embodiment of the present application is shown;
[0039] Figure 3 A first flow chart of the power supply control method according to an embodiment of the present application is shown;
[0040] Figure 4 A second flow chart of the power supply control method according to an embodiment of the present application is shown;
[0041] Figure 5 A first flow chart of a method for controlling power supply shutdown according to an embodiment of the present application is shown;
[0042] Figure 6 A second flow chart of the power supply shutdown control method according to an embodiment of the present application is shown.
[0043] Description of main component symbols:
[0044] 100-battery management unit; 200-battery; 300-controller; P1-first pin; P2-second pin; P3-third pin; P4-fourth pin; K-relay; DC-battery negative pole; DC+-battery positive pole. DETAILED DESCRIPTION
[0045] The technical solutions in the embodiments of the present application will be described clearly and completely below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, rather than all of the embodiments.
[0046] The components of the embodiments of the present application generally described and shown in the drawings herein may be arranged and designed in various configurations. Therefore, the following detailed description of the embodiments of the present application provided in the drawings is not intended to limit the scope of the application claimed for protection, but merely represents the selected embodiments of the present application. Based on the embodiments of the present application, all other embodiments obtained by those skilled in the art without making creative work belong to the scope of protection of the present application.
[0047] Hereinafter, the terms "including", "having" and their cognates that can be used in various embodiments of the present application are intended only to indicate specific features, numbers, steps, operations, elements, components or a combination of the foregoing items, and should not be understood as first excluding the existence of one or more other features, numbers, steps, operations, elements, components or a combination of the foregoing items or increasing the possibility of one or more features, numbers, steps, operations, elements, components or a combination of the foregoing items. In addition, the terms "first", "second", "third" and the like are only used to distinguish descriptions and cannot be understood as indicating or implying relative importance.
[0048] Unless otherwise defined, all terms (including technical terms and scientific terms) used herein have the same meanings as those generally understood by those skilled in the art to which the various embodiments of the present application belong. The terms (such as those defined in generally used dictionaries) will be interpreted as having the same meanings as the contextual meanings in the relevant technical field and will not be interpreted as having idealized meanings or overly formal meanings unless clearly defined in the various embodiments of the present application.
[0049] In conjunction with the accompanying drawings, some embodiments of the present application are described in detail below. In the absence of conflict, the following embodiments and features in the embodiments can be combined with each other.
[0050] UART communication (serial communication) is a widely used serial communication protocol, suitable for point-to-point asynchronous data transmission. It sends and receives data in serial mode through serial communication lines. Due to its low cost, high-speed data transmission and easy-to-use characteristics, it is widely used in many industries and fields. UART communication is also used in smart electric vehicles for data transmission.
[0051] The electric vehicle system includes: controller, instrument display system, battery management unit; the battery management unit is designed to monitor and manage the status of the battery or battery pack to ensure its safe and efficient operation. The main functions of the battery management unit (BMS) include battery voltage monitoring, current monitoring, temperature monitoring, battery balancing, charging control and discharge protection, etc. The controller is responsible for controlling the motor of the electric vehicle to make the electric vehicle move; the instrument display system obtains real-time battery data through UART communication and displays battery information, etc.
[0052] Among them, battery voltage monitoring means that the battery management unit will continuously monitor the voltage of each single cell in the battery pack to ensure that they remain within a safe operating range. If the voltage of a battery is abnormally high or low, the battery management unit will issue a warning signal or even stop the battery's charge and discharge operations to prevent overcharging or over-discharging. Current monitoring means that by monitoring the input and output current of the battery pack, the battery management unit can evaluate the charge and discharge status of the battery, which is very important to ensure that the battery is not damaged by excessive current. The battery management unit can also protect the battery from overload by limiting the current. Temperature monitoring means that the battery management unit monitors the temperature of the battery and takes measures when the temperature is too high or too low. For example, if the battery temperature is too high, the battery management unit may reduce the charge and discharge current to avoid thermal runaway. Battery balancing means that in the battery pack, the voltages between the individual cells may not be completely consistent. The battery management unit ensures that all batteries are in the same charge and discharge state by monitoring and adjusting the voltage of each single cell. This balance is crucial to extending the overall life of the battery pack. Charging control means that the battery management unit controls the charging process according to the state of the battery and the characteristics of the charger. For example, it will decide when to stop charging and select the appropriate charging mode (constant current charging or constant voltage charging) based on the battery's temperature and voltage. Discharge protection is that the battery management unit monitors the battery's discharge status to ensure that the battery is not permanently damaged due to excessive discharge. In addition, the battery management unit can also protect the battery from short circuits or other electrical faults by disconnecting the load.
[0053] There are two main ways to control the battery output power in the prior art. The first way is to build a small battery into the meter; the second way is to add a power-on line to the battery management unit on the meter. In the first way of the prior art, the small battery in the meter may be damaged or the power will be exhausted, so the small battery needs to be replaced and maintained. The second way requires additional pins to be added to the battery management unit and a new wiring harness to the meter, which increases complexity and cost.
[0054] Based on this, the present application proposes a power supply system, a control method, a battery management unit and an electric vehicle, so as to obtain the upper and lower lines of the controller in a timely and accurate manner without increasing the complexity and cost of the equipment, and then control the output of the battery power and shut down the battery output according to the upper and lower lines of the controller.
[0055] The power supply system is described below in conjunction with some specific embodiments.
[0056] For example, Figure 1 and Figure 2 As shown, the power supply system includes: a battery panel and a controller 300; the battery panel is used to control the output of battery power or control the shutdown of battery power output; wherein, the battery panel includes a battery 200 and a battery management unit 100; the battery management unit 100 is used to monitor and manage the status of the battery to ensure its safe and efficient operation, and control the battery power output and shut down the output, and the battery 200 is used to output power to the controller 300, so that the controller 300 drives the electric vehicle motor to rotate.
[0057] The battery management unit 100 is provided with a first pin P1 and a second pin P2; the controller 300 is provided with a relay K and a third pin P3 and a fourth pin P4; the normally closed contact of the relay K is connected to the fourth pin P4; the contact common end of the relay K is connected to the negative electrode DC- of the battery.
[0058] like Figure 1As shown, when the battery management unit 100 is not connected to the controller 300, the normally closed contact of the relay K is closed. Since the fourth pin P4 of the controller 300 is connected to the negative electrode DC- of the battery, the level of the fourth pin P4 of the controller 300 is pulled down to the level of DC- (the negative electrode DC- of the battery) through the normally closed contact of the relay K, that is, at this time, the controller 300 remains short-circuited with the battery. In addition, in order to facilitate the subsequent judgment of whether the controller 300 is online, when the controller 300 is not connected to the battery management unit 100, the first pin P1 and the second pin P2 are configured as pins for realizing the general input and output port (GPIO) function. After the first pin P1 and the second pin P2 are configured as pins for realizing the general input and output port (GPIO) function, the level of the first pin P1 is configured to be a high level state, and the level of the second pin P2 is configured to be a low level state, that is, before the controller 300 is connected to the battery management unit 100, the first pin P1 remains in a high level state, and the second pin P2 remains in a low level state. The high level state is different from the level state of the battery negative electrode DC-; the low level state is the same as the level state of the battery negative electrode DC-. When the battery management unit 100 is not connected to the controller 300, the third pin P3 and the fourth pin P4 are also pins for realizing the general input and output port (GPIO) function.
[0059] like Figure 2 As shown, when the controller 300 is connected to the battery management unit 100, the normally closed contact of the relay K is still closed at the beginning of the connection. At this time, a loop is formed between the first pin P1, the fourth pin P4, the relay K and the negative electrode DC- of the battery, so the level of the first pin P1 is pulled down to the negative electrode DC- of the battery, that is, the level state of the first pin P1 of the battery management unit 100 changes from the original high level state to the low level state; when the battery management unit 100 detects that the level state of the first pin P1 has changed, the battery is controlled to output power to the controller 300. At this time, if the level state of the controller 300 changes from the low level state to the high level state after the battery 200 supplies power to the controller 300, it means that the controller 300 is online; if after the level of the first pin P1 changes from the high level state to the low level state, and after the battery 200 supplies power to the controller 300, the level state of the first pin P1 does not change from the low level state to the high level state, it means that the controller may be damaged or the line is damaged.
[0060] After the controller 300 receives the power output by the battery, the controller 300 sends a power-on response to the battery management unit 100; wherein the power-on response is that the controller 300 controls the normally closed contact of the relay K to pop open. After the normally closed contact of the relay K pops open, since the level state of the first pin P1 is a low level state when the normally closed contact of the relay K is closed, after the normally closed contact of the relay K pops open, the first pin P1 is hard-pull released by the controller 300, and the level state of the first pin P1 changes to a high level state again. The battery management unit 100 detects that the level state of the first pin P1 changes from a high level state to a low level state, and then changes to a high level state again, and the battery management unit 100 determines that the controller 300 is powered on.
[0061] After the controller 300 obtains the power of the battery 200, the controller 300 configures the third pin P3 and the fourth pin P4 as pins for realizing the serial communication function (UART function); and after the battery management unit 100 determines that the controller 300 is powered, the battery management unit 100 also configures the first pin P1 and the second pin P2 as pins for realizing the serial communication function, and then after the controller 300 is online, the controller 300 and the battery management unit 100 can exchange data. In this way, the present embodiment can realize the multiplexing of the first pin P1, the second pin P2, the third pin P3 and the fourth pin P4, that is, the communication between the battery management unit 100 and the controller 300 can be realized through the first pin P1, the second pin P2, the third pin P3 and the fourth pin P4, and it can also realize the judgment of whether the controller 300 is online.
[0062] When the controller 300 is connected to the battery management unit 100, the first pin P1 is connected to the fourth pin P4; the second pin P2 is connected to the third pin P3; the first pin P1 and the fourth pin P4, and the second pin P2 and the third pin P3 can be connected through a communication line; in addition, the battery negative electrode DC- and the battery positive electrode DC+ are connected to the controller 300 through a power line.
[0063] When the controller 300 configures the third pin P3 and the fourth pin P4 as pins of a serial communication function (UART function), the controller 300 configures the third pin P3 to be in a high level state.
[0064] In some embodiments, the first pin P1, the second pin P2, the third pin P3, and the fourth pin P4 are pins for serial communication. When it is necessary to determine whether the controller 300 is online, the first pin P1, the second pin P2, the third pin P3, and the fourth pin P4 are configured as pins for implementing the GPIO function. After determining that the controller 300 is online, the first pin P1, the second pin P2, the third pin P3, and the fourth pin P4 can be restored to the pins for the serial communication function. Exemplarily, the first pin P1 can be a communication sending pin (TX pin) of the battery management unit 100, the second pin P2 can be a communication receiving pin (RX pin) of the battery management unit 100, the third pin P3 can be a communication sending pin (TX pin) of the controller 300, and the fourth pin P4 can be a communication receiving pin (RX pin) of the controller 300.
[0065] In some embodiments, based on the power supply system of the above embodiment, Figure 3 , the power supply control method of this embodiment is described.
[0066] like Figure 3 As shown, the power supply control method of this embodiment includes:
[0067] Step S100, monitoring the level state of the first pin in real time.
[0068] Step S200: If the level state of the first pin changes from a high level state to a low level state, the battery is controlled to supply power to the controller.
[0069] Step S300: if the level state of the first pin changes from a low level state to a high level state after the battery supplies power to the controller, it is determined whether the level state complies with a preset rule.
[0070] If the level status meets the preset rule, step S400 is executed to determine that the controller is online and continue to control the battery to supply power to the controller.
[0071] If it is determined that the level state does not meet the preset rule, step S600 is executed to determine that the controller is not online, and the control battery stops supplying power to the controller.
[0072] Since the first pin and the second pin are configured as pins for implementing the general input and output port (GPIO) function before the controller is connected to the battery management unit, it can be understood that if the first pin and the first pin in the battery management unit are serial communication pins themselves, then in this embodiment, the original serial communication pins are multiplexed for GPIO; if the first pin and the first pin in the battery management unit are not serial communication pins, then the first pin and the second pin are directly configured as GPIO functions.
[0073] In this embodiment, before the controller is connected to the battery management unit, the level of the first pin is configured to be in a high level state; the level of the second pin is configured to be in a low level state; and the normally closed contact of the relay is closed before the controller is connected to the battery management unit. In addition, before the controller is connected to the battery management unit, the normally closed contact of the relay is closed, and the fourth pin of the controller is connected to the negative electrode of the battery through the relay, that is, the controller is short-circuited with the negative electrode of the battery, and the level state of the fourth pin is pulled down to the negative electrode of the battery through the relay.
[0074] If the controller is online, that is, the controller is connected to the battery management unit, that is, the first pin is connected to the fourth pin, the second pin is connected to the third pin, and the normally closed contact of the relay is closed at this time, then a loop is formed between the first pin, the fourth pin, the relay and the negative electrode of the battery, and the level state of the first pin of the battery management unit is pulled down to the negative electrode of the battery, that is, the level state of the first pin changes from the original high level state to the low level state. After monitoring that the level state of the first pin changes from the original high level state to the low level state, the battery is controlled to supply power to the controller. After the battery supplies power to the controller, if the controller receives the battery power, the controller will pop open the normally closed contact of the relay. At this time, if the normally closed contact of the relay pops open, the level state of the first pin changes from the low level state to the high level state. If the high level state of the first pin is maintained for more than the preset time, it is determined that the controller is powered. If the level state of the first pin does not change from the low level state to the high level state after the battery supplies power to the controller, it may be that the controller is damaged or the circuit is damaged.
[0075] Therefore, in this embodiment, if you want to detect whether the controller is online, you can directly determine it by detecting the level state of the first pin in the battery management unit. If the level state of the first pin changes from the original high level state to the low level state, and then changes from the low level state to the high level state, the battery management unit considers that the controller is online.
[0076] In order to avoid inaccurate detection caused by a short-term change in the level state of the first pin due to circuit instability, this embodiment further determines whether the low level state of the first pin meets the preset rules after detecting that the level state of the first pin changes from the original high level state to the low level state, and after the first pin changes from the low level state to the high level state, determines whether the high level state of the first pin at this time meets the preset rules. If both meet the preset rules, it is determined that the controller is online, and then the battery management unit continues to control the battery to output power to the controller, so that the controller drives the electric vehicle motor to rotate.
[0077] In some embodiments, Figure 4 As shown, judging whether the level state meets the preset rules includes:
[0078] Step S310, after the first pin changes from a high level state to a low level state, determine a first holding time for the first pin to maintain a low level state, and after the first pin changes from a low level state to a high level state, determine a second holding time for the first pin to maintain a high level state.
[0079] Step S320: If the first holding time and the second holding time are both greater than or equal to the preset time, it is determined that the controller is online.
[0080] Among them, the preset time is set as needed (can be 1 second). If the first pin changes from a high level to a low level, the battery supplies power to the controller, and the controller pops open the normally closed contact, there will be a certain amount of time. Therefore, in order to ensure accuracy, it is necessary to ensure that the low level of the first pin is maintained for a preset time at this time, and after the first pin changes from a low level state to a high level state, the second holding time of the first pin maintaining a high level state is greater than or equal to the preset time, then it is determined that the controller is online; if the holding time does not reach the preset time, it is considered that the controller is not online.
[0081] Step S500: configuring the first pin and the second pin as pins for implementing a serial communication function.
[0082] After the controller is powered on, the controller configures the third pin and the fourth pin as pins for implementing the serial communication function; and after the battery management unit determines that the controller is online, it configures the first pin and the second pin as pins for implementing the serial communication function.
[0083] Among them, the first pin is configured as a sending pin, and the second pin is configured as a receiving pin; wherein the third pin is configured as a sending pin, and the fourth pin is configured as a receiving pin.
[0084] It can be understood that, since the first pin and the second pin are configured as pins for implementing the general purpose input and output port (GPIO) function before the controller goes online, after detecting that the controller goes online, data needs to be exchanged between the battery management unit and the controller, the first pin and the second pin of the battery management unit are reconfigured as pins for the serial communication function, and the third pin and the fourth pin of the controller are configured as pins for implementing the serial communication function, so as to facilitate data exchange between the battery management unit and the controller. It should be noted that if the first pin and the second pin, the third pin and the fourth pin are themselves pins for the serial communication function, then after detecting that the controller goes online, it is only necessary to restore the first pin and the second pin, the third pin and the fourth pin to the pins for the serial communication function.
[0085] In some embodiments, in order to determine that the controller has indeed obtained the power output by the battery, the method of this embodiment also includes: obtaining a power response instruction sent by the controller; wherein the power response instruction is a response instruction for opening the normally closed contacts of the relay after the controller obtains the power output by the battery.
[0086] It can be understood that after the controller obtains power, the controller controls the normally closed contacts of the relay to pop open, and the level state of the first pin of the battery management unit is restored to the high level state configured at the beginning (that is, from a low level state to a high level state). If the battery management unit detects that the level state of the first pin changes from a low level state to a high level state, it is determined that the controller is powered.
[0087] In this embodiment, pin multiplexing (i.e., the first pin, the second pin, the third pin, and the fourth pin can be used to implement the general input / output port function and the serial communication function) can detect whether the controller is online, and after detecting that the controller is online, the battery management unit controls the battery to output power to the controller. In addition, in this embodiment, pin multiplexing is used to determine whether the controller is online by detecting the change in the level state of the first pin, and no additional components are required to control the battery power output.
[0088] In some embodiments, after power is supplied based on the power supply control method of the above embodiment, Figure 5 , the power supply stopping control method of this embodiment is described.
[0089] like Figure 5 As shown, the power supply stopping control method of this embodiment includes:
[0090] Step S10, monitoring the level state of the second pin in real time.
[0091] Step S20: If the level state of the second pin changes from the high level state to the low level state, it is determined whether the low level state of the second pin meets a preset rule.
[0092] If the low level state meets the preset rule, step S30 is executed to determine that the controller is offline, and control the battery to stop supplying power to the controller.
[0093] If the low level state does not meet the preset rule, step S40 is executed to determine that the controller is not offline, and the control battery continues to supply power to the controller.
[0094] In the above embodiment, after the controller obtains the electric energy of the battery, the controller configures the third pin and the fourth pin as pins for the serial communication function, and the third pin is the sending pin (TX), the fourth pin is the receiving pin (RX), and the level state of the third pin is maintained at a high level state, that is, the level state of the third pin is maintained at a high level state, then the second pin of the battery management unit is also pulled up to a high level state by the level of the third pin of the controller; it can be understood that the level state of the second pin has been maintained at a low level state by the battery management unit, and after the level state of the third pin is changed to a high level state, the level state of the second pin is also changed to a high level state, that is, the level state of the second pin is changed from a low level state to a high level state, and after the controller is connected to the battery management unit, the level of the second pin is always maintained at a high level state.
[0095] If the battery management unit system detects that the level state of the second pin has changed during the process of the battery supplying power to the controller, that is, the level state of the second pin has changed from a high level state to a low level state, then the controller is considered to be offline, and the battery management unit controls the battery to stop supplying power to the controller, thereby ensuring that the battery has no voltage output when the controller is not online.
[0096] In some embodiments, in order to avoid inaccurate detection caused by short-term changes in the level state of the second pin due to circuit instability, after detecting that the level state of the second pin changes from a high level state to a low level state, this embodiment also determines whether the low level state of the second pin meets the preset rules. If it meets the preset rules, it is determined that the controller is indeed offline, and then the battery management unit can control the battery to stop outputting power to the controller.
[0097] In some embodiments, after the controller goes offline, that is, after the controller is disconnected from the battery management unit, the first pin and the second pin of the battery management unit are configured as pins for realizing the general input and output port function, and the level state of the first pin is configured as a high level state, and the level state of the second pin is configured as a low level state; and the controller controls the normally closed contact of the relay to be closed, so that the battery management unit can subsequently detect whether the controller is online.
[0098] like Figure 6 As shown, judging whether the low level state of the second pin meets the preset rule includes:
[0099] Step S21, determining a third holding time for the second pin to maintain a low level state.
[0100] Step S22: If the third holding time is greater than or equal to the preset time, it is determined that the controller is offline.
[0101] The preset time may be 1 second. If the second pin changes from a high level to a low level and maintains a low level for 1 second or longer, it is determined that the controller is offline.
[0102] In the embodiment of the present application, before the controller is connected to the battery management unit, the first pin and the second pin are configured as pins for realizing the function of the general input and output port; the level of the first pin is configured to be in a high level state; the level of the second pin is configured to be in a low level state; and the normally closed contact of the relay is closed; after the controller is connected to the battery management unit, the battery management unit can know that the controller has been online through the change of the level state of the first pin, that is, after the controller is online, the battery management unit can actively identify the controller in the embodiment of the present application, and then control the battery to power the controller. After the controller is offline, the battery management unit can directly determine that the controller is offline according to the change of the level state of the second pin, and then control the battery to stop powering the controller. Further, after the controller is connected to the battery management unit and the battery has powered the controller, the first pin, the second pin, the third pin and the fourth pin are configured as pins for the serial communication function, and then during the battery power supply process, the data interaction between the controller and the battery management unit is realized through these pins.
[0103] It can be understood that the options in the above embodiment are also applicable to this embodiment, so they will not be described again here.
[0104] The present application also provides a battery management unit, the battery management unit includes a processor and a memory, the memory stores a computer program, the processor is used to execute the computer program to implement the above-mentioned power supply control method, or the above-mentioned power supply stop control method. The present application also provides an electric vehicle, the electric vehicle includes the above-mentioned power supply system; the battery management unit in the power supply system is the above-mentioned battery management unit. In several embodiments provided in the present application, it should be understood that the disclosed device and method can also be implemented in other ways. The device embodiments described above are only schematic. For example, the flowcharts and structure diagrams in the accompanying drawings show the possible implementation architecture, functions and operations of the devices, methods and computer program products according to multiple embodiments of the present application. In this regard, each box in the flowchart or block diagram can represent a module, a program segment or a part of the code, and the module, program segment or a part of the code contains one or more executable instructions for implementing the specified logical function. It should also be noted that in an alternative implementation, the functions marked in the box can also occur in an order different from that marked in the accompanying drawings. For example, two consecutive boxes can actually be executed substantially in parallel, and they can sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each box in the structure diagram and / or flowchart, and combinations of boxes in the structure diagram and / or flowchart, can be implemented by a dedicated hardware-based system that performs the specified functions or actions, or can be implemented by a combination of dedicated hardware and computer instructions.
[0105] In addition, the functional modules or units in the various embodiments of the present application may be integrated together to form an independent part, or each module may exist separately, or two or more modules may be integrated to form an independent part.
[0106] If the function is implemented in the form of a software function module and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application can be essentially or partly embodied in the form of a software product that contributes to the prior art, and the computer software product is stored in a storage medium, including several instructions for a computer device (which can be a smart phone, a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a disk or an optical disk.
[0107] The above description is only a specific implementation manner of the present application, but the protection scope of the present application is not limited thereto. Any technician familiar with the technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application.
Claims
1. A power supply system, characterized in that: include: Battery management units, batteries and controllers; The battery management unit comprises a first pin and a second pin; The controller includes a third pin, a fourth pin and a relay; The normally closed contact of the relay is connected to the fourth pin, and the other end of the relay is connected to the negative electrode of the battery; When the controller is not connected to the battery management unit, the first pin and the second pin are configured as pins for realizing a general input and output port function; the level of the first pin is configured as a high level state; the level of the second pin is configured as a low level state; the normally closed contact of the relay is closed; After the controller is connected to the battery management unit, the first pin is connected to the fourth pin; the second pin is connected to the third pin; The first pin, the second pin, the third pin and the fourth pin are serial communication pins.
2. The power supply system according to claim 1, characterized in that: The first pin is a communication sending pin of the battery management unit; the second pin is a communication receiving pin of the battery management unit; the third pin is a communication sending pin of the controller, and the fourth pin is a communication receiving pin of the controller.
3. A power supply control method, characterized in that: The method is applied to the power supply system according to claim 1 or 2, and the method comprises: When the battery management unit does not control the battery to supply power to the controller, real-time monitoring of the level state of the first pin; If the level state of the first pin changes from the high level state to the low level state, controlling the battery to supply power to the controller; If the level state of the first pin changes from the low level state to the high level state after the battery supplies power to the controller, determining whether the level state change complies with a preset rule; If yes, it is determined that the controller is online; wherein, after the controller receives the power output by the battery, the controller configures the third pin and the fourth pin as pins for implementing a serial communication function, and configures the third pin to the high level state; The first pin and the second pin are configured as pins for implementing a serial communication function.
4. The power supply control method according to claim 3, characterized in that: The determining whether the level state change complies with a preset rule includes: After the first pin changes from the high level state to the low level state, determining a first holding time for the first pin to maintain the low level state, and after the first pin changes from the low level state to the high level state, determining a second holding time for the first pin to maintain the high level state; If the first holding time and the second holding time are both greater than or equal to a preset time, it is determined that the controller is online.
5. The power supply control method according to claim 3, characterized in that: After controlling the battery to supply power to the controller, the method further includes: Obtain a power-on response instruction sent by the controller; wherein the power-on response instruction is a response instruction for the controller to open the normally closed contact of the relay after obtaining the power output by the battery.
6. A method for stopping power supply control, characterized in that: The method is a control method for stopping power supply after power supply based on the power supply control method according to any one of claims 3 to 5, and the method comprises: monitoring the level state of the second pin in real time; If the level state of the second pin changes from the high level state to the low level state, it is determined that the low level state of the second pin meets a preset rule; If so, it is determined that the controller is offline, and the battery is controlled to stop supplying power to the controller.
7. The power supply stop control method according to claim 6, characterized in that: The determining whether the low level state of the second pin meets a preset rule includes: Determining a third holding time for the second pin to maintain a low level state; If the third holding time is greater than or equal to the preset time, it is determined that the controller is offline.
8. The power supply stop control method according to claim 7, characterized in that: After controlling the battery to stop supplying power to the controller, the method further includes: The first pin and the second pin are configured as pins for realizing a general input / output port function; and the level of the first pin is configured as a high level state, and the level of the second pin is configured as a low level state.
9. A battery management unit, characterized in that: The battery management unit includes a processor and a memory, the memory stores a computer program, and the processor is used to execute the computer program to implement the power supply control method described in any one of claims 3-5, or the power supply stop control method described in any one of claims 6-8.
10. An electric vehicle, characterized in that: The electric vehicle comprises the power supply system according to claim 1; the battery management unit in the power supply system is the battery management unit according to claim 9.