An encoder assembly for a wheel hub motor, a wheel hub motor and an electric vehicle

By using a magnetic encoder assembly in the hub motor, the problems of easy damage and difficult maintenance of Hall elements are solved, achieving low-cost, high-efficiency assembly and maintenance, and ensuring the motor's sealing and service life.

CN224537974UActive Publication Date: 2026-07-21ZHEJIANG JIUZHOU NEW ENERGY TECHNOLOGY CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Utility models(China)
Current Assignee / Owner
ZHEJIANG JIUZHOU NEW ENERGY TECHNOLOGY CO LTD
Filing Date
2025-07-01
Publication Date
2026-07-21

AI Technical Summary

Technical Problem

Hall elements in existing hub motors are susceptible to damage from high temperatures, affecting their accuracy and lifespan, and are also costly to repair. Replacing the encoder assembly from the inside would compromise the seal, increasing the difficulty of transportation and maintenance.

Method used

The magnetic encoder assembly includes a housing, an external drive gear, and a driven gear. The sensing magnet is positioned opposite to the magnetic encoder, and the external drive gear meshes with the driven gear. Changes in the angle or displacement of the sensing magnet are sent to the controller circuit board for processing via the magnetic encoder, avoiding internal wiring. It is assembled with the hub motor as a separate modular component.

Benefits of technology

It reduced production costs, improved assembly efficiency, eliminated internal wiring, ensured sealing, simplified the maintenance process, reduced the labor intensity of workers, and reduced the cost of returning the equipment for repair.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN224537974U_ABST
    Figure CN224537974U_ABST
Patent Text Reader

Abstract

An encoder assembly for a wheel hub motor, a wheel hub motor and an electric vehicle, comprising a housing, an outer drive gear rotatably arranged in the housing and a driven gear, the outer drive gear being engaged with the driven gear; the driven gear is connected with the housing shaft at one end, and the driven gear is provided with an inductive magnet at the other end, and the housing inner wall is provided with an encoder arranged opposite to the inductive magnet, and a gap is formed between the inductive magnet and the encoder. The utility model has the advantages that compared with the prior art, the above-mentioned encoder assembly has the following advantages: simple structure, few components, convenient assembly, low production cost, as a separate modular component, it is more convenient and efficient to assemble with the wheel hub motor, and the wiring from the wheel hub motor is avoided, which can be completely automated production, saves the production cost, and can be used as a spare part for the wheel hub motor after the built-in Hall element or encoder is damaged, avoiding the large cost caused by the wheel hub motor repair.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This utility model relates to hub motors, specifically to encoder assemblies for hub motors, hub motors, and electric vehicles. Background Technology

[0002] With the increasing popularity of electric bicycles and electric motorcycles in the market, the demands on the performance and functionality of electric vehicles are also rising. Most existing two-wheeled electric vehicle hub motors use Hall effect sensors to detect changes in the magnetic field, converting the magnetic signal into an electrical signal and transmitting it to the controller. When the motor uses Hall elements to collect rotor information, the poor temperature characteristics of the Hall elements cause high internal temperatures during heavy motor operation, easily damaging the Hall elements and affecting their accuracy and sensitivity. Damaged Hall element output signals further affect the controller's control accuracy, impacting motor operating characteristics and reducing overall riding comfort. High temperatures can even directly cause irreparable damage to the Hall elements, affecting the motor's lifespan. Furthermore, when using high-power, high-speed motors, the continuous increase in load current causes the induced electromotive force generated in the motor's internal winding coils to significantly affect the Hall elements' acquisition of permanent magnet rotor position information, directly leading to rotor position distortion. This prevents the controller from accurately controlling motor commutation, causing the motor to stop working directly. Finally, the Hall elements are installed in the Hall slots of the stator core inside the motor, making them susceptible to mechanical damage during installation, affecting their lifespan.

