Mountain electric motorcycle main control system based on motor driving of three-axis gyroscope motion detection and Hall current detection
The main control system for mountain electric motorcycles based on 3-axis gyroscopes and Hall current detection solves the problems of complex electronic hardware, high cost, insufficient real-time performance and low sensor reliability of existing systems. It achieves high maneuverability and safety of electric motorcycles in complex terrain, optimizes energy efficiency and enhances the driving experience.
Patent Information
- Application Number
- CN202411441642.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-16
- Publication Date
- 2025-01-10
AI Technical Summary
The existing main control system for mountain electric motorcycles suffers from problems such as complex electronic hardware design, poor electrical performance stability, high cost, insufficient real-time performance, low sensor reliability, poor environmental adaptability, unintelligent fault diagnosis, and insufficient user adaptability.
The main control system for mountain electric motorcycles, based on 3-axis gyroscope motion detection and Hall current detection, includes a power supply module, a dual-processing unit for single-chip microcomputers, a gyroscope motion monitoring module, a surge protection module, a communication module, a motor drive control module, and a Hall current acquisition module. It combines Kalman filtering and complementary filtering algorithms to achieve data fusion and intelligent control.
It improves the handling and safety of electric motorcycles in complex terrain, optimizes energy efficiency, enhances the driving experience, and provides intelligent sensor fusion control to ensure system stability and real-time response.
Smart Images

