Parameter setting method and system for electric power-assisted bicycle

By using CAN bus communication and communication switching circuit between the host and the host in the electric power bicycle control system, the problem of inefficient parameter setting in the prior art is solved, and a more efficient and safer parameter setting process is achieved.

CN119911368APending Publication Date: 2025-05-02NEW ANANDA DRIVE TECHN SHANGHAI

Patent Information

Application Number
CN202510077920.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-01-17
Publication Date
2025-05-02

AI Technical Summary

Technical Problem

The existing electric power bicycle controller parameter setting method is inefficient, and it is necessary to connect the equipment one by one and set the parameter through serial communication, resulting in high complexity and inconvenient debugging and modification.

Method used

The CAN bus communication is used to connect the instrument and other devices. Through the communication switching circuit between the upper computer and the host, the parameters of other devices are read and set, and the parameter setting process is simplified.

Benefits of technology

It improves the efficiency of device parameter setting, reduces system complexity, and adds data security and tamper-proof verification in the process of USB communication and CAN communication to ensure data security.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119911368A_ABST
    Figure CN119911368A_ABST
Patent Text Reader

Abstract

The invention provides an electric power-assisted bicycle parameter setting method and system, the system comprises an upper computer and an instrument, the instrument is in communication connection with other devices of an electric power-assisted bicycle through a CAN bus, the other devices comprise motor controllers, and the instrument and each other device are respectively provided with a node device ID; the instrument comprises a host, and the host comprises a communication switching circuit and can be electrically connected with external equipment. The working modes of the host comprise a power supply mode and a parameter setting mode, in the power supply mode, the communication switching circuit provides electric energy to the outside, and in the parameter setting mode, the host is in communication connection with the upper computer through the communication switching circuit; the upper computer transmits and receives CAN messages through the control host, and reads and / or sets parameters of corresponding equipment. According to the invention, the tedious process of connecting each device of the electric power-assisted bicycle one by one by using a wire harness and setting parameters through different upper computer software is avoided.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of signal transmission, and in particular to a method and system for setting parameters of an electric power-assisted bicycle. Background Art

[0002] In recent years, with the rise of cycling culture, the integration of battery technology and intelligent functions, and the increasing awareness of environmental sustainability, the electric-assisted bicycle industry has developed rapidly. As the core component of electric-assisted bicycles, the electric-assisted bicycle controller realizes the control of the entire electric-assisted bicycle system, including motors, instruments, batteries, lights, and anti-lock braking systems. However, different vehicle models or motor models require different controller software. The software differences usually lie in motor parameters and control parameters. These parameters are usually written into the controller along with the software when the controller is produced, and are saved in the memory inside the controller as factory parameters. If the user subsequently debugs and modifies the electric-assisted bicycle, the actual required controller parameters may not match the factory parameters, resulting in a reduced user riding experience or even the inability of the entire vehicle system to operate.

[0003] Patent document CN101486322A discloses a system and method for setting parameters of an electric bicycle controller. At present, existing methods for setting parameters of electric bicycle controllers are all implemented by external parameter setting terminals or host computer software. The electric bicycle controller needs to be provided with a communication interface, and communicates with the parameter setting terminal or host computer software through serial communication, and the controller parameters are read and written in the parameter setting terminal or host computer software. With the development of electric bicycles towards intelligence, similar parameter setting requirements exist for instruments, batteries, anti-lock braking systems and other devices in the vehicle control system. If this method is used to connect these intelligent devices one by one and set parameters, the parameter setting efficiency will be low. Summary of the invention

[0004] In view of the defects in the prior art, an object of the present invention is to provide a method and system for setting parameters of an electric assisted bicycle.

[0005] A parameter setting system for an electric-assisted bicycle provided by the present invention comprises a host computer and an instrument, wherein the instrument is connected to other devices of the electric-assisted bicycle via a CAN bus communication, wherein the other devices comprise a motor controller, and the instrument and each of the other devices respectively have a node device ID;

[0006] The instrument includes a host, and the host includes a communication switching circuit, which can be electrically connected to an external device;

