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

MOTIX™ MCU

Giova97
Level 1
5 sign-ins First reply posted First question asked
Level 1

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
2 Replies
Krupashankar
Moderator
Moderator 250 sign-ins 50 solutions authored First question asked
Moderator

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

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

0 Likes