BLDC_SHIELD_TLE9879 setParameter() not working?

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
lock attach
Attachments are accessible only for community members.
BR712
Level 1
Level 1
10 sign-ins 5 sign-ins First reply posted

Hello everyone,

I bought the BLDC_SHIELD_TLE9879 for Arduino Uno,  connected it to a BLDC motor (5000-25000 rpm), 20V, using FOC and tried out the demoprogram "bldc_shield_single...". The motor starts, but the problem is now, that the real rpm does not match to the setMotorSpeed(5000), means with 5000 the motor runs with maximum (in my case around 25000). After some measurement of the real speed I found out, that the value in setMotorSpeed() must be 630 in order to drive the motor with 5000rpm, that means a factor of round about 8.

Now I implement the setParameter() (see below) for the pole pairs to correct this, but nothing changed. I tried out some value for the pole pairs, but no success. What is wrong? I also have to change some other parameters (KI, KP...), but also these modifications have no effect to the behavior of the motor.

I hope that someone can help me.

Here the code:

#include "TLE9879_Group.h"
TLE9879_Group *shields;

void setup()
{
shields = new TLE9879_Group(1);
shields->setMode(FOC);
//shields->setMotorSpeed(5000); // real Speed around 25000

shields->setMotorSpeed(630); // real Speed 5000

// For a real rpm of 5000 I must insert in setMotorSpeed(630), means factor 8 (or 0,125)

/*************************************************************************
setParameter(FOC_POLE_PAIRS,2, BOARD1); // Does not change anything
**************************************************************************/
// It doesn't matter how many pole pairs I set, the real rpm is for every value the same!
// Why ???
shields->setMotorMode(START_MOTOR);
//delay(5000);
//shields->setMotorMode(STOP_MOTOR);
}

void loop()
{
}

// Picture shows my setup

0 Likes
1 Solution
Raj_C
Moderator
Moderator
Moderator
250 solutions authored 500 replies posted 50 likes received

Hi @BR712,

Please follow the instruction mentioned in the BLDC_SHIELD_TLE9879: setParameter() Working.  thread to make setParameter() working. 

This will require to program the BLDC shield using 10-pin SWD programmer.

Thank you

Best Regards

Raj Chaudhari

View solution in original post

0 Likes
8 Replies
Raj_C
Moderator
Moderator
Moderator
250 solutions authored 500 replies posted 50 likes received

Hi @BR712,

There are currently known gaps in the BLDC shield software. We are working on it. We will update the code as soon as possible.

For a workaround instead of using setParameter(), you can change the parameters in the config wizard and program the shield using J-Link.

 

Thank you

Best Regards

Raj Chaudhari

0 Likes
BR712
Level 1
Level 1
10 sign-ins 5 sign-ins First reply posted

Thank you @Raj_C for the fast response. I`m looking forward to hear from you, if there is a new BLDC shield software. The shield is really a good product for fast prototyping and testing the TLE9879 so its worth to have a good working software environment.

At the moment, I`m not able to program the shield using J-Link, I don`t have the hardware for that.

Kind regards, Bernd

0 Likes
Raj_C
Moderator
Moderator
Moderator
250 solutions authored 500 replies posted 50 likes received

Hi @BR712,

Please follow the instruction mentioned in the BLDC_SHIELD_TLE9879: setParameter() Working.  thread to make setParameter() working. 

This will require to program the BLDC shield using 10-pin SWD programmer.

Thank you

Best Regards

Raj Chaudhari

0 Likes
JODL_001
Level 1
Level 1
First like given 5 replies posted First question asked

Hello @Raj_JC  facing the same problem and was wondering , sorry newby here, have several questions :

              where can I download config wizard ? Does it work standalone ? No need for Keil installation I hope

              Which hardware , interface do I need to use J-link ? Do i need also Software to get it downloaded or is it a                       part of the config wizard ?

               Where can I download a guide for the Config wizard and J-link?

 

0 Likes
BR712
Level 1
Level 1
10 sign-ins 5 sign-ins First reply posted

@JODL_001 See page 4 or 11: https://www.infineon.com/dgdl/Infineon-Getting_Started_TLE986x-7x-GettingStarted-v02_00-EN.pdf

- In my opinion Config wizard does not work alone

- Keil or IAR IDE is necessary

- J-Link is a hardware that can be connected to the TEL9879 arduino shield. Driver for J-Link necessary

Installation order:

Install Keil µVision5 or IAR (account at keil necessary)

Install Infineon developer center and inside it the config wizard

Install J-Link driver

Install µVision5 Pack installer for TLE987x

The links to the software packages are in the Getting Started document (see above).

Hope it helps

 

0 Likes

And downgrade ARM compiler from v6 to v5. Because by default you get ARM compiler 6 and the example codes simply will not compile…

And probably good idea to also define heap size different than 0. This did cost me most of yesterday to figure out why code with stdio printf fails to run / boot without any hints that heap must be >256 bytes or else…

0 Likes
JODL_001
Level 1
Level 1
First like given 5 replies posted First question asked

Hello BR712 , thanks for your fast response. Momentarily J-link interface isn't available. 

For the moment I will wait for the update of the BLDC shield software . 

When can we expect the update ?

0 Likes

Instead of buying an expensive Segger JLink, get a <100 EUR eval kit such as the TLE9879EVALKIT. That has on board JLink equivalent USB SWD with logic level conversion. It should be possible to solder (jumper) the 3 SWD wires (TMS, reset, P0.0) plus 0 and +5V to the SWD debugger adapter on your Arduino kit i think. You will need to hold the TLE9879 in the EVALKIT in reset (or remove it).

On your RPMs being ~8x too high: my first guess is that your BLDC motor is 7 pole pairs while your code is configured for 1 pole pair. 

TLE9879EVALKITTOBO1

0 Likes