[0007] The working mode of the host includes a power mode and a parameter setting mode. In the power mode, the communication switching circuit provides power to the outside. In the parameter setting mode, the host is connected to the host computer through the communication switching circuit.

[0008] The host computer reads and / or sets the corresponding parameters of the other devices by controlling the host to send and receive CAN messages;

[0009] Furthermore, the communication switching circuit includes: an MCU module, a switching module and a USB module;

[0010] The switching module includes: a first analog switch and a second analog switch;

[0011] The first analog switch includes a first control end, a second control end, a first common end, a first normally closed end, a second common end, and a second normally closed end. The first control end and the second control end are respectively connected to the first IO end and the second IO end of the MCU module. The first common end and the second common end are respectively connected to the D- end and the D+ end of the USB module. When the first control end is at a high level, the first common end is connected to the first normally closed end. When the second control end is at a high level, the second common end is connected to the second normally closed end. The first normally closed end and the second normally closed end are used for charging protocol communication.

[0012] The second analog switch includes a third control terminal, a fourth control terminal, a third common terminal, a third normally closed terminal, a fourth common terminal and a fourth normally closed terminal. The third control terminal and the fourth control terminal are respectively connected to the third IO terminal and the fourth IO terminal of the MCU module, and the third common terminal and the fourth common terminal are respectively connected to the D- terminal and the D+ terminal of the USB module. When the third control terminal is at a high level, the third common terminal is connected to the third normally closed terminal. When the fourth control terminal is at a high level, the fourth common terminal is connected to the fourth normally closed terminal. The third normally closed terminal and the fourth normally closed terminal are used for serial port communication.

[0013] Furthermore, the instrument also includes a key module, which is electrically connected to the host to control the switch, control and working mode switching of the host.

[0014] Furthermore, the other equipment also includes: a battery and an anti-lock braking (ABS) module.

[0015] Furthermore, the default working mode of the host after powering on is the power mode, and after the host is disconnected from the host, the working mode of the host is automatically switched to the power mode.

[0016] Furthermore, when the host obtains data sent by the host computer, it first performs a security check on the sent data, and then sends and receives CAN messages after the check is successful.

[0017] Furthermore, the CAN message adopts a CAN extended frame, and the CAN extended frame includes: an ID segment, an ID extended segment and a data segment, etc.;

[0018] The ID segment and the ID extension segment include a protocol data unit format and a protocol data unit specific field;

[0019] The protocol data unit format is divided into a first protocol data unit format and a second protocol data unit format;

[0020] When sending a broadcast CAN message, selecting to use the second protocol data unit format to configure the message number in the first protocol data unit format and the second protocol data unit format, and configuring the message number extension content in the protocol data unit specific field;

[0021] When sending a directional CAN message, select to use the first protocol data unit format to configure the message number, and configure the device node ID of the receiving message in the protocol data unit specific field;

[0022] The device receiving the CAN message parses the data segment of the CAN message to read and / or set corresponding parameters.

[0023] Furthermore, the ID segment also includes: priority, reserved bit;

[0024] The device receiving the CAN message sorts and analyzes the received CAN message according to the priority;

[0025] The reserved bits are reserved for configuration by the device manufacturer.

[0026] Furthermore, the ID extension segment also includes: a source address;

[0027] When sending a broadcast CAN message, the device sending the CAN message configures the node ID of the device sending the CAN message at the source address.

[0028] According to a method for setting parameters of an electric assisted bicycle provided by the present invention, the electric assisted bicycle parameter setting system is adopted, the host computer is connected to the host, the working mode of the host is switched to the parameter setting mode, and the host computer reads and / or sets the corresponding parameters of the other devices by controlling the host to send and receive CAN messages.

[0029] Compared with the prior art, the present invention has the following beneficial effects:

[0030] The present invention avoids the tedious process of using a wiring harness to connect each device of the electric power-assisted bicycle one by one and setting parameters through different upper computer software. At the same time, it does not need to connect external terminal devices, which reduces the complexity of the entire system and greatly improves the efficiency of device parameter setting. In addition, this parameter setting method does not need to disconnect the connection of each device of the electric power-assisted bicycle control system, which is more convenient for debugging and modification of the vehicle after leaving the factory.

