Motor Control and Drive
Motor Control and Drive
- Motor Types
- Reference Designs
- Motor Control Products
- Motor Control Algorithms
- Motor Control Library
- Motor Control Simulations
- motorBench Development Suite
- Hardware Development Tools
- Design Partners
PIC32MK Microcontrollers for Motor Control Applications
PIC32MK microcontrollers (MCUs) combine 32-bit, 120 MHz performance with up to 1 MB of dual-panel live update Flash memory with Error Code Correction (ECC) for creating high-performance applications. They offer a range of communications and other peripherals combined with a rich feature set of high-performance analog motor control functions that make them an excellent option for developing motor control, industrial control, Industrial Internet of Things (IIoT) and automotive applications.
|Key Features||PIC32MK GPK/MCM Family||PIC32MK GPG/MCJ Family|
|Core||MIPS32 microAptiv™||MIPS32 microAptiv|
|CPU Frequency||120 MHz||120 MHz|
|Double Precision Floating Point Unit (FPU) and DSP Extension Support||✓||✓|
|Flash with ECC||Up to 1 MB of Dual-Panel Live Update||Up to 512 KB|
|SRAM||Up to 256 KB||64 KB|
|Pin Count||64 and 100||48 and 64|
|Shadow Register Set for Reduced Interrupt Latency||7||7|
|CAN FD Modules||Up to 4||1|
|Full Speed USB||Up to 2||-|
|UART Modules||Up to 6||Up to 2|
|Analog-to-Digital Converters (ADCs)||7 × 12-bit |
3.75 Msps (25.45 Msps combined)
|7 × 12-bit|
3.75-Msps (25.45 Msps Combined)
|Digital-to-Analog Converters (DACs)||Up to 3 × 12-bit||Up to 2 × 12-bit|
|Pulse-Width Modulation (PWM) Pairs||12||9|
|PWM Resolution||8.16 ns||8.16 ns|
|High Bandwidth Op Amps||4||4|
|Op Amps Slew Rate||40 V/µs||40 V/µs|
PIC32MK GPD/GPE/MCF Family (Legacy Products): These devices have CAN instead of CAN FD, lower-bandwidth op amps, no ECC on the Flash and no I2C interface.
Sensorless Single-Motor Drive with PIC32MK MCUs
PIC32MK MCUs make it easy and cost effective to implement single-motor drive applications. Their internal op amps reduce the need for external devices. Use their multiple Analog-to-Digital (ADC) conversion cores to dedicate an ADC to each motor phase that you want to measure rather than sharing the conversion of two or more phases on a single ADC. This reduces code complexity and increases resolution since you can capture more samples per phase without having to calculate complex timing between phases on a single ADC. Internal high-speed comparators with PWM fault triggering can also be used as over-current protection across the two measured phases.
Sensorless Dual-Motor Drive with PIC32MK MCUs
Many motor control applications require multiple motors. With their hefty selection of integrated peripherals, the PIC32MK series of MCUs is up to the challenge of driving dual, sensorless motor applications. Although it is similar to the block diagram for single-motor, dual-shunt sensorless control, this block diagram shows that the peripheral requirements are doubled for two motors. Since the PIC32MK MCUs offer seven ADC conversion cores, you don’t have to worry about sharing converters between phases or motors. This significantly reduces the software timing overhead. All four op amps and four out of five comparators are used for this application.
Sensored Motor Control with PIC32MK MCUs
For applications requiring more than just speed and torque control, but also requiring absolute positioning (rotor angle) measurements, PIC32MK MCUs are an excellent option. The six Quadrature Encoder Interfaces (QEIs) are ideal for multi-axis CNC machines and robotics designs. Stepper motors, which have high torque holding and are easy to control accurately, are common in these applications. The PWM modules can be independently timed for multi-axis control. When coupled with a smart stepper driver, a PIC32MK MCU can drive up to six stepper motors while providing high-precision sensored feedback.
Simulation and Modeling Tools
MPLAB® Device Blocks for Simulink® provide a set of user interfaces and Simulink peripheral blocks for PIC32MK and SAM MCUs. Create stand-alone applications from a Simulink discrete time model and, with one click, generate, compile and load on the code for your application onto your target device. The package also provides many examples in the form of demo models, including a complete BLDC motor control application, to further simplify your development. The latest version includes support for single-shunt motor control algorithms and includes Simulink models for several additional examples.
PIC32MK devices are also supported in the open-source Scilab simulation package, a two-part modeling environment that includes the Scilab main and Xcos system modeler.
Scilab Key Features
- Mathematics and simulation
- Data visualization
- Control system design and analysis
- Signal processing
- Algorithm development
- Application deployment
Xcos Key Features
- Standard palettes and blocks
- Model building and edition
- Model customization and Modelica blocks creation
Development Software and Hardware
MPLAB® Harmony, a flexible, abstracted, fully integrated firmware development platform for PIC32 microcontrollers, provides support for peripherals, application demos and motor control applications using the PIC32MK family of MCUs. It combines the key elements of modular and object-oriented design and the flexibility to use a Real-Time Operating System (RTOS) or work without one, and provides software modules that are easy to use, configurable for your specific needs, and that work together in complete harmony. It also includes a set of peripheral libraries, drivers and system services that are easily accessible for your application development. The code development format allows for maximum re-use and reduces your time to market.
We also offer the following motor control development boards to simplify your development with PIC32MK devices. You will also need to purchase the PIC32MK MCM Motor Control Plug-In Module to add a PIC32MK device to your design. Demo examples for sensored and sensorless Field Oriented Control (FOC) of a permanent magnet synchronous motor are available within MPLAB Harmony v3.