[0003] Currently, encoders are often used instead of Hall elements to collect rotor information. However, whether it is a hub motor that uses Hall elements or an encoder to collect rotor information, the Hall element or encoder is located inside the hub. When it is damaged, the hub motor often needs to be returned to the manufacturer for repair. The transportation and repair costs of hub motors are high, and the hub motor needs to be opened to replace the Hall element or encoder, which damages the sealing of the hub motor and easily leads to the risk of water ingress. Utility Model Content

[0004] The purpose of this invention is to overcome the shortcomings of the prior art and provide a magnetic encoder assembly for a hub motor, as well as a hub motor and an electric vehicle.

[0005] The main technical solution of the magnetic encoder assembly for a hub motor provided by this utility model is as follows: it includes a housing, an external drive gear and a driven gear rotatably disposed within the housing, the external drive gear meshing with the driven gear; one end of the driven gear is connected to the housing shaft, and the other end of the driven gear is provided with an induction magnet; a magnetic encoder is provided on the inner wall of the housing opposite to the induction magnet, and a gap is formed between the induction magnet and the magnetic encoder; a first shaft hole is provided on one side of the housing, a second shaft hole is provided on the other side of the housing, the external drive gear is located between the first shaft hole and the second shaft hole, and a third shaft hole is provided on the external drive gear, the first shaft hole, the second shaft hole and the third shaft hole being arranged opposite to each other.

[0006] The magnetic encoder assembly for hub motors provided by this utility model also adopts the following auxiliary technical solutions:

[0007] Preferably, one end of the driven gear is provided with a shaft groove, and the inner wall of the housing is provided with a fixed shaft. The driven gear is rotatably mounted on the fixed shaft through the shaft groove.

[0008] Preferably, a bearing is provided in the shaft groove, the outer ring of the bearing is connected to or interference-fitted with the inner wall of the shaft groove, and the inner ring of the bearing is connected to or interference-fitted with the fixed shaft.

[0009] Preferably, the housing includes a groove and a cover that is fastened to the groove. A fixed shaft is provided on the cover, a magnetic encoder is provided on the inner wall of the groove, a first shaft hole is provided on the groove, a second shaft hole is provided on the cover, and the groove and the cover are connected by screws.

[0010] Preferably, a groove is provided at the other end of the driven gear, and the induction magnet is located in the groove.

[0011] Preferably, the external drive gear is provided with a flange.

[0012] Preferably, the outer diameter of the flange is larger than the outer diameter of the external drive gear, and the axial thickness of the flange is smaller than the axial thickness of the external drive gear.

[0013] Preferably, the flange has a recessed step.

[0014] Preferably, the inner diameter of the first shaft hole is larger than the inner diameter of the second shaft hole.

[0015] Preferably, the inner wall of the first shaft hole is provided with an annular support portion.

[0016] Preferably, the inner wall of the housing is provided with a carrier plate, the magnetic encoder is mounted on the carrier plate, and the carrier plate is fixedly connected to the housing.

[0017] The main technical solution of the hub motor provided by this utility model is as follows: it includes a support shaft, a stator and a hub mounted on the support shaft. The hub includes two end caps arranged opposite each other, and a cavity is formed inside the hub, with the stator located inside the cavity. The stator includes a stator bracket fixed on the support shaft and a stator core mounted on the outer periphery of the stator bracket. A magnetic encoder assembly for the hub motor is provided on the support shaft. The magnetic encoder assembly for the hub motor includes a housing, an external drive gear and a driven gear rotatably mounted inside the housing, with the external drive gear meshing with the driven gear. One end of the driven gear is connected to the housing shaft, and the other end of the driven gear... An induction magnet is provided at one end, and a magnetic encoder is provided on the inner wall of the housing opposite to the induction magnet, with a gap between the induction magnet and the magnetic encoder; a first shaft hole is provided on one side of the housing, and a second shaft hole is provided on the other side of the housing, with an external drive gear located between the first and second shaft holes, and a third shaft hole provided on the external drive gear, with the first, second, and third shaft holes being opposite to each other; a support shaft passes through the first, third, and second shaft holes in sequence, and the housing is connected and fixed to the support shaft, with the external drive gear connected to one of the end covers on the hub and rotating synchronously with the end cover, and the external drive gear driving the driven gear meshing with it to rotate.