[0031] At the same time, data security and anti-tampering verification are added to the USB communication and CAN communication processes to ensure the security of data during transmission. To a certain extent, it also prevents unauthorized devices from tampering with the parameters of the electric assisted bicycle equipment and causing control system security problems. BRIEF DESCRIPTION OF THE DRAWINGS

[0032] Other features, objects and advantages of the present invention will become more apparent from the detailed description of non-limiting embodiments made with reference to the following drawings:

[0033] Figure 1 It is a schematic diagram of the communication method of the present invention;

[0034] Figure 2 This is a schematic diagram of the control system of an electric power-assisted bicycle;

[0035] Figure 3 This is a schematic diagram of the mainframe structure of the instrument;

[0036] Figure 4 The overall structure diagram of the instrument;

[0037] Figure 5 This is a schematic diagram of the installation status of the instrument;

[0038] Figure 6 A circuit diagram of a communication switching circuit;

[0039] Figure 7 Schematic diagram of the data frame of CAN message. DETAILED DESCRIPTION

[0040] The present invention is described in detail below in conjunction with specific embodiments. The following embodiments will help those skilled in the art to further understand the present invention, but are not intended to limit the present invention in any form. It should be noted that, for those of ordinary skill in the art, several changes and improvements can also be made without departing from the concept of the present invention. These all belong to the protection scope of the present invention.

[0041] Example 1

[0042] like Figure 1 and Figure 2As shown, the present invention provides a parameter setting system for an electric-assisted bicycle, including a host computer and an instrument, wherein the instrument is connected to other devices of the electric-assisted bicycle via a CAN bus communication, wherein the other devices include a motor controller, and the instrument and each other device have a node device ID respectively, and all node devices share the same communication line and communicate via the CAN communication protocol to form an integrated network system. The communication mode is physically manifested as the instrument and the motor controller, the battery and the motor controller, and the ABS and the motor controller are all connected via CAN_H and CAN_L ports using twisted pair cables.

[0043] Other devices also include: batteries, anti-lock brake ABS modules, instruments, motor controllers, batteries, ABS and other devices are all intelligent devices, and can all be used as parameter setting objects. The parameter setting method of the electric power-assisted bicycle control system provided in the embodiment of the present invention can set the language, unit and other parameters of the instrument; set the gear position, speed limit value, current limit value and other parameters of the motor controller; set the maximum capacity level, remaining capacity level and other parameters of the battery; set the wheel cylinder pressure threshold and other parameters of the ABS. The instruments, motor controllers, batteries, ABS and other devices in the embodiment of the present invention are built-in intelligent devices of the electric power-assisted bicycle system, and can all be used as communication nodes to realize data reception and transmission between the CAN bus through the CAN communication protocol.

[0044] like Figure 3 , 4 As shown in Figure 5, the instrument includes a host and a key module. The key module is electrically connected to the host to control the switch, control and working mode switching of the host. The host includes a communication switching circuit that can be electrically connected to an external device. The working modes of the host include a power mode and a parameter setting mode. In the power mode, the communication switching circuit provides power to the outside. In the parameter setting mode, the host is connected to the host computer through the communication switching circuit. The host computer reads and / or sets the parameters of the corresponding other devices by controlling the host to send and receive CAN messages.

[0045] like Figure 6 As shown, the communication switching circuit includes: an MCU module 1, a switching module 2 and a USB module 3, and the switching module includes: a first analog switch U1 and a second analog switch U2.

[0046] The first analog switch U1 includes a first control terminal (pin 2), a second control terminal (pin 3), a first common terminal (pin 6), a first normally closed terminal (pin 5), a second common terminal (pin 8) and a second normally closed terminal (pin 7). The first control terminal and the second control terminal are respectively connected to the first IO terminal and the second IO terminal of the MCU module, and the first common terminal and the second common terminal are respectively connected to the D- terminal and the D+ terminal of the USB module. When the first control terminal is at a high level, the first common terminal is connected to the first normally closed terminal, and when the second control terminal is at a high level, the second common terminal is connected to the second normally closed terminal. The first normally closed terminal and the second normally closed terminal are used for charging protocol communication. Pin 1 of the first analog switch U1 is connected to VCC, and pin 4 is grounded.

