[SOLVED] commutation table of BEMF demo code

Announcements

Webinar: Integrated solutions for smaller, simpler low-voltage motor control design.
Join the webinar to experience!

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
User17952
Level 3
Level 3
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.
3862.attach
0 Likes
8 Replies
Fiz
Moderator
Moderator
Moderator
First like received 50 replies posted 25 replies posted
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
0 Likes
User17952
Level 3
Level 3
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.
3791.attach
Best!
0 Likes
Fiz
Moderator
Moderator
Moderator
First like received 50 replies posted 25 replies posted
Hi LiangXiao,

could you test the table I have attached with your motor?
3792.attach

Best,
Fiz
0 Likes
User17952
Level 3
Level 3
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
0 Likes
Fiz
Moderator
Moderator
Moderator
First like received 50 replies posted 25 replies posted
Hi LiangXiao,
Yes the reference for the BEMF sequence was VBAT.
When you are referencing to GND the commution table will look like this:

3856.attach

Best,
Fiz
0 Likes
User17952
Level 3
Level 3
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
0 Likes
Fiz
Moderator
Moderator
Moderator
First like received 50 replies posted 25 replies posted
Hi LiangXiao,

1.) Yes exactly, plase see the table below from the TLE987x UM.
3796.attach
2.) Yes the first bit is the COUT6x and the second bit the CC6x.

Best,
Fiz
0 Likes
User17952
Level 3
Level 3
Hi Fiz,
Thank you.This problem has been solved.
0 Likes