1. Trang chủ
  2. » Giáo Dục - Đào Tạo

Research and development of intelligent self balancing electric assist bicycle

84 0 0
Tài liệu đã được kiểm tra trùng lặp

Đang tải... (xem toàn văn)

Tài liệu hạn chế xem trước, để xem đầy đủ mời bạn chọn Tải xuống

THÔNG TIN TÀI LIỆU

Thông tin cơ bản

Tiêu đề Nghiên cứu và phát triển xe đạp trợ lực điện tự cân bằng thông minh
Tác giả Trịnh Minh Phúc, Bùi Quốc Hoàng
Người hướng dẫn Ph.D Vũ Quang Huy
Trường học Trường Đại học Sư phạm Kỹ thuật Thành phố Hồ Chí Minh
Chuyên ngành Mechatronics Engineering Technology
Thể loại Đồ án tốt nghiệp
Năm xuất bản 2024
Thành phố Thành phố Hồ Chí Minh
Định dạng
Số trang 84
Dung lượng 7,72 MB

Cấu trúc

  • CHAPTER 1. INTRODUCTION (18)
    • 1.1. The urgency of the topic (18)
    • 1.2. Scientific and practical significance of the topic (19)
    • 1.3. Research objectives of the topic (19)
    • 1.4. Scope of the project (19)
    • 1.5. Research methodology (20)
    • 1.6. Structure of the graduation thesis (20)
  • CHAPTER 2. THEORETICAL FOUNDATIONS (22)
    • 2.1. Reaction wheel (22)
    • 2.2. Chain Drive (24)
    • 2.3. Brushless DC motor (26)
    • 2.4. RC Servo (28)
    • 2.5. I 2 C protocol (29)
    • 2.6. UART protocol (30)
    • 2.7. SPI protocol (31)
    • 2.8. PWM (32)
    • 2.9. Kalman filter (33)
    • 2.10. PID (36)
  • CHAPTER 3. MECHANICAL DESIGN (38)
    • 3.1. Design requirements (38)
    • 3.2. Analysis and selection of transmission options (38)
      • 3.2.1. Pedal assist transmission system (38)
    • 3.3. Vehicle balancing system (46)
      • 3.3.1. Balancing wheel (46)
      • 3.3.2. Mounting bracket of the reaction wheel motor to the frame (49)
      • 3.3.3. Rear brake assembly part (53)
  • CHAPTER 4. CONTROL SYSTEM DESIGN (21)
    • 4.1. Microcontroller selection (54)
    • 4.2. Block diagram (54)
      • 4.2.1. Block diagram for the balancing system (55)
      • 4.2.2. Block diagram for the electric assist system (56)
    • 4.3. Principle diagram (56)
    • 4.4. Details of components in the system (59)
      • 4.4.1. STM32F103C8T6 microcontroller (59)
      • 4.4.2. Encoder LPD3806-600BM (59)
      • 4.4.3. MPU6050 sensor (60)
      • 4.4.4. NRF24L01-M wireless module (61)
      • 4.4.5. Load cell sensor (61)
      • 4.4.6. SH1106 OLED LCD screen (62)
      • 4.4.7. Brushless motor (63)
      • 4.4.8. Gear reduction motor MY1016 Z (63)
      • 4.4.9. Power supply (64)
    • 4.5. Algorithm flowchart (68)
      • 4.5.1. Balancing system algorithm flowchart (68)
      • 4.5.2. Electric assist system algorithm flowchart (69)
  • CHAPTER 5. SYSTEM RESULTS AND EVALUATION (21)
    • 5.1. Results after assembly (71)
    • 5.2. Control system evaluation experiments (74)
      • 5.2.1. PID controller evaluation (75)
      • 5.2.2. Kalman filter evaluation (76)
      • 5.2.3. System balancing response evaluation (77)
      • 5.2.4. Feedback from force sensor module (79)
      • 5.2.5. Evaluation of electric assist system effectiveness (80)
  • CHAPTER 6. CONCLUSION AND FUTURE DEVELOPMENT (21)
    • 6.1. Conclusion (82)

Nội dung

Our initial research has shown promising results as we have created hardware components such as the balancing motor assembly, steering servo assembly, and electric assist assembly to mou

INTRODUCTION

The urgency of the topic

Currently, the green lifestyle is gradually becoming popular in major cities, and the use of green transportation is a new trend, including bicycles, electric bicycles, and electric vehicles Our team recognized the user demand for a compact, daily convenient vehicle that can help users travel long distances without much effort, thus forming the idea of researching and developing an electric assist bicycle with smart self-balancing features

To understand more about electric assist bicycles, we need to look back at their formation and development from the past to the present An electric assist bicycle is a bicycle equipped with an electric motor to assist pedaling, making cycling easier, especially when going uphill or over bridges Around the late 19th century, the first patent for an electric motor-assisted bicycle was recorded, invented by an American inventor named Ogden Bolton

Jr His invention contributed to the development of today's electric assist bicycles

