BDML Brushless DC Motor Controller
  • Project Overview
  • Hardware
  • Electrical Design
  • Firmware
  • Meet the team

EE152 Final Project

For this project, we built a brushless motor controller breakout shield for the STM32F4DISCOVERY board. Our goal was to drive a Maxon EC32 flat at low speeds while implementing PI position control using the AS5048 rotary magnetic encoder and our driver design.

We chose this project because 1) we are building a robotic hand that will have an oil-filled motor containment for ocean exploration and therefore cannot use brushed motors, and 2) as roboticists we love learning about elegant and powerful ways to actuate motors in different modes.

Results

We designed, populated, and tested our motor driver pcb design. It worked beautifully! We also implemented PI position control using sinusoidal commutation using an ARM microcontroller development board with I2C magnetic absolute encoder feedback.
Picture
These plots are the experimental time responses of the motor from a random displacement. The desired rotary location is 180 degrees in all plots. There is a very conservative current limit of about 0.4A. Therefore, the control gain is constant at large displacements. This accounts for the linear time response when the motor is far from the desired position - the motor is in a constant torque state in this regime. We suspect that continuous noise at the final location is due to the high resolution of the encoder and high controller gains.

Important Skills Learned and Developed

We have learned so much throughout EE152, especially with this project. Here is a condensed list of project highlights:
  • Hardware initialization (timers/IO ports for pwm and I2C communication) on a STM32F407 ARM Cortex MCU.
  • Implement a PI position controller for a 3-phase brushless motor. We were able to get precise results using sinusoidal commutation.
  • Understand the hardware necessary for a 3-phase inverter.
  • Get comfortable with Altium Designer and PCB manufacturing.
  • Understand how traces are sized with current requirements and compact and effective ways to create ground planes on the PCB while minimizing parasitic noise coupling.
  • Learn how I2C protocol works for the encoder input.
  • Practice fixed-point arithmetic and catch roll-over error in code calculations, as well as general code debugging.

Future Work

This project will be continued until it can be packaged and installed in our robotic hand. The final board will include the micro-controller, a more compact driver circuit layout with minimal wiring, tactile and joint angle sensor inputs, and a firewire communication module. However, on a more immediate level we plan to:
  • Understand new current and torques limits when the motor cavity is oil-filled.
  • Implement impedance control with a larger range of possible torques (this requires either a gear ratio or pushing to motor past it's continuous operation limits).
  • Develop a more robust way of calibrating the angle of the encoder to the motor's electrical windings.
  • Include A/D inputs to the microcontroller to limit current through active measurement, not just an estimated arbitrary limit.
Create a free web site with Weebly