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

Hardware Setup

This section describes how to configure the supported hardware.

1

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

SAME54_PIM.jpg

2

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

external_opamp.png

3

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

hall_connection.png
phase_connection.png

4

Final Hardware setup:

full_hardware_setup.jpg

Build, Program, and Observe the Outputs

1

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.

choose_j32.png

2

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

build.png

3

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

program.png

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.

© 2024 Microchip Technology, Inc.
Notice: ARM and Cortex are the registered trademarks of ARM Limited in the EU and other countries.
Information contained on this site regarding device applications and the like is provided only for your convenience and may be superseded by updates. It is your responsibility to ensure that your application meets with your specifications. MICROCHIP MAKES NO REPRESENTATIONS OR WARRANTIES OF ANY KIND WHETHER EXPRESS OR IMPLIED, WRITTEN OR ORAL, STATUTORY OR OTHERWISE, RELATED TO THE INFORMATION, INCLUDING BUT NOT LIMITED TO ITS CONDITION, QUALITY, PERFORMANCE, MERCHANTABILITY OR FITNESS FOR PURPOSE. Microchip disclaims all liability arising from this information and its use. Use of Microchip devices in life support and/or safety applications is entirely at the buyer's risk, and the buyer agrees to defend, indemnify and hold harmless Microchip from any and all damages, claims, suits, or expenses resulting from such use. No licenses are conveyed, implicitly or otherwise, under any Microchip intellectual property rights.