NXP's MCX Microcontrollers for Mobile Robotics

Image: NXP Semiconductors

NXP’s MCX Microcontrollers for Mobile Robotics

With NXP
July 04, 2024
7 min
Modal to share this post

Enhancing Motor Control in Mobile Robotics

For mobile robots to achieve optimal performance, smooth motion and reliable operation, efficient and precise motor control is essential. As robots become more autonomous and sophisticated, advanced microcontrollers that can handle the complexities of motor control alongside other duties are in high demand. NXP’s new MCX portfolio of microcontrollers feature cutting-edge peripherals that enable developers to optimize motor control in mobile robotic systems.

FlexPWM Module

The MCX A and N series feature a versatile and highly configurable Enhanced Flex Pulse-Width Modulator (eFlexPWM) module. This module enables precise motor control and offers a wide feature set to meet the diverse needs of mobile robotics applications. In addition to advanced controls for driving motors, the eFlexPWM module can be used to build Switched-Mode Power Supplies.

One of the eFlexPWM module’s key capabilities is its support for center-aligned, edge-aligned and asymmetrical Pulse Width Modulation (PWM).

Center-aligned PWMs maintain phase alignment and minimize current ripple in brushless DC (BLDC) motors, commonly used in mobile robotics for their high efficiency and torque density. By employing center-aligned PWMs, developers can achieve smoother motor operation, reduce electromagnetic interference (EMI) and extend the lifespan of the motor windings.

Edge-aligned PWMs simplify duty cycle calculations and make it easier to control H-bridge circuits, which are prevalent in mobile robotics for bidirectional motor control, precise positioning and speed regulation. The FlexPWM module streamlines the generation of the necessary control signals for H-bridge circuits, reducing software complexity and improving firmware responsiveness.

The FlexPWM module also offers phase-shifted PWMs, a valuable feature for mobile robotics applications involving multiphase inverters. By phase-shifting the PWM signals, developers can optimize power delivery to multiple motors simultaneously, ensuring smooth and coordinated motion in systems with multiple degrees of freedom, such as robotic arms or multiwheeled platforms.

The FlexPWM module incorporates robust fault protection and automatic fault-clearing mechanisms to ensure safety and reliability. When a fault is detected, the module automatically disables the PWM outputs, preventing damage to the motor windings and other sensitive components. Once the fault condition is resolved, the module can automatically clear the fault status and resume normal operation, minimizing downtime and enhancing overall system robustness.

Quadrature Decoder (QDC)

Mobile robotics require accurate position and speed feedback to implement effective closed-loop control systems. MCX microcontrollers feature the Quadrature Decoder (QDC) module, a dedicated peripheral designed to simplify the process of decoding quadrature encoder signals and providing reliable position and speed measurements.

Quadrature encoders generate two quadrature signals, Phase A and Phase B, which are 90 degrees out of phase with each other. The QDC module analyzes the sequence and frequency of these signals to determine both the motor shaft’s position and direction of rotation. The module’s advanced features, such as glitch filtering and edge detection, ensure the integrity and reliability of the decoded position and speed data, even in the presence of electrical noise or signal disturbances.

The QDC module offers flexibility in counter initialization, allowing developers to align the counter position with specific events or conditions. For example, the counter can be initialized based on the occurrence of an index pulse generated by the encoder once per revolution. This functionality simplifies the implementation of homing routines and absolute positioning. Additionally, the QDC module supports initialization based on the assertion of a home signal triggered by an external sensor or switch, enabling precise control and calibration of the mobile robotic system.

The QDC module provides multiple speed measurement methods for diverse application needs. Developers can calculate motor speed by monitoring the change in position over a fixed time interval, balancing resolution and response time. Alternatively, the module can measure the elapsed time between consecutive quadrature edges, offering high-resolution speed measurements suitable for applications requiring rapid response and fine-grained control.

AND/OR INVERT (AOI) Module

The AND/OR INVERT (AOI) module in the MCX A series complements the FlexPWM and QDC modules in optimizing motor control. It allows developers to create programmable combinational boolean logic, generating event outputs based on specific input conditions. In the MCX N series of microcontrollers, two AOI modules and a configurable flip-flop form the Event Generator (EVTG) module.