However, over more than 100 years, electric assist bicycles have only recently started to establish a foothold as efficient and economical transportation For many reasons, mainly due to the oversized motors and battery packs, electric motorized vehicles were less popular than gasoline-powered internal combustion engine vehicles between 1920-1980 It was not until the 1990s that electric motorized vehicles truly boomed thanks to Lithium battery technology and brushless DC motors At this time, major manufacturers like Panasonic and Yamaha began to invest more heavily in the electric vehicle sector, developing it very well in Japan and Asia in general The European and North American markets were equally vibrant as large bicycle manufacturers began producing electric assist bicycles Today, electric assist bicycles are becoming a trend in developed countries and are expected to become the main mode of transportation in major cities where pollution from internal combustion engine vehicles is severe

One significant drawback of electric assist bicycles that this project aims to address is the high production cost Currently, to own a basic electric assist bicycle, users need to spend at least 15 million VND The best and most famous electric assist motor manufacturer today is Bosch with its Performance Line CX motor series, which offers many special features and

2 maximizes rider support, making cycling easier However, the cost of this motor system is not cheap, around 100 million VND, excluding the bicycle frame More competitively priced are the Chinese manufacturers, notably Bafang, whose motors offer comparable power to Bosch but at only about 2/5 the price Yet, even at that price, it is still quite high for Vietnamese consumers, so our team has researched and found methods to manufacture an electric assist bicycle at a more accessible price while still retaining all the necessary features of an electric assist bicycle

As mentioned above, besides the electric assist capability, our team's product also features smart self-balancing So, how does this feature benefit bicycle usage? The smart self- balancing feature proposed by our team is not intended to balance the rider but to make the bicycle smarter and easier to use The balancing feature will enable the bicycle to self-drive without a rider, allowing it to intelligently move in and out of parking lots, follow the owner without being pushed, and in the future, our team aims to develop a system to control the bicycle via a smartphone to summon the bicycle from the parking lot to the owner's location or have the bicycle self-drive to a specific assigned location

Finally, our team hopes to contribute to the development of a transportation mode that will undoubtedly become very popular in many places worldwide in the near future and be a green, clean, and convenient means of transportation suitable for everyone.

Scientific and practical significance of the topic

The smart self-balancing electric assist bicycle model is created to research a public transportation vehicle that has become and will continue to be an essential mode of transport in major cities worldwide The model can measure the pedaling force of the user's legs and provide an appropriate level of assistance based on each individual's physical condition Additionally, the model also studies the balance of objects in space under the influence of gravity using a gyroscope, utilizing a flywheel as a moving weight to help the bicycle achieve a balanced state The model has high practical significance as it promises to be a convenient, green, clean, and healthy means of transportation in the near future.

Research objectives of the topic

In this project, our team researches and develops a model of an electric assist bicycle with smart self-balancing features The model has capabilities such as self-balancing, providing electric assistance to help the rider pedal with less effort, and processing information from sensors.

Scope of the project

To limit the scope of the project, our team sets the following constraints:

- The model's dimensions are 1800x680x1200mm

- The bicycle can travel a distance of approximately 30km

- The maximum speed is under 50km/h

- The bicycle can balance at tilt angles of ± 20 degrees.

Research methodology

Literature Review Method: Collect documents and research works related to electric assist bicycles and balanced flywheels From the collected information, our team will filter and identify limitations to overcome and determine suitable research directions for the project

Experimental Research Method: Our team conducts experiments and creates surveys on specific flywheel masses that can help balance the bicycle This helps identify specific parameters to minimize errors as much as possible

Survey Research Method: Our team surveys the pedaling force of both ordinary people and athletes to best fine-tune the electric assist system to match the physical condition of Vietnamese users

Expert Consultation Method: Discuss with the project advisors to evaluate the research direction theoretically and the feasibility of implementing the project Our team also consults with experts in the field of electric assist bicycles and bicycles, as well as coaches of professional racing teams, to draw on their experiences and lessons to improve the bicycle to suit specific racing scenarios.

Structure of the graduation thesis

This thesis will be divided into 6 chapters, including:

Chapter 1: Introduction to the Topic

This chapter will provide an overview of electric assist bicycles, the smart and special features of the project, the necessary research methods, the practical applications of the project, and the methods to implement the project

From this, the objectives that the project needs to achieve will be presented, along with the necessary limitations Our team will summarize the content that needs to be reported as well as the feasibility of implementing the project

Chapter 2: Theoretical Basis of the Topic

In this chapter, our team will analyze the essential components required to construct a smart electric assist bicycle model, providing an overview of the features, advantages, and disadvantages of each device used in the model Additionally, it will introduce the self-

4 balancing wheel, various types of drivetrains used in the model, and relevant calculation formulas

In this chapter, our team will dive deeper into selecting components for the model such as motors, chain drives, belt drives, wheels, and pedal assemblies of the bicycle Additionally, it will cover machining methods to create these parts and calculations for the force required on the pedal axle of the bike

For the electrical system and controller design of the bike, our team will introduce the use of an STM32 microprocessor-based controller, breakout boards for connecting electrical components such as motor drivers, MPU sensors, steering servos, battery systems, and voltage regulators for the motors In the controller design section, our team will present a PID controller to provide PWM signals for motor control, and a Kalman filter to process signals from the MPU angle sensors

Chapter 5: System Results and Evaluation

In this chapter, our team will summarize the achievements during the project implementation, detailing what has been accomplished and what remains incomplete From this, conclusions about the project will be drawn, suggesting improvements and future development directions for the model This will enhance future projects, making them more comprehensive and refined

Chapter 6: Conclusion and future development

