infineon4engi@twitter twitter

infineon4engineers Facebook

infineon@linkedin linkedin

infineon@youtube youtube


+ Reply to Thread
Results 1 to 9 of 9
  1. #1
    Beginner Beginner LiangXiao is on a distinguished road
    Join Date
    Sep 2019
    Location
    948928731@qq.com
    Posts
    15
    Points
    160

    [SOLVED] commutation table of BEMF demo code

    If I use the BEMF demo code to drive my own motor,I want to know whether the macro definition about commutation seqence in the Table.c need to be changed, and how to change them.
    Click image for larger version

Name:	19.JPG
Views:	5
Size:	182.5 KB
ID:	4221

  2. #2
    Moderator
    Infineon Employee
    Infineon Employee
    Fiz is on a distinguished road
    Join Date
    Jun 2019
    Posts
    49
    Hello LingXiao,

    yes you will have to adapt the the commutaion table according to your motor.
    You can get the commutation table from the manufacturer of the motoror you can create it yourself.
    You can read back the hall pattern (this of course is only possible if your motor has internal hall sensors) when your are energizing alternately two motor phases until you have all possible 6 hall pattern.
    You can also spin the motor with an external load (f.e. another motor) and read back the resulting terminal voltages and determine the pattern for one electric revolution.
    In the table you will need to write for the last 3 Bit (CURH) the current Hall pattern (ABC) and in the next 3 Bit (EXPH) the expected pattern.
    Meaning the pattern the controller can expect to be the next one after the current pattern, this will ultimately be determined by the spinning direction.
    The last 6 Bit are used to control the B6 Bridge, the active (the half bridge that is used to PWM) is set to 11 and the half bridge that that is connected to VDH or GND will be set to 10 or 01.
    This depends if your are generating PWM in the high or in the low side of the active bridge.
    The third half-bridge is in passive state, meaning it will show the BEMF and help generating your virtual hall pattern.

    If you need further help to create your commutation table let me know!

    Best,
    Fiz
    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
    Beginner Beginner LiangXiao is on a distinguished road
    Join Date
    Sep 2019
    Location
    948928731@qq.com
    Posts
    15
    Points
    160
    Hi Fiz,
    Thank you! I find the picture as below about my motor's commutation sequnece.Can you give me an example about how to write the code according to this picture.
    Click image for larger version

Name:	??.JPG
Views:	1
Size:	76.1 KB
ID:	4273
    Best!

  4. #4
    Moderator
    Infineon Employee
    Infineon Employee
    Fiz is on a distinguished road
    Join Date
    Jun 2019
    Posts
    49
    Hi LiangXiao,

    could you test the table I have attached with your motor?
    Click image for larger version

Name:	BEMF_commutaion_table.PNG
Views:	1
Size:	28.7 KB
ID:	4279

    Best,
    Fiz
    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.

  5. #5
    Beginner Beginner LiangXiao is on a distinguished road
    Join Date
    Sep 2019
    Location
    948928731@qq.com
    Posts
    15
    Points
    160
    Hi Fiz,
    In the MCMP register the bit sequence should be COUT62 CC62 COUT61 CC61 COUT60 CC60?
    So, the half bridge that is connected to GND should be set to 10 not 01, is it right?
    Best

  6. #6
    Moderator
    Infineon Employee
    Infineon Employee
    Fiz is on a distinguished road
    Join Date
    Jun 2019
    Posts
    49
    Hi LiangXiao,
    Yes the reference for the BEMF sequence was VBAT.
    When you are referencing to GND the commution table will look like this:

    Click image for larger version

Name:	BEMF_commutaion_table_GND_reference.PNG
Views:	0
Size:	48.4 KB
ID:	4287

    Best,
    Fiz
    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.

  7. #7
    Beginner Beginner LiangXiao is on a distinguished road
    Join Date
    Sep 2019
    Location
    948928731@qq.com
    Posts
    15
    Points
    160
    Hi Fiz,
    Sorry,I still feel confused.I have two questions:
    1、Does the CC6x control the high side mos, and the COUT6x control the low side mos?
    2、For example, I think W = COUT62 & CC62 not W = CC62 & COUT62,because in the MCMP register the bit sequence is COUT62 CC62 COUT61 CC61 COUT60 CC60, is it right?
    Best

  8. #8
    Moderator
    Infineon Employee
    Infineon Employee
    Fiz is on a distinguished road
    Join Date
    Jun 2019
    Posts
    49
    Hi LiangXiao,

    1.) Yes exactly, plase see the table below from the TLE987x UM.
    Click image for larger version

Name:	CCU&_BDRV_linkage.PNG
Views:	0
Size:	23.8 KB
ID:	4289
    2.) Yes the first bit is the COUT6x and the second bit the CC6x.

    Best,
    Fiz
    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.

  9. #9
    Beginner Beginner LiangXiao is on a distinguished road
    Join Date
    Sep 2019
    Location
    948928731@qq.com
    Posts
    15
    Points
    160
    Hi Fiz,
    Thank you.This problem has been solved.

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.