Application of ST72262G1 Single-chip Microcomputer in Brushless DC Motor Control of Electric Bicycle

) It has many advantages such as good speed control performance, easy control, no commutating spark and excitation loss, long service life, etc. Therefore, its application range covers various fields. The new ST72262G1 microcontroller not only has a strong real-time computing capability, but also integrates a PWM module with a small number of peripheral devices to design an effective speed and current loop to achieve precise motor speed regulation. ), is the upgrading of ST72215 products. It has built-in LVD detection and can omit the power-on reset circuit as having 4k of ROM and 256 bytes of RAM, CPU frequency can reach 8MHZ. On-chip peripherals it has real-time clock, A/D, SPI module and so on. Including two 16-bit timers each can be an independent PWM output channel. At the same time ST72262G1 also has a powerful software function, its RAM has 128 bytes as a stack, get rid of the ST6 series of subroutine calls up to 6 layers of restrictions. There are 63 basic instructions, 17 addressing modes, and in particular, it also has an 8bit unsigned multiplication instruction which is very difficult to obtain in a microcontroller.

2 The hardware design of the brushless DC motor controller 21 The principle of the motor The brushless DC motor is made of permanent magnets, and the stator winding commutation is used instead of the brush commutation Hall element sensing rotor position information. The three Hall elements of the built-in motor will output the determined three-level signals in real time to represent the rotor position information. The MCU ST72262G1 geese according to these three levels of signals, look up the table to find the phase to be switched, and change the corresponding output state.

For example, counterclockwise rotation as an example. Assume that the position of the rotor at this time makes the commutation state obtained by looking up the table exactly in the direction indicated by the arrow 1, and then only the MOS transistors T1 and T6 need to be turned on and the others are turned off. Then, with each change of the position signal, the MOS transistors T1 to T6 can be installed with the timing commutation on the left so that the stator windings can generate a rotating magnetic field from 1 to 6 in the direction of the arrow on the right. The motor is in synchronization and the rotor will rotate in the order of arrows 1~6.

2.2 Hardware implementation 圄2 System hardware box First look at the system block diagram. For example, the entire control system consists of three parts: the switch matrix consisting of ST72262G1, IR2130, and 6 MOS transistors. The ST72262G1 determines the next output state by returning from the 3-way Hall signal returned from the motor, and then drives the MOS tube to be commutated by the IR2130. At the same time, the relevant information is output to the LCD through the SPI port. Because this controller is used for the electric bicycle to use the 36 volt battery to supply power, therefore has put forward the request to the under voltage and the over current protection and so on, namely undervoltage protection: 1±1V; turbulence protection: 17A±0.5A overload protection: 15A (The XIR2130 is a 10V~20V gate driver for 15 minutes of continuous operation for 3 minutes of continuous operation). The internal bootstrap function can drive the six MOS tubes of the three-phase full bridge. It also has a comparator in itself, coupled with a suitable resistor that can be used as an over-current detector. Once over-current, a total of six high-end and low-end outputs are all 0 and output a low level from the fault pin to the 16-pin alarm of the ST72262G1 (for example) to the LCD display B1 is the PWM output port B7 as the brake number input, P巳3, PB2, PB0 are the input terminals of the 3-phase Hall multiplication number of the motor. The PC port has A/D function, so PC5 is used as the speed doubler to sample corpse C0 for over-current detection. PC1 is only used as an ordinary input port to connect to the above-mentioned fault number from IR2130. PA2~PA7 do 6-phase commutation times the number of IR2130 drive MOS tube PA2~PA4 as a high-end 3-way MOS switch number must first do with the PWM output "and", and then by inverting the old 213-. "And" is because the ST72262G1 does not have as many PWM output ports, and using the universal output port and PWM as the "can achieve 3 PWM output port functions. And do not have to PWM double the number of low-end three MOS transistors It is necessary to keep the corresponding MOS transistors turned on during the on-cycle, for example, and vice versa, while the IR2130 is a negative logic device, so the logic output of PA5~PA7 is negated. After the IR2130 is connected to the inverter, PA2~PA4 are not logically negated.This test circuit uses 150W/36V brushless DC motor (rated current 5~5.5A), VDC uses 36V lead-acid battery to generate MS tube with STP6NF6li6V, 6A) sampling The resistance is 0.1 ohms and the current is limited to 15A. This overcurrent sampling voltage is 1.5V. In addition, configuring the IR2130 with proper resistance values ​​on pins 9, 10, and 11 causes the IR2130 to output a fault multiple when the current reaches 17A.

3 software design flow chart of the brushless DC motor controller, such as the entire software design can be roughly divided into the following several power initialization, commutation, speed, display and determine whether over-current, whether the brakes.

To determine whether to use A/D for overcurrent and A/D for speed control, we can only use the query method to start the detection in each cycle of the main program. If overcurrent is found, it will not be stopped immediately according to the manufacturer's requirements. Instead, look at the situation (1.5A1.7A), because the pins 9,10, and 11 of the IR2130 have been connected to the feedback loop, so the 16-pin microcontroller will receive a low-number double-click to trigger a Stop the shutdown.

In the practical application process, the real-time requirements of the commutation subroutine in each subroutine are very high, especially when the motor is running at a high speed. At the same time, the commutation subroutine is very short, so the commutation subroutine can be properly inserted in the display and speed control subroutine to improve the smoothness of the motor rotation. The commutation subroutine is as follows: ST001 (continued on next page) This subroutine function is to read the data register of PB port, determine the input state of PB3, PB2, and PB0, and then call the relevant state setting subroutine. Since there are 8 inputs in total, there are 8 subroutines from ST000 to ST111, but the Hall multiplications a, b, and c all have 0 and all 1s are abnormal. Therefore, exception processing should be performed in these two subroutines. .

4 Concluding remarks Through experiments, the 150W brushless DC motor controlled by ST72262G1 has been running smoothly in the speed range of 10~400rpm. After a trial by an electric bicycle company, it worked well and was successfully assembled on its electric bicycle for delivery to users.

Stainless Steel Goblet Holder

wire holder is made of high quality 304 stainless steel, It is easier to clean without rust, safe, healthy and durable, Prevent rust or chemicals from contaminating food and damaging health. Suitable for putting the wine glass holder.

China leading manufacturers and suppliers of Wine glass holder,Goblet Holder, and we are specialize in Wine Rack,Hanging Wine Rack, etc.

Goblet Rack,Stainless Steel Goblet Rack,Wine Glass Holder,Wine Glass Rack

Shenzhen Lanejoy Technology Co.,LTD , https://www.ccls-vaccine.com

Posted on