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

MOTIX™ MCU Forum Discussions

ansede
Level 2
10 replies posted First like received 10 sign-ins
Level 2
Hi!
We are working with TLE9879 Arduino shield to test our application while we are designing the electronic PCB.

We need in our application mantain the BLDC motor energized in an static position, that is keep the motor braked.
I understand that this action is not implemented in Arduino library and it requires program TLE9879 ic.
Do you propose a specific action? i.e. enable the corresponding motor phase by PWM control?

0 Likes
1 Solution
RupakC
Moderator
Moderator 100 sign-ins 25 solutions authored 50 replies posted
Moderator

Hello @ansede

You need to make the following changes for the BLDC shield code :

1265_625_1.5.png

1202_702_1.5.png

Additionally please look into the attached document. 

I hope these changes in the code will help you to achieve static braking for your motor in the way you want. So if Static_braking=0, then the motor runs at reference speed and if Static_braking =1, then the motor brakes.

Regards

RupakC

View solution in original post

0 Likes
9 Replies
RupakC
Moderator
Moderator 100 sign-ins 25 solutions authored 50 replies posted
Moderator

Hi @ansede 

To block the rotor, one option is to switch-ON the three Low-Side MOSFETs simultaneously and switch-OFF the three High-Side MOSFETs. This will block the rotor immediately. 

Regards

RupakC
ansede
Level 2
10 replies posted First like received 10 sign-ins
Level 2

Hi Rupack

Thank you for your response. We tested externally the option you comment but this brake is not enough for our application, we need to energize the motor. That's why we are planning to switch-ON one High-Side MOSFET and switch-ON with PWM the Low-Side MOSFET of the other phase. 

Could you guide us where we find the control functions of the motor phases inside the TLE9879 example code (03_shield_software)?

0 Likes
RupakC
Moderator
Moderator 100 sign-ins 25 solutions authored 50 replies posted
Moderator

Hello @ansede 

Could you please tell me why turning ON all 3 HS MOSFETs and turning OFF all 3 LS MOSFETs is not enough for you ? By energizing the motor, what do you exactly mean ? Do you wish to opt for regenerative braking ?? 

It will help me to find a solution to your issue once I get to know the above answers. 

Thanks and Regards

RupakC
0 Likes
ansede
Level 2
10 replies posted First like received 10 sign-ins
Level 2

Hello Rupack

Sorry for the delay in my response.

We do not need to break the motor when it is rotating, we only need to block the motor once it is stopped. This block must be with a high torque. I think that turning ON all 3 LS MOSFETs and turning OFF all 3 HS MOSFETs do not meet our required torque.

Thanks!

0 Likes
RupakC
Moderator
Moderator 100 sign-ins 25 solutions authored 50 replies posted
Moderator

Hi @ansede 

The switches in the BLDC shield are complementarily gated. So if the Low Side MOSFET of one phase is turned ON, the corresponding High side MOSFET will be gated OFF and vice versa. The static braking you are talking about can be implemented in two ways: 

1. By switching ON one HS/LS MOSFET and PWM the two switches of another phase. Third phase is left OPEN. 

2. By giving PWM pulses to the two complimentary switches of two phases. Third phase is OPEN. 

These can be implemented through properly setting the compare values for the two phases at the compare register and disabling the compare unit for the third phase in the example code.  

I hope that answers your doubt. 

Regards

RupakC
0 Likes
ansede
Level 2
10 replies posted First like received 10 sign-ins
Level 2

Thanks @RupakC!

We are trying to implement it.

Could you give us where we can configure the properly settings? What are the name of the compare registers and compare unit?

Regards

0 Likes
RupakC
Moderator
Moderator 100 sign-ins 25 solutions authored 50 replies posted
Moderator

Hello @ansede 

In the emo_RAM.c file, you can make the following changes to the code and you should get the desired results:

43ca9513-c649-4008-8c1a-0fecada65b68.PNG

if you need a lower duty ratio of PWM, you can make necessary changes with the compare values. 

Please let us know if you face any further issues. 

Regards

RupakC
0 Likes
ansede
Level 2
10 replies posted First like received 10 sign-ins
Level 2

Thanks @RupakC!

We are working with HALL interface instead of FOC, should be the code changes made in emo_RAM.c file as well? 

Regards

0 Likes
RupakC
Moderator
Moderator 100 sign-ins 25 solutions authored 50 replies posted
Moderator

Hello @ansede

You need to make the following changes for the BLDC shield code :

1265_625_1.5.png

1202_702_1.5.png

Additionally please look into the attached document. 

I hope these changes in the code will help you to achieve static braking for your motor in the way you want. So if Static_braking=0, then the motor runs at reference speed and if Static_braking =1, then the motor brakes.

Regards

RupakC
0 Likes