Create Your First Motor Control Application Using MPLAB Harmony v3: Step 6

Last modified by Microchip on 2023/11/09 09:07

Hardware Setup

This section describes how to configure the supported hardware.

Mount the ATSAME54 Motor Control Plug-in Module on the U9 header.

Hardware setup


Place the External Op-amp Configuration Matrix board at J14.

Placing the External Op-amp Configuration Matrix board at J14png


Connect the motor phases and hall sensor interfaces. Hall and phase connections for Short Hurst motor are given below.

Hall Connector Chart

Phase Connections Chart


Final Hardware setup

Final Hardware setup

Build, Program, and Observe the Outputs

Go to File > Project Properties and verify the correct debugger is selected under Hardware Tools. Check that XC32 (v2.41) is selected as the Compiler Toolchain for XC32.

File > Project Properties


Clean and build your application by clicking on the Clean and Build button.

Clean and Build button


Program your application to the device, by clicking on the Make and Program button.

Make and Program button

The project should build and program successfully.

Results

  1. Press the S2 switch to start the motor.
  2. Press the S3 switch to toggle the motor direction.
  3. Vary the potentiometer to change the speed of the motor.
  4. Press the S2 switch again to stop the motor.

Conclusions

This training module described how to configure and use all the fundamental components needed to build a real-time motor control application on a SAM D5x/E5x microcontroller with the MPLAB Harmony v3 Framework. As a next step, you may customize this application and reconfigure some of the components used in this training module. You could also add new components (PLIBs, etc.) to develop your end application.