Motor Control Project

To build an intelligent motor drive system that –

  • Accepts a desired trajectory (generated & sent from PC (MATLAB)
  • Executes the trajectory
  • Plots the reference and executed trajectories

Project Summary:

GitHub link: https://github.com/patilnabhi/motor_proj

Hardware
  • brushed DC motor with encoder
  • PIC32 (NU32) micro-controller board
  • printed circuit board with an encoder counting chip in 4x mode
  • H-Bridge (DRV8835) to amplify the current to power motor
  • battery pack to power H-Bridge
  • resistors & capacitors
Software

2 pieces of software developed:

  • motor control code in C (on PIC32)
  • ‘client’ user interface code in MATLAB (on PC)

(Communication between PIC32 and PC was established using UART)

Control Strategy

 

Step-By-Step Approach
  1. Establish communication with terminal emulator and MATLAB client
  2. Adding the encoder circuit
    • PIC32 uses SPI to communicate with decoder PCB [decoder PCB connects PIC32 to motor encoder]
  3. Set-up and calibrate current sensor and read current sensor reading
  4. Connect H-bridge and motor and control motor PWM signal from client (MATLAB)
  5. Implement the PI current controller
  6. Implement PID position control [this is done such that the position control specifies a reference current value for the current controller to track]
  7. Tracking trajectory
    • Generate and visualize a reference trajectory in MATLAB client
    • Send the reference trajectory to PIC32 [N samples followed by N reference positions]
    • Execute the reference trajectory
    • Send the motor angle data back to client (MATLAB) for plotting

 

0 comments on “Motor Control ProjectAdd yours →

Leave a Reply

Your email address will not be published. Required fields are marked *