Figure CN119292148A_ABST
Abstract
Description
Technical Field
[0001] The invention relates to a mountain electric motorcycle, in particular to a main control system of a mountain electric motorcycle based on motor drive and Hall current detection of 3-axis gyroscope motion detection. Background Art
[0002] At present, the main electronic control system of mountain electric motorcycles with 16-bit digital 3-axis gyroscope motion detection, three-phase motor drive and Hall current detection, which are commonly used in the domestic and foreign markets, has many advantages, but also has the following defects: 1. The electronic hardware design is complex, the electrical performance stability is poor, the thermal conductivity is poor, and the heat dissipation is poor; it is easy to fail when running for a long time in a harsh environment with high current, and the defective rate is high.
[0003] 2. Cost issue: High-precision sensors and main controllers are expensive. They are only suitable for the high-end market. For the mid-end market, materials must be continuously improved and optimized. The cost of electronic materials and structural parts must be improved.
[0004] 3. Software algorithm: adaptive control algorithm and fault diagnosis algorithm; combination of Kalman filtering, complementary filtering and adaptive filtering; various temperature compensations, etc.; ensure the electrical performance stability of the system.
[0005] 4. Real-time and computing resources: Real-time processing and response are important performance indicators of electronic control systems. With the increase in sensor data volume and algorithm complexity, the system's requirements for computing resources and response speed are also getting higher and higher. If the processor performance is insufficient or the algorithm is not optimized, it may cause system response delays or freezes, affecting the vehicle's controllability and safety.
[0006] 5. Sensor reliability: The reliability of the sensor directly affects the stability of the system. The 16-bit digital 3-axis gyroscope and Hall current sensor may be affected by various vibrations, temperature changes, and electromagnetic interference in complex mountain environments, resulting in unstable or inaccurate electrical performance data, thereby affecting the electrical performance of the electronic control system.
[0007] 6. Environmental adaptability: Mountain electric motorcycles need to work in a variety of complex and harsh environments, such as high temperature, low temperature, heavy rain, typhoon, mudslide, high humidity, mud and strong vibration. The durability and stability of the electronic components of the electronic control system in these environments is an important test. Especially during long-term high-intensity use, component aging and heat loss may cause system performance degradation and even cause failures of varying degrees.
[0008] 7. Intelligent rapid response and diagnosis of faults. Real-time processing of important parts.
[0009] 8. System compatibility and coordination: Especially at the software level, it is necessary to ensure the real-time and accuracy of data transmission and processing, and avoid conflicts and interference between modules within the system.
[0010] 9. User adaptability: Especially for some advanced functions, optional functions and settings, users are required to have more professional technical knowledge and operational skills.
[0011] In view of this, it is necessary to develop a mountain electric motorcycle main control system and auxiliary system based on motor drive and Hall current detection of 3-axis gyroscope motion detection to solve the above technical problems. Summary of the invention
[0012] In view of the deficiencies in the prior art, the technical problem to be solved by the present invention is to provide a main control system for a mountain electric motorcycle based on motor drive and Hall current detection of 3-axis gyroscope motion detection. The purpose of designing the main control system of the mountain electric motorcycle is to enhance and improve the maneuverability, safety and energy efficiency of the electric motorcycle in complex terrain.
[0013] To solve the above technical problems, the present invention is implemented by the following scheme: A main control system of a mountain electric motorcycle based on motor drive and Hall current detection of 3-axis gyroscope motion detection of the present invention comprises: A power supply module, which provides power to the main control system and the auxiliary system, and has a main power supply and multiple branch power supply paths electrically connected to the main power supply; A single-chip dual processing unit, comprising a single-chip master processing unit and a single-chip slave processing unit; A gyroscope motion monitoring module is connected to the single chip main processing unit via an IIC control circuit; There are multiple surge protection modules, which are respectively connected to each signal control, each signal input and output interface and the communication interface; A communication module having three communication lines, wherein the first communication line is connected to the single-chip main processing unit, and the other two communication lines are connected to the single-chip main processing unit and the single-chip slave processing unit respectively; A motor drive control module, comprising a three-phase drive circuit and a three-phase voltage monitoring circuit, wherein the three-phase drive circuit is connected to the single-chip main processing unit and the three-phase voltage monitoring circuit is connected in the circuit between the three-phase drive circuit and the single-chip main processing unit; A Hall current acquisition module, comprising three Hall current acquisition circuits for real-time acquisition of currents in the three-phase drive circuit, and the Hall current acquisition circuits are connected to the main processing unit of the single-chip microcomputer; The indicator light driving control module is connected to the single chip main processing unit.
[0014] Further, the total power supply is a B+ lithium battery total power supply, and the B+ lithium battery total power supply is connected to 7 power branch power supply paths and an auxiliary control system; The power branch power path has a DC-DC step-down circuit electrically connected to the B+ lithium battery total power supply, an output end feedback circuit connected to the DC-DC step-down circuit, and an output end filter protection circuit connected to the DC-DC step-down circuit.
[0015] Furthermore, a branch power supply DC-DC chip U3 is electrically connected to the DC-DC step-down circuit; The pin 1 VIN of the DC-DC chip U3 is connected to the output terminal B+ of the B+ lithium battery main power supply; Pin 2 EN of the DC-DC chip U3 is connected to resistor R52, resistor R50, and resistor R51 respectively, the other end of the resistor R52 is connected to the drain of the MOS switch tube Q1, the source of the MOS switch tube Q1 is grounded GND5, and its gate is connected to resistors R53 and R54, the other end of the resistor R53 is connected to the enable control signal terminal 36VSD of the single-chip main processing unit or the single-chip slave processing unit, the other end of the resistor R54 is connected to the source of the MOS switch tube Q1, the other end of the resistor R50 is connected to the cathode of the diode D1, and the anode of the diode D1 is connected to the key lock control signal KEYLOCK; Pin 3 FB of the DC-DC chip U3 is respectively connected to the first end of the capacitor C38, the first end of the resistor R60, and the first end of the resistor R61, the second end of the resistor R60 is grounded to GND5, and the resistor R60 and the resistor R61 form the output end feedback circuit; The 4-pin VD of the DC-DC chip U3 is connected to the positive electrode of the diode D2, the negative electrode of the diode D2 is connected to the 5-pin VB of the DC-DC chip U3 and one end of the capacitor C35, the other end of the capacitor C35 is respectively connected to the 7-pin VS of the DC-DC chip U3 and one end of the resistor R58, the other end of the resistor R58 is respectively connected to the negative electrode of the diode D3, the first end of the inductor L1, and one end of the resistor R59, the positive electrode of the diode D3 is grounded GND5, the other end of the resistor R59 is respectively connected to one end of the resistor R57, One end of the resistor R56, one end of the capacitor C36, the source of the MOS switch tube Q2, and the positive electrode of the diode ZD1, the other end of the resistor R57 is connected to the 8-pin IS of the DC-DC chip U3, the other end of the resistor R56 is respectively connected to the other end of the capacitor C36, the gate of the MOS switch tube Q2, one end of the resistor R55, and the negative electrode of the diode ZD1, the drain of the MOS switch tube Q2 is connected to the output end B+ of the B+ lithium battery total power supply, and the other end of the resistor R55 is connected to the 6-pin HO of the DC-DC chip U3; Pin 9 of the DC-DC chip U3 is grounded to GND5; The second end of the inductor L1 is respectively connected to the first end of the capacitor C37, the second end of the capacitor C38, the second end of the resistor R61, and the positive electrode of the polar capacitor C39, the second end of the capacitor C37 is grounded, and the negative electrode of the polar capacitor C39 is grounded GND5; The polarized capacitor C39 is respectively connected in parallel with capacitors C41, C42, C43, and C40, wherein the positive electrode of the polarized capacitor C40 is connected to the positive electrode of the polarized capacitor C39; Resistors R62 and R63 of the same resistance value are connected in series and then connected in parallel with the polarized capacitor C39; The polarized capacitor C39, the polarized capacitor C40, the capacitor C41, and the capacitor C42 constitute the output end filtering protection circuit.
[0016] Furthermore, a 3-axis gyroscope motion monitoring chip U4 is provided in the circuit of the gyroscope motion monitoring module; The 1st pin SAO of the 3-axis gyroscope motion monitoring chip U4 is the serial data output terminal; The 2nd pin ASDx of the 3-axis gyroscope motion monitoring chip U4 is the auxiliary interface data and is a spare pin; The 3-pin ASCx of the 3-axis gyroscope motion monitoring chip U4 is the auxiliary interface clock and is a spare pin; The 4th pin INT1 of the 3-axis gyroscope motion monitoring chip U4 is the first interrupt input terminal; The 5th pin VDDIO of the 3-axis gyroscope motion monitoring chip U4 is a first power supply terminal, which is connected to a first end of a capacitor C33, and a second end of the capacitor C33 is grounded to GND1; The 6th pin GNDIO of the 3-axis gyroscope motion monitoring chip U4 and the 7th pin GND of the 3-axis gyroscope motion monitoring chip U4 are both grounded to GND1; The 8-pin VDD of the 3-axis gyroscope motion monitoring chip U4 is the second power supply terminal, which is connected to the first end of the capacitor C32, and the second end of the capacitor C32 is grounded GND1. The 8-pin VDD of the 3-axis gyroscope motion monitoring chip U4 is connected to the 12-pin CSB of the 3-axis gyroscope motion monitoring chip U4; The 9th pin INT2 of the 3-axis gyroscope motion monitoring chip U4 is the second interrupt input terminal; The 10th pin OCSB of the 3-axis gyroscope motion monitoring chip U4 is the first digital input terminal of the auxiliary interface and is a spare pin; The 11th pin OSDO of the 3-axis gyroscope motion monitoring chip U4 is the second digital input terminal of the auxiliary interface and is a spare pin; The 13th pin SCX of the 3-axis gyroscope motion monitoring chip U4 is a serial clock terminal in the SPI working mode and a serial clock terminal in the IIC working mode. The 13th pin SCX of the 3-axis gyroscope motion monitoring chip U4 is respectively connected to two diode nodes of a TVS5 tube with surge protection and a first end of a resistor R45. The second end of the resistor R45 is connected to a 1.8V voltage. The 13th pin SCX of the 3-axis gyroscope motion monitoring chip U4 is also connected to a single-chip main processing unit through an IIC control circuit. The ground pin of the TVS5 tube is grounded to GND1. The 14-pin SDX of the 3-axis gyroscope motion monitoring chip U4 is the serial data terminal in the IIC working mode. The 14-pin SDX of the 3-axis gyroscope motion monitoring chip U4 is respectively connected to the TVS4 tube with surge protection function and the first end of the resistor R46. The second end of the resistor R46 is connected to the second end of the resistor R45. The ground pin of the TVS4 tube is grounded to GND1.
[0017] Furthermore, the three communication lines include two CAN communication circuits and one RS485 communication circuit, wherein one CAN communication circuit is connected to the single-chip microcomputer slave processing unit, the other CAN communication circuit is connected to the single-chip microcomputer main processing unit, and the S485 communication circuit is connected to the single-chip microcomputer main processing unit.
[0018] Furthermore, the motor drive control circuits of the three phase lines of the three-phase drive control circuit are the same but have different phases, and a MOS tube drive control chip U9 is provided in any motor drive control circuit; Pin 1 VCC of the MOS tube driver chip U9 is connected to the first end of the capacitor C10 and the first end of the resistor R10, the second end of the capacitor C10 is grounded, the second end of the resistor R10 is connected to the +14.3V voltage and the first end of the resistor R11, the second end of the resistor R11 is connected to the positive electrode of the diode D7, the negative electrode of the diode D7 is respectively connected to the first end of the capacitor C11 and the 8-pin VB of the MOS tube driver chip U9, the second end of the capacitor C11 is connected to the first end of the resistor R12, and the second end of the resistor R12 is connected to the 6-pin Vs of the MOS tube driver chip U9; Pin 2 HIN of the MOS tube driver chip U9 is connected to the high-end control terminal HA of the main processing unit of the single-chip microcomputer; The 3-pin LIN of the MOS tube driving chip U9 is connected to the low-end control terminal LA of the main processing unit of the single-chip microcomputer; The 4th pin COM of the MOS tube driver chip U9 is grounded to GND4; The 5-pin LO of the MOS tube driving chip U9 is connected to the cathode of the diode D9, the diode D9 is connected in parallel with a resistor R15, the anode of the diode D9 is connected to the first end of the resistor R16, and the anode of the diode D9 is also output to the MOS aluminum substrate T2, and the second end of the resistor R16 is grounded GND4; The 7-pin HO of the MOS tube driver chip U9 is connected to the cathode of the diode D8, the diode D8 is connected in parallel with a resistor R13, the anode of the diode D8 is connected to the first end of the resistor R14, and the anode of the diode D8 is also output to the MOS aluminum substrate T1, and the second end of the resistor R14 is connected to the A-phase detection signal output end of the main processing unit of the single-chip microcomputer; The 9-pin GND of the MOS tube driving chip U9 is connected to the ground GND4.
[0019] Furthermore, the motor drive circuits of the three phase lines are all connected to a Hall current collection circuit, and the Hall current collection circuit is provided with a Hall sensor chip U5; Pin 1 VDD of the Hall sensor chip U5 is connected to the first end of the inductor L1, the second end of the inductor L1 is connected to the 5V1 voltage, pin 2 GND of the Hall sensor chip U5 is connected to the ground GND2, pin 3 OUT of the Hall sensor chip U5 is respectively connected to the first end of the resistor R17 and the first end of the capacitor C12, the second end of the resistor R17 is connected to the first end of the resistor R18, the second end of the capacitor C12 is connected to the ground GND2, the second end of the resistor R18 is connected to the ground end of the capacitor C12, the resistor R18 is connected in parallel with the capacitor C13, and the second end of the resistor R17 is connected to the CA voltage sampling end of the single-chip main processing unit.
[0020] Furthermore, the main control system of the mountain electric motorcycle of the present invention further includes a gyro optical image stabilization control module, and the gyro optical image stabilization control module includes: Gyroscope sensor; An OIS optical image stabilization control driver connected to the gyro sensor, wherein a motor control end of the OIS optical image stabilization control driver is electrically connected to a drive motor, and the drive motor drives a connected lens; A Hall sensor connected to the Hall signal pin of the OIS optical image stabilization control driver, and the Hall sensor is installed on the lens; AP / SP interface, connected to the wireless signal access pin of the OIS optical image stabilization control driver; AF focus drive control chip, a control signal end connected to the AP / SP interface, and an output signal end connected to the signal end of the drive motor; A CMOS sensor, mounted on the lens and connected to the CMOS signal terminal of the AP / SP interface; The operating method of the gyro optical image stabilization control module includes: Step 1: The gyroscope is used to sense the vibration of the electric motorcycle. When the gyroscope is vibrated by the outside world, it feeds back the vibration signal to the OIS control driver, and performs corresponding compensation on the drive motor in the X-axis and Y-axis directions to offset the image offset caused by the vibration; Step 2: The gyroscope measures the tilt angle caused by the shaking of the electric motorcycle, and the main processing unit of the single-chip microcomputer predicts the resulting image offset according to the tilt angle; The OIS optical image stabilization control driver calculates the compensation angle and generates an instruction to control the drive motor to adjust the lens angle. The OIS optical image stabilization control driver converts the tilt angle information caused by the vibration of the gyroscope into an electrical signal to control the compensation of the X-axis and the Y-axis to stabilize the image. Step three, the Hall sensor is used for electromagnetic induction, which feeds back the position information of the lens to the OIS optical image stabilization control driver, drives the motor chip, forms a closed-loop control, and enables the lens to be accurately moved to the required position.
[0021] Furthermore, the main control system of the mountain electric motorcycle of the present invention also includes a motion monitoring control method of a gyroscope, and the motion monitoring control method includes the following three steps: Step 1: Check the communication of the gyroscope, including IIC communication and SPI communication; Under IIC communication, check whether the communication is normal and whether the hardware is normal. After the hardware and software communication are normal, proceed to the next step; when there is an exception in the hardware and software communication, enter the exception handling subroutine; Under SPI communication, first check the Dummy register. After the Dummy register is correct, check whether the communication is normal and whether the hardware is normal. After the hardware and software communication are normal, proceed to the next step. If there is an exception in the hardware and software communication, enter the exception handling subroutine. Step 2: Initialization and calibration test of the gyroscope. During the initialization and calibration process of the gyroscope, the main power supply and the power supply of each branch power supply path must be monitored in real time; Step 3: The gyroscope works normally.
[0022] Furthermore, the single-chip main processing unit and the single-chip slave processing unit both use single-chip microcomputers, the single-chip microcomputer model used by the single-chip main processing unit is GD32F405RGT6, and the single-chip microcomputer model used by the single-chip slave processing unit is STM32F103C8T6.
[0023] Compared with the prior art, the beneficial effects of the present invention are: 1) Improve the electrical performance, handling and safety of electric vehicles: In mountainous environments, electric motorcycles need to face complex terrain and changing road conditions. The 16-bit digital 3-axis gyroscope can detect the vehicle's tilt angle and rotation speed in real time. Combined with the three-phase motor drive system, it can achieve precise control of the vehicle's posture to avoid overturning and loss of control. The Hall current sensor ensures that the motor can operate stably under various load conditions, prevents overload and overheating, and improves the safety of the vehicle's electrical performance.
[0024] 2) Optimize energy efficiency and endurance: Through precise current detection and intelligent control algorithms, the main electronic control system can adjust the output power of the motor in real time, optimize energy consumption, and has heat absorption and recovery processing functions, thereby improving vehicle endurance.
[0025] 3) Enhanced driving experience: The high-precision gyroscope and current detection provided by the present invention make the vehicle control smoother and more stable. The driver can view the vehicle status and driving data in real time through the vehicle display or mobile application, which enhances interactivity and fun.
[0026] 4) Sensor fusion and intelligent control: The electronic control main system of the present invention is more intelligent, and accurate and intelligent vehicle control is achieved by fusing data from multiple sensors and combining control algorithms.
[0027] 5) The main electric control system of the mountain electric motorcycle based on the three-phase motor drive and Hall current detection of the 16-bit digital 3-axis gyroscope motion detection integrates a variety of advanced technologies, providing a solid technical foundation for improving the vehicle's electrical performance, controllability, safety and energy efficiency, bringing users a more intelligent and efficient driving experience. BRIEF DESCRIPTION OF THE DRAWINGS
[0028] Figures 1 to 3 After connection, a principle block diagram of the main control system of the mountain electric motorcycle of the present invention is formed.
[0029] Figure 4 The present invention is a schematic diagram of a main power supply and multiple branch power supply paths electrically connected to the main power supply in the power supply module.
[0030] Figure 5 This is a circuit diagram of a power branch power path of the present invention.
[0031] Figure 6 The circuit diagram of the gyroscope motion monitoring module of the present invention is shown in FIG.
[0032] Figure 7 This is a block diagram of the working logic principle of the gyroscope chip of the present invention.
[0033] Figure 8 This is a principle block diagram of the gyroscope optical image stabilization control module of the present invention.
[0034] Fig. 9 This is a three-phase drive circuit diagram of the present invention.
[0035] Fig.10 This is a three-phase voltage monitoring circuit diagram of the present invention.
[0036] Fig.11 The present invention is a flow chart of the communication inspection test of the gyroscope.
[0037] Fig.12 This is a flow chart of initialization and calibration of the gyroscope of the present invention.
[0038] Fig.13 It is a control flow chart of the gyroscope of the present invention in normal working mode. DETAILED DESCRIPTION
[0039] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention, so that the advantages and features of the present invention can be more easily understood by those skilled in the art, thereby making a clearer and more explicit definition of the protection scope of the present invention. Obviously, the embodiments described in the present invention are only some embodiments of the present invention, not all embodiments. Based on the embodiments in the present invention, all other embodiments obtained by those skilled in the art without making creative work are within the scope of protection of the present invention.
[0040] In addition, the technical features involved in the different embodiments of the present invention described below can be combined with each other as long as they do not conflict with each other.
[0041] Embodiment 1: The specific structure of the present invention is as follows: Please refer to the attached Figure 1-13The present invention discloses a main control system for a mountain electric motorcycle based on motor drive and Hall current detection of 3-axis gyroscope motion detection, comprising a power module, a single-chip dual processing unit, a gyroscope motion monitoring module, a surge protection module, a communication module, a motor drive control module, a Hall current acquisition module and an indicator light drive control module.
[0042] The single-chip dual processing unit comprises a single-chip master processing unit and a single-chip slave processing unit; the master single-chip model used by the single-chip master processing unit is GD32F405RGT6, and the slave single-chip model used by the single-chip slave processing unit is STM32F103C8T6. The single-chip 1 mentioned below is the master single-chip, and the single-chip 2 is the slave single-chip.
[0043] like Figure 4 As shown, the power supply module provides power for the main control system and the auxiliary system, and has a main power supply and multiple branch power supply paths electrically connected to the main power supply. Figure 4 In the embodiment, the total power supply is a B+ lithium battery total power supply, which is connected to 7 power branch power supply paths; the power branch power supply paths have a DC-DC step-down circuit electrically connected to the B+ lithium battery total power supply, an output-end feedback circuit connected to the DC-DC step-down circuit, and an output-end filtering protection circuit connected to the DC-DC step-down circuit.
[0044] The DC-DC step-down circuit is electrically connected to a branch power supply (B+=96V to 36V power supply) DC-DC chip U3; DC-DC chip U3 is EG1195S model. It is a voltage regulator chip with wide voltage input, enable terminal, and adjustable output voltage. DC-DC chip U3 has output short circuit protection and temperature protection, temperature protection = 145 degrees, F-OSC oscillation frequency = 120KHZ, static current = 2mA; maximum input voltage = 120V; non-isolated DC to DC voltage regulator chip. The internal reference voltage of DC-DC chip U3 is 1.25V; V-OUT = 1.25V (1+R1 / R2), and resistors R1 and R2 can be adjusted and selected.
[0045] The signal flow is: FB pin 3 → error amplifier 1 → comparator 1 (internal OSC oscillator) → added to the internal logic control of the chip; IS pin 8 → comparator amplifier 2 → added to the internal logic control of the chip, logic control output → suspension drive → HO high-end output, power chip internal pin management. The pin definition of DC-DC chip U3 is: 1-pin VIN = chip power input; 2-pin EN = enable terminal, high level is valid; low level turns off the power output; 3-pin FB = output voltage feedback input; 4-pin VD = external bootstrap diode anode; 5-pin VB = suspension power; 6-pin HO = high-end output; 7-pin VS = suspension ground; 8-pin IS = internal MOS peak current limiting input port; 9-pin GND = chip center heat dissipation ground pad.
[0046] The pin 1 VIN of the DC-DC chip U3 is connected to the output terminal B+ of the B+ lithium battery main power supply; Pin 2 EN of the DC-DC chip U3 is connected to resistor R52, resistor R50, and resistor R51 respectively, the other end of the resistor R52 is connected to the drain of the MOS switch tube Q1, the source of the MOS switch tube Q1 is grounded GND5, and its gate is connected to resistors R53 and R54, the other end of the resistor R53 is connected to the enable control signal terminal 36VSD of the single-chip main processing unit or the single-chip slave processing unit, the other end of the resistor R54 is connected to the source of the MOS switch tube Q1, the other end of the resistor R50 is connected to the cathode of the diode D1, and the anode of the diode D1 is connected to the key lock control KEYLOCK; Pin 3 FB of the DC-DC chip U3 is respectively connected to the first end of the capacitor C38, the first end of the resistor R60, and the first end of the resistor R61, the second end of the resistor R60 is grounded to GND5, and the resistor R60 and the resistor R61 form the output end feedback circuit; The 4-pin VD of the DC-DC chip U3 is connected to the positive electrode of the diode D2, the negative electrode of the diode D2 is connected to the 5-pin VB of the DC-DC chip U3 and one end of the capacitor C35, the other end of the capacitor C35 is respectively connected to the 7-pin VS of the DC-DC chip U3 and one end of the resistor R58, the other end of the resistor R58 is respectively connected to the negative electrode of the diode D3, the first end of the inductor L1, and one end of the resistor R59, the positive electrode of the diode D3 is grounded GND5, the other end of the resistor R59 is respectively connected to one end of the resistor R57, One end of the resistor R56, one end of the capacitor C36, the source of the MOS switch tube Q2, and the positive electrode of the diode ZD1, the other end of the resistor R57 is connected to the 8-pin IS of the DC-DC chip U3, the other end of the resistor R56 is respectively connected to the other end of the capacitor C36, the gate of the MOS switch tube Q2, one end of the resistor R55, and the negative electrode of the diode ZD1, the drain of the MOS switch tube Q2 is connected to the output end B+ of the B+ lithium battery total power supply, and the other end of the resistor R55 is connected to the 6-pin HO of the DC-DC chip U3; Pin 9 of the DC-DC chip U3 is grounded to GND5; The second end of the inductor L1 is respectively connected to the first end of the capacitor C37, the second end of the capacitor C38, the second end of the resistor R61, and the positive electrode of the polar capacitor C39, the second end of the capacitor C37 is grounded, and the negative electrode of the polar capacitor C39 is grounded GND5; The polarized capacitor C39 is respectively connected in parallel with capacitors C41, C42, C43, and C40, wherein the positive electrode of the polarized capacitor C40 is connected to the positive electrode of the polarized capacitor C39; Resistors R62 and R63 of the same resistance value are connected in series and then connected in parallel with the polarized capacitor C39; The polarized capacitor C39, the polarized capacitor C40, the capacitor C41, and the capacitor C42 constitute the output end filtering protection circuit.
[0047] The working principle of the power branch power path of the present invention is composed of four parts: ① The enable control of the input end of the DC-DC chip U3: It is the superposition of two signals, one KEYLOCK key lock control is an external control signal; the other 36VSD is an enable end control signal issued by the single-chip microcomputer. These two signals are in a two-choice relationship in terms of timing, that is, only one signal can be selected to work at the 2-pin EN end of the DC-DC chip U3. 36VSD = high level, turn on the MOS switch tube Q1, the EN end of the DC-DC chip U3 = low level, and the chip power supply is turned off; 36VSD = low level, turn off the MOS switch tube Q1, the EN end of the DC-DC chip U3 = high level, and the DC-DC chip U3 is powered. ②High-end output of DC-DC chip U3: High-end output of HO end of DC-DC chip U3 → resistor R55 → G pole of MOS switch tube Q2 → S pole of MOS switch tube Q2; → capacitor C36, resistor R56, diode ZD1 are the inter-pole voltage protection of MOS switch tube Q2 → S pole output of MOS switch tube Q2 → resistor R59 is the current detection resistor → output to inductor L1 on one side, and feedback to VS floating ground end through small resistor R58 on the other side. → Inductor L1 output, get +36V / 5A branch power supply voltage. ③Feedback voltage at output end: +36V voltage → resistor R61, resistor R60 divide the voltage to get V-FB voltage of DC-DC chip U3, which is provided to the input of error amplifier 1 inside DC-DC chip U3. Note: The resistor package of resistor R61 and resistor R60 is SMD0805 patch material, with an accuracy of ±1%. ④Output power supply filtering and protection: The output load is debugged with a small resistor. In actual debugging, the resistance value of the resistor parameters will change. The output load uses large and small capacitors for filtering, two large electrolytic capacitors (capacitor C39 and capacitor C40) 220uF / 50V, two small SMD electrolytic capacitors (capacitor C41, capacitor C42) 22uF / 50V; the output capacitor uses low ESR (that is, the capacitor used has a small internal resistance), and the value of the output capacitor is mainly determined by the ripple requirement of the output voltage. Diode D2 is a bootstrap protection diode, BAV21WS model, SOD-323 package, parameter 250V / 0.25A / 0.5W. Capacitor C35 is a bootstrap protection capacitor; the capacitor should be close to the VB of the DC-DC chip U3 and the VS pin of the DC-DC chip U3; inductor L1 is a power inductor, which is a SMD integrated power inductor, and the model used is SLO0650H470MTT.
[0048] Preferably, the DC-DC chip U3 of the present invention is a high-current power conversion chip. The 9th pin of the DC-DC chip U3 is the heat dissipation pad in the center of the chip. Several GND holes for heat dissipation should be added. The holes can be selected with an inner diameter of 0.25mm and an outer diameter of 0.4mm. The PCB input, output, protection and component layout of the DC-DC chip U3, the high-current routing (MOS switch tube Q2, resistor R59, inductor L1, +36V) should be as wide as possible (use 2mm routing), and the routing should be short. MOS switch tube: It is necessary to select a MOS tube with a GS terminal voltage of 4.5V to be fully turned on; low turn-on voltage, low internal resistance, and low junction capacitance. Power output inductor: EG1195S has two working modes: continuous working mode and discontinuous working mode. Under light load and small load, EG1195S works in discontinuous working mode. At the same time, the inductance value and error accuracy will also affect the ripple of the inductor current. The ripple of the inductor current should be small, and the peak-to-peak value of the current should not exceed 30% of the maximum output current. Diode D3 is a freewheeling diode: its main function is to provide a discharge loop for the power inductor current when the MOS switch tube is turned off. The switching speed and forward voltage drop of the diode directly affect the efficiency of the DC-DC power conversion and voltage stabilization chip; the Schottky freewheeling diode selected by the present invention has fast switching speed, low forward conduction voltage (0.85V), and low power consumption.
[0049] The gyroscope motion monitoring module is connected to the single chip main processing unit through an IIC control circuit.
[0050] The circuit of the gyroscope motion monitoring module is provided with a 3-axis gyroscope motion monitoring chip U4; the model of the 3-axis gyroscope motion monitoring chip U4 is the BMI270 chip, and the definitions of the pins of the BMI270 chip are as follows: Pin 1 SA0 end = serial data output = slave address BIT0 bit selection end; Pin 2 ASDx end = auxiliary interface data, not used; Pin 3 ASCx end = auxiliary interface clock, not used; Pin 4 INT1 end = interrupt 1 input end; Pin 5 VDDIO end = Pin 8 VDD end = power supply 1.8V end. 6-pin GNDIO = 7-pin GND = GND1; 9-pin INT2 = interrupt 2 input; 10-pin OCSB = digital input of auxiliary interface, not used; 11-pin OSDO = digital output of auxiliary interface, not used; 12-pin CSB = chip selection in SPI working mode, connected to high level; 13-pin SCX = serial clock in SPI working mode = serial clock in IIC working mode; 14-pin SDX = serial data in IIC working mode. Among them, 2-pin ASDx and 3-pin ASCx can be left floating and cannot be connected to GND.
[0051] 1) Sensor working direction regulations: X-axis adaptive cruise control signal channel is ±0g, QX-axis GYR gyroscope signal channel is ±0° / second; Y-axis adaptive cruise control signal channel is ±0g, QY-axis GYR gyroscope signal channel is ±0° / second; Z-axis adaptive cruise control signal channel is ±0g, QZ-axis GYR gyroscope signal channel is ±0° / second. 2) Interrupt 1 description: Interrupt 1 includes the following various motion monitoring events: normal vehicle movement; vehicle start; vehicle braking; vehicle acceleration; vehicle deceleration; vehicle gear shifting; multi-gear vehicle speed change (speed regulation); vehicle short emergency stop; vehicle jumping; vehicle obstacle crossing; vehicle aerial skills (including rolling); vehicle neutral; vehicle downshifting and refueling; vehicle fault alarm, etc. 3) Interrupt 2 description: Interrupt 2 includes the following various motion indicator light events: working indicator lights for the 6 directions of vehicle movement; indicator lights for various working states of vehicle movement and stop; indicator lights for color light strip 1; indicator lights for color light strip 2, etc.
[0052] The 1st pin SAO of the 3-axis gyroscope motion monitoring chip U4 is the serial data output terminal; The 2nd pin ASDx of the 3-axis gyroscope motion monitoring chip U4 is the auxiliary interface data and is a spare pin; The 3-pin ASCx of the 3-axis gyroscope motion monitoring chip U4 is the auxiliary interface clock and is a spare pin; The 4th pin INT1 of the 3-axis gyroscope motion monitoring chip U4 is the first interrupt input terminal; The 5th pin VDDIO of the 3-axis gyroscope motion monitoring chip U4 is a first power supply terminal, which is connected to a first end of a capacitor C33, and a second end of the capacitor C33 is grounded to GND1; The 6th pin GNDIO of the 3-axis gyroscope motion monitoring chip U4 and the 7th pin GND of the 3-axis gyroscope motion monitoring chip U4 are both grounded to GND1; The 8-pin VDD of the 3-axis gyroscope motion monitoring chip U4 is the second power supply terminal, which is connected to the first end of the capacitor C32, and the second end of the capacitor C32 is grounded GND1. The 8-pin VDD of the 3-axis gyroscope motion monitoring chip U4 is connected to the 12-pin CSB of the 3-axis gyroscope motion monitoring chip U4; The 9th pin INT2 of the 3-axis gyroscope motion monitoring chip U4 is the second interrupt input terminal; The 10th pin OCSB of the 3-axis gyroscope motion monitoring chip U4 is the first digital input terminal of the auxiliary interface and is a spare pin; The 11th pin OSDO of the 3-axis gyroscope motion monitoring chip U4 is the second digital input terminal of the auxiliary interface and is a spare pin; The 13th pin SCX of the 3-axis gyroscope motion monitoring chip U4 is a serial clock terminal in the SPI working mode and a serial clock terminal in the IIC working mode. The 13th pin SCX of the 3-axis gyroscope motion monitoring chip U4 is respectively connected to two diode nodes of a TVS5 tube with surge protection and a first end of a resistor R45. The second end of the resistor R45 is connected to a 1.8V voltage. The 13th pin SCX of the 3-axis gyroscope motion monitoring chip U4 is also connected to a single-chip main processing unit through an IIC control circuit. The ground pin of the TVS5 tube is grounded to GND1. The 14-pin SDX of the 3-axis gyroscope motion monitoring chip U4 is the serial data terminal in the IIC working mode. The 14-pin SDX of the 3-axis gyroscope motion monitoring chip U4 is respectively connected to the TVS4 tube with surge protection function and the first end of the resistor R46. The second end of the resistor R46 is connected to the second end of the resistor R45. The ground pin of the TVS4 tube is grounded to GND1.
[0053] like Figure 7 As shown, the working logic of the 3-axis gyroscope motion monitoring chip U4 of the present invention is divided into the following four parts: Part 1: Digital and interrupt interface → ACCEL angular velocity register → 1.6KHZ frequency compensation working mode → hybrid filtering → feature and feature output → digital processing (with temperature compensation correction) → IIC interface. → User filter → optional bandwidth → user compensation → data register → IIC interface. → 1.6KHZ frequency compensation working mode → FIFO first-in first-out buffer → IIC interface.
[0054] Part II: Digital and interrupt interface → gyroscope → 6.4KHZ frequency compensation working mode → hybrid filtering → feature and feature output → digital processing (with temperature compensation correction) → II interface → user filter → optional bandwidth → user compensation → data register → digital processing (with temperature compensation correction) → II interface. → 6.4KHZ frequency compensation working mode → FIFO first-in first-out buffer → digital processing (with temperature compensation correction) → IIC interface.
[0055] Part 3: External sensor → IIC communication → AUX / IF channel / internal focus → user compensation → data register → digital processing (with temperature compensation correction) → IIC interface.
[0056] Part 4: User alternatives: OIS control driver → SPI communication → OIS / IF optical image stabilization / internal focus → user filter → optional bandwidth → user compensation → data register → digital processing (with temperature compensation correction) → SPI interface.
[0057] like Figure 8 As shown, the gyroscope optical image stabilization control module includes: Gyroscope sensor; An OIS optical image stabilization control driver connected to the gyro sensor, wherein a motor control end of the OIS optical image stabilization control driver is electrically connected to a drive motor, and the drive motor drives a connected lens; A Hall sensor connected to the Hall signal pin of the OIS optical image stabilization control driver, and the Hall sensor is installed on the lens; AP / SP interface, connected to the wireless signal access pin of the OIS optical image stabilization control driver; AF focus drive control chip, a control signal end connected to the AP / SP interface, and an output signal end connected to the signal end of the drive motor; A CMOS sensor, mounted on the lens and connected to the CMOS signal terminal of the AP / SP interface; The operating method of the gyro optical image stabilization control module includes: Step 1: The gyroscope is used to sense the vibration of the electric motorcycle. When the gyroscope is vibrated by the outside world, it feeds back the vibration signal to the OIS control driver, and performs corresponding compensation on the drive motor in the X-axis and Y-axis directions to offset the image offset caused by the vibration; Step 2: The gyroscope measures the tilt angle caused by the shaking of the electric motorcycle, and the main processing unit of the single-chip microcomputer predicts the resulting image offset according to the tilt angle; The OIS optical image stabilization control driver calculates the compensation angle and generates an instruction to control the drive motor to adjust the lens angle. The OIS optical image stabilization control driver converts the tilt angle information caused by the vibration of the gyroscope into an electrical signal to control the compensation of the X-axis and the Y-axis to stabilize the image. Step three, the Hall sensor is used for electromagnetic induction, which feeds back the position information of the lens to the OIS optical image stabilization control driver, drives the motor chip, forms a closed-loop control, and enables the lens to be accurately moved to the required position.
[0058] A preferred technical solution of this embodiment: The present invention also includes a motion monitoring and control method for a gyroscope, and the motion monitoring and control method includes the following three steps: Step 1: Check the communication of the gyroscope, including IIC communication and SPI communication; Under IIC communication, check whether the communication is normal and whether the hardware is normal. After the hardware and software communication are normal, proceed to the next step; if there is an exception in the hardware and software communication, enter the exception handling subroutine; Under SPI communication, first check the Dummy register. After the Dummy register is correct, check whether the communication is normal and whether the hardware is normal. After the hardware and software communication are normal, proceed to the next step. If there is an exception in the hardware and software communication, enter the exception handling subroutine. Step 2: Initialization and calibration test of the gyroscope. During the initialization and calibration process of the gyroscope, the main power supply B+ and the power supply of each branch power supply path must be monitored in real time; Step 3: The gyroscope works normally.
[0059] Other gyroscope actions: 1) Supply 1.8V, POR power-on reset, and re-initialize (including sensor time, initial control, initial data, interrupt status and corresponding indicator status).
[0060] 2) Chip 1.8V power supply working mode: There are four types: Low power mode: It is divided into ACCEL angular velocity mode, GYR gyroscope mode, and IMU inertial measurement mode. Configuration mode: It is in inertial measurement mode. Normal working mode: It is a measurement mode without aliasing motion. Performance mode: It is a state of running at the highest performance.
[0061] 3) Gyroscope sensor data, ①16-bit angular velocity data: high-end data and low-end data are contained in two different DATA_8 and DATA-13 data registers. ②Angular velocity data filter setting and processing are achieved through the ACC_CONF register and adaptive cruise control. ③Angular velocity data filtering method, based on the chip's low-pass filter, 3dB bandwidth cutoff frequency, noise, and gyroscope attenuation, is stored in the ACC_CONF.acc_bwp=0X02 register. ④Angular velocity data preparation interrupt: Through the INT_MAP_DATA register, whether an interrupt occurs can be seen in the DATA_8 and DATA-13 registers and the interrupt flag register.
[0062] 4) Gyroscope data ①16-bit gyroscope data: high-end data and low-end data are contained in two different data registers DATA_14 and DATA-19. ②Gyroscope data filter settings and processing are implemented through the GYR_CONF register and adaptive cruise control. ③Gyroscope data filtering method, based on the chip's low-pass filter, 3dB bandwidth cutoff frequency, noise, and gyroscope attenuation, is stored in the ACC_CONF.acc_bwp=0X02 register.
[0063] ④ Gyroscope data preprocessing: can be processed by setting different DATA_15, DATA-16, DATA_17, DATA-18, DATA-19 registers and GRY_CAS.factor_zx data registers on the X-axis, Y-axis, and Z-axis. ⑤ Normal working mode and high-performance working mode of gyroscope data: by setting different data output registers, gyroscope working frequency 25HZ / 50HZ / 100HZ / 200HZ / 400HZ / 800HZ / 1.6KHZ / 3.2KHZ / 6.4KHZ; the 3dB cutoff frequencies in normal filtering mode are: 11HZ / 20HZ / 39HZ / 77HZ / 152HZ / 300HZ / 557HZ / 751HZ / 712HZ. At this time, GYR_CONF.gyr_bwp register = 0X02.⑥ Low power working mode of gyroscope data: obtained by setting these two registers, one is PWR_CONF.adv_power_save = 0b1; the other is GYR_CONF.gyr_filter_perf = 0b0. ⑦ Preparation interrupt of gyroscope data: through the INT_MAP_DATA register, whether an interrupt occurs can be seen in the DATA_14 and DATA-19 registers and the interrupt flag register. FIFO first-in first-out buffer ① Application conditions: a) Stream mode; b) First-in first-out buffer mode. c) There are two types of interrupts supported by 2048 bytes: FIFO first-in first-out full interrupt and FIFO first-in first-out watermark interrupt. ② FIFO first-in first-out can be used in all power modes of the chip, especially under readable conditions. Low power mode. ③ FIFO first-in first-out frame structure: There are two types: one is the headless frame mode (only for data), with regular frames. One is the header frame mode (frame header + data), which is divided into regular frames and control frames (including skip frames, sensor frames, etc.) device time frame, FIFO first-in first-out input structure frame).
[0064] The communication module has three communication lines, wherein the first communication line is connected to the single-chip main processing unit, and the other two communication lines are respectively connected to the single-chip main processing unit and the single-chip slave processing unit; the three communication lines include two CAN communication circuits and one RS485 communication circuit, wherein one CAN communication circuit is connected to the single-chip slave processing unit, the other CAN communication circuit is connected to the single-chip main processing unit, and the S485 communication circuit is connected to the single-chip main processing unit.
[0065] The motor drive control module comprises a three-phase drive circuit of phase A (i.e., phase U) / phase B (i.e., phase V) / phase C (i.e., phase W) and a three-phase voltage monitoring circuit. The three-phase drive circuit is connected to the main processing unit of the single-chip microcomputer and the three-phase voltage monitoring circuit is connected in the circuit between the three-phase drive circuit and the main processing unit of the single-chip microcomputer.
[0066] The motor drive circuits of the three phase lines of the three-phase drive circuit are the same but have different phases. In any motor drive circuit, a MOS tube drive chip U9 (see Figure 9 ); Pin 1 VCC of the MOS tube driver chip U9 is connected to the first end of the capacitor C10 and the first end of the resistor R10, the second end of the capacitor C10 is grounded, the second end of the resistor R10 is connected to the +14.3V voltage and the first end of the resistor R11, the second end of the resistor R11 is connected to the positive electrode of the diode D7, the negative electrode of the diode D7 is respectively connected to the first end of the capacitor C11 and the 8-pin VB of the MOS tube driver chip U9, the second end of the capacitor C11 is connected to the first end of the resistor R12, and the second end of the resistor R12 is connected to the 6-pin Vs of the MOS tube driver chip U9; Pin 2 HIN of the MOS tube driver chip U9 is connected to the high-end control terminal HA of the main processing unit of the single-chip microcomputer; The 3-pin LIN of the MOS tube driving chip U9 is connected to the low-end control terminal LA of the main processing unit of the single-chip microcomputer; The 4th pin COM of the MOS tube driver chip U9 is grounded to GND4; The 5-pin LO of the MOS tube driving chip U9 is connected to the cathode of the diode D9, the diode D9 is connected in parallel with a resistor R15, the anode of the diode D9 is connected to the first end of the resistor R16, and the anode of the diode D9 is also output to the MOS aluminum substrate T2, and the second end of the resistor R16 is grounded GND4; The 7-pin HO of the MOS tube driver chip U9 is connected to the cathode of the diode D8, the diode D8 is connected in parallel with a resistor R13, the anode of the diode D8 is connected to the first end of the resistor R14, and the anode of the diode D8 is also output to the MOS aluminum substrate T1, and the second end of the resistor R14 is connected to the A-phase detection signal output end of the main processing unit of the single-chip microcomputer; The 9-pin GND of the MOS tube driving chip U9 is connected to the ground GND4.
[0067] A-phase motor drive control logic: It is divided into the following three types of two-way control: The first type of high-end control: single-chip microcomputer 1 high-end control HA → MOS tube driver chip U9-2 pin HIN input → MOS tube driver chip U9 internal upper and lower MOS tube push-pull complementary input circuit → level drift processing → pulse generator → high-end level drift processing → pulse filtering → RS phase-locked register → MOS tube driver chip U9 internal upper and lower MOS tube push-pull complementary output to MOS tube driver chip U9 7 pin HO → diode D8 / resistor R13 protection output → then output to MOS aluminum substrate; → simultaneously output to the motor A phase PHASE_A phase detection terminal.
[0068] The second low-end control: MCU 1 low-end control LA → MOS tube driver chip U9-3 pin LIN input → MOS tube driver chip U9 internal upper and lower MOS tube push-pull complementary input circuit → level drift processing → delay → compare with the signal from the pulse generator at the same time → MOS tube driver chip U9 internal upper and lower MOS tube push-pull complementary output to MOS tube driver chip U9 5 pin LO → diode D9 / resistor R15 protection output → then output to MOS aluminum substrate. MOS tube driver chip U9 8 pin VB end = high-end floating power supply; MOS tube driver chip U9 6 pin VS end = high-end floating power supply feedback end; MOS tube driver chip U9 9 pin GND end = MOS tube driver chip U9 center pad multiple heat dissipation holes. MOS tube driver chip U9 8 pin VB end, MOS tube driver chip U9 1 pin VCC end, MOS tube driver chip U9 2 pin HIN end, MOS tube driver chip U9 3 pin LIN end all have internal chip surge protection diodes.
[0069] The third high-end output feedback control: one is PHASE_A terminal → capacitor C11 → feedback to the 8-pin VB terminal of the MOS tube driver chip U9; the other is PHASE_A terminal → resistor R12 → feedback to the 5-pin Vs terminal of the MOS tube driver chip U9. These two feedback controls exist at the same time, and the purpose is to improve the current driving capability of the high-end side of the MOS tube driver chip U9.
[0070] Specifically, the circuits for driving the A-phase / B-phase / C-phase motors are the same, but the phases are different.
[0071] The MOS aluminum substrate auxiliary control system is a PCB board subsystem that matches the mainboard control system.
[0072] The Hall current acquisition module has three Hall current acquisition circuits for real-time acquisition of current in the three-phase drive circuit. The Hall current acquisition circuit is connected to the main processing unit of the single-chip microcomputer; the motor drive circuits of the three phase lines are all connected to the Hall current acquisition circuit, and the Hall current acquisition circuit is provided with a Hall sensor chip U5 (see Fig.10); Pin 1 VDD of the Hall sensor chip U5 is connected to the first end of the inductor L1, the second end of the inductor L1 is connected to the 5V1 voltage, Pin 2 GND of the Hall sensor chip U5 is connected to the ground GND2, Pin 3 OUT of the Hall sensor chip U5 is respectively connected to the first end of the resistor R17 and the first end of the capacitor C12, the second end of the resistor R17 is connected to the first end of the resistor R18, the second end of the capacitor C12 is connected to the ground GND2, the second end of the resistor R18 is connected to the ground end of the capacitor C12, the resistor R18 is connected in parallel with the capacitor C13, and the second end of the resistor R17 is connected to the CA voltage sampling end of the main processing unit of the single-chip microcomputer.
[0073] Phase A Hall current detection is controlled by Hall current sensor chip U5: CHI612TB008 The circuit is realized. The Hall current signal detection circuits of the A-phase / B-phase / C-phase motors are the same, only the phases are different. The U5 Hall sensor chip contains two parts of control actions: the first part of the control action sequence: external magnetic ring → Hall current signal input sensed inside the chip → dynamic drift calibration → signal amplification → signal demodulation → low-pass filtering → driver → chip V-OUT output → microcontroller voltage sampling to obtain CA signal. The second part of the control action sequence: sensitivity polarity → sensitivity modification / sensitivity TC fine-tuning → drift modification / drift TC fine-tuning → output to the EEPROM memory and control logic of the microcontroller 1. Resistors R17 and R18 are high-precision sampling resistors. Through the resistance voltage division of the sampling resistor, the current signal is converted into a voltage signal, and the microcontroller 1 can obtain an accurate voltage signal. The characteristics of the Hall sensor are: programmable sensitivity range: 0.6~32mV / Gs. Bandwidth 180KHZ; 2uS response time; extremely high ESD electrostatic protection: 8KV. The output voltage has short circuit protection and temperature protection. Temperature compensation after power-on; programmable delay; short rise time and response time; delay clamping; transient voltage output; programmable resolution under transient voltage output, segmented adjustment; small effect of temperature on sensitivity. Power-on reset voltage; power-on reset release time.
[0074] The indicator light driving control module is connected to the single chip main processing unit, and the single chip main processing unit monitors the working status of each indicator light. The indicator light driving control module includes: 1. The A phase (U phase) / B phase (V phase) / C phase (W phase) working indicator lights (real-time monitoring) of the three-phase motor and the operating status indicator lights of the motor; 2. Color light strip 1: working indicator lights for the six directions of vehicle movement (real-time monitoring); microcontroller 2 controls the working indicator lights of color light strip 1.
[0075] 3. Color light strip 2: indicator lights for various working states, including normal vehicle movement / vehicle start / vehicle acceleration / vehicle deceleration / vehicle gear shifting / multi-speed vehicle speed change (speed regulation) / vehicle short emergency stop / vehicle jump / vehicle obstacle crossing / vehicle aerial skills (including rollover) / vehicle neutral gear / vehicle downshift and refueling / vehicle fault alarm / vehicle instrument display / vehicle communication. Single chip microcomputer 2 controls the working indicator lights of color light strip 2.
[0076] In summary, the system of the present invention has the following advantages: Data fusion algorithm: Kalman filter and complementary filter relationship; In complex dynamic environments, accurate estimation of the attitude information of mountain electric motorcycles is the key to ensuring the stability and controllability of their electrical performance. This goal can be achieved through advanced data fusion algorithm processing based on the acceleration and angular velocity data obtained by the 16-bit digital 3-axis gyroscope sensor.
[0077] Strong noise filtering capability: Kalman filtering and other filters can effectively filter out noise in sensor data and improve system accuracy. This is especially important for electric motorcycles operating in complex and noisy environments.
[0078] Fast dynamic response: Kalman filtering can update the system status in real time and adapt to the dynamically changing environment. This allows the mountain electric motorcycle to maintain a stable system posture in rapidly changing terrain.
[0079] ④ Attitude estimation: By integrating the data of accelerometer, angular velocity and gyroscope, the pitch angle, roll angle and other attitude information of the electric motorcycle are estimated. Position tracking: Combined with positioning data such as GPS, the position and trajectory of the electric motorcycle can be tracked in real time.
[0080] ⑤ Fusion of multi-sensor data: Through adaptive weight combination and complementary filtering, data from different sensors can be effectively fused to provide the system with stable attitude estimation.
[0081] ⑥ Steps to use complementary filtering: 1) Low-frequency part: Using the accelerometer and angular velocity data, the low-frequency components are extracted through a low-pass filter to obtain long-term stable attitude information.
[0082] 2) High frequency part: Using gyroscope data, high-frequency components are extracted through a high-pass filter to reflect rapid dynamic changes.
[0083] 3) Data fusion: Adaptively weight the low-frequency and high-frequency parts to obtain the final attitude estimation.
[0084] In the application of mountain electric motorcycles, complementary filtering is mainly used for: Attitude correction: Based on the long-term stable attitude provided by the accelerometer and angular velocity, the gyroscope data can compensate for the rapid changes in the vehicle's movements in a short period of time, maintaining the accuracy and stability of the attitude correction estimate.
[0085] ⑦ System stability: Through adaptive linear combination, complementary filtering can quickly respond to posture changes and improve the stability of the electrical performance of mountain electric motorcycles in complex terrain.
[0086] ⑧Data encryption and security: AES encryption and two-way authentication (identity authentication and session password key) mechanism are adopted; In the main electronic control system of modern mountain electric motorcycles, the safety and privacy of electrical performance are crucial. Especially in the complex situation where there are multiple communication methods (CAN bus, RS485, Bluetooth and 5G Wi-Fi modules) at the same time, the security of data transmission is also important.
[0087] The above description is only a preferred embodiment of the present invention, and does not limit the patent scope of the present invention. Any equivalent structure or equivalent process transformation made by using the contents of the present invention specification and drawings, or directly or indirectly applied in other related technical fields, are also included in the patent protection scope of the present invention.
Claims
1. A main control system for a mountain electric motorcycle based on motor drive and Hall current detection with 3-axis gyroscope motion detection, characterized in that: include: A power supply module, which provides power to the main control system and the auxiliary control system, and has a main power supply and multiple branch power supply paths electrically connected to the main power supply; A single-chip dual processing unit, comprising a single-chip master processing unit and a single-chip slave processing unit; A gyroscope motion monitoring module is connected to the single chip main processing unit via an IIC control circuit; There are multiple surge protection modules, which are respectively connected to each signal control, each signal input and output interface and the communication interface; The communication module has three communication lines, wherein the first RS485 communication line is connected to the single-chip main processing unit, and the other two CAN communication lines are connected to the single-chip main processing unit and the single-chip slave processing unit respectively; A motor drive control module, comprising a three-phase drive circuit and a three-phase voltage monitoring circuit, wherein the three-phase drive circuit is connected to the single-chip main processing unit and the three-phase voltage monitoring circuit is connected in the circuit between the three-phase drive circuit and the single-chip main processing unit; A Hall current acquisition module, comprising three Hall current acquisition circuits for real-time acquisition of currents in the three-phase drive circuit, and the Hall current acquisition circuits are connected to the main processing unit of the single-chip microcomputer; The indicator light driving control module is connected to the single chip main processing unit.
2. A main control system for a mountain electric motorcycle based on motor drive and Hall current detection based on 3-axis gyroscope motion detection according to claim 1, characterized in that: The total power supply is a B+ lithium battery total power supply, which is connected to 7 power branch power supply paths and an auxiliary control system; The power branch power path has a DC-DC step-down circuit electrically connected to the B+ lithium battery total power supply, an output end feedback circuit connected to the DC-DC step-down circuit, and an output end filter protection circuit connected to the DC-DC step-down circuit.
3. A main control system for a mountain electric motorcycle based on motor drive and Hall current detection based on 3-axis gyroscope motion detection according to claim 2, characterized in that: The DC-DC step-down circuit is electrically connected to a branch power supply DC-DC chip U3; The pin 1 VIN of the DC-DC chip U3 is connected to the output terminal B+ of the B+ lithium battery main power supply; Pin 2 EN of the DC-DC chip U3 is connected to resistor R52, resistor R50, and resistor R51 respectively, the other end of the resistor R52 is connected to the drain of the MOS switch tube Q1, the source of the MOS switch tube Q1 is grounded GND5, and its gate is connected to resistors R53 and R54, the other end of the resistor R53 is connected to the enable control signal terminal 36VSD of the single-chip main processing unit or the single-chip slave processing unit, the other end of the resistor R54 is connected to the source of the MOS switch tube Q1, the other end of the resistor R50 is connected to the cathode of the diode D1, and the anode of the diode D1 is connected to the key lock control KEYLOCK; Pin 3 FB of the DC-DC chip U3 is respectively connected to the first end of the capacitor C38, the first end of the resistor R60, and the first end of the resistor R61, the second end of the resistor R60 is grounded to GND5, and the resistor R60 and the resistor R61 form the output end feedback circuit; The 4-pin VD of the DC-DC chip U3 is connected to the positive electrode of the diode D2, the negative electrode of the diode D2 is connected to the 5-pin VB of the DC-DC chip U3 and one end of the capacitor C35, the other end of the capacitor C35 is respectively connected to the 7-pin VS of the DC-DC chip U3 and one end of the resistor R58, the other end of the resistor R58 is respectively connected to the negative electrode of the diode D3, the first end of the inductor L1, and one end of the resistor R59, the positive electrode of the diode D3 is grounded GND5, the other end of the resistor R59 is respectively connected to one end of the resistor R57, One end of the resistor R56, one end of the capacitor C36, the source of the MOS switch tube Q2, and the positive electrode of the diode ZD1, the other end of the resistor R57 is connected to the 8-pin IS of the DC-DC chip U3, the other end of the resistor R56 is respectively connected to the other end of the capacitor C36, the gate of the MOS switch tube Q2, one end of the resistor R55, and the negative electrode of the diode ZD1, the drain of the MOS switch tube Q2 is connected to the output end B+ of the B+ lithium battery total power supply, and the other end of the resistor R55 is connected to the 6-pin HO of the DC-DC chip U3; Pin 9 of the DC-DC chip U3 is grounded to GND5; The second end of the inductor L1 is respectively connected to the first end of the capacitor C37, the second end of the capacitor C38, the second end of the resistor R61, and the positive electrode of the polar capacitor C39, the second end of the capacitor C37 is grounded, and the negative electrode of the polar capacitor C39 is grounded GND5; The polarized capacitor C39 is respectively connected in parallel with capacitors C41, C42, C43, and C40, wherein the positive electrode of the polarized capacitor C40 is connected to the positive electrode of the polarized capacitor C39; Resistors R62 and R63 of the same resistance value are connected in series and then connected in parallel with the polarized capacitor C39; The polarized capacitor C39, the polarized capacitor C40, the capacitor C41, and the capacitor C42 constitute the output end filtering protection circuit.
4. A main control system for a mountain electric motorcycle based on motor drive and Hall current detection based on 3-axis gyroscope motion detection according to claim 1, characterized in that: The circuit of the gyroscope motion monitoring module is provided with a 16-bit digital 3-axis gyroscope motion monitoring chip U4; The 1st pin SAO of the 3-axis gyroscope motion monitoring chip U4 is the serial data output terminal; The 2nd pin ASDx of the 3-axis gyroscope motion monitoring chip U4 is the auxiliary interface data and is a spare pin; The 3-pin ASCx of the 3-axis gyroscope motion monitoring chip U4 is the auxiliary interface clock and is a spare pin; The 4th pin INT1 of the 3-axis gyroscope motion monitoring chip U4 is the first interrupt input terminal; The 5th pin VDDIO of the 3-axis gyroscope motion monitoring chip U4 is a first power supply terminal, which is connected to a first end of a capacitor C33, and a second end of the capacitor C33 is grounded to GND1; The 6th pin GNDIO of the 3-axis gyroscope motion monitoring chip U4 and the 7th pin GND of the 3-axis gyroscope motion monitoring chip U4 are both grounded to GND1; The 8-pin VDD of the 3-axis gyroscope motion monitoring chip U4 is the second power supply terminal, which is connected to the first end of the capacitor C32, and the second end of the capacitor C32 is grounded GND1. The 8-pin VDD of the 3-axis gyroscope motion monitoring chip U4 is connected to the 12-pin CSB of the 3-axis gyroscope motion monitoring chip U4; The 9th pin INT2 of the 3-axis gyroscope motion monitoring chip U4 is the second interrupt input terminal; The 10th pin OCSB of the 3-axis gyroscope motion monitoring chip U4 is the first digital input terminal of the auxiliary interface and is a spare pin; The 11th pin OSDO of the 3-axis gyroscope motion monitoring chip U4 is the second digital input terminal of the auxiliary interface and is a spare pin; The 13th pin SCX of the 3-axis gyroscope motion monitoring chip U4 is a serial clock terminal in the SPI working mode and a serial clock terminal in the IIC working mode. The 13th pin SCX of the 3-axis gyroscope motion monitoring chip U4 is respectively connected to two diode nodes of a TVS5 tube with surge protection and a first end of a resistor R45. The second end of the resistor R45 is connected to a 1.8V voltage. The 13th pin SCX of the 3-axis gyroscope motion monitoring chip U4 is also connected to a single-chip main processing unit through an IIC control circuit. The ground pin of the TVS5 tube is grounded to GND1. The 14-pin SDX of the 3-axis gyroscope motion monitoring chip U4 is the serial data terminal in the IIC working mode. The 14-pin SDX of the 3-axis gyroscope motion monitoring chip U4 is respectively connected to the TVS4 tube with surge protection function and the first end of the resistor R46. The second end of the resistor R46 is connected to the second end of the resistor R45. The ground pin of the TVS4 tube is grounded to GND1.
5. A main control system for a mountain electric motorcycle based on motor drive and Hall current detection based on 3-axis gyroscope motion detection according to claim 1, characterized in that: The three communication lines include two CAN communication circuits and one RS485 communication circuit, wherein one CAN communication circuit is connected to the single-chip microcomputer slave processing unit, the other CAN communication circuit is connected to the single-chip microcomputer master processing unit, and the S485 communication circuit is connected to the single-chip microcomputer master processing unit.
6. A main control system for a mountain electric motorcycle based on motor drive and Hall current detection based on 3-axis gyroscope motion detection according to claim 1, characterized in that: The motor drive control circuits of the three phase lines of the three-phase drive control circuit are the same but have different phases. In any motor drive control circuit, a MOS tube drive chip U9 is provided; Pin 1 VCC of the MOS tube driver chip U9 is connected to the first end of the capacitor C10 and the first end of the resistor R10, the second end of the capacitor C10 is grounded, the second end of the resistor R10 is connected to the +14.3V power supply voltage and the first end of the resistor R11, the second end of the resistor R11 is connected to the positive electrode of the diode D7, the negative electrode of the diode D7 is respectively connected to the first end of the capacitor C11 and the 8th pin VB of the MOS tube driver chip U9, the second end of the capacitor C11 is connected to the first end of the resistor R12, and the second end of the resistor R12 is connected to the 6th pin Vs of the MOS tube driver chip U9; Pin 2 HIN of the MOS tube driver chip U9 is connected to the high-end control terminal HA of the main processing unit of the single-chip microcomputer; The 3-pin LIN of the MOS tube driving chip U9 is connected to the low-end control terminal LA of the main processing unit of the single-chip microcomputer; The 4th pin COM of the MOS tube driver chip U9 is grounded to GND4; The 5-pin LO of the MOS tube driving chip U9 is connected to the cathode of the diode D9, the diode D9 is connected in parallel with a resistor R15, the anode of the diode D9 is connected to the first end of the resistor R16, and the anode of the diode D9 is also output to the MOS aluminum substrate T2, and the second end of the resistor R16 is grounded GND4; The 7-pin HO of the MOS tube driver chip U9 is connected to the cathode of the diode D8, the diode D8 is connected in parallel with a resistor R13, the anode of the diode D8 is connected to the first end of the resistor R14, and the anode of the diode D8 is also output to the MOS aluminum substrate T1, and the second end of the resistor R14 is connected to the A-phase detection signal output end of the main processing unit of the single-chip microcomputer; The 9th pin GND of the MOS tube driving chip U9 is connected to the ground GND4.
7. A main control system for a mountain electric motorcycle based on motor drive and Hall current detection based on 3-axis gyroscope motion detection according to claim 6, characterized in that: The motor drive circuits of the three phase lines are all connected to a Hall current collection circuit, and the Hall current collection circuit is provided with a Hall sensor chip U5; Pin 1 VDD of the Hall sensor chip U5 is connected to the first end of the inductor L1, the second end of the inductor L1 is connected to the 5V1 voltage, pin 2 GND of the Hall sensor chip U5 is connected to the ground GND2, pin 3 OUT of the Hall sensor chip U5 is respectively connected to the first end of the resistor R17 and the first end of the capacitor C12, the second end of the resistor R17 is connected to the first end of the resistor R18, the second end of the capacitor C12 is connected to the ground GND2, the second end of the resistor R18 is connected to the ground end of the capacitor C12, the resistor R18 is connected in parallel with the capacitor C13, and the second end of the resistor R17 is connected to the CA voltage sampling end of the single-chip main processing unit.
8. A main control system for a mountain electric motorcycle based on motor drive and Hall current detection based on 3-axis gyroscope motion detection according to claim 1, characterized in that: The device also includes a gyro optical image stabilization control module, wherein the gyro optical image stabilization control module includes: Gyroscope sensor; An OIS optical image stabilization control driver connected to the gyro sensor, wherein a motor control end of the OIS optical image stabilization control driver is electrically connected to a drive motor, and the drive motor drives a connected lens; A Hall sensor connected to the Hall signal pin of the OIS optical image stabilization control driver, and the Hall sensor is installed on the lens; AP / SP interface, connected to the wireless signal access pin of the OIS optical image stabilization control driver; AF focus drive control chip, a control signal end connected to the AP / SP interface, and an output signal end connected to the signal end of the drive motor; A CMOS sensor, mounted on the lens and connected to the CMOS signal terminal of the AP / SP interface; The operating method of the gyro optical image stabilization control module includes: Step 1: The gyroscope is used to sense the vibration of the electric motorcycle. When the gyroscope is vibrated by the outside world, it feeds back the vibration signal to the OIS control driver, and performs corresponding compensation on the drive motor in the X-axis and Y-axis directions to offset the image offset caused by the vibration; Step 2: The gyroscope measures the tilt angle caused by the shaking of the electric motorcycle, and the main processing unit of the single-chip microcomputer predicts the resulting image offset according to the tilt angle; The OIS optical image stabilization control driver calculates the compensation angle and generates an instruction to control the drive motor to adjust the lens angle. The OIS optical image stabilization control driver converts the tilt angle information caused by the vibration of the gyroscope into an electrical signal to control the compensation of the X-axis and the Y-axis to stabilize the image. Step three, the Hall sensor is used for electromagnetic induction, which feeds back the position information of the lens to the OIS optical image stabilization control driver, drives the motor chip, forms a closed-loop control, and enables the lens to be accurately moved to the required position.
9. A main control system for a mountain electric motorcycle based on motor drive and Hall current detection based on 3-axis gyroscope motion detection according to claim 1, characterized in that: The invention also includes a motion monitoring and control method of a gyroscope, the motion monitoring and control method comprising the following three steps: Step 1: Check the communication test of the gyroscope, including IIC communication and SPI communication; Under IIC communication, check whether the communication is normal and whether the hardware is normal. After the hardware and software communication are normal, proceed to the next step; when there is an exception in the hardware and software communication, enter the exception handling subroutine; Under SPI communication, first check the Dummy register. After the Dummy register is correct, check whether the communication is normal and whether the hardware is normal. After the hardware and software communication are normal, proceed to the next step. When there is an exception in the hardware and software communication, enter the exception handling subroutine. Step 2: Initialization and calibration test of the gyroscope. During the initialization and calibration process of the gyroscope, the main power supply B+ and the power supply of each branch power supply path must be monitored in real time; Step 3: The gyroscope works normally.
10. A main control system for a mountain electric motorcycle based on motor drive and Hall current detection using 3-axis gyroscope motion detection according to any one of claims 1 to 9, characterized in that: The single-chip microcomputer main processing unit and the single-chip microcomputer slave processing unit both use single-chip microcomputers. The single-chip microcomputer model used by the single-chip microcomputer main processing unit is GD32F405RGT6, and the single-chip microcomputer model used by the single-chip microcomputer slave processing unit is STM32F103C8T6.