[0018] The hub motor provided by this utility model also adopts the following auxiliary technical solutions:

[0019] Preferably, the inner diameter of the third shaft hole is larger than the outer diameter of the corresponding support shaft portion.

[0020] Preferably, the external drive gear and the end cover are integrally molded.

[0021] Preferably, the end cap is provided with a convex ring, and the first shaft hole is sleeved on the convex ring, and the two can rotate relative to each other. A sealing ring is provided between the inner wall of the first shaft hole and the outer wall of the convex ring.

[0022] Preferably, the external drive gear is connected to the end cover by screws.

[0023] The main technical solution of the electric vehicle provided by this utility model is as follows: it includes a frame, a hub motor mounted on the frame, a tire mounted on the hub motor, and a battery and controller mounted on the frame. The hub motor includes a support shaft, a stator mounted on the support shaft, and a hub. The hub includes two end caps arranged opposite each other, and a cavity is formed inside the hub, with the stator located inside the cavity. The stator includes a stator bracket fixed on the support shaft and a stator core mounted on the outer periphery of the stator bracket. A magnetic encoder assembly for the hub motor is provided on the support shaft. The magnetic encoder assembly for the hub motor includes a housing, an external drive gear and a driven gear rotatably mounted inside the housing, and the external drive gear and the driven gear... The driven gear is meshed with the housing shaft at one end and has an induction magnet at the other end. A magnetic encoder is provided on the inner wall of the housing opposite to the induction magnet, and a gap is formed between the induction magnet and the magnetic encoder. A first shaft hole is provided on one side of the housing and a second shaft hole is provided on the other side of the housing. An external drive gear is located between the first and second shaft holes and has a third shaft hole. The first, second, and third shaft holes are arranged opposite to each other. A support shaft passes through the first, third, and second shaft holes in sequence. The housing is connected and fixed to the support shaft. The external drive gear is connected to one of the end covers on the hub and rotates synchronously with the end cover. The external drive gear drives the driven gear that meshes with it to rotate.

[0024] Compared with the prior art, the magnetic encoder assembly for hub motors, hub motors, and electric vehicles provided by this utility model have the following advantages: The magnetic encoder assembly has a simple structure, fewer parts, convenient assembly, and low production cost. As a separate modular component, it is more convenient and efficient to assemble with the hub motor, and it avoids wiring inside the hub motor. It can be fully automated, saving production costs and reducing the labor intensity of workers. Hub motor manufacturers can directly assemble the magnetic encoder assembly onto the hub motor, that is, fix the external drive gear to the end cover of the hub motor, and make the external drive gear and one end cover of the hub motor an integral structure. When the hub motor rotor rotates, it drives the external drive gear to rotate, and the external drive gear drives the driven gear meshing with it to rotate. The sensing magnet rotates synchronously with the driven gear. The change in the angle or displacement of the sensing magnet will cause a change in the resistance or voltage of the magnetic encoder. The magnetic encoder sends this change to the main control chip on the controller circuit board for signal processing to complete the detection of the hub motor rotor, and thus obtain the position information of the hub motor rotor. The magnetic encoder assembly can also be used as an accessory for wheel hub motors with damaged built-in Hall elements or magnetic encoders. Simply connect the external drive gear coaxially to the end cover of the existing wheel hub motor to avoid the large costs associated with returning the wheel hub motor to the factory for repair. Attached Figure Description

[0025] Figure 1 This is an exploded view of the magnetic encoder assembly for a hub motor according to Embodiment 1 of this utility model.

[0026] Figure 2 This is a structural diagram of the magnetic encoder assembly for a hub motor in Embodiment 1 of this utility model without the cover.

[0027] Figure 3 This is a structural diagram of the driven gear in the magnetic encoder assembly for a hub motor according to Embodiment 1 of this utility model.

[0028] Figure 4 This is a structural diagram of a hub motor according to Embodiment 1 of this utility model.

[0029] Figure 5 This is a cross-sectional view of a hub motor according to Embodiment 1 of this utility model.