[0047] The second analog switch U2 includes a third control terminal (pin 2), a fourth control terminal (pin 3), a third common terminal (pin 6), a third normally closed terminal (pin 5), a fourth common terminal (pin 8) and a fourth normally closed terminal (pin 7). The third control terminal and the fourth control terminal are respectively connected to the third IO terminal and the fourth IO terminal of the MCU module, and the third common terminal and the fourth common terminal are respectively connected to the D- terminal and the D+ terminal of the USB module. When the third control terminal is at a high level, the third common terminal is connected to the third normally closed terminal, and when the fourth control terminal is at a high level, the fourth common terminal is connected to the fourth normally closed terminal. The third normally closed terminal and the fourth normally closed terminal are used for serial communication. Pin 1 of the second analog switch U2 is connected to VCC, and pin 4 is grounded.

[0048] Therefore, the host's working mode switching can be controlled by controlling the output of MCU module 1. The physical connection method of serial communication can be to connect the host computer and the host through a double-headed USB-A cable. If the host computer has a USB-C port, a USB-A to USB-C cable can also be used to connect the host computer and the host.

[0049] The instrument has two main functions. On the one hand, it covers the display and setting functions of traditional electric bicycle instruments. For example, it displays information such as speed, mileage, gear, light status, battery power, etc. during riding. At this time, the gear and display data can be switched by operating the key module, and the brightness, sleep time and other functions that users need to modify can be set in the setting menu. On the other hand, the power mode can be switched to parameter setting mode. The default working mode of the host after power on is power mode. After the host is disconnected from the host, the host's working mode automatically switches to power mode.

[0050] When the system sets parameters for devices other than the instrument, the instrument receives data sent by the host computer through USB serial communication, and performs data security and anti-tampering verification. After the verification is successful, the CAN message corresponding to the data is sent to the CAN bus through the CAN communication protocol. After the instrument successfully uploads the CAN message to the CAN bus, it replies to the host computer. During this process, the instrument will display information such as communication status and parameter setting status. The purpose of data security and anti-tampering verification is to prevent unauthorized devices from tampering with the parameters of the electric power bicycle equipment, which may lead to possible control system security problems.

[0051] The upper computer software interface displays the communication connection status, "read" operation key, "write" operation key, device selection interface and parameter page. The parameter page displays the device parameters and can switch pages according to the names of different devices. After the upper computer establishes communication with the electric-assisted bicycle through the USB port of the instrument, you can select a setting object in the upper computer software interface to set the parameters, or you can select multiple setting objects at the same time to set the parameters. There are two methods for setting parameters. After the upper computer successfully communicates with the electric-assisted bicycle, you can directly edit the parameters in the upper computer software and write them to the setting object, or you can read the original parameters from the setting object and edit and modify them in the upper computer software before writing them to the setting object. The upper computer software reads and writes device parameters in the form of parameter lists, and the parameters of each device will generate a corresponding parameter list.

[0052] When the system sets the parameters of the instrument, the instrument communicates with the host computer directly through the USB serial port communication. The parameter setting of the instrument can be completed without converting the USB serial port communication to CAN communication.

[0053] like Figure 7 As shown, the CAN message adopts the CAN extended frame, and the CAN extended frame includes: ID segment, ID extension segment and data segment, etc.

[0054] The ID segment and ID extension segment include priority, reserved bits, protocol data unit format, protocol data unit specific fields and source address.

[0055] Priority: refers to the priority of the frame message, with a length of 3 bits and a value range of 0-7. The smaller the value, the higher the priority. The device receiving the message sorts and parses the received message according to the priority.

[0056] Reserved bit: This bit is reserved and has no definition. It is 2 bits long and has a default value of 0. It can be configured by the device manufacturer.

[0057] Protocol data unit format: refers to the protocol data unit format type and also indicates the message number. The length is 8 bits and the data range is 0-255. When the data is 0-239, it indicates that the first protocol data unit format is selected. When the data is 240-255, it indicates that the second protocol data unit format is selected.

