BLDC Motordriver BLDC-SHIELD-TLE-9879-TOBO1

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.
ResQ-Bots
Level 3
Level 3
25 sign-ins First solution authored 10 replies posted

Dear community,

We try to control BLDC motors with the help of BLDC motor drivers TLE9879 in combination with an Arduino Uno R3. The motors are from the company "Faulhaber" designation: "4490X024B K1155" and run at 24 V.  Our Motors have integrated Hall sensors. When we use FOC mode in the Code, the Motor spins. At low speeds, however, the motor rotates unevenly. We would like to use the integrated hall sensors, however when we use HALL-mode the motor doesn't spin at all. We have already varied the input current into the motor drivers from 12V-20V. But always without result. 

Without signal going thrue, the controller requires 0.04A. When the motor is driven in FOC mode, it draws 1.015 A

Help please, we dont know what to do anymore. We just want to use the hallsensors with those Motordrivers.

The code we use is:

#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_POLE_PAIRS, 1);

//Set Hall Frequency
shields->setParameter(HALL_PWM_FREQ,100000.0);      //original Faulhaber driver are working on <100000 Hz

//connect motor phase to hall phase
shields->setParameter(HALL_INPUT_A,0, BOARD1);
shields->setParameter(HALL_INPUT_B,1, BOARD1);
shields->setParameter(HALL_INPUT_C,2, BOARD1);

//set hall phase offset
//shields->setParameter(HALL_OFFSET_60DEGREE_EN, 0);
//shields->setParameter(HALL_ANGLE_DELAY_EN, 0);
//shields->setParameter(HALL_DELAY_ANGLE,0);
//shields->setParameter(HALL_DELAY_MINSPEED,10);


//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:

}

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

Hi @ResQ-Bots,

The warning given in the above image is because you have called setParameter before changing to HALL mode. 

Could you please confirm if the 5V is appearing at the VDDEXT after changing to the HALL mode?

Thank you

Best Regards

Raj Chaudhari

View solution in original post

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

Hi @ResQ-Bots,

To use Hall sensor mode for TLE9879 BLDC Shield, please follow the steps given below:

1) Download the 'BLDC Shield for Arduino with TLE9879QXA40' zip file from the product webpage.

2) Unzip the files, and go to "Infineon-BLDC_Shield-Software-v01_00-EN\03_shield_software\uVision_project_files\HALL" directory and open BldcBcHall Keil project.

3) To make setparameter() command to work properly please add one command, at line number 59, in "void changeSingleParameter(uint8 index, uint16 data1, uint16 data2)"  in  "commands.c" (in KEIL software program). (Refer to the image.)

    Emo_Status.MotorState = EMO_MOTOR_STATE_UNINIT; 

Raj_JC_1-1666340504649.png

 

4) Build and program the BLDC shield.

5) Connect Shield to Arduino and upload your Arduino Program.

Note: Sometimes HALL input requires an external Pullup and please ensure correct HALL pattern connected.

 

Please let us know if you have further queries.

 

Thank you

Best Regards

Raj Chaudhari

 

 

0 Likes
ResQ-Bots
Level 3
Level 3
25 sign-ins First solution authored 10 replies posted

Hello, that helped us a lot. Simply all we need now is a programming adapter like the segger J-link lite. The Company don't sell them since the chip chrisis.  Do you know where we can get one or a similar product to flash our BLDCshield?

Kind Regards

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

Hi @ResQ-Bots,

You can refer to the KIT_XMC_LINK_SEGGER_V1 which is the debug probe based on SEGGER J-Link debug firmware.

Or

You can buy any debugger/microcontroller which supports JTAG SWD 10pin debugging to program the BLDC shield.

Please let us know if you have further questions.

Thank you

Best Regards

Raj Chaudhari

0 Likes
lock attach
Attachments are accessible only for community members.

Hey all,

our  KIT XMC LINK SEGGER V1 arrived yesterday. Today i tried flashing the BLDCshield and keil uvision told me that the build cant be created cause complier version 5 is missing

Help please. 

 

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

Hi @ResQ-Bots,

Please go to the arm website to download the arm compiler version 5.
https://developer.arm.com/documentation/ka005184/latest 

Thank you

Best Regards

Raj Chaudhari

0 Likes
lock attach
Attachments are accessible only for community members.

We finally managed to create our BLDC.hex file in Kile uvision, with the following text: 

Build started: Project: BldcBcHall

*** Using Compiler 'V5.06 update 7 (build 960)', folder: 'C:\Keil_v5\ARM\complier\Bin'