In this chapter, our team will present the accomplishments achieved, outline the limitations of the project, and propose development directions to enhance future projects, thereby improving overall project completeness

THEORETICAL FOUNDATIONS

Reaction wheel

The Microsat Reaction Wheel (MRW), also known as the Micro Wheel, was developed at SSTL in the mid-1990s and features a unique design using simple electronic components weighing less than 1kg [1]

A reaction wheel is a spinning wheel or rotor mounted on a gimbal or bearings, allowing it to rotate freely around a fixed axis Reaction wheels operate based on the principle of conservation of angular momentum

Figure 2.1: An image depicting a reaction wheel

In practice, reaction wheels are widely applied across various fields One notable application is integrating reaction wheels onto satellites, enabling them to autonomously orient themselves in space Additionally, when mounted on a gimbal frame where the reaction wheel can freely rotate in all directions, it forms a gyroscopic system that finds extensive use in determining the orientation of devices or submerged equipment such as submarines and underwater drones…

Figure 2.2: Illustration of applications of reaction wheels

For self-balancing vehicles in general, and specifically for self-balancing bicycles, keeping the vehicle balanced while stationary is indeed a challenging task Therefore, to assist in maintaining balance, integrating a reaction wheel system onto the bicycle is necessary

Figure 2.3: Modeling a reaction wheel system on a bicycle

To facilitate the analysis of the reaction wheel system, the team modeled the system as shown in Figure 2.3 The self-balancing system integrated onto the vehicle, which includes the vehicle frame and the reaction wheel, can be visualized as a pendulum system with point

A being the pivot of the rotating joint connecting the pendulum rod to the ground, with a length 𝑙 𝐴𝐷 , corresponding to the height of the vehicle frame above the ground Point B represents the center of mass of the pendulum, assuming that the pendulum rod is a homogeneous mass, the center of mass of the pendulum is the midpoint of points A and D Point C is the pivot of the rotating joint connecting the wheel to the rod

We consider the system under analysis to have 2 degrees of freedom, and its state can be determined by 2 coordinates: the angle 𝜃 representing the deviation angle of the pendulum from the equilibrium point, and the angular velocity 𝜔 of the wheel

The reaction wheel rotates around point C and simultaneously rotates around point A along with the pendulum rod By applying the parallel axis theorem, we have the moment of inertia of the wheel about point A, denoted as 𝐼 𝑤 𝐴

7 where mw is the mass of the reaction wheel and lAC is the distance between points A and C

The pendulum rotating around point A has its moment of inertia calculated by the formula:

12𝑚 𝑟 (3𝑟 2 + 𝑙 𝐴𝐷 2 ) + 𝑚 𝑟 𝑙 𝐴𝐵 2 (2 2) where mr is the mass of the rod, lAB is the distance between points A and B, and lAD is the distance between points A and D

The torque of the reaction wheel is calculated by the following formula:

From the above equations, we obtain the state equation of the system:

Chain Drive

Chain drive is a method of transmitting mechanical power from one place to another using a chain and two sprockets (driving sprocket and driven sprocket) Chain drives are commonly used to transfer power from shafts to wheels in vehicles such as bicycles and motorcycles They are also found in various types of machinery, especially in industrial applications

The chain is driven by the driving sprocket, which has teeth that engage with the chain links, allowing it to rotate smoothly and transfer power from one shaft to another The chain consists of multiple rigid links connected by pins, enabling the driving and driven sprockets to rotate around each other

Figure 2.4: An example of a chain drive

- Types of chain drives currently used:

Roller Chain: Uses rollers between the inner plates, reducing friction and wear

Bush Chain: Uses bushings instead of rollers, suitable for low-speed and high-load applications

Leaf Chain: Consists of link plates and pins with no rollers, designed for heavy lifting and pulling applications

Heavy Duty Chain: Built robustly for handling high loads and tough operating conditions

Double Pitch Chain: Has elongated pitch for accommodating larger sprockets, often used in conveyor systems

Half Link Chain: Features links that are half the length of standard links, useful for precise chain length adjustments

Drag Chain: Flexible and often enclosed, used to protect and guide cables and hoses in automated systems

Power Transmission Chain: Designed specifically for transmitting mechanical power efficiently

Plastic Chain: Made from plastic materials, used in applications requiring corrosion resistance or where noise reduction is crucial

Stainless Steel Chain: Corrosion-resistant and durable, suitable for applications requiring hygiene or exposure to harsh environments

Brushless DC motor

A Brushless DC motor, also known as BLDC motor, is an electric motor controlled electronically, featuring stator magnets as the motor's stationary part and permanent magnets as the rotor This type of motor utilizes a driver to switch the electromagnet poles, thereby converting electrical energy into mechanical energy

BLDC motors are synchronous motors, meaning the rotor speed matches the speed of the magnetic field They find wide applications in industrial automation, printers, automotive, consumer electronics, medical devices, and measurement equipment

Figure 2.5: An example of a brushless motor

A Brushless DC motor (BLDC motor), similar to conventional synchronous motors, positions its coils 120 degrees apart within the stator Permanent magnets fixed onto the rotor serve to induce the motor's action The key distinction of BLDC motors from other permanent magnet synchronous motors is their requirement for rotor position sensing to operate effectively

