Giter VIP home page Giter VIP logo

dc-motor-control's Introduction

DC Motor Control Project

Final project for ME 333: Introduction to Mechatronics, Northwestern University, Winter 2019.

Overview

This project consisted of building a circuit that uses a PIC32 microcontroller to control the position and behavior of a brushless DC motor.

Hardware

A PIC32MX795F512H chip was mounted on a board (called the "NU32" Development Board) that included buttons, LEDs, breakout ports, a USB port, and a virtual USB serial port. The motor used a rotary encoder to measure its angular position and the PIC32 microcontroller communicated through SPI with an encoder counting chip that counted the number of rotary encoder lines the motor turned each time. A MAX9918 current-sense amplifier provided voltage proportional to the motor current and this voltage output was attached to an ADC input on the NU32. Finally, a DRV8835 H-bride board was used to control the motor and was attached to a digital output channel as well as a PWM output compare channel on the NU32. Here is a general block diagram for the motion control of the system:

Motor Interface

A MATLAB client was used to interface with the motor circuit and give it commands to acquire information (such as controller gains) and execute tasks (such as move to a specified angle). The full list of commands is below:

Demo & Results

The demo below shows results for a step trajectory. The graph shown during the beginning of the video is a current control test for a constant signal that is run before the step trajectory for debugging purposes. After the step trajectory is completed, position control results are shown.

Here are some additional results for current control only:

Here are some results for a cubic trajectory:

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.