Skip to content

Microchip-MPLAB-Harmony/motor_control

Repository files navigation


title: Microchip MPLAB® Harmony 3 Motor Control nav_order: 1 has_children: false has_toc: false

Microchip MPLAB® Harmony 3 Motor Control

MPLAB Harmony 3 is an extension of the MPLAB® ecosystem for creating embedded firmware solutions for Microchip 32-bit SAM and PIC32 microcontroller and microprocessor devices. Refer to the following links for more information.

This repository serves as the home for Harmony QSpin, a GUI-based motor control system configuration tool. Designed for ease of use, it empowers users to swiftly construct motor control applications featuring well-architected code and MISRA-compliant content. Achieving this is made simple by following intuitive steps, ensuring a seamless and efficient motor control development experience.

Harmony QSpin

For a detailed understanding of the tool's various features, consult the Harmony QSpin Quick Guide to view the online documentation

To view the documentation offline, follow these steps:

  • Download the publication as a zip file from here.
  • Extract the zip file into a folder.
  • Navigate to the folder and open index.html in a web browser of your choice Additionally, keep yourself informed with the latest updates and improvements by checking out our release notes:
  • Release Notes

Harmony QSpin Device and Algorithm Compatibility

Harmony QSpin is designed to support a wide range of devices and algorithms for motor control applications. Below are the lists of supported devices, motors, and algorithms:

Supported Devices

Harmony QSpin supports various microcontroller families from Microchip, ensuring compatibility with different motor control applications.

Device Families Tested On Remarks
SAMD/E5x ATSAME54P20A -
SAME7x ATSAME70Q21B -
SAMV7x - -
SAMC2x ATSAMC21J18A -
PIC32CM MC PIC32CM1216MC00048 -
PIC32MK MCF PIC32MK1024MCF100 -
PIC32MK MCM PIC32MK1024MCM100 -
PIC32MK MCA PIC32MK0128MCA048 -

Supported Motors

Harmony QSpin provides support for following motors:

  • Permanent Magnet Synchronous Motors (PMSM)

Supported Algorithms

Harmony QSpin integrates advanced algorithms tailored for different microcontroller families, enabling efficient motor control strategies.

Algorithms SAMD/E5x SAME7x / SAMV7x SAMC2x/ PIC32CM MC PIC32MK MCF/ PIC32MK MCM/ PIC32MK MCA
Classical PLL based Estimator Yes Yes Yes Yes
Sliding mode observer Yes Yes No Yes
Reduced Order Luenberger Observer Yes Yes Yes Yes
Encoder based position calculation Yes Yes No Yes
ZSMT-HF Hybrid Yes No No Yes
Flux weakening Yes Yes No Yes
MTPA Yes Yes No Yes
Null vector Flying start Yes Yes No Yes
Encoder based position control Yes Yes No Yes

Additional Resources

Explore a variety of example application projects generated from QSpin and discover high-value standalone projects in the following repositories:

Repository Name Description Help Document
mc_apps_pic32cm_mc Motor Control Applications for PIC32CM MC family mc_apps_pic32cm_mc help
mc_apps_pic32mk Motor Control Applications for PIC32MK family mc_apps_pic32mk help
mc_apps_sam_c2x Motor Control Applications for SAM C2x family mc_apps_sam_c2x help
mc_apps_sam_d5x_e5x Motor Control Applications for SAM E5x family mc_apps_sam_d5x_e5x help
mc_apps_sam_e7x_s7x_v7x Motor Control Applications for SAM E7x family mc_apps_sam_e7x_s7x_v7x help
mc_apps_sam_rh71 Motor Control Applications for SAM RH71 family mc_apps_sam_rh71 help
mc_apps_sam_rh707 Motor Control Applications for SAM RH707 family mc_apps_sam_rh707 help

License Latest release Latest release date Commit activity Contributors


Follow us on Youtube Follow us on LinkedIn Follow us on Facebook Follow us on Twitter