Stator: Consists of a laminated iron core and winding The winding configuration in BLDC motors differs from that of traditional three-phase AC motors, creating a trapezoidal back electromotive force

Rotor: Fundamentally similar to other permanent magnet motors, available in two types: outrunner and inrunner, each with unique advantages and drawbacks depending on the application

Hall Sensor: Due to the trapezoidal back electromotive force, typical control configurations of brushless motors necessitate position sensors to determine rotor magnetic field positions relative to stator phases Hall sensors are commonly used for this purpose, positioned on the stator rather than the rotor

The operating principle of BLDC motors relies on the interaction of the magnetic field generated by the stator with the permanent magnets on the rotor When current flows through one of the three stator windings, it creates a magnetic pole that attracts the nearest permanent magnet with the opposite pole The rotor continues to rotate as the current shifts to an adjacent winding Sequentially powering each winding causes the rotor to follow the rotating magnetic field

In practice, to enhance interaction force, current is often applied to two windings simultaneously, with switching sequence controlled by the BLDC motor driver circuit

Utilization of permanent magnets reduces copper and iron losses on the rotor, offering advantages such as:

Large air gap flux density

Relatively high power-to-weight ratio

High moment of inertia ratio (enabling rapid acceleration)

Smooth operation at both low and high speeds

Rapid acceleration and deceleration capabilities

Efficiency typically ranges from 70% to 75% for conventional motors, while BLDC motors can achieve efficiencies up to 90%

Excellent speed control, suitable for high-speed applications (above 10,000 rpm)

Savings on maintenance costs, eliminating the need for brush and commutator replacements

BLDC motors, using permanent magnets and Hall sensors for precise speed and torque control, tend to be relatively expensive However, with the increasing adoption of BLDC motors, costs are gradually decreasing.

RC Servo

RC (Radio Control) servo motor is a DC motor with a gearbox integrated into its body, designed to provide low speed, high torque output It comes in various sizes, ranging from small enough to fit in the palm of a hand to larger sizes comparable to a hand's size Unlike

DC motors and Stepper motors, RC servo motors typically do not rotate a full 360 degrees Instead, they are limited to rotation within ranges like 180, 270, or 90 degrees

A control signal in the form of PWM (Pulse Width Modulation) is sent to the servo motor to rotate its shaft and achieve the desired angle In practice, RC servo motors are not directly controlled by RC signals; they are connected to a central control circuit This control circuit receives signals from the RC transmitter and adjusts the RC servo motor to rotate to the desired angle

RC servo motors find wide applications in remote-controlled models such as RC airplanes, RC cars, or RC boats due to their flexibility, compact size, high torque output, and ease of use

Compact, lightweight, and easy to use

Available in various sizes suitable for different purposes

Capable of generating high torque

Relatively affordable compared to industrial servo types

Mostly made with plastic housing, which may not ensure durability for industrial use

Accuracy is not high enough, suitable primarily for assembly into simple RC products.

I 2 C protocol

The I2C communication standard is widely adopted and powerful, commonly used for communication between one or more master devices and one or more slave devices using just two wires [2]

Due to its simplicity, stable performance, and ability to connect multiple devices on the same bus, the I2C communication standard is widely used by peripheral device manufacturers, such as various types of sensors, as an integrated communication standard

Initially, the I2C communication standard was limited to a speed of 100 kbit/s After numerous improvements, the I2C standard now includes five data transfer speeds:

- Standard-Mode (Sm): Bit rate up to 100 kbit/s

- Fast-Mode (Fm): Bit rate up to 400 kbit/s

- Fast-Mode Plus (Fm+): Bit rate up to 1 Mbit/s

- High-speed Mode (HS-mode): Bit rate up to 3.4 Mbit/s

- Ultra Fast-Mode (UFm): Bit rate up to 5 Mbit/s

I2C requires two wires: SDA (Serial Data Line) and SCL (Serial Clock Line) for communication between devices The SDA line is used to transmit data between devices, while the SCL line is used to synchronize signals on the SDA line

The I2C data frame consists of four components:

- Start: Start bit signaling the beginning of a data frame being sent to the receiving device

- 7-bit Address + 1 Bit R/W: The next bits include a 7-bit address and 1 bit to set the read or write status

- ACK/NACK: Acknowledgment bit indicating that the device has received the address

- Data bits: The following 8 bits are data bits

- Stop bit: Signals the completion of the data frame transmission

UART protocol

UART stands for Universal Asynchronous Receiver-Transmitter, a widely used asynchronous communication protocol today that can transmit and receive data simultaneously

Figure 2.9: Connection of UART protocol

UART operates with a very simple data transmission and reception method, connecting devices via two designated lines: Tx (Transmitting) and Rx (Receiving) Data is sent and received in standardized frames known as Data framing

Specifically, UART operates in three modes:

- Simplex: Data flows in only one direction

- Half duplex: Data can be transmitted in one direction at a time

- Full duplex: Data can be transmitted and received simultaneously

- Idle: This bit signals that the device is ready to transmit or receive data, set at a high logic level (logic HIGH)

- Start bit: Signals the beginning of a data frame, set at a low logic level (logic LOW)

- Data bits: Typically 5-9 data bits, depending on the UART configuration

- Parity bit: Used for error checking during data transmission