[0030] Figure 6 This is a cross-sectional view of the hub motor in Embodiment 2 of this utility model.

[0031] Figure 7 This is the structure of the external drive gear in the magnetic encoder assembly for a hub motor according to Embodiment 2 of the present invention. Figure 1 .

[0032] Figure 8 This is the structure of the external drive gear in the magnetic encoder assembly for a hub motor according to Embodiment 2 of the present invention. Figure 2 .

[0033] Figure 9 This is a cross-sectional view of the hub motor in Embodiment 3 of this utility model.

[0034] Figure 10 This is a structural diagram of the end cover of the hub motor in Embodiment 3 of this utility model. Detailed Implementation

[0035] To make the above-mentioned objectives, features and advantages of this utility model more apparent and understandable, the utility model will be further described in detail below with reference to the accompanying drawings and specific embodiments.

[0036] The working principle of an encoder: The rotation of a sensing magnet causes a change in the angle or displacement of the magnet, which in turn causes a change in the resistance or voltage of the magnetic encoder. This change is sent to the main control chip on the controller circuit board for signal processing, thus detecting the rotation angle or displacement of the sensing magnet. The encoder described above is a relatively mature technology and will not be elaborated upon here.

[0037] Example 1

[0038] See Figures 1 to 5According to the embodiment of the magnetic encoder assembly for hub motor provided by the utility model, it includes a housing 1, an external drive gear 2 and a driven gear 3 rotatably disposed in the housing 1, the external drive gear 2 and the driven gear 3 meshing; one end of the driven gear 3 is connected to the shaft of the housing 1, and the other end of the driven gear 3 is provided with an induction magnet 4, and a magnetic encoder 5 is provided on the inner wall of the housing 1 opposite to the induction magnet 4, and a gap is formed between the induction magnet 4 and the magnetic encoder 5; one side of the housing 1 is provided with a first shaft hole 111, and the other side of the housing 1 is provided with a second shaft hole 121, the external drive gear 2 is located between the first shaft hole 111 and the second shaft hole 121, and the external drive gear 2 is provided with a third shaft hole 21, the first shaft hole 111, the second shaft hole 121 and the third shaft hole 21 are opposite and concentrically arranged. The aforementioned magnetic encoder assembly has a simple structure, few parts, is easy to assemble, and has low production costs. As a separate modular component, it is more convenient and efficient to assemble with the hub motor. Since it is installed outside the hub motor and connected to the end cover outside the hub motor, it avoids wiring inside the hub motor, allowing for fully automated production, saving production costs, and reducing the labor intensity of workers. Hub motor manufacturers can directly assemble the magnetic encoder assembly onto the hub motor, that is, fix the external drive gear 2 to the end cover 101 of the hub motor, making the external drive gear 2 and one end cover 101 of the hub motor an integral structure. When the hub motor rotor rotates, it drives the external drive gear 2 to rotate, and the external drive gear 2 drives the driven gear 3 that meshes with it to rotate. The sensing magnet 4 rotates synchronously with the driven gear 3. Changes in the angle or displacement of the sensing magnet 4 will cause changes in the resistance or voltage of the magnetic encoder 5. The magnetic encoder 5 sends this change to the main control chip on the controller circuit board for signal processing to complete the detection of the hub motor rotor, thereby obtaining the position information of the hub motor rotor. The magnetic encoder assembly can also be used as an accessory for remedial solutions of hub motors with damaged built-in Hall elements or built-in encoders. Simply connect the external drive gear 2 coaxially with the end cover 101 of the existing hub motor to avoid the large costs of returning the hub motor to the factory for repair.

[0039] See Figures 1 to 5 According to the above-described embodiment of the utility model, the driven gear 3 has a shaft groove 31 at one end, and a fixed shaft 122 is provided on the inner wall of the housing 1. The driven gear 3 is rotatably mounted on the fixed shaft 122 through the shaft groove 31. The driven gear 3 and the housing 1 are connected by a single-sided shaft, which facilitates the installation position setting of the magnetic encoder 5, helps to simplify the overall structure of the product, and improves assembly efficiency.