[0058] Protocol data unit specific field: refers to the bits specially defined according to different protocol data unit formats. Specifically, according to different protocol data unit formats, there are two different definitions of the protocol data unit specific field, with a length of 8 bits. When the frame message corresponds to the first protocol data unit format, the protocol data unit specific field is defined as the destination address, and the destination address refers to the device node ID that receives the message, that is, the data destination of the current message. When the frame message corresponds to the second protocol data unit format, the protocol data unit specific field is defined as the message number extension, and the parameter group extension refers to the extension bit of the data number, and its data range is 0-255.

[0059] Source address: refers to the device node ID that sends the message, that is, the data source of the current message, and its length is 8 bits. When the device sends a CAN message, the device node ID that sends the CAN message is configured in the source address.

[0060] Message number: refers to the number of different CAN messages, including the above-mentioned reserved bits, protocol data unit format and protocol data unit specific field, where the reserved bits default to 0. When the frame message is a data frame with a specific destination address, its format is the first protocol data unit format, that is, there are 240 different message numbers, ranging from 0 to 239; when the data frame is a broadcast data frame, its format is the second protocol data unit format, protocol data unit format (240-255) * protocol data unit specific field (0-255) is 16 * 256 = 4096 different message numbers, ranging from 61440 to 65535. Regardless of which protocol data unit format is used, when the message number reaches the maximum number, the next message number with the same source address starts from the starting number.

[0061] When sending a broadcast CAN message, the second protocol data unit format is selected to be used in the first protocol data unit format and the second protocol data unit format to configure the message number, and the message number extension content is configured in the protocol data unit specific field.

[0062] When sending a directional CAN message, the first protocol data unit format is selected to configure the message number, and the device node ID of the receiving message is configured in the protocol data unit specific field.

[0063] The device receiving the CAN message parses the data segment of the CAN message to read and / or set corresponding parameters.

[0064] In order to improve the security and integrity of message transmission, the device receiving the message also verifies the data segment before parsing the data segment of the message. Specifically, the data segment has 8 bytes or 64 bits. The last byte of data is the security check code, which is the sum of the first 7 bytes of data and the lower 8 bits. If the two are the same, the verification is successful. When a device node receives a CAN message from another device node, it will first verify the data segment to determine the integrity and correctness of the data to ensure the security of data transmission. If the verification fails, the data is wrong and the device node needs to receive the data again.

[0065] Each frame of data in the CAN communication protocol has a size limit, which is determined by the data segment length of each frame of data. The data segment length is 8 bytes, and only 8 bytes of data can be transmitted at most. In actual situations, the parameter list data sent by the device may be larger than 8 bytes. In this case, the parameter list data can be subpacketized and divided into multiple data frames and sent in sequence.

[0066] Example 2

[0067] A method for setting parameters of an electric-assisted bicycle is provided. Based on the electric-assisted bicycle parameter setting system of embodiment 1, the working mode of the host is switched to the parameter setting mode, and the upper computer reads and / or sets the parameters of other corresponding devices by controlling the host to send and receive CAN messages.

[0068] Specifically, connect to the host computer and enter the parameter setting mode. Use a USB cable to connect the host computer and the USB port of the instrument, and open the parameter setting mode option in the instrument's setting menu interface. At this time, the signals connected to the D-pin and D+pin of the instrument's USB port are switched from D1- and D1+ to D2- and D2+, and the USB port enters the communication mode. Open the host computer interface, and the host computer software sends a parameter setting status command to the instrument. After receiving the command, the instrument replies to the host computer with a parameter setting status confirmation command. At this time, the communication connection status between the instrument and the host computer software interface both displays "connected", and the system enters the parameter setting mode.

[0069] Directly edit the parameters in the host computer interface and write them into the parameter setting object, or read the device parameters and edit and modify them before writing them into the parameter setting object. After the system enters the parameter setting mode, assuming that only the parameters of the motor controller and ABS need to be set, you can check the motor controller and ABS in the device check module of the host computer software, and directly edit the new version parameters on the parameter page of the motor controller and ABS. You can also read the original parameters of the two devices after checking the motor controller and ABS, modify and edit them based on the original parameters, and write the parameters to the two devices after editing.