- Stop bit: One or two subsequent bits always set at a high logic level (logic HIGH), signaling the completion of the character The start bit being low (0) and stop bit(s) being high (1) ensure at least two signal transitions between characters

Figure 2.10: Basic data framing of UART protocol

As an asynchronous communication protocol, it is necessary to synchronize certain settings between transmitting and receiving devices, such as voltage levels (typically 3.3v or 5v) and Baud Rate, also known as the data transmission speed.

SPI protocol

SPI, short for Serial Peripheral Interface, was developed by Motorola in the mid-1980s initially for internal chip-to-chip communication SPI allows for full-duplex communication, where a master device can both send and receive data simultaneously One master device can communicate with multiple slave devices, but each slave can only communicate with one master

Typically, the SPI communication standard uses 4 wires to connect devices:

SCLK: Serial Clock line used for synchronizing communication between devices MISO: Master Input Slave Output, used to send signals from the master device to the slave device

MOSI: Master Output Slave Input, used to send signals from the slave device to the master device

SS/CS: Slave Select/Chip Select line, used by the master device to select which slave device to communicate with Each connected slave device has its own SS/CS line

Unlike the UART and I2C communication standards mentioned earlier, the SPI (Serial Peripheral Interface) standard does not have a fixed data frame structure Data is transmitted in blocks that can be 8 bits, 16 bits, or more, depending on the specific devices involved.

PWM

In both past and present automation control systems, the method of control using PWM (Pulse Width Modulation) is widely applied to regulate motor speed, valve openings, or light intensity…

PWM stands for Pulse Width Modulation, a technique that generates signals with alternating high and low voltage levels, continuously The difference in time between the high and low voltage levels is referred to as the pulse width

In many cases, it's necessary to set the PWM signal at a specific frequency, such as 50Hz for controlling servo positions [3], or between 5-20kHz for controlling various types of

The PWM frequency can be understood as the inverse of the total time of the alternating HIGH and LOW voltage levels in the signal

The PWM pulse frequency is calculated using the following formula:

Kalman filter

When working with highly sensitive sensors like the MPU6050, the readings from the sensor are susceptible to noise due to external environmental factors such as vibrations, wind, or pressure changes However, in most control systems today, using high-sensitivity sensors is crucial to enhance system performance This is particularly important for systems like the self-balancing bicycle mentioned in this report, where high-sensitivity sensors are necessary to detect small changes in tilt angle and promptly adjust the position of the bicycle for balance

Using noisy sensor signals directly as input to the system can lead to reduced system efficiency, loss of stability, or even inability to control the output effectively An example of signal noise is illustrated in Figure 2.14, where the accelerometer appears stationary but

17 exhibits certain fluctuations in its readings If such signals were used as inputs for a self- balancing system, they would introduce undesired errors

Figure 2.13: The reading from the accelerometer is stationary for 200ms

To reduce noise for highly sensitive sensors, susceptible to environmental influences, common filters like Low Pass Filters (LPF), High Pass Filters (HPF), or Band Pass Filters (BPF) can be employed These filters utilize frequency to distinguish noise from actual values However, in practice, high-sensitivity sensors often exhibit noise across various frequency ranges due to changing environmental conditions Therefore, there's a need for a filter capable of addressing noise across all frequency bands The Kalman filter is one such filter that meets this criterion

In 1960, R.E Kalman published a seminal paper describing a recursive solution to the discrete linear filtering problem Since then, due to advancements in digital computation, the Kalman filter has become widely researched and extensively applied, particularly in automation and navigation support fields [3]

The Kalman filter is popular for its straightforward computations and its ability to effectively filter noise based on the actual noise values observed Hence, it is a good choice for noise filtering in sensors, especially when the frequency of noise cannot be determined from sensor readings

The Kalman filter is an algorithm used to estimate or predict the next value based on previous values The prediction process can be seen as a noise filtering process for sensors, as it removes or reduces the amplitude of outliers

The Kalman filter equations for sensor noise filtering

Figure 2.14: Output signal after applying the Kalman filter

PID

The PID (Proportional-Integral-Derivative) controller was developed and initially applied in the early 1920s At that time, it was used in automatic steering systems for ships Subsequently, it was further developed and widely adopted in the field of automatic control, including applications in pneumatic systems, temperature control, and more Today, PID controllers are extensively used in various industries that demand precise and stable automatic control

True to its name, the PID controller combines three components: Proportional, Integral, and Derivative These components are combined and their coefficients adjusted specifically for each application to optimize the system's output

The basic idea of the PID controller involves reading the current state value of the system through sensors, comparing this value with the desired setpoint, and then using the Proportional, Integral, and Derivative components to compute the output for actuators to achieve the desired system state effectively

Figure 2.15: Block diagram of the full PID controller

Each stage in the controller will have its own unique impacts:

- Proportional: The proportional stage is the simplest It depends solely on the difference between the setpoint and the measured value at a specific time, also known as the error, and is represented by the formula 𝐾 𝑝 𝑒(𝑡) A larger Kp value results in faster output response speed However, if the response speed is too high, it can lead to significant oscillations in the output result

- Integral: The integral stage computes the cumulative sum of error values over time, and its value continuously increases until the error becomes zero It is represented by the formula: 𝐾 𝑖 ∫ 𝑒(𝑡)𝑑𝑡 0 𝑡 As the error approaches zero, the response speed of the integral stage decreases proportionally This is compensated by the value of the integral stage

