[STM32 Motor FOC] Record 17——Edge trigger of Hall timer

Publisher:码字狂徒Latest update time:2018-09-22 Source: eefocusKeywords:STM32 Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere

Hall sensor placed at 120 degrees:

The idea of ​​changing the 120 degree trigger to a 60 degree trigger

Originally, when triggered, the three signals of the Hall sensor are XORed into one signal, and the falling edge of this signal is used for triggering, and then the corresponding interruption, that is, the measurement state 5, 3, and 6 of the Hall sensor is entered. Each trigger is exactly 120 degrees of electrical cycle.

[STM32 Motor FOC] Record 17——Edge trigger of Hall timer


[STM32 Motor FOC] Record 17——Edge trigger of Hall timer

After figuring out the process, try changing the trigger mode to double-edge trigger. That means, after entering the interrupt subroutine, the corresponding Hall sensor measurement should be run for the complete 6 states, namely 5, 1, 3, 2, 6, and 4. Therefore, the calculation program for the electrical position angle of the three states 1, 2, and 4 should be added to the interrupt program.

Electrical position angles in 6 operating states:

State 5: offset angle +0°

State 1: offset angle +60°

State 3: offset angle +120°

State 2: offset angle +180° = offset angle - 180°

State 6: offset angle +240° = offset angle - 120°

State 4: offset angle +300° = offset angle - 60°

Note: The position angle is not greater than 360°

Authentication method:

To verify the feasibility of the method, the trigger of the original program was changed to the rising edge, and the motor could not run. However, the 1, 2, and 4 states were added to the interrupt service subroutine, and the rising edge trigger was used again, and the motor ran smoothly. Then, it was changed to the double edge trigger, and the motor ran as well. So far, this method should be in line with the trigger operation of 60 degrees electrical angle.


Keywords:STM32 Reference address:[STM32 Motor FOC] Record 17——Edge trigger of Hall timer

Previous article:[STM32 Motor FOC] Record 15 - TIM input capture
Next article:[STM32 Motor Vector Control] Record 14 - Hall Sensor

Latest Microcontroller Articles
Change More Related Popular Components

EEWorld
subscription
account

EEWorld
service
account

Automotive
development
circle

About Us Customer Service Contact Information Datasheet Sitemap LatestNews


Room 1530, 15th Floor, Building B, No.18 Zhongguancun Street, Haidian District, Beijing, Postal Code: 100190 China Telephone: 008610 8235 0740

Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved 京ICP证060456号 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号