[0070] When reading parameters, the host computer uses USB communication to send parameter reading request instructions to the instrument. The motor controller and ABS each correspond to one instruction, and the corresponding instruction data contains the node ID of the motor controller or ABS. Assuming that the motor controller has a higher priority than the ABS, the motor controller parameter reading request instruction is sent first, and then the ABS parameter reading request instruction is sent. After the instrument receives these instructions, it reorganizes each instruction data into a data frame according to the CAN communication protocol and uploads it to the CAN bus. The data frame ID contains the instrument ID and the ID from the motor controller or ABS, which is the source address and destination address of the data frame. After the motor controller and ABS monitor the data frame with the destination address as their own ID from the CAN bus, they receive and parse the frame data to obtain the parameter reading request instruction from the instrument. Subsequently, the motor controller and ABS package the internal original parameters in the form of a parameter list to form multiple data frames and upload them to the CAN bus in sequence. At this time, the source address in the data frame ID is the ID of the motor controller or ABS, and the destination address is the ID of the instrument. After the instrument monitors the data frame with its own ID as the destination address from the CAN bus, it receives, parses and verifies the data in sequence. After confirming that the parameter list of the motor controller or ABS is complete, it combines the parameter list with the corresponding device ID to generate parameter list data, and then sends the parameter list data to the host computer through USB communication according to the priority. After receiving the data, the host computer processes the parameter list data according to the device ID and displays the parameters in the motor controller and ABS parameter pages respectively. At this point, the device parameter reading operation is completed, and the instrument and host computer software interface both show that the parameter reading is successful.

[0071] When writing parameters, the upper computer software will combine the edited new version parameter list of the motor controller and ABS with the device ID according to the priority and generate parameter list data and send it to the instrument. The instrument receives the parameter list data, parses it and verifies its integrity. After the verification is completed, the parameter list is divided into multiple data frames according to the CAN communication protocol and uploaded to the CAN bus. The source address in the data frame ID is the instrument ID, and the destination address is the ID of the motor controller or ABS. After the motor controller and ABS listen to the data frame with the destination address of their own ID from the CAN bus, they receive, parse and verify the data in sequence. After the verification is successful, the new version of the parameters will overwrite the original parameters. At this point, the device parameter writing operation is completed, and the instrument and upper computer software interface both show that the parameters have been written successfully.

[0072] After the parameter setting is completed, disconnect the communication from the host computer software interface. At this time, the communication connection status of the instrument and the host computer software interface will both display "disconnected", and the signals connected to the D- and D+ pins of the instrument's USB port will switch from D2- and D2+ to D1- and D1+, and the USB port will enter the power mode. Then you can disconnect the host computer from the instrument's USB port.

[0073] At this point, the parameters of the electric assisted bicycle control system are set.

[0074] Those skilled in the art know that, in addition to realizing the system and its various devices, modules, and units provided by the present invention in a purely computer-readable program code, it is entirely possible to realize the same functions in the form of logic gates, switches, application-specific integrated circuits, programmable logic controllers, and embedded microcontrollers by logically programming the method steps. Therefore, the system and its various devices, modules, and units provided by the present invention can be considered as a hardware component, and the devices, modules, and units included therein for realizing various functions can also be regarded as structures within the hardware component; the devices, modules, and units for realizing various functions can also be regarded as both software modules for realizing the method and structures within the hardware component.

[0075] The above describes the specific embodiments of the present invention. It should be understood that the present invention is not limited to the above specific embodiments, and those skilled in the art can make various changes or modifications within the scope of the claims, which does not affect the essence of the present invention. In the absence of conflict, the embodiments of the present application and the features in the embodiments can be combined with each other arbitrarily.

Claims

1. A parameter setting system for an electric power-assisted bicycle, characterized in that: It includes a host computer and an instrument, wherein the instrument is connected to other devices of the electric power-assisted bicycle through a CAN bus communication, wherein the other devices include a motor controller, and the instrument and each of the other devices respectively have a node device ID; The instrument includes a host, and the host includes a communication switching circuit, which can be electrically connected to an external device; The working mode of the host includes a power mode and a parameter setting mode. In the power mode, the communication switching circuit provides power to the outside. In the parameter setting mode, the host is connected to the host computer through the communication switching circuit. The host computer reads and / or sets the corresponding parameters of the other devices by controlling the host to send and receive CAN messages.