- Derivative: The derivative stage reduces the impact of error on the system if the rate of change of error increases rapidly It is represented by the formula 𝐾 𝑑 𝑑𝑒(𝑡)

Combining the three stages together, we have the general PID controller:

In specific cases, there are particular formulas for PID controllers, with the most common being those used for position and velocity control

The PID controller used for position control:

The PID controller used for velocity control:

Figure 2.16: Description of the response of each stage in a PID controller

MECHANICAL DESIGN

Design requirements

Our team has set the following design requirements for the model:

- Compact and easy to move

- Equipped with self-balancing and autonomous operation mechanisms

- Pedal-assist mechanism capable of fully supporting pedaling force

Analysis and selection of transmission options

The chain drive system has advantages such as handling large loads, no slipping, reliable durability, and precise, consistent motion Therefore, our team will use a chain drive to transmit power from the motor through the chain drive to design an electric assist component for the bicycle However, chain drives also have some disadvantages compared to belt drives, such as loud operation noise and requiring lubrication between chain links Nevertheless, considering the electric assist component's importance and the current use of a chain drive to transmit power from the pedal shaft to the rear wheel, using a chain drive is a suitable choice

Next, to ensure the chain drive operates smoothly and efficiently, it's necessary to calculate the center distance between the two shafts to select the appropriate chain length Additionally, the gear ratio for the system and the generated output power at the pedal shaft will be calculated

The type of chain we chose has a pitch distance of p = 12.8 mm

Sprocket wheel Z2 = 34 d1 = 58 mm d2 = 130 mm da1 = 71 mm da2 = 144 mm

The center distance between two sprockets is typically chosen to be between 30-50 times the pitch diameter of the chain links However, our team has opted for a center distance

22 of 144mm to save space in the design, albeit reducing the durability of the chain system slightly

Where X is the number of chain links calculated according to the formula:

Calculate the power at the pedal shaft:

The motor type used by the group has a power of 350W, rotational speed 330 𝑅𝑃𝑀

60000 = 1.1264 (𝑚 𝑠⁄ ) (3 5) After obtaining the above parameters, our team will proceed with manufacturing the chain drive for the electric pedal assist component Initially, since only ready-made cranksets are available on the market, our team will need to modify the crank axle to accommodate the chainring

The crankset used by our team is the Fovno GOBLIN MTB crankset On the market, cranksets are typically designed with axles integrated into the crankset, so our team cannot adjust the length of the crank axle to fit the model's requirements Our team chose this crankset because it features a removable crank axle, making it easier to manufacture Additionally, this type of crank axle is hollow, made of aluminum, and utilizes bearings for load-bearing, making it lighter than conventional solid crank axles while also providing higher durability

Next, when the motor rotates to provide assistance to the cyclist, it will also rotate the crankset and consequently move the cyclist's legs However, when the cyclist wants to stop pedaling, the inertia of the motor may continue to pull, causing discomfort Another scenario occurs when starting to pedal: the motor may provide a sudden torque along with high speed, which pulls the cyclist's legs In such cases, if the cyclist stops pedaling suddenly, the motor's inertia could unintentionally drag along, posing a safety risk

Therefore, our team has proposed a solution to add a one-way bearing This addition aims to keep the crankset and the motor's chain drive in a freewheeling state when the cyclist is not pedaling They will only engage and rotate when the cyclist begins applying downward force on the pedal

Figure 3.2: NSK 30PP one-way bearing

From these requirements, it is not possible to fit this one-way bearing onto the pedal shaft because the shaft diameter is 24mm, but the bearings are only available in sizes for shafts of 25mm and 30mm Additionally, the thickness of the bearing is larger than the clearance of the existing pedal shaft slot Therefore, our team has decided to manufacture a new pedal shaft based on the design of the old one, but with increased length and outer diameter to accommodate the one-way bearing

Figure 3.3: Pedal shaft after redesign

After redesigning the new pedal shaft, our team proceeded to calculate the torsional strength to ensure that the shaft can withstand the same durability as the old shaft

The improved shaft is made from aluminum alloy 6061

To determine the maximum pedal force on the end of the lever arm with a length of 170mm as 400N, the torsional moment Mz acting on the shaft is calculated as:

𝑀 𝑧 = 𝐹 170.10 −3 = 68(𝑁 𝑚) (3 6) Model and internal force diagram of the shaft:

Figure 3.4: Mathematical model and internal force diagram of shaft

The maximum allowable stress on the shaft is calculated using the formula:

Therefore, we can confirm that the shaft, after improvement, meets all the strength requirements

CNC (Computer Numerical Control) is a modern machining technology that uses a cutting tool to shape solid materials (also known as blanks) into precise products with specific technical specifications

Today, various types of metal CNC machines with automated functions make CNC machining easier, suitable for both one-off production and large-scale manufacturing Materials that can be CNC machined include metals, plastics, wood, glass, and composites

Due to the precision and durability requirements of the drive system, our team has decided to utilize 3D metal CNC machining to manufacture most components for the model

Through measuring the dimensions based on the old shaft and recalculating for compatibility with the one-way bearing, our team successfully CNC machined a new pedal shaft after several trials and improvements

