BLDC Shield with TLE9879QXA40: Hall Sensor Parameter

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
Giova97
Level 1
Level 1
First like received 5 sign-ins First reply posted

Hi everyone,

I am working on a single BLDCSHIELDTLE9879TOBO1 evaluation board mated to an Arduino Uno R3, trying to run the setParameter() function to change the parameters related to Hall Sensor and FOC of the control algorithm within the TLE9879 device.

The TLE9879 device was programmed at the factory, I haven't changed it.

I've tried to change the parameters but it seems that this doesn't affect the motor behavior. For examples I've tried to change the Hall inputs through the function "shields->setParameter(HALL_INPUT_A, ... )", but the motor spin always in the same way and I don't understand why.

(I change the parameters after calling the mode of the motor and before starting it)

I've also tried the FOC control mode and I've met some strange behavior. At high spinning rate the motor doesn't try to maintain the velocity when a load is applied at the shaft of the motor. Is there some parameter that I've to change?

Kind regards,

Giovanni

0 Likes
1 Solution
lock attach
Attachments are accessible only for community members.
Sahil_K
Moderator
Moderator
Moderator
250 replies posted First like given 100 solutions authored

Hi @Gimballs ,

 For the proper functioning of the "set parameter" command, please add one command, at line number 59, in "void changeSingleParameter(uint8 index, uint16 data1, uint16 data2)"  in  "commands.c" (in KEIL software program).

    Emo_Status.MotorState = EMO_MOTOR_STATE_UNINIT; 

 

For your reference, I am attaching the image.

Please, Let us know if you have further issues.

Thank you

Best Regards

Sahil Kumar

View solution in original post

0 Likes
4 Replies
Krupashankar
Moderator
Moderator
Moderator
500 replies posted 50 likes received 25 likes received

Hi @Giova97,

 

Could you please share your code this will help us to understand the issue better.

Have you tried changing any other parameters and observed the change in the behavior of the motor?

 

I've also tried the FOC control mode and I've met some strange behavior. At a high spinning rate, the motor doesn't try to maintain the velocity when a load is applied at the shaft of the motor. Is there some parameter that I've to change?

Are you observing this behavior only in FOC mode? Could you please check the max current and other motor parameters. The motor can slip due to improper parameter configuration.

 

Thanks,

Krupashankar

 

0 Likes
lock attach
Attachments are accessible only for community members.
Giova97
Level 1
Level 1
First like received 5 sign-ins First reply posted

Hi @Krupashankar ,

Thanks for your responding. Yes, I've tried to change other parameter like the Kp or Ki for the hall sensor mode and some other parameters for the FOC mode but nothing chanced in the motor behaviour. Here is the code for the Hall sensor control mode:

#include "TLE9879_Group.h"

// Declare Shield group object
TLE9879_Group *shields;

void setup() {
// put your setup code here, to run once:
// Initialize the Shield group object with the
// number of Shields in the stack
shields = new TLE9879_Group(1);


// Set the desired mode (FOC, HALL, BEMF)
shields->setMode(HALL,BOARD1);
shields->setParameter(HALL_INIT_DUTY,30, BOARD1); //set initial duty cycle (default 10)

shields->setParameter(HALL_INPUT_A,0, BOARD1);
shields->setParameter(HALL_INPUT_B,1, BOARD1);
shields->setParameter(HALL_INPUT_C,2, BOARD1);

//shields->setParameter(HALL_OFFSET_60DEGREE_EN,1);
shields->setParameter(HALL_SPEED_KP,500, BOARD1);
shields->setParameter(HALL_SPEED_KI,100, BOARD1);

// Enable and set LED to blue, set RPM
// then stop the motor
shields->setLed(LED_ON, BOARD1);
shields->setLedColor(COLOR_BLUE, BOARD1);
shields->setMotorSpeed(-500);

/*
You might have to adjust the motor parameters,
in case the motor does not run properly.
*/
// Start the motor and let it run for 15 seconds,
// then stop the motor
shields->setMotorMode(START_MOTOR);

delay(5000);

shields->setMotorMode(STOP_MOTOR);
}

void loop() {
// put your main code here, to run repeatedly:

}

The code for FOC mode is attached in the zip. Regarding the setting of the parameters they correspond to the BLDC motor I'm using for my project. The motor is DF45L024048-A2 from Nanotec (https://www.farnell.com/datasheets/1996061.pdf).

Thanks in advance for your answer,

Giovanni

Hey Giovanni,

I know this is an old post, but I've encountered the same issue. Did you ever figure out how to solve the problem?

 

0 Likes
lock attach
Attachments are accessible only for community members.
Sahil_K
Moderator
Moderator
Moderator
250 replies posted First like given 100 solutions authored

Hi @Gimballs ,

 For the proper functioning of the "set parameter" command, please add one command, at line number 59, in "void changeSingleParameter(uint8 index, uint16 data1, uint16 data2)"  in  "commands.c" (in KEIL software program).

    Emo_Status.MotorState = EMO_MOTOR_STATE_UNINIT; 

 

For your reference, I am attaching the image.

Please, Let us know if you have further issues.

Thank you

Best Regards

Sahil Kumar

0 Likes