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

MOTIX™ MCU Forum Discussions

bhargavah
Level 1
Level 1
First reply posted First question asked Welcome!

Hi Guys,

I have read decently on the documentation of TLE9879QXA40 and decided to write some code to control the BLDC motor. Happily, I can run the motor in FOC & BEMF mode. However, It does not move as expected in HALL mode. The motor just gives an initial jerk when we send 'startMotor' command. Following is the code for HALL mode.

// Include the Shield library to your Arduino project
#include "TLE9879_Group.h"

#define BOARD1 1

// Declare Shield group object
TLE9879_Group *shields;

void setup()
{
// Initialize the Shield group object with the
// number of Shields in the stack
shields = new TLE9879_Group(1);

shields->setMode(HALL, BOARD1);
shields->setParameter(HALL_INIT_DUTY, 30, BOARD1);
shields->setParameter(HALL_POLE_PAIRS, 4, BOARD1);
shields->setParameter(HALL_SPEED_KP,500, BOARD1);
shields->setParameter(HALL_SPEED_KI,100, BOARD1);

// Set the desired motor speed (RPM)
shields->setMotorSpeed(2000, BOARD1);

// Start the motor and let it run for 5 seconds,
// then stop the motor
shields->setMotorMode(START_MOTOR, BOARD1);
delay(10000);
shields->setMotorMode(STOP_MOTOR, BOARD1);
}

void loop() {
}

My motor is 4 pole motor. Already checked the hall sensor connections many times with the shield pins. I would be happy to answer more questions, if any.

0 Likes
1 Solution
Krupashankar
Moderator
Moderator
Moderator
250 replies posted 100 solutions authored 5 likes given

Hi @bhargavah,

Thanks for posting in Infineon Community!

In Hall sensor mode the hall sensor output may be interchanged with the phase cables.

You can try changing the hall sensor cables( A B C) with respect to the phase excitation, You will be able to change this by interchanging any two hall sensor output( B-> C or C->A or A->B ) and then try starting the motor by start command.

 

Please contact us for further clarifications.

 

Thanks,

Krupashankar

View solution in original post

0 Likes
2 Replies
Krupashankar
Moderator
Moderator
Moderator
250 replies posted 100 solutions authored 5 likes given

Hi @bhargavah,

Thanks for posting in Infineon Community!

In Hall sensor mode the hall sensor output may be interchanged with the phase cables.

You can try changing the hall sensor cables( A B C) with respect to the phase excitation, You will be able to change this by interchanging any two hall sensor output( B-> C or C->A or A->B ) and then try starting the motor by start command.

 

Please contact us for further clarifications.

 

Thanks,

Krupashankar

0 Likes

Hi Krupashankar,

 

Thanks for the reply. I would sure shot try that and write back here.

0 Likes