Calculating the shaft length: In the design of the old pedal shaft, after assembly on the bike, there was a 4mm gap, but the bearing has a thickness of 15mm Therefore, we need to

26 add 11mm to the shaft Additionally, we need to leave a 4mm clearance for the motor bracket, so the total additional length required is 15mm

Thus, the length of the new shaft is

After machining is completed, we can see that the new pedal shaft is longer and includes an additional step to accommodate the one-way bearing

To enable precise assistance according to the pedal force exerted by the rider, our team will install two load cell sensors on both sides of the pedals to accurately measure the pedaling force Due to the large size of these sensors and the requirement for precise and secure installation, our team has decided to CNC mill a hollow space inside the pedal arms to accommodate the sensors The sensor dimensions are 130x27x22 mm, so our team will mill a rectangular groove measuring 130x22 mm inside each pedal arm

Figure 3.6: Both sides of crank arms after hollow milling

Component for mounting bearings into the sprocket disc

To drive from the motor through the pedal shaft, we will need sprockets To mount the sprockets onto the outer shell of the bearing, we will need to design and manufacture a connecting bracket

With the above design, our team will use two chain sprockets mounted on the inner and outer sides of the bracket The outer sprocket will receive pulling force from the motor and move together with the inner sprocket The inner sprocket's role is to transmit the pulling force from the pedal shaft to the drive system at the rear

Figure 3.8: Chainring part after design and machining

For this chain sprocket mounting bracket, our team also used 6061 aluminum alloy material and employed 3D metal CNC machining

Assembly of the electric assist motor mount

Since the bike frame is not designed to accommodate a motor mount, our team will design a mounting bracket consisting of aluminum plates assembled together to securely attach the motor to the bike frame

Figure 3.9: Details of electric assist motor bracket

Chain drive from the central shaft to the rear wheel

Our team is using the Shimano Deore M5100 1-11S drivetrain to transmit pedaling force from the crankshaft to the rear wheel One advantage of this drivetrain is its simple design with a single front chainring of 40 teeth, coupled with an 11-speed cassette at the rear ranging from 8 to 52 teeth This setup allows for riding at various speeds and is suitable for diverse terrains Combined with the electric assist motor, it enables smooth cycling across different speeds In this report section, our team will prioritize using a single gear ratio with a 40-tooth chainring driving a 28-tooth sprocket

Calculating the transmission ratio and power at the 40-28 tooth range

Figure 3.10: Shimano Deore M5100 chain transmission

CONTROL SYSTEM DESIGN

Microcontroller selection

Due to the complexity of our project requiring advanced calculations such as PID control, Kalman filtering, and trigonometric function computations, we need a microcontroller with fast processing speed, yet not excessive I/O pins After researching available microcontroller options, we identified two popular choices: STM32F103C8T6 and Arduino Uno/Nano Comparing their specifications in the table below, the STM32F103C8T6 shows superior CPU processing speed, RAM capacity, and GPIO pins compared to Arduino Uno/Nano Additionally, with support from the HAL library, the STM32F103C8T6 allows us to efficiently manage Timer/Counter parameters and I/O pin configurations

Therefore, our team has decided to use the STM32F103C8T6 microcontroller for designing the control system of our project

Table 4.1: Compare microcontroller STM32F103C8T6 and Arduino uno/nano

Block diagram

To summarize the components in the control system and illustrate the connections between them, our team has drawn the diagram below for a visual and comprehensive overview of the system

4.2.1 Block diagram for the balancing system

Figure 4.1: Block diagram of balance system

Our team uses the I2C protocol to read data from the MPU6050 sensor and external interrupts to read values from the encoder Subsequently, these values are processed in computational functions to generate PWM signals for controlling the BLDC motor

4.2.2 Block diagram for the electric assist system

Figure 4.2: Block diagram for electric assist system

To determine the force exerted by the user on the pedal, our team designed sensor clusters directly mounted on the lever arm of the pedal These sensors move continuously, making direct real-time sensor reading during system operation impractical Therefore, our team devised a solution using RF modules to send and receive sensor data to and from the microcontroller

The main controller of the assist system reads data from the wireless modules and user settings from a rotary encoder, then sends signals to the motor driver to meet system requirements Additionally, an LCD screen is used to display necessary values for the user

Principle diagram

Principle diagram of the balancing system

Figure 4.3: Principle diagram of the balancing system

Schematic diagram of the electric power steering system

Figure 4.4: Principle diagram of electric assist control unit

Figure 4.5: Principle diagram of wireless signal transmission unit

Our team has drawn a block diagram to detail the interconnections of I/O pins among devices, divided into four main blocks These blocks include: power supply, processing block, sensor block, and execution block, visually represented in the diagram above

Specific functions of each block are as follows:

- Power Supply Block: Consists of 4 levels:

• 48V Power Supply: Provides energy to the BLDC motor for maintaining vehicle balance

• 24V Power Supply: Supplies power to the assist motor

• 5V Power Supply: Powers the microcontroller and low-power actuators

• 3.3V Power Supply: Provides power to sensors

- Processing Block: Responsible for reading values from sensors and performing calculations to generate control signals for actuators

- Sensor Block: Collects signals such as inclination angle, speed, acceleration, and sends them to the processing block

- Execution Block: Executes tasks sent from the processing block

Details of components in the system