2. The electric-assisted bicycle parameter setting system according to claim 1, characterized in that: The communication switching circuit comprises: an MCU module, a switching module and a USB module; The switching module includes: a first analog switch and a second analog switch; The first analog switch includes a first control end, a second control end, a first common end, a first normally closed end, a second common end, and a second normally closed end. The first control end and the second control end are respectively connected to the first IO end and the second IO end of the MCU module. The first common end and the second common end are respectively connected to the D- end and the D+ end of the USB module. When the first control end is at a high level, the first common end is connected to the first normally closed end. When the second control end is at a high level, the second common end is connected to the second normally closed end. The first normally closed end and the second normally closed end are used for charging protocol communication. The second analog switch includes a third control terminal, a fourth control terminal, a third common terminal, a third normally closed terminal, a fourth common terminal and a fourth normally closed terminal. The third control terminal and the fourth control terminal are respectively connected to the third IO terminal and the fourth IO terminal of the MCU module, and the third common terminal and the fourth common terminal are respectively connected to the D- terminal and the D+ terminal of the USB module. When the third control terminal is at a high level, the third common terminal is connected to the third normally closed terminal. When the fourth control terminal is at a high level, the fourth common terminal is connected to the fourth normally closed terminal. The third normally closed terminal and the fourth normally closed terminal are used for serial port communication.

3. The electric-assisted bicycle parameter setting system according to claim 2, characterized in that: The instrument also includes a key module, which is electrically connected to the host and controls the switch, control and working mode switching of the host.

4. The electric-assisted bicycle parameter setting system according to claim 1, characterized in that: The other equipment also includes: a battery and an anti-lock braking system (ABS) module.

5. The electric-assisted bicycle parameter setting system according to claim 1, characterized in that: The default working mode of the host after powering on is the power mode. After the host is disconnected from the host, the working mode of the host is automatically switched to the power mode.

6. The electric-assisted bicycle parameter setting system according to claim 1, characterized in that: When the host obtains the data sent by the host computer, it first performs a security check on the sent data, and then sends and receives CAN messages after the check is successful.

7. The electric-assisted bicycle parameter setting system according to claim 1, characterized in that: The CAN message adopts a CAN extended frame, and the CAN extended frame includes: an ID segment, an ID extended segment and a data segment; The ID segment and the ID extension segment include a protocol data unit format and a protocol data unit specific field; The protocol data unit format is divided into a first protocol data unit format and a second protocol data unit format; When sending a broadcast CAN message, selecting to use the second protocol data unit format to configure the message number in the first protocol data unit format and the second protocol data unit format, and configuring the message number extension content in the protocol data unit specific field; When sending a directional CAN message, select to use the first protocol data unit format to configure the message number, and configure the device node ID of the receiving message in the protocol data unit specific field; The device receiving the CAN message parses the data segment of the CAN message to read and / or set corresponding parameters.

8. The electric-assisted bicycle parameter setting system according to claim 7, characterized in that: The ID segment also includes: priority and reserved bits; The device receiving the CAN message sorts and analyzes the received CAN message according to the priority; The reserved bits are reserved for configuration by the device manufacturer.

9. The electric-assisted bicycle parameter setting system according to claim 7, characterized in that: The ID extension segment also includes: a source address; When sending a broadcast CAN message, the device sending the CAN message configures the node ID of the device sending the CAN message at the source address.

10. A method for setting parameters of an electric power-assisted bicycle, characterized in that: The electric-assisted bicycle parameter setting system according to any one of claims 1 to 9 is adopted, the host computer is connected to the host, the working mode of the host is switched to the parameter setting mode, and the host computer reads and / or sets the corresponding parameters of the other devices by controlling the host to send and receive CAN messages.

Citation Information

Patent Citations

  • Parameter setting system and method of electric bicycle controller

    CN101486322A

Cited By

  • Electric power-assisted bicycle parameter setting method and system

    WO2026152660A1