infineon4engineers Facebook

infineon@google+ Google+

infineon@linkedin linkedin

infineon4engi@twitter twitter

infineon@youtube youtube

+ Reply to Thread
Results 1 to 3 of 3

Thread: XMC4700: BLDC Motor Control Issue Help Needed

  1. #1
    New Member New Member Soda Ant is on a distinguished road
    Join Date
    Apr 2019
    Posts
    2
    Points
    37.5

    XMC4700: BLDC Motor Control Issue Help Needed

    I'm implementing a controller for a BLDC motor that uses a Hall position sensor. I've implemented this on an XMC4700 and am using the POSIF (in Hall sensor mode and Multi-Channel mode) and a few CCU4 and CCU8 slices.

    I'm using one CCU4 slice to measure the rotation speed of the motor. It's configured as a counter clocked by the system clock and the capture event is the Correct Hall Event (CHE) output from the POSIF. I'm reading the capture registers in the CHE interrupt handler and using that to calculate motor RPM. I have the CCU4 slice's prescaler set to divide by 32, which puts the captured counts well within the 0-0xffff range of the counter.

    Everything is working, except the motor speed as calculated from the timer capture counts is very erratic at +/- 500 RPM. When I use an accurate external tachometer instrument to read the motor RPM (set to 7000) directly at the shaft, I'm getting readings that are +/- 10 RPM. I do see some jitter on the Hall outputs from the motor on an oscilloscope, but nowhere near enough to account for the +/- 500 RPM speeds I'm calculating from the timer.

    Anyone have any suggestions? What should I look at next?

  2. #2

    Infineon Employee
    Infineon Employee
    Expert
    Mike is on a distinguished road
    Join Date
    Nov 2011
    Posts
    18
    Hi Soda Ant,

    The possible issues could be:
    - Hall Jitter
    - CHE Timing -- Could be off if the expected hall pattern is not the same as the actual hall pattern
    - Computation of the speed

    To investigate this I recommend you make some RAM buffers and store the commutation times (capture time from the CCU4) and the calculated speed. For example you could store 100 captures and speeds in a circular buffer. Then you can compare the capture values and calculated speed with the hall times that you see on a oscilloscope.

    Best regard,
    Mike
    The views expressed here are my personal opinions, have not been reviewed or authorized by Infineon and do not necessarily represent the views of Infineon.

  3. #3
    New Member New Member Soda Ant is on a distinguished road
    Join Date
    Apr 2019
    Posts
    2
    Points
    37.5
    Quote Originally Posted by Mike View Post
    The possible issues could be:
    - Hall Jitter
    - CHE Timing -- Could be off if the expected hall pattern is not the same as the actual hall pattern
    - Computation of the speed
    Thanks for the reply, Mike.

    I don't think it's Hall jitter, because the magnitude of the jitter I see on an oscilloscope is not nearly enough to account for the large variance in calculated speed versus the speed measured with a tach.

    It can't be a mismatch between the expected Hall pattern versus the actual pattern because I'm not seeing any Wrong Hall Events.

    Computation of the speed is straightforward from the Hall timings and the results agree with the speed from the external tach (after averaging out the wide variance, of course).

    I have implemented a circular buffer for the CCU4 captured counts, and they do vary widely. This is the puzzling part--why do they vary so much for a motor spinning at constant RPM with no load? I'm triggering the capture of the CCU4 counter via the CHE from the Posif, and have the CCU4 set to clear on every capture event. I'm not getting capture overruns (because I'm only seeing valid capture data in C1V and never in C0V.

+ Reply to Thread
Disclaimer

All content and materials on this site are provided “as is“. Infineon makes no warranties or representations with regard to this content and these materials of any kind, whether express or implied, including without limitation, warranties or representations of merchantability, fitness for a particular purpose, title and non-infringement of any third party intellectual property right. No license, whether express or implied, is granted by Infineon. Use of the information on this site may require a license from a third party, or a license from Infineon.


Infineon accepts no liability for the content and materials on this site being accurate, complete or up- to-date or for the contents of external links. Infineon distances itself expressly from the contents of the linked pages, over the structure of which Infineon has no control.


Content on this site may contain or be subject to specific guidelines or limitations on use. All postings and use of the content on this site are subject to the Usage Terms of the site; third parties using this content agree to abide by any limitations or guidelines and to comply with the Usage Terms of this site. Infineon reserves the right to make corrections, deletions, modifications, enhancements, improvements and other changes to the content and materials, its products, programs and services at any time or to move or discontinue any content, products, programs, or services without notice.