Our team utilizes the STM32F103C8T6 microcontroller as the main controller to handle all tasks within the system, including reading input values, performing calculations, and controlling actuators

Our team uses a 600 pulse per revolution encoder to calculate and control the speed of the reaction wheel

The MPU6050 sensor is used to read the inclination angle of the vehicle

Figure 4.8: MPU6050 accelerometer gyroscope sensor

Our team uses the NRF24 wireless module to transmit signals from sensors to the microcontroller for implementing power assist for the vehicle

- Receiver power: 2Mbps ~ -83dB; 1Mbps ~ -87dB; 250Kbps ~ -96dB

- Receiver current: 2Mbps ~ 15mA, 1Mbps ~ 14.5mA, 250kbps ~ 14mA

Our team uses a weight sensor to obtain data on the force applied by the user, which is then used to calculate and meet the user's pedal assistance needs

The LCD screen is used to display the current inclination angle and other necessary values during debugging

Figure 4.11: SH1106 OLED LCD screen

Our team uses a brushless motor to rotate the reaction wheel to help the vehicle maintain balance

- Motor model: X-TEAM 7050 brushless motor

Our team choose the MY1016 Z motor to provide pedal assist for users

Figure 4.13: MY1016 Z gear reduction motor

To select the appropriate power supply, our team will create a summary table of the power consumption of all devices used in the system

Table 4.2: Summary table of current consumption

Device Name Current Consumption (mA)

NRF24L01-M Wireless Module 1Mbps ~ 14.5mA

Based on the above results, our team decides to choose a 12S 48V 45A battery pack to supply power to the system, as described in the diagram below

Power supply for wireless transmission module:

Table 4.3: Table summarizing the current consumption of the wireless transmission and reception module

Devices name Current Consumption (mA)

NRF24L01-M Wireless Module 1Mbps ~ 14.5mA

Based on the table above, our team decides to choose a 2500mAh 3.7V LiPo battery as the power source for the wireless communication module, with the following specifications:

Additionally, due to the different operating voltage requirements of the devices in the system, our team decides to include several voltage regulators to supply power to the aforementioned devices

DC-DC voltage regulator module 12-75V to 2.5-50V

Figure 4.15: DC-DC 12-75V 2.5-50V voltage regulator module

Figure 4.16: LM2596 voltage regulator module

SYSTEM RESULTS AND EVALUATION

Results after assembly

After the design and manufacturing assembly phase, our team has completed the entire model They finalized blocks such as the balancing block, assist block, pedal force sensor block, and brake block

Figure 5.4: Pedal force sensor unit

Figure 5.6: Reaction wheel motor control unit

Figure 5.7: Electric assist motor control unit

Figure 5.8: Wireless signal transmission unit

CONCLUSION AND FUTURE DEVELOPMENT

Conclusion

The project focused on developing a self-balancing mechanism for bicycles aimed at autonomous operation, alongside researching an assistive mechanism to support human pedaling during movement The basic project has achieved certain results, such as providing pedal assistance for human movement using bicycles However, there are still some aspects that have not been fully achieved, particularly the instability in the self-balancing system of the bicycle

To further enhance the project and make it more applicable in practical applications, our team proposes several features for future development:

- Algorithms Improving Wheel Design and Control: Enhance the design of the wheel and improve the efficiency of control algorithms to enable the bicycle to self-balance and operate autonomously

- Implementing Image Processing for Autonomous Navigation or Following: Integrate image processing capabilities so the bicycle can autonomously navigate or follow a person

- Integrating IoT (Internet of Things) for Remote Monitoring and Control: Incorporate IoT technologies to monitor and control the bicycle remotely

- Increasing Pedal Assistance Efficiency: Enhance the efficiency of pedal assistance mechanisms to provide better support during pedaling

- Refining Mechanisms for Compactness and Efficiency: Improve mechanisms to be more compact and efficient

[1] G R Andrew Haslehurst, "Commercial off the Shelf Components in Reaction Wheel," p 1, 2006

[2] J B Jonathan Valdez, "Understanding the I2C Bus," Texas Instruments, 2015

[3] K Magdy, "DEEPBLUE MBEDED," 2021 [Online] Available: https://deepbluembedded.com/stm32-pwm-example-timer-pwm-mode-tutorial/

[4] J Malášek, "Polplu Robotíc & Electroníc," 9 February 2011 [Online] Available: https://www.pololu.com/blog/17/servo-control-interface-in-detail

[5] G B Greg Welch, "An Introduction to the Kalman Filter," vol I, p 02, 2006

[6] A.-B Rockwell Software, "Perform Common Process Loop Control Algorithms," Rockwell Automation, 2016

[7] B A A P D Soden, "Forces applied to a bicycle during normal cycling," PubMed, p

[8] I A A N , R I A Alfian Ma’arif, "Kalman Filter for Noise Reducer on Sensor Readings," Signal and Image Processing Letters, vol V, p 53, 2019

[9] T 3D, "Cam nang," 24 11 2022 [Online] Available: https://3d-smartsolutions.com/cam- nang/cong-nghe-3d/tim-hieu-ve-gia-cong-cnc-kim-loai/.

Ngày đăng: 19/11/2024, 12:16

TÀI LIỆU CÙNG NGƯỜI DÙNG

TÀI LIỆU LIÊN QUAN

w