BLDC Shield with TLE9879QXA40 for Arduino

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.
User19954
Level 1
Level 1
5 sign-ins Welcome! First question asked

Hello everyone,

unfortunately the LED2 on the BLDC_SHIELD_TLE9879 does not light up as desired. I put the BLDC shield on an Arduino Uno. I operate the BLDC shield with 7.4 volts and I connected the Arduino to the laptop via USB.
After connection, LED1 on the BLDC shield lights up red and LED2 white. Using the source code, I would like to have the LED2 light up blue and green alternately. The built-in LED on the Arduino should blink.

When I transfer the code shown below to the Arduino nothing happens. The LED on the Arduino does not flash, nor does LED2 on the BLDC shield change color.

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

// Declare Shield group object
TLE9879_Group *shields;

voidsetup()
{

shields = new TLE9879_Group(1);
shields->setLed(LED_ON, BOARD1);
pinMode(LED_BUILTIN, OUTPUT);

}

void loop()
{

digitalWrite(LED_BUILTIN, HIGH);
shields->setLedColor(COLOR_BLUE, BOARD1);
delay(500);

digitalWrite(LED_BUILTIN, LOW);
shields->setLedColor(COLOR_GREEN, BOARD1);
delay(500);

}

If I run the following code on the Arduino, the LED on the Arduino flashes as desired. The BLDC shield is still plugged into the Arduino and receives 7.4 volts.

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

// Declare Shield group object
TLE9879_Group *shields;

voidsetup()
{

pinMode(LED_BUILTIN, OUTPUT);

}

void loop()
{

digitalWrite(LED_BUILTIN, HIGH);
delay(500);

digitalWrite(LED_BUILTIN, LOW);
delay(500);

}

As soon as I extend the program with the following line, the LED on the Arduino also stops blinking:

shields = new TLE9879_Group(1);

The original "bldc_shield_blinky_test" program doesn't work either.

Can anyone help me.

Thank you and best regards

Thomas

0 Likes
1 Solution
Sahil_K
Moderator
Moderator
Moderator
First like given 100 solutions authored 250 sign-ins

Hi @User19954 ,

 

  • The built-in LED of the Arduino UNO is connected to D13 of the UNO board and is also used by the SPI as the clock. In order to communicate between the UNO and BLDC shield, D13 is used as SPI CLK once the command shields = new TLE9879_Group(1); is added. Hence it is not recommended to use the built-in led feature with the BLDC shield.

Therefore, if you want the LED on both boards to flash, consider connecting an external LED to the Arduino UNO board at a pin that isn't used by the SHIELD, as shown in the image.

sk7211_0-1690787554287.png

 

  •  As mentioned by you, the "bldc_shield_blinky_test" program doesn't work either. Were there any modifications made to the original sketch or Keil code?

Best Regards,
Sahil Kumar

View solution in original post

0 Likes
3 Replies
Sahil_K
Moderator
Moderator
Moderator
First like given 100 solutions authored 250 sign-ins

Hi @User19954 ,

 

  • The built-in LED of the Arduino UNO is connected to D13 of the UNO board and is also used by the SPI as the clock. In order to communicate between the UNO and BLDC shield, D13 is used as SPI CLK once the command shields = new TLE9879_Group(1); is added. Hence it is not recommended to use the built-in led feature with the BLDC shield.

Therefore, if you want the LED on both boards to flash, consider connecting an external LED to the Arduino UNO board at a pin that isn't used by the SHIELD, as shown in the image.

sk7211_0-1690787554287.png

 

  •  As mentioned by you, the "bldc_shield_blinky_test" program doesn't work either. Were there any modifications made to the original sketch or Keil code?

Best Regards,
Sahil Kumar

0 Likes

Hallo Sahil,

there where no modifications in the original sketch. I send you the source in a doc.
 
Best regards
 
Thomas
0 Likes
Sahil_K
Moderator
Moderator
Moderator
First like given 100 solutions authored 250 sign-ins

Hi @User19954 ,

Can you please share the project file and Arduino Uno sketch?

Best Regards,
Sahil Kumar

0 Likes