[0040] See Figures 1 to 5According to the above-described embodiment of the utility model, a bearing 6 is provided in the shaft groove 31. The bearing includes an outer ring, an inner ring, and a roller located between the two. The outer ring of the bearing 6 is connected to or has an interference fit with the inner wall of the shaft groove 31, and the inner ring of the bearing 6 is connected to or has an interference fit with the fixed shaft 122. In this embodiment, the outer ring of the bearing 6 has an interference fit with the inner wall of the shaft groove 31, and the inner ring of the bearing 6 has an interference fit with the fixed shaft 122. This reduces the rotational resistance and wear of the driven gear 3, improves the reliability and service life of the magnetic encoder assembly, and contributes to energy saving in electric vehicles.

[0041] See Figures 1 to 5 According to the above-described embodiment of the utility model, a groove 32 is provided at the other end of the driven gear 3, and the induction magnet 4 is disposed in the groove 32. The design of the groove 32 can prevent the induction magnet 4 from shifting on the driven gear 3. Alternatively, an adhesive material can be used to further bond the induction magnet 4 to the groove 32. The bottom surface and the surrounding area of ​​the induction magnet 4 are bonded to the adhesive material, resulting in higher reliability.

[0042] See Figures 1 to 5 According to the above-described embodiment of the utility model, the housing 1 includes a groove 11 and a cover 12 fastened to the groove 11. A fixed shaft 122 is disposed on the cover 12, a magnetic encoder 5 is disposed on the inner wall of the groove 11, a first shaft hole 111 is disposed on the groove 11, and a second shaft hole 121 is disposed on the cover 12. The groove 11 and the cover 12 are connected by screws. The housing 1 has a simple structure and is easy to assemble. When assembled with a hub motor, the first shaft hole 111 is closer to the hub motor side, and the inner diameter of the first shaft hole 111 is larger than the inner diameter of the second shaft hole 121. The inner wall of the first shaft hole 111 is provided with an annular support portion 112. The end cover 101 of the hub motor is provided with a convex ring 1011, and the first shaft hole 111 is fitted on the convex ring 1011. The two can rotate relative to each other. A sealing ring 103 is provided between the annular support part 112 and the outer wall of the convex block. The annular support part 112 helps to improve the mechanical strength of the groove 11, and also facilitates its fit with the sealing ring 103, thereby improving the sealing performance between the housing 1 and the hub motor diameter.

[0043] See Figures 1 to 5 According to the above-described embodiment of the utility model, a support plate 13 is provided on the inner wall of the housing 1, and the magnetic encoder 5 is disposed on the support plate 13. The support plate 13 is fixedly connected to the housing 1. Screw connection is preferred. During assembly, the magnetic encoder 5 is first fixed to the support plate 13, and then the support plate 13 is fixed to the housing 1. The support plate 13 serves as a connecting carrier between the magnetic encoder 5 and the housing 1, facilitating the fixed connection of the magnetic encoder 5 within the housing 1 and preventing damage to the individual magnetic encoder 5 during the fixing process.

