Motor Control on Microcontroller

March 16, 2016

Demo

Overview

This project involved using a PIC32 microcontroller and MatLab to control the motion of a DC motor. The final project could be commanded to any angle and could follow a trajectory fairly accuratly.

Flowchart of Project

Trajectories

The trajectories were generated in Matlab and sent to the PIC for the motor to folow. both step and cubic trajectoies were used. After completing the trajectory, the PIC would record the motor’s actual trajectory and send it back to MatLab for comparison to the input.

Example trajectory graphs below. The red line is the motor’s actual trajectory, and the blue line is the generated trajectory input to the motor.

Example Step trajectory

Example Cubic trajectory

Files

Github

Here is the Github repo for the project