Online detection circuit and method for one-button start and stop KEY line of electric power-assisted bicycle system
By designing KEY line online detection circuits and methods in the electric moped system, the problem of not being able to accurately judge the broken position of the KEY line is solved, and the KEY line online detection is realized, which improves the troubleshooting efficiency.
Patent Information
- Application Number
- CN202210656282.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-06-10
- Publication Date
- 2025-02-11
- Estimated Expiration
- 2042-06-10
AI Technical Summary
In the existing electric moped system, it is impossible to accurately determine the connection between the one-click start-stop KEY cable and the battery, instrument or controller, which leads to difficulty in positioning the broken line fault.
Design an online detection circuit and method for one-click start and stop KEY cable of electric moped system, detect the one-key start and stop signal through the main control MCU of the component, and determine the KEY cable and the battery, instrument or controller respectively after the instrument button fails. Connection status, realize KEY line online detection.
It can accurately determine the location of the KEY wire breakage, which facilitates R&D personnel and customers to quickly resolve broken faults and improves troubleshooting efficiency.
Smart Images

Figure CN115113100B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of electric power-assisted bicycles, and in particular to an online detection circuit and method for a one-button start / stop KEY line of an electric power-assisted bicycle system. Background Art
[0002] With the continuous development of the electric power-assisted bicycle industry, more and more designers tend to use a one-button start-stop circuit, that is, by pressing the instrument button for a certain period of time, the power-assisted bicycle system including components such as batteries, instruments or controllers can be turned on or off. This design method is simple to operate and easy for consumers to understand and use. However, the use of a one-button start-stop circuit requires the design of a KEY line to connect the corresponding signals of the battery, instrument, and controller. After the instrument button is activated, the battery, instrument, controller, etc. realize the corresponding function according to the action time of the signal. Therefore, when the vehicle system is powered on and self-checked, the online detection of the KEY line is very important. If the instrument button is activated for the software-set logic time and the key value can execute the corresponding function when the button is activated, it means that the KEY line is well connected to the battery, instrument, and controller; if the instrument button cannot execute the corresponding function after the action, it is impossible to determine which component of the battery, instrument or controller is disconnected from the KEY line. Summary of the invention
[0003] The technical problem to be solved by the present invention is: in order to overcome the deficiencies in the prior art, the present invention provides an online detection circuit and method for a one-button start and stop KEY line of an electric power-assisted bicycle system. When the system works normally and performs a self-check on the power on, the connection status of the KEY line with the battery, instrument or controller can be judged respectively after the instrument button fails, and it can be accurately determined which component is disconnected from the KYE line, which is convenient for R&D personnel to locate and solve the disconnection problem, which is simple and efficient.
[0004] The technical solution adopted by the present invention to solve its technical problems is: an online detection method for the one-button start-stop KEY line of an electric power-assisted bicycle system, wherein the components of the electric power-assisted bicycle system include a battery, an instrument and a controller, and the battery, the instrument and the controller are all connected to the one-button start-stop signal terminal through a KEY line; the one-button start-stop signal can only be provided by the instrument button, and when the instrument button is pressed, all components can perform corresponding functions according to the button action time logic, and it is considered that the one-button start-stop signal is in good working order and the KEY line is online. The computer program for implementing the detection method is executed by the component main control MCU, and the MCU of any one of the battery, the instrument and the controller is used as the component main control MCU, and the component corresponding to the component main control MCU is recorded as the first component, and the other two components are recorded as the second component and the third component respectively;
[0005] The following steps are also included:
[0006] S1: The electric bicycle system is powered on normally and enters the KEY line online inspection process;
[0007] S2: The component main control MCU detects whether there is a one-key start-stop signal. If there is a one-key start-stop signal, it is determined that the KEY line detection is correct, and the KEY line online inspection process is directly exited to perform the corresponding start-stop action; if there is no one-key start-stop signal, it goes to step S3;
[0008] S3: The component main control MCU determines whether the second component is online. If the second component is not online, the KEY line online inspection process is exited and manual fault elimination is performed; if the second component is online, the process proceeds to step S4;
[0009] S4: The component main control MCU determines whether the third component is online. If the third component is not online, the KEY line online inspection process is exited and manual fault elimination is performed; if the third component is online, the process proceeds to step S5;
[0010] S5: the component main control MCU of the first component sends a KEY line online check instruction, the first component receives and executes the KEY line online check instruction, and feeds back a corresponding detection value to the component main control MCU, thereby realizing online self-check of the KEY line of the first component.
[0011] S6: The second component and the third component receive the KEY line online check instruction sent by the first component, and execute the KEY line online check instruction respectively, and feed back the corresponding detection values to the component main control MCU; realize the online self-check of the KEY line of the corresponding components of the second component and the third component.
[0012] S7: The component main control MCU first determines whether the online detection of one of the second component and the third component has passed according to the detection value fed back in step S6, records the determination result, and then determines whether the online detection of the other component has passed, and records the determination result; at this time, regardless of whether the online detection of the previous component has passed, the other component needs to be tested online. When determining whether the online detection of the second component and the third component has passed, the second component can be determined first, or the third component can be determined first, and the order is not limited.
[0013] S8: If the online detection of the second component and the third component are both passed, the component main control MCU determines that all KEY lines are online, sends a KEY line detection correct signal, exits the KEY line online inspection process, and executes corresponding start and stop actions;
[0014] If one of the second component and the third component passes the online inspection and the other fails, the KEY line of the component that fails is determined to be broken, a KEY line inspection error signal of the corresponding component is sent, the KEY line online inspection process is exited, and manual troubleshooting is performed;
[0015] If both the second component and the third component fail the online detection, the KEY line of the first component is determined to be broken, a KEY line detection error signal of the first component is sent, the KEY line online inspection process is exited, and manual troubleshooting is performed.
[0016] Since the component main control MCU is in the first component, as long as it can normally determine whether the second and third components are online, it means that the online inspection of the first component must have passed normally, otherwise, the entire program cannot run normally. Therefore, when performing N inspection actions, there is no need to judge the first component separately.
[0017] In order to improve the accuracy of detection, preferably, in step S5, the first component executes the KEY line online inspection instruction N times, and the value range of N is 3-5 times.
[0018] In order to improve the accuracy of the detection, preferably, in step S6, the second component and the third component execute the KEY line online inspection instruction M times and P times respectively, wherein the value range of M is 3-5 times, and the value range of P is 3-5 times. The values of M, N and P may be the same or different, and in this embodiment, the values of M, N and P are the same.
[0019] An online detection circuit for a key start and stop KEY line of an electric power-assisted vehicle system, wherein the detection circuit applies the above-mentioned detection method to perform online detection of the KEY line, and the detection circuit also includes a key KEY, a transistor Q1, a diode D1, a capacitor C1, and resistors R1, R2, R3, and R4, wherein the base of the transistor Q1 is connected in series with the resistor R3 to lead out a drive signal input terminal KEY_detect_CTL, the emitter of the transistor Q1 is grounded GNDA, and the resistor R4 is connected in parallel between the base and the emitter of the transistor Q1, one end of the resistor R1 is connected to a power supply VDD, and the other end is connected to the anode of the diode D1, the cathode of the diode D1 is connected to the collector of the transistor Q1, the key KEY is connected to the collector of the transistor Q1 through a line, one end of the resistor R2 is connected to the collector of the transistor Q1, and the other end leads out a KEY line voltage signal detection terminal KEY_AD, one end of the capacitor C1 is connected to the KEY line voltage signal detection terminal KEY_AD, and the other end is grounded GNDA.
[0020] Furthermore, it also includes a main control MCU, which is connected to the drive signal input terminal KEY_detect_CTL through a line for inputting a drive signal, and the KEY line voltage signal detection terminal KEY_AD is connected to the AD acquisition terminal of the component main control MCU through a line for acquiring the level signal on the KEY line.
[0021] The main control MCU can be implemented by an independent control unit. In order to reduce costs and simplify the circuit structure, the main control MCU is an instrument MCU, a battery management system BMS or a controller.
[0022] The beneficial effects of the present invention are as follows: the online detection circuit and method of the one-button start-stop KEY line of an electric power-assisted bicycle system provided by the present invention can detect the online status of the KEY line and accurately locate the broken position of the KEY line of the entire vehicle system, which is convenient for R&D and customers to directly solve the broken line fault and improve efficiency. BRIEF DESCRIPTION OF THE DRAWINGS
[0023] The present invention will be further described below in conjunction with the accompanying drawings and embodiments.
[0024] Figure 1 It is a schematic diagram of the detection circuit of the present invention.
[0025] Figure 2 This is a schematic diagram of KEY line connection in Embodiment 1 of the present invention (the detection circuit is at the BMS end).
[0026] Figure 3 It is a flow chart of the detection method of the first embodiment of the present invention (the detection circuit is at the BMS end).
[0027] Figure 4 This is a schematic diagram of KEY line connection in Embodiment 2 of the present invention (the detection circuit is at the controller end).
[0028] Figure 5 It is a flow chart of the detection method of the second embodiment of the present invention (the detection circuit is at the controller end).
[0029] Figure 6 This is a schematic diagram of KEY line connection in Embodiment 3 of the present invention (the detection circuit is at the instrument end).
[0030] Figure 7 It is a flow chart of the detection method of the third embodiment of the present invention (the detection circuit is at the instrument end). DETAILED DESCRIPTION
[0031] The present invention will now be described in detail with reference to the accompanying drawings. This figure is a simplified schematic diagram, which only illustrates the basic structure of the present invention in a schematic manner, and therefore only shows the components related to the present invention.
[0032] like Figure 1As shown, the present invention provides an online detection circuit for the one-button start-stop KEY line of an electric power-assisted vehicle system, including a main control MCU, a button KEY, a transistor Q1, a diode D1, a capacitor C1, and resistors R1, R2, R3, and R4, wherein the base of the transistor Q1 is connected in series with the resistor R3 and then leads to a drive signal input terminal KEY_detect_CTL, the emitter of the transistor Q1 is grounded GNDA, and the resistor R4 is connected in parallel between the base and the emitter of the transistor Q1, and one end of the resistor R1 is connected to the power supply VDD. In this embodiment, the power supply VDD is 3.3V, which is defined as the 3V3 power supply in the figure. The other end is connected to the anode of the diode D1, the cathode of the diode D1 is connected to the collector of the transistor Q1, the button KEY is connected to the collector of the transistor Q1 through a line, one end of the resistor R2 is connected to the collector of the transistor Q1, and the other end leads to the KEY line voltage signal detection terminal KEY_AD, one end of the capacitor C1 is connected to the KEY line voltage signal detection terminal KEY_AD, and the other end is grounded GNDA.
[0033] The main control MCU is connected to the driving signal input terminal KEY_detect_CTL through a line for inputting a driving signal, and the KEY line voltage signal detection terminal KEY_AD is connected to the AD acquisition terminal of the component main control MCU through a line for acquiring the level signal on the KEY line.
[0034] This circuit can detect whether the KEY line is online and accurately locate the components where the KEY line connection fails. Its main operating principles are as follows:
[0035] When the system is turned on using the instrument button, the vehicle system is in normal working mode. Because the instrument button is pressed, the AD sampling of each component has detected the key value of the button pressed. At this time, it can be determined that the KEY lines of all components are online.
[0036] When the system uses a non-instrument button to start up, the system does not detect the corresponding key value, so it is necessary to perform online detection of the KEY line. When the online detection of the KEY line is not performed, because each component has a 3.3V pull-up on the KEY line and AD value collection on the KEY line, it can be seen that each AD value is about 3.3V; when the online detection of the KEY line is performed, the component main control MCU sends an execution detection instruction and interacts with other components through the CAN bus. At this time, the component main control MCU designed with the detection circuit can drive KEY_detect_CTL to a high level to make the transistor Q1 work in the amplification area. Therefore, the KEY line of the component with the detection circuit must be set to a low level, and whether the KEY line of other components is online requires judging whether the AD value of the KEY line of each component is set to a low level value, which is mainly divided into the following three situations:
[0037] 1. If only the component with the detection circuit detects that its KEY line AD value is set to a low level value, and the KEY line AD values of other components are still high level values, it means that the KEY line of the component with the detection circuit is disconnected from the KYE line of other components; other abnormalities
[0038] 2. If the KEY line AD value of one of the other two groups of components is still a high level value, and the KEY line AD value of another group of components is set to a low level value, it means that the KEY line of the component set to a high level value is broken.
[0039] 3. If the KEY line AD values of all components are set to low level values, it means that the KYE lines of all components are online and one-key start and stop operations can be performed.
[0040] The above can determine that the component with broken KEY line needs to issue a broken line instruction so that R&D or users can judge and deal with the broken line problem.
[0041] Since the components involved in the electric power-assisted vehicle system include instruments, batteries and controllers, the detection circuit can be set in any of the instruments, batteries and controllers, and the batteries, instruments and controllers are all connected to the one-key start-stop signal terminal through the KEY line; the one-key start-stop signal can only be provided by the instrument button. When the instrument button is pressed, all components can perform corresponding functions according to the button action time logic, and it is considered that the one-key start-stop signal is in good working order and the KEY line is online; different embodiments are described below. Example
[0042] In this embodiment, the detection circuit is set in the battery management system BMS, and the KEY line connection relationship is as follows: Figure 2 As shown, Figure 1 The key KEY signal of the detection circuit shown in Figure 2 The key KEY signal in the circuit is connected to form a complete circuit. At this time, the BMS is used as the main control MCU of the detection circuit. The KEY line voltage signal detection terminal KEY_AD and the drive signal input terminal KEY_detect_CTL are connected to the MCU of the BMS. At this time, the battery is the first component, the controller and the instrument are the second and third components respectively. The main control MCU of the battery is the main control MCU of the BMS. The corresponding detection method is as follows:
[0043] like Figure 3 As shown, an online detection method for a one-button start-stop KEY line of an electric power-assisted bicycle system comprises the following steps:
[0044] S1: The electric bicycle system is powered on normally and enters the KEY line online inspection process.
[0045] S2: The main control MCU of the BMS detects whether there is a one-key start-stop signal. If there is a one-key start-stop signal, it is determined that the KEY line detection is correct, and the KEY line online inspection process is directly exited to perform the corresponding start-stop action; if there is no one-key start-stop signal, it goes to step S3.
[0046] S3: The main control MCU of the BMS determines whether the controller is online. If the controller is not online, the KEY line online inspection process is exited and manual troubleshooting is performed; if the controller is online, the process proceeds to step S4.
[0047] S4: The main control MCU of the BMS determines whether the instrument is online. If the instrument is not online, the KEY line online inspection process is exited and manual troubleshooting is performed; if the instrument is online, step S5 is entered.
[0048] S5: The main control MCU of the BMS sends a KEY line online check instruction, the BMS receives and executes the KEY line online check instruction, and feeds back the corresponding detection value to the main control MCU of the BMS; the KEY line of the battery is self-checked online. In order to improve the accuracy of the detection, as a preferred embodiment, the battery executes the KEY line online check instruction N times, and the value range of N is 3-5 times.
[0049] S6: The controller and the instrument receive the KEY line online inspection instruction sent by the BMS, and execute the KEY line online inspection instruction respectively, and feed back the corresponding detection value to the main control MCU of the BMS; realize the online self-inspection of the KEY line of the corresponding components of the controller and the instrument. In order to improve the accuracy of the detection, as a preferred embodiment, the controller and the instrument execute the KEY line online inspection instruction M times and P times respectively, where the value range of M is 3-5 times, and the value range of P is 3-5 times. Among them, the values of M, N and P can be the same or different. In this embodiment, the values of M, N and P are the same.
[0050] S7: The main control MCU of the BMS first determines whether the online detection of one of the components in the controller and the instrument has passed according to the detection value fed back in step S6, records the judgment result, and then determines whether the online detection of the other component has passed and records the judgment result; in this embodiment, first determine whether the online detection of the instrument has passed and record the judgment result, then determine whether the online detection of the controller has passed and record the judgment result. At this time, regardless of whether the online detection of the instrument has passed, the controller needs to be tested online. When determining whether the online detection of the controller and the instrument has passed, the instrument can be determined first, or the controller can be determined first, and the order is not limited.
[0051] S8: If the online detection of the controller and the instrument are passed, the main control MCU of the BMS determines that all KEY lines are online, sends a KEY line detection correct signal, exits the KEY line online inspection process, and executes the corresponding start and stop actions.
[0052] If one of the controller and the instrument passes the online test and the other fails, the KEY line of the failed component is determined to be broken, a KEY line detection error signal of the corresponding component is sent, the KEY line online inspection process is exited, and manual troubleshooting is performed.
[0053] If both the controller and the instrument fail the online detection, the battery's KEY line is determined to be broken, a battery KEY line detection error signal is sent, the KEY line online inspection process is exited, and manual troubleshooting is performed.
[0054] Since the component main control MCU is in the battery's BMS, as long as it can be judged whether the controller and the instrument are online, it means that the battery's online inspection must have passed normally. Otherwise, the entire program cannot run normally. Therefore, when performing N inspection actions, there is no need to judge the BMS separately. Example
[0055] In this embodiment, the detection circuit is set in the controller, and the connection relationship of the KEY line is as follows: Figure 4 As shown, Figure 1 The key KEY signal of the detection circuit shown in Figure 4 The key KEY signal in the circuit is connected to form a complete circuit. At this time, the MCU of the controller is used as the main control MCU of the detection circuit. The KEY line voltage signal detection terminal KEY_AD and the drive signal input terminal KEY_detect_CTL are connected to the MCU of the controller. At this time, the controller is the first component, the battery and the instrument are the second and third components respectively, and the corresponding detection methods are as follows:
[0056] like Figure 5 As shown, an online detection method for a one-button start-stop KEY line of an electric power-assisted bicycle system comprises the following steps:
[0057] S1: The electric bicycle system is powered on normally and enters the KEY line online inspection process.
[0058] S2: The main control MCU of the controller detects whether there is a one-key start-stop signal. If there is a one-key start-stop signal, it is determined that the KEY line detection is correct, and the KEY line online inspection process is directly exited to perform the corresponding start-stop action; if there is no one-key start-stop signal, enter step S3.
[0059] S3: The main control MCU of the controller determines whether the battery BMS is online. If the battery BMS is not online, the KEY line online inspection process is exited and manual fault elimination is performed; if the battery BMS is online, step S4 is entered.
[0060] S4: The main control MCU of the controller determines whether the instrument is online. If the instrument is not online, the KEY line online inspection process is exited and manual troubleshooting is performed; if the instrument is online, step S5 is entered.
[0061] S5: The main control MCU of the controller sends a KEY line online check instruction, the controller receives and executes the KEY line online check instruction, and feeds back the corresponding detection value to the main control MCU of the controller, so as to realize the online self-check of the controller KEY line. Preferably, the battery executes the KEY line online check instruction N times, and the value range of N is 3-5 times.
[0062] S6: BMS and the instrument receive the KEY line online inspection instruction sent by the first component, and execute the KEY line online inspection instruction respectively, and feed back the corresponding detection value to the main control MCU of the controller; realize the online self-inspection of the KEY line of the corresponding components of BMS and the instrument. Preferably, BMS and the instrument execute the KEY line online inspection instruction M times and P times respectively, wherein the value range of M is 3-5 times, and the value range of P is 3-5 times. Among them, the values of M, N and P can be the same or different. In this embodiment, the values of M, N and P are the same.
[0063] S7: The main control MCU of the controller first determines whether the online detection of the instrument has passed according to the detection value fed back in step S6, records the judgment result, and then determines whether the online detection of the BMS has passed, and records the judgment result. At this time, regardless of whether the online detection of the instrument has passed, the BMS needs to be tested online. When judging whether the online detection of the BMS and the instrument has passed, the instrument can be judged first, or the BMS can be judged first, and the order is not limited.
[0064] S8: If the online detection of the battery and the instrument are passed, the main control MCU of the controller determines that all KEY lines are online, sends a KEY line detection correct signal, exits the KEY line online inspection process, and executes the corresponding start and stop actions;
[0065] If one of the battery and the meter passes the online test and the other fails, the KEY line of the failed component is judged to be broken, and a KEY line detection error signal of the corresponding component is sent, the KEY line online inspection process is exited, and manual fault elimination is performed;
[0066] If both the battery and instrument online tests fail, the controller's KEY line is determined to be broken, a KEY line detection error signal is sent to the controller, the KEY line online inspection process is exited, and manual troubleshooting is performed.
[0067] Since the component main control MCU is in the controller, as long as it can normally determine whether the battery and the instrument are online, it means that the controller's online check must have passed normally, otherwise, the entire program cannot run normally. Therefore, when performing N inspection actions, there is no need to judge the controller separately. Example
[0068] In this embodiment, the detection circuit is set in the instrument, and the KEY line connection relationship is as follows: Figure 6 As shown, Figure 1 The key KEY signal of the detection circuit shown in Figure 6 The key KEY signal in the circuit is connected to form a complete circuit. At this time, the MCU of the instrument is used as the main control MCU of the detection circuit. The KEY line voltage signal detection terminal KEY_AD and the drive signal input terminal KEY_detect_CTL are connected to the MCU of the instrument. At this time, the instrument is the first component, the battery and the controller are the second and third components respectively, and the corresponding detection methods are as follows:
[0069] like Figure 7 As shown, an online detection method for a one-button start-stop KEY line of an electric power-assisted bicycle system comprises the following steps:
[0070] S1: The electric bicycle system is powered on normally and enters the KEY line online inspection process;
[0071] S2: The main control MCU of the instrument detects whether there is a one-key start-stop signal. If there is a one-key start-stop signal, it is determined that the KEY line detection is correct, and the KEY line online inspection process is directly exited to perform the corresponding start-stop action; if there is no one-key start-stop signal, it goes to step S3;
[0072] S3: The main control MCU of the instrument determines whether the BMS of the battery is online. If the BMS of the battery is not online, the KEY line online inspection process is exited and manual fault elimination is performed; if the BMS of the battery is online, the process proceeds to step S4;
[0073] S4: The main control MCU of the instrument determines whether the controller is online. If the controller is not online, the KEY line online inspection process is exited and manual fault elimination is performed; if the controller is online, the process proceeds to step S5;
[0074] S5: The main control MCU of the instrument sends a KEY line online check instruction, the instrument receives and executes the KEY line online check instruction, and feeds back the corresponding detection value to the main control MCU of the instrument, so as to realize the KEY line online self-check of the instrument. Preferably, the battery executes the KEY line online check instruction N times, and the value range of N is 3-5 times.
[0075] S6: The battery and the controller receive the KEY line online inspection instruction sent by the first component, and execute the KEY line online inspection instruction respectively, and feed back the corresponding detection value to the main control MCU of the instrument; realize the online self-inspection of the KEY line of the corresponding components of the battery and the controller. Preferably, the battery and the controller execute the KEY line online inspection instruction M times and P times respectively, wherein the value range of M is 3-5 times, and the value range of P is 3-5 times. Among them, the values of M, N and P can be the same or different. In this embodiment, the values of M, N and P are the same.
[0076] S7: The main control MCU of the instrument first determines whether the online detection of one of the battery and controller has passed according to the detection value fed back in step S6, records the judgment result, and then determines whether the online detection of the other component has passed, and records the judgment result; in this embodiment, first determine whether the online detection of the controller has passed, and record the judgment result; then determine whether the online detection of the battery BMS has passed, and record the judgment result; at this time, regardless of whether the online detection of the controller has passed, the battery BMS needs to be tested online. When judging whether the online detection of the battery and controller has passed, the battery can be judged first, or the controller can be judged first, and the order is not limited.
[0077] S8: If the online detection of the battery and the controller are passed, the main control MCU of the instrument determines that all KEY lines are online, sends a KEY line detection correct signal, exits the KEY line online inspection process, and executes the corresponding start and stop actions;
[0078] If one of the battery and the controller passes the online test and the other fails, the KEY line of the failed component is determined to be broken, a KEY line detection error signal of the corresponding component is sent, the KEY line online inspection process is exited, and manual troubleshooting is performed;
[0079] If both the battery and controller online tests fail, the instrument's KEY line is determined to be broken, a KEY line detection error signal is sent, the KEY line online inspection process is exited, and manual troubleshooting is performed.
[0080] Since the component main control MCU is in the instrument, as long as it can be judged whether the battery and the controller are online, it means that the online inspection of the instrument must have passed normally. Otherwise, the whole program cannot run normally. Therefore, when performing N inspection actions, there is no need to judge the instrument separately.
[0081] What requires instructions is: Figure 2 , Figure 4 and Figure 6 The controller module, BMS module and instrument module shown in the figure do not have their corresponding main control MCU drawn in the circuit.
[0082] Based on the above ideal embodiments of the present invention, the relevant staff can make various changes and modifications without departing from the scope of the present invention through the above description. The technical scope of this invention is not limited to the contents of the specification, and its technical scope must be determined according to the scope of the claims.
Claims
1. An online detection method for a key start / stop KEY line of an electric power-assisted bicycle system, characterized in that: The components of the electric power-assisted vehicle system include a battery, an instrument and a controller, and the battery, the instrument and the controller are all connected to the one-button start-stop signal terminal through a KEY line; the computer program for implementing the detection method is executed by the component main control MCU, and the MCU of any component among the battery, the instrument and the controller is used as the component main control MCU, and the component corresponding to the component main control MCU is recorded as the first component, and the other two components are recorded as the second component and the third component respectively; The following steps are also included: S1: The electric bicycle system is powered on normally, performs self-check, and enters the KEY line online check process; S2: The component main control MCU detects whether there is a one-key start-stop signal. If there is a one-key start-stop signal, it is determined that the KEY line detection is correct, and the KEY line online inspection process is directly exited to perform the corresponding start-stop action; if there is no one-key start-stop signal, it goes to step S3; S3: The component main control MCU determines whether the second component is online. If the second component is not online, the KEY line online inspection process is exited and manual fault elimination is performed; if the second component is online, the process proceeds to step S4; S4: The component main control MCU determines whether the third component is online. If the third component is not online, the KEY line online inspection process is exited and manual fault elimination is performed; if the third component is online, the process proceeds to step S5; S5: the component main control MCU of the first component sends a KEY line online check instruction, the first component receives and executes the KEY line online check instruction, and feeds back a corresponding detection value to the component main control MCU; S6: The second component and the third component receive the KEY line online check instruction sent by the first component, execute the KEY line online check instruction respectively, and feed back corresponding detection values to the component main control MCU; S7: The component main control MCU first determines whether the online detection of one of the second component and the third component passes according to the detection value fed back in step S6, and records the determination result, and then determines whether the online detection of the other component passes, and records the determination result; S8: If the online detection of the second component and the third component are both passed, the component main control MCU determines that all KEY lines are online, sends a KEY line detection correct signal, exits the KEY line online inspection process, and executes corresponding start and stop actions; If one of the second component and the third component passes the online inspection and the other fails, the KEY line of the component that fails is determined to be broken, a KEY line inspection error signal of the corresponding component is sent, the KEY line online inspection process is exited, and manual troubleshooting is performed; If both the second component and the third component fail the online detection, the KEY line of the first component is determined to be broken, a KEY line detection error signal of the first component is sent, the KEY line online inspection process is exited, and manual troubleshooting is performed.
2. The online detection method for the one-button start-stop KEY line of the electric power-assisted vehicle system according to claim 1, characterized in that: In step S5, the first component executes the KEY line online inspection instruction N times, and the value range of N is 3-5 times.
3. The online detection method for the one-button start-stop KEY line of the electric power-assisted vehicle system according to claim 1, characterized in that: In step S6, the second component and the third component execute the KEY line online inspection instruction M times and P times respectively, wherein the value range of M is 3-5 times, and the value range of P is 3-5 times.
4. An online detection circuit for a key start / stop KEY line of an electric power-assisted vehicle system, characterized in that: The detection circuit applies the detection method according to any one of claims 1 to 3 to perform online detection of the KEY line, and the detection circuit also includes a key KEY, a transistor Q1, a diode D1, a capacitor C1, and resistors R1, R2, R3, and R4, wherein the base of the transistor Q1 is connected in series with the resistor R3 to lead out a drive signal input terminal KEY_detect_CTL, the emitter of the transistor Q1 is grounded GNDA, and the resistor R4 is connected in parallel between the base and the emitter of the transistor Q1, one end of the resistor R1 is connected to the power supply VDD, and the other end is connected to the anode of the diode D1, the cathode of the diode D1 is connected to the collector of the transistor Q1, the key KEY is connected to the collector of the transistor Q1 through a line, one end of the resistor R2 is connected to the collector of the transistor Q1, and the other end leads to a KEY line voltage signal detection terminal KEY_AD, one end of the capacitor C1 is connected to the KEY line voltage signal detection terminal KEY_AD, and the other end is grounded GNDA; It also includes a main control MCU, which is connected to the drive signal input terminal KEY_detect_CTL through a line for inputting a drive signal, and the KEY line voltage signal detection terminal KEY_AD is connected to the AD acquisition terminal of the component main control MCU through a line for acquiring the level signal on the KEY line.
5. The online detection circuit of the one-button start-stop KEY line of the electric power-assisted vehicle system as claimed in claim 4, characterized in that: The main control MCU is an instrument MCU, a battery management system BMS or a controller.
Citation Information
Patent Citations
Circuit capable of dynamically configuring USB Type-C working mode and using method thereof and device
CN113190488A
Control method for battery replacing system of electric vehicle
CN113771633A