[0044] See Figure 4 and Figure 5According to the embodiment of the hub motor provided by the utility model, it includes a support shaft 102, a stator and a hub disposed on the support shaft 102. The hub includes two end caps 101 disposed opposite each other, and a cavity is formed inside the hub, with the stator located inside the cavity. The stator includes a stator bracket fixed on the support shaft 102 and a stator core disposed on the outer periphery of the stator bracket. The support shaft 102 is provided with the magnetic encoder assembly for the hub motor described in the above embodiment. The support shaft 102 passes through a first shaft hole 111, a third shaft hole 21 and a second shaft hole 121 in sequence. The housing 1 is connected and fixed to the support shaft 102. The external drive gear 2 is connected to one of the end caps 101 on the hub and rotates synchronously with the end cap 101. The external drive gear 2 drives the driven gear 3 meshing with it to rotate. The housing 1 is connected to the support shaft 102 through the second shaft hole 121, specifically by snap-fit ​​fixing or screw fixing. The external drive gear 2 has an opening on the end cap 101 and is connected together by screws. The inner diameter of the third shaft hole 21 is larger than the outer diameter of the supporting shaft 102 portion opposite to it. When the supporting shaft 102 portion opposite to the third shaft hole 21 has a non-circular cross-section, the inner diameter of the third shaft hole 21 is larger than the maximum outer diameter of that portion. The end cover 101 is provided with a convex ring 1011, and the first shaft hole 111 is fitted onto the convex ring 1011, allowing relative rotation between the two. A sealing ring 103 is provided between the inner wall of the first shaft hole 111 and the outer wall of the convex ring. The induction magnet 4 rotates synchronously with the driven gear 3. Changes in the angle or displacement of the induction magnet 4 will cause changes in the resistance or voltage of the magnetic encoder 5. The magnetic encoder 5 sends this change to the main control chip on the controller circuit board for signal processing to complete the detection of the hub motor rotor and thus obtain the position information of the hub motor rotor. With this structure, the magnetic encoder assembly is more convenient and efficient to assemble with the hub motor as a separate modular component, and it avoids wiring inside the hub motor, enabling fully automated production, saving production costs, and reducing the labor intensity of workers.

[0045] See Figures 1 to 3 and Figure 5 According to the embodiment of the electric vehicle provided by the utility model, it includes a frame, a hub motor mounted on the frame, a tire mounted on the hub motor, and a battery and controller mounted on the frame. The hub motor is the hub motor described in the above embodiment, and the magnetic encoder 5 is connected to the controller. The electric vehicle using the above-mentioned hub motor has an independent modular design for its magnetic encoder assembly, which facilitates maintenance and repair, makes troubleshooting the hub motor easier and faster, and makes repairing the magnetic encoder 5 easier, faster, and more cost-effective, while also ensuring the motor's sealing.

[0046] Example 2

[0047] See Figures 6 to 8This embodiment is largely the same in structure as Embodiment 1 above, except for the external drive gear 2. In this embodiment, the external drive gear 2 is provided with a flange 22. The flange 22 is coaxially arranged with the external drive gear 2 and is an integral structure. The thickness of the flange 22 is less than the thickness of the gear. In this embodiment, when the magnetic encoder assembly is connected to the hub motor, holes are made in the flange 22 and the end cover 101, and they are fixed together with screws. Providing a flange 22 on the external drive gear 2 facilitates the connection and fixation between the external drive gear 2 and the end cover 101. The outer diameter of the flange 22 is larger than the outer diameter of the external drive gear 2, and the axial thickness of the flange 22 is smaller than the axial thickness of the external drive gear 2. Compared to the difficulty of making holes in the external drive gear, it is easier to make holes in the flange 22, thus reducing production costs. The hub motor end cover 101 is provided with a convex ring 1011 and a protruding step 1012. The flange 22 is provided with a recessed step 221. During assembly, the protruding step 1012 and the recessed step 221 are inserted and matched, which helps to improve the sealing between the magnetic encoder assembly and the end cover 101 and improves the reliability of the product.

[0048] Example 3

[0049] See Figures 9 to 10 This embodiment is structurally similar to Embodiment 1 above, with the only difference being that the external drive gear 2 and the end cover 101 are integrally formed in this embodiment. This eliminates the connection process between the external drive gear 2 and the end cover 101, making assembly more convenient.

[0050] The technical solution provided by this utility model has been described in detail above. Specific examples have been used to illustrate the principle and implementation of this utility model. The description of the above embodiments is only for the purpose of helping to understand the method and core idea of ​​this utility model. The terms "front," "back," "left," "right," "positive," and "negative" in this solution are all terms used to describe things clearly from a certain perspective. At the same time, for those skilled in the art, there will be changes in the specific implementation and application scope based on the idea of ​​this utility model. Therefore, the content of this specification should not be construed as a limitation of this utility model.

Claims