Build target 'TLE9879 EvalKit'

compiling commonMC.c...

compiling auto_address.c...

compiling globvas_HALL.c...

compiling common.c...

compiling commands.c...

compiling Emo.c...

compiling Main.c...

compiling bdrv.c...

compiling EmoCcu_Cfg.c...

compiling adc1.c...

compiling EmoCcu.c...

compiling bootrom.c...

compiling gpt12e.c...

compiling ccu6.c...

assembling startup_tle987x.S...

compiling int.c...

compiling isr.c...

compiling ssc.c...

compiling scu.c...

compiling port.c...

compiling system_tle987x.c...

compiling tle_device.c...

compiling wdt1.c...

linking...

Program Size: Code=8220 RO-data=9020 RW-data=112 ZI-data=760 

FromELF: creating hex file...

".\Objects\BldcBcHall.axf" - 0 Error(s), 0 Warning(s).

Build Time Elapsed:  00:00:07

Load "G:\\Meine Ablage\\Res.Q Bots\\Steuerungstechnik\\TLE9879-BLDC-Shield-master\\Infineon-BLDC_Shield-Software-v01_00-EN\\03_shield_software\\uVision_project_files\\HALL\\Objects\\BldcBcHall.axf"

Set JLink Project File to "G:\Meine Ablage\Res.Q Bots\Steuerungstechnik\TLE9879-BLDC-Shield-master\Infineon-BLDC_Shield-Software-v01_00-EN\03_shield_software\uVision_project_files\HALL\JLinkSettings.ini"

* JLink Info: Device "TLE9879" selected.

 

JLink info:

------------

DLL: V7.82 , compiled Oct 13 2022 13:32:51

Firmware: J-Link Lite-XMC4200 Rev.1 compiled Mar  1 2019 11:28:26

Hardware: V1.00

S/N : 599013265

 

* JLink Info: InitTarget() start

* JLink Info: InitTarget() end

* JLink Info: Found SW-DP with ID 0x2BA01477

* JLink Info: DPv0 detected

* JLink Info: CoreSight SoC-400 or earlier

* JLink Info: Scanning AP map to find all available APs

* JLink Info: AP[1]: Stopped AP scan as end of AP map has been reached

* JLink Info: AP[0]: AHB-AP (IDR: 0x24770011)

* JLink Info: Iterating through AP map to find AHB-AP to use

* JLink Info: AP[0]: Core found

* JLink Info: AP[0]: AHB-AP ROM base: 0xE00FF000

* JLink Info: CPUID register: 0x412FC231. Implementer code: 0x41 (ARM)

* JLink Info: Found Cortex-M3 r2p1, Little endian.

* JLink Info: FPUnit: 2 code (BP) slots and 0 literal slots

* JLink Info: CoreSight components:

* JLink Info: ROMTbl[0] @ E00FF000

* JLink Info: [0][0]: E000E000 CID B105E00D PID 000BB000 SCS

* JLink Info: [0][1]: E0001000 CID B105E00D PID 003BB002 DWT

* JLink Info: [0][2]: E0002000 CID B105E00D PID 002BB003 FPB

ROMTableAddr = 0xE00FF000

* JLink Info: ResetTarget() start

* JLink Info: ResetTarget() end

 

Target info:

------------

Device: TLE9879QXA40

VTarget = 3.300V

State of Pins:

TCK: 0, TDI: 0, TDO: 0, TMS: 0, TRES: 8, TRST: 1

Hardware-Breakpoints: 2

Software-Breakpoints: 8192

Watchpoints:          1

JTAG speed: 3000 kHz

 

No Algorithm found for: 1101D000H - 1101D1ABH

Partial Erase Done (areas with no algorithms skipped!)

No Algorithm found for: 1101D000H - 1101D1ABH

Partial Programming Done (areas with no algorithms skipped!)

Partial Verify OK (areas with no algorithms skipped!)

Flash Load finished at 16:19:15

 

 

After that i changed the old hall.hex file with the new one and used the shield_flash batch datei. It worked without a problem. After that i brought the arduino and the BLDC shield together and tried our little code :


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

// 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);

// Set the desired mode (FOC, HALL, BEMF)
shields->setMode(HALL);

// Set the desired motor speed (RPM)
shields->setMotorSpeed(1000);

/*
You might have to adjust the motor parameters,
in case the motor does not run properly.
*/

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

void loop()
{
}

 

But like before, the engine isnt turning. 

What can we do here 😫?

thanks for your Help

Kind regards

Marvin

batch.png

 

 

 

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

Hi @ResQ-Bots,

