BLDC_SHIELD_TLE9879 questions.

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
User19138
Level 1
Level 1
As I understand the board has a firmware ready to operate from SPI master (the board serves as SPI slave).
But I haven't found any documentation regarding the communication protocol and commands.
I also haven't found how do I set a chip select pin for the board (it has 4 on board so 4 boards can be operated from one axis manager).
May be I could be satisfied by high level API like

shields->setMode(HALL, BOARD1);
shields->setMode(FOC, BOARD1);

shields->setMotorSpeed(500, BOARD1);
shields->setMotorSpeed(2000, BOARD2);

shields->setMotorMode(START_MOTOR, BOARD1);
delay(5000);
shields->setMotorMode(START_MOTOR, BOARD2);
delay(5000);
shields->setMotorMode(STOP_MOTOR, BOARD1);
delay(5000);
shields->setMotorMode(STOP_MOTOR, BOARD2);
delay(5000);

But I need more control on the boards.
0 Likes
6 Replies
Elettrograffiti
Employee
Employee
Hi John, are you using the autoaddressing function "startAutoAddressing()"? with these function the boards will automatically get addressed starting from the bottom of the stack (board 1) to the top (board 4). At the moment this is the way the board addressing works for this platform.
0 Likes
User19138
Level 1
Level 1
I see. Thank you.
My motors has encoders and I have to close a position loop. How can read the encoder data?
0 Likes
Elettrograffiti
Employee
Employee
how many bits is this encoder? If it is just 3, line an Hall sensor, you could try to use the hall pattern detection to your advantage. Otherwise you could use any GPIO in input mode and generate interrupt function for your loop regulation.
0 Likes
User19138
Level 1
Level 1
Elettrograffiti wrote:
how many bits is this encoder? If it is just 3, line an Hall sensor, you could try to use the hall pattern detection to your advantage. Otherwise you could use any GPIO in input mode and generate interrupt function for your loop regulation.

It's AB incremental encoder. Some microcontrollers, like STM32 have a timer that may be configured as AB encoder reader. You say I can set two pins as inputs and decode it on pin interrupt?
0 Likes
Elettrograffiti
Employee
Employee
Hi. then you could actually use the Hall pattern mode described in paragraph 18.7 and onwards. Instead of using the 3 CCPOS inputs you could use just 2 of them with the 3rd pulled to GND (always read as 0).
0 Likes
User20120
Level 1
Level 1
Hi, I was looking of getting speed feedback too from the HALL sensor that I feed to the BLDC controller. If I get it right there is no "getter" function that reads the measured speed from the SPI, right? Would be great addition to the Arduino library since it is already implemented for the FOC, so that we don't have to do it at the high level MCU.
0 Likes