For motor control, the AOI module offers a powerful means to offload event detection and trigger generation from the main processor, reducing firmware overhead and improving system responsiveness. By configuring the AOI module to monitor various input signals, such as position, speed or fault status, developers can create custom hardware triggers that initiate specific motor control actions without requiring constant software intervention.

For instance, the AOI module can be programmed to generate a trigger signal when a specific combination of conditions is met, such as when the motor position reaches a predetermined threshold, and the speed is within a certain range. This trigger can then be used to automatically adjust the PWM duty cycle, change the motor commutation sequence or perform any other desired motor control action.

By leveraging the AOI module’s programmable logic, developers can implement complex control strategies that respond quickly to real-time events, enhancing overall performance and efficiency. The AOI module’s flexibility allows for the creation of custom triggering conditions tailored to the specific requirements of each application, enabling developers to optimize motor control based on the unique characteristics of their robotic platform.

FRDM-MC-LVPMSM Expansion Board

NXP offers the FRDM-MC-LVPMSM expansion board to facilitate the development and prototyping of motor control applications. This FRDM board combines hardware and software resources to accelerate the design process. It is designed with a shield form factor, allowing it to integrate seamlessly with NXP’s Freedom development board platform.

The FRDM-MC-LVPMSM expansion board provides a complete motor control reference design when combined with NXP’s Permanent Magnet Motor Control Reference Software. This software suite includes a range of preconfigured motor control algorithms, libraries and example projects, enabling developers to quickly implement and optimize motor control systems for their specific mobile robotic applications.

The shield features a low-voltage, 3-phase permanent magnet synchronous motor (PMSM), commonly used in mobile robotics due to its high efficiency, high torque density and precise control capabilities. The board also includes essential components such as power stages, current sensing circuitry and encoder interfaces, providing a complete platform for motor control development.

By leveraging the FRDM-MC-LVPMSM shield and the associated reference software, developers can significantly reduce the time and effort required to design and validate motor control systems for mobile robotics. The board’s compatibility with the FRDM-MCX development platform allows for seamless integration enabling developers to choose the most suitable microcontroller for their specific application requirements.

MCUXpresso Developer Experience

For quick prototyping with MCX, NXP offers a low-cost FRDM development platform. FRDM development boards come with standard form factor and headers, easy access to MCU I/Os, on-board MCU-Link debugger and a USB-C cable.

NXP’s GitHub also provides access to application examples, which can be accessed using the Application Code Hub portal (ACH). MCUXpresso IDE and MCUXpresso for VS Code have ACH browsing built-in, so developers can easily search for available demos and examples, and filter by device, application technology or peripheral/feature before loading the project directly for use.

Expansion board hub (EBH) is an extension to NXP’s SDK Builder site where developers can find a range of add-on boards from NXP and partners to extend the capabilities of the chosen evaluation board. This hub gives intuitive filtering to quickly find boards and locate available supporting software. Developers can pair their board with different kinds of shields to evaluate and do rapid prototyping for specific use cases or applications.

NXP’s Comprehensive Solution Offering for Motor Control in Mobile Robotics

NXP’s MCX portfolio of microcontrollers represent a significant advancement in motor control technology, offering a comprehensive suite of peripherals specifically designed to optimize motor control in mobile robotics applications. The FlexPWM module provides the flexibility and reliability needed for precise motor control, while the Quadrature Decoder (QDC) module delivers accurate position and speed feedback necessary for closed-loop control systems. The AND/OR INVERT (AOI)/Event Generator (EVTG) modules adds a layer of programmable logic, enabling developers to create custom hardware triggers and offload event detection from the main processor.

Can't find what you're looking for? Need help finding the right supplier?

Your message was sent successfully!

Thank you for reaching out. We'll get back to you shortly!

Oops!

Something went wrong. Please try again later.

Processing!

Thank you for your message. We are processing the information.

Upcoming events

WIoT tomorrow 2024

International Exhibition | Summit

Date

23. - 24.

October 2024

Location

Wiesbaden,

Germany

Think WIoT Day August 28th

Livestream on Healthcare

Date

August 28th

Location

Online