1. A magnetic encoder assembly for a hub motor, characterized in that, The device includes a housing, an external drive gear and a driven gear rotatably disposed within the housing, the external drive gear meshing with the driven gear; one end of the driven gear is connected to the housing shaft, and the other end of the driven gear is provided with an induction magnet; a magnetic encoder is provided on the inner wall of the housing opposite to the induction magnet, and a gap is formed between the induction magnet and the magnetic encoder; a first shaft hole is provided on one side of the housing, a second shaft hole is provided on the other side of the housing, the external drive gear is located between the first shaft hole and the second shaft hole, and a third shaft hole is provided on the external drive gear, the first shaft hole, the second shaft hole and the third shaft hole being arranged opposite to each other.

2. The magnetic encoder assembly for a hub motor according to claim 1, characterized in that, The driven gear has a shaft groove at one end, and a fixed shaft is provided on the inner wall of the housing. The driven gear is rotatably mounted on the fixed shaft through the shaft groove.

3. The magnetic encoder assembly for a hub motor according to claim 2, characterized in that, A bearing is installed in the shaft groove. The outer ring of the bearing is connected to or has an interference fit with the inner wall of the shaft groove, and the inner ring of the bearing is connected to or has an interference fit with the fixed shaft.

4. The magnetic encoder assembly for a hub motor according to claim 2, characterized in that, The housing includes a groove and a cover that is fastened to the groove. A fixed shaft is located on the cover, a magnetic encoder is located on the inner wall of the groove, a first shaft hole is located on the groove, and a second shaft hole is located on the cover.

5. The magnetic encoder assembly for a hub motor according to claim 1, characterized in that, A groove is provided at the other end of the driven gear, and the induction magnet is located in the groove.

6. The magnetic encoder assembly for a hub motor according to claim 1, characterized in that, The external drive gear is equipped with a flange.

7. The magnetic encoder assembly for a hub motor according to claim 6, characterized in that, The outer diameter of the flange is larger than the outer diameter of the external drive gear, and the axial thickness of the flange is smaller than the axial thickness of the external drive gear.

8. The magnetic encoder assembly for a hub motor according to claim 6, characterized in that, The flange has a recessed step.

9. The magnetic encoder assembly for a hub motor according to any one of claims 1-8, characterized in that, The inner diameter of the first shaft hole is larger than the inner diameter of the second shaft hole.

10. The magnetic encoder assembly for a hub motor according to any one of claims 1-8, characterized in that, The inner wall of the first shaft hole is provided with an annular support.

11. The magnetic encoder assembly for a hub motor according to any one of claims 1-8, characterized in that, The inner wall of the housing is provided with a support plate, and the magnetic encoder is mounted on the support plate. The support plate is fixedly connected to the housing.

12. A hub motor, comprising a support shaft, a stator disposed on the support shaft, and a hub, the hub comprising two end caps disposed opposite each other, a cavity formed within the hub, and the stator located within the cavity; the stator comprising a stator bracket fixed on the support shaft and a stator core disposed on the outer periphery of the stator bracket, characterized in that, The support shaft is provided with a magnetic encoder assembly for a hub motor as described in any one of claims 1-11; the support shaft passes through the first shaft hole, the third shaft hole and the second shaft hole in sequence, the housing is connected and fixed to the support shaft, the external drive gear is connected to one of the end covers on the hub and rotates synchronously with the end cover, and the external drive gear drives the driven gear meshing with it to rotate.

13. The hub motor according to claim 12, characterized in that, The external drive gear and the end cover are integrally molded.

14. The hub motor according to claim 12, characterized in that, The end cap is provided with a protruding ring, and the first shaft hole is fitted on the protruding ring. The two can rotate relative to each other. A sealing ring is provided between the inner wall of the first shaft hole and the outer wall of the protrusion.

15. The hub motor according to claim 12, characterized in that, The external drive gear is connected to the end cover by screws.

16. An electric vehicle, comprising a frame, a hub motor mounted on the frame, a tire mounted on the hub motor, and a battery and controller mounted on the frame, characterized in that, The hub motor is the hub motor described in any one of claims 12-15, and the magnetic encoder is connected to the controller.