BLDC motors are the backbone of modern robotics, prized for their efficiency, reliability, and smooth speed control. With Infineon’s BLDC_SHIELD_TLE9879, you can bring professional-grade motion to your robot projects no advanced electronics required. This guide shows you how to get rolling fast, whether you’re building a two-wheeled rover or a complex multi-motor platform.
Hardware OverviewThis project revolves around three key hardware components:
- Infineon’s BLDC_SHIELD_TLE9879 evaluation board
- XMC™ 1100
- GBM4108-120TGimbal Brushless Motor
- 12V PowerSupply
Plug the first BLDC_SHIELD_TLE9879 onto your Arduino. For more wheels, stack additional shields on top. Each shield’s SPI address is set automatically by its position in the stack.
Connect the Motors:
Attach each motor’s three phase wires (L1, L2, L3) to the corresponding outputs on the shield. Double-check the order for correct rotation.
Power Up:
Connect a 12V DC supply to the shield’s power input. The same supply powers all stacked shields and motors.
Arduino USB:
Connect your Arduino to your PC for programming and serial monitoring
A Closer Look at the TLE9879QXA40The TLE9879QXA40 is far more than a simple motor driver chip—it’s a complete system-on-chip (SoC) solution designed to simplify BLDC motor control. At its core is an Arm® Cortex®-M3 processor, which performs the complex calculations required for smooth and precise motor operation. This processor is supported by a suite of integrated features, making the chip a comprehensive and versatile solution for driving 3-phase motors.
Key highlights of the TLE9879QXA40 include:
- Integrated NFET Drivers and Charge Pump: These components simplify the design, allowing the chip to directly drive the motor without requiring additional external circuitry.
- Advanced Peripherals: The chip features a current sensor, a successive approximation ADC, and a synchronized capture-and-compare unit. Together, these components ensure precise pulse-width modulation (PWM) control for accurate motor operation. Additionally, 16-bit timers provide flexibility for a variety of timing requirements.
- Communication Capabilities: With a built-in LIN transceiver, the TLE9879QXA40 is ideal for establishing communication in both automotive and industrial network environments. This makes it a versatile tool for engineers working on diverse applications.
- General-Purpose I/Os and Voltage Regulation: The chip includes multiple configurable I/Os for customization and an on-chip linear voltage regulator capable of powering external loads, reducing the need for additional components.
In essence, the TLE9879QXA40 combines processing power, flexibility, and integration to enable developers to efficiently design and implement BLDC motor control solutions.
SoftwareThe software component accompanying this hardware stack plays a crucial role in unlocking the full potential of the TLE9879QXA40 and the BLDC_SHIELD_TLE9879 evaluation board. Through pre-built libraries and example code, developers can quickly configure the system, experiment with various control algorithms, and fine-tune motor control parameters. Tutorials and reference materials provided by Infineon make it easier than ever to integrate this system into real-world applications.
Getting started with Arduino IDE and XMC™ Boards
To start programming with XMC™ boards, you need to set up the Arduino IDE. Follow our step-by-step guide to get started with XMC™ for Arduino: documentation.
Get Started!
With everything prepared we’re ready to flash the first code example to the microcontroller. In order to do that you have to do the following steps in the Arduino IDE:
1.Select the right board
Once you have installed the XMC™ board family, you can select one of the supported boards from the menu: Tools > Board > Infineon’s XMC™ Microcontroller. In our case we have to choose the XMC1100 Boot Kit in order to select the correct board.
Speed Control for Wheeled RobotsThe TLE9879 Arduino library makes it easy to set up and control each wheel’s speed. Here’s a sample sketch for two wheels:
#include "TLE9879_Group.h"
TLE9879_Group *shields;
void setup() {
shields = new TLE9879_Group(2); // Two shields for two wheels
// Set both shields to BEMF mode (sensorless, ideal for wheels)
shields->setMode(BEMF);
// Wheel 1 (BOARD1) parameters
shields->setParameter(BEMF_POLE_PAIRS, 11, BOARD1); // 22 poles / 2
shields->setParameter(BEMF_PWM_FREQ, 20000, BOARD1); // 20kHz PWM
shields->setParameter(BEMF_SPEED_KP, 100, BOARD1);
shields->setParameter(BEMF_SPEED_KI, 50, BOARD1);
shields->setParameter(BEMF_RUNBEGIN_SPEED_PWM_MIN, 0.1, BOARD1);
shields->setMotorSpeed(150, BOARD1); // Set speed in RPM
// Wheel 2 (BOARD2) parameters (adjust for your second motor)
shields->setParameter(BEMF_POLE_PAIRS, 7, BOARD2);
shields->setParameter(BEMF_PWM_FREQ, 18000, BOARD2);
shields->setParameter(BEMF_SPEED_KP, 80, BOARD2);
shields->setParameter(BEMF_SPEED_KI, 40, BOARD2);
shields->setParameter(BEMF_RUNBEGIN_SPEED_PWM_MIN, 0.12, BOARD2);
shields->setMotorSpeed(150, BOARD2);
// Start both wheels
shields->setMotorMode(START_MOTOR, BOARD1);
shields->setMotorMode(START_MOTOR, BOARD2);
}
void loop() {
// For simple speed control, just update setMotorSpeed as needed
// For advanced robots, add logic here for turning, stopping, etc.
}
Parameter Tuning: Why Each Motor Needs Custom SettingsEvery BLDC motor is different. For best results, set these parameters for each wheel:
- BEMF_POLE_PAIRS: Number of pole pairs (poles/2, check your datasheet).
- BEMF_PWM_FREQ: Higher values (15–25kHz) mean quieter, smoother operation.
- BEMF_SPEED_KP / KI: PI controller gains—start low, increase for more responsive speed control.
- BEMF_RUNBEGIN_SPEED_PWM_MIN: Minimum PWM for startup too low and the wheel may not move, too high and it may jerk.
- Motor Speed: Set in RPM; adjust for your robot’s needs.
Tip: Tune each wheel individually, then run them together for best performance.
Each BLDC motor is different, and so is each control mode. The TLE9879 shield supports three main control modes BEMF (Back-EMF), FOC (Field-Oriented Control), and HALL (Hall sensor commutation) and each mode has its own unique set of parameters that must be tuned for best results. (See your user manual, section 4.4, for full parameter lists.)
- BEMF Mode:
- Key parameters: BEMF_POLE_PAIRS, BEMF_PWM_FREQ, BEMF_SPEED_KP, BEMF_SPEED_KI, BEMF_RUNBEGIN_SPEED_PWM_MIN, etc.
- Best for: Simple, sensor-less speed control (great for wheels and drive motors).
- FOC Mode:
- Key parameters: FOC_R_PHASE, FOC_L_PHASE, FOC_POLE_PAIRS, FOC_NOM_CUR, FOC_MAX_SPEED, FOC_SPEED_KP, FOC_SPEED_KI, etc.
- Best for: High-precision, smooth control (gimbals, robotics arms, applications needing torque control).
- HALL Mode:
- Key parameters: HALL_INIT_DUTY, HALL_POLE_PAIRS, HALL_SPEED_KP, HALL_SPEED_KI, etc.
- Best for: Motors with Hall sensors, robust low-speed operation. Always check your motor’s datasheet and the shield’s user manual for recommended parameter ranges. Tune each motor and each mode individually for best performance.
Robots need precise, independent wheel control for smooth movement and accurate navigation. The TLE9879 shield’s stackable design lets you scale up easily just add more shields for more wheels. With simple speed commands, you can focus on your robot’s logic, not the low level motor details.
With Infineon’s TLE9879 shield, you can go from parts to a rolling robot in under an hour. Stack, wire, tune, and drive no advanced electronics required. Perfect for makers, educators, and anyone ready to bring their robot to life!
Comments