1) Could you please confirm if the pull-up resistors are connected to the HALL signals?

2) If the rotor is getting locked try to interchange the HALL connection till it starts working.

3) Could you please just flash the HALL code using the KEIL IDE only.

4) Please change the motor parameters using the setparameter() after making mentioned change in the above post.

Please let us know if this works for you.

Thank you

Best Regards

Raj Chaudhari

0 Likes

Hey Raj,

Mega thank you for your support. unfortunately it still isnt working.  I connectet the pull- up Resistors. Used 12K Ohm resistors on every Hallsignal and connctet them to the +5V .

infineoBLDC.jpeg

I also reflashed the BLDC shield with the KEIL IDE only and changed the motor parameter() code like you mentioned in the post above. 

ResQBots_2-1668540940950.png

 

The moment i run the code from the Arduino to the shield, the rotor is getting locked for the 5 sec the code would run. I tried every possible connection from the Hallsensor cabels to the BLDC Shield and it chanched nothing. 

In the Infineon documentary is written that i should download the " config wizard for embedded Power IC's" 

ResQBots_0-1668540032663.png

 

In my new installed Developer Center i couldnt find that exact thing so i downloaded the "config wizard for MOTIX MCU". Is that maybe the Problem? 

ResQBots_1-1668540204921.png

 

Thank you

Best Regards

Marvin from Res.Q Bots

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

Hi @ResQ-Bots,

The TLE9879 BLDC Shield software requires IFXConfigWizard which can be downloaded from here: Link

There are two ways to configure the parameters for the drive, i) ConfigWizard, ii) setParameter().

The config wizard is not an issue for your application.

1) Could you please detect hall signals on the oscilloscope with and without the external pullups after applying +5V and Gnd signals. Please share the results here. (Please let us know if you need further clarification.)

2) If you are able to detect the hall signals as shown below (with/without pullups)

Raj_JC_0-1668600889692.png

Please connect the hall inputs as shown in following figure with BLDC Shield:

Raj_JC_1-1668600945987.png

Note: If motor doesn't rotate for current hall signal connection please reset the arduino after inter-changing the HALL signals. Keep supply voltage to the 12V for the BLDC shield.

3) In Arduino code please set following parameters:

//Set Hall Frequency
shields->setParameter(HALL_PWM_FREQ,20000);      //20KHz

4) Please share Serial Monitor results of the Arduino.

5) Please let us know if you have made any additional changes.

 

Thank you

Best Regards

Raj Chaudhari

0 Likes

Hello Raj,

 

i think i found the Problem but  i dont know the solution. While i was trying to read out the Hallsignals with the Osciloscope, i mentioned that the Hallsensors dont get any 5V Power from the TLC9879 Board. I tried a second TLE9879 and the same Problem occoured. I also tried to give the Hallsensors a +5V from an external power adapter, and it didn't worked. I think that the whole x15 part of the BLDCshield isn't enabled.  

16686943fe40717.jpg

 How can i solve that ? 

 

Thank you and Kind Regards

Marvin Corea 

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

Hi @ResQ-Bots,

In the image attached by you in your previous response, the LED is glowing in WHITE color.

1) For HALL mode this LED should glow in a BLUE color as shown in figure 1(if there are no changes made in the firmware other than setParameter).

2) Additionally, you can confirm if the shield is entering HALL mode by reading the message of the serial monitor of the Arduino IDE as shown in figure 2.

Raj_JC_1-1669030902540.jpeg

                                                   Figure 1 BLUE LED glowing for HALL mode

Raj_JC_0-1669030882877.png

                                                Figure 2 Serial Monitor for the HALL mode

 

 

3) The 5V will appear on the VDDEXT pin after shield enter to the HALL mode. 

Raj_JC_2-1669031206959.png

 

Could you please confirm if the shield is entering to the HALL mode by above three points.

Thank you

Best Regards

Raj Chaudhari

0 Likes

Hey RAj,

 

Thanks for your help again.

The Picture with the white LED was not the correct one, I just wanted to confirm to you that the Pull-up resistors are connected. Actually, the setup looks like this and the LED is Blue. 

1669032972972.jpg

 

 

The seriall-monitor in the Arduino IDE is showing me a warning:

ResQBots_0-1669033166422.png

Thanks and kind regards

 

Marvin

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

Hi @ResQ-Bots,

The warning given in the above image is because you have called setParameter before changing to HALL mode. 

Could you please confirm if the 5V is appearing at the VDDEXT after changing to the HALL mode?

Thank you

Best Regards

Raj Chaudhari

0 Likes