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

MOTIX™ MCU Forum Discussions

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

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
7 Replies
Raj_JC
Moderator
Moderator 250 sign-ins 25 likes received 50 solutions authored
Moderator

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

Thank you @Raj_JC 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
JODL_001
Level 1
First reply posted Welcome!
Level 1

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

@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
siccodwars
Level 1
5 replies posted 5 sign-ins First reply posted
Level 1

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
First reply posted Welcome!
Level 1

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
siccodwars
Level 1
5 replies posted 5 sign-ins First reply posted
Level 1

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