Motor Motion Controller: ECE342-Sp20

The motor motion controller system we developed this term serves as an initial step to developing a larger scale and more robust motion motor controller for use in the Oregon State University Mars Rover team’s robotic arm. This will allow the motor controllers within the arm to be easily customized via a GUI, a capability that is currently missing in the current robotic arm implementation. The system was built with a four-layer PCB, firmware written in C, and a GUI written in XAML and C#. It also uses a STM32 microcontroller, magnetic quadrature encoder, and a brushed DC motor. The biggest challenge we faced was working on this project remotely within the constricted timeline. Without being able to meet in person to talk through challenges or connect components to properly integrate our system, each development step was found to be more difficult than the last. While we made use of online technologies, it was impossible to replace the value of in-person teamwork and collaboration.

0 Lifts 

Artifacts

Name Description
Project Summary Explanation of project, including approach, timeline, and key lessons learned.   Download
Block Diagram The block diagram artifact shows a highly abstracted view of the Motor Motion Controller project. It shows how the PCB serves as the connecting component between the GUI, the firmware, and the motor and encoder. The colors correspond to the team member responsible for the component: green for Trevor, blue for Alec and purple for Marley. The arrows between blocks refer to how the blocks are connected. More detail on these interfaces can be found in the Interface Definitions artifact.   Download
Interface Definitions Corresponding to the block diagram, the interface definitions detail the relationships between blocks. The first column represents the name of the interface that can be seen on the block diagram. The second column describes the type of interface, and the third column elaborates on the specifics, including limits and specific requirements. The colors (corresponding to those on the block diagram), identify the team member responsible for each component. Green refers to Trevor, blue to Alec, and purple to Marley.   Download
Firmware Test Circuit Schematic Due to the COVID pandemic our group was unable to work together in person while we were developing this project. This meant that the firmware designer was unable to access our actual PCB while writing the firmware. To overcome this problem, they designed and built a test circuit that included an STM32 devboard, rotary encoder with Schmitt trigger debounce, and a dedicated USB connection to a host PC. The schematic for this test platform shows how all of the components are connected together. Using a test platform they were able to continue developing the project firmware despite a global pandemic.   Download
Project Firmware GitHub This code repository is where all of the STM32G4 code lives. We chose the STM32G4 as our microcontroller because of its superior peripherals and modern ARM core. Our project's firmware was built on top of ST's provided hardware abstraction library (HAL). These abstractions allowed us to quickly build a project with integrated USB, floating point math acceleration, and quadrature encoder decoding.   Link
GUI GitHub This repository includes the code for the front end Graphical User Interface. The GUI was implemented in XAML and C# using Microsoft WPF. It opens without any connection to a COM port, but a connection is required for proper functionality. For use instructions, refer to the User Guide (III) in the Developer Guide. The README in the GitHub includes information on further development and expansion.   Link
PCB Schematics These are the schematics for the motion controller, given the requirements for the system. It has individual schematics for the STM32G431 microcontroller, motor controller, 3.3V regulator, RS485 transceiver, and FDCAN transceiver. This is also an Altium schematic file, so it includes all the part data sheets and purchasing links to the items. The overall schematic (Main) shows all the individual blocks and how they work together as a whole.   Download
PCB Layers These are the individual layers as a whole and as individual layers for the PCB. The PCB is a 4 layer board, using 1oz. copper on the top and bottom and 0.7oz. copper for the middle two signal layers. The signals that are included are all properly impedance matched and the power lines are calculated to handle the defined current capacities for the lines.   Download
PCB BOM This includes all the parts that were ordered for the PCB, including the part designator, the part value, the link to the where to purchase it from, the vendor, the vendor number, the price from the vendor at the purchasing quantity, how many are needed for a single PCB, how much the parts for the PCB will cost, the actual purchasing quantity, and the total cost of items bought. This is an interactive artifact, so the links are available to be clicked.   Download
Motor Specifications The motor used is a Rev Robotics HD Hex Motor with a 20:1 planetary gearbox. This has an integrated magnetic encoder that has 28 counts/revolution on the main motor shaft, not the 20:1 reduction shaft. As a 12V motor specifically, the power supplied to the PCB is limited to the range that the motor can handle.   Download
Motor Control Arduino Code This is a minimum viable Arduino code base for the motor controller system. Due to the global pandemic of COVID-19, the team could not fully implement the code with the microcontroller we selected before the pandemic. This Aruduino was bodged onto the system using the vias from the motor controller to the microcontroller, and were intercepted to be controlled via an Arduino Uno and the serial monitor.   Download
PCB Enclosure This is a minimalist enclosure design for the PCB to cover up the sensitive electronics on the back and create a robust mounting system for the PCB itself.   Download
Project FAQ Below is a list of anticipated questions. Any additional questions can be directed to the group members at the emails listed below:   Download