Brushed Motors
Project Overview
Section titled “Project Overview”On the rover exists a MCU board which essentially is a PCB powered by 12V which has various voltage lines and MCUs embedded on it. Two of the MCUs embedded on it is what we call the Motor MCUs, which are two STM32s chip whose tasks are to control the brushed motors of the rover.
The brushed motors which the STM32s control are the arm joints (Joints A, B, F, Finger, Gripper), Mast Gimbal (Pitch and Yaw), ISH carousel system, the SA system (Joints 1, 2, 3, Scoop, and Microscope).
System Overview
Section titled “System Overview”The two STM32 MCUs are connected via the same I2C line. They are both follower devices and the leader device in the I2C bus is the Raspberry Pi.
Top Level Code
Section titled “Top Level Code”The code is written in C++.
The I2C.cpp file is a wrapper for I2C. The Controller.cpp defines the Controller class which basically represents a motor. The ControllerMap.cpp file basically creates Controller devices based on the config (esw.yaml) file. The ROSHandler.cpp file defines all the functions that are called in response to services and topics.
MCU Code
Section titled “MCU Code”Code can be found in embedded-testbench in dev/motors.
https://github.com/umrover/embedded-testbench/tree/dev/motors
Appendix
Section titled “Appendix”Motor MCU Pinouts (Blurry - sorry)
Section titled “Motor MCU Pinouts (Blurry - sorry)”There are some pins that happened to be swapped on the actual motors MCU board.

Motor MCU 0 Pinout
Section titled “Motor MCU 0 Pinout”Source is Motor MCU Pinout Google Sheets


Motor MCU 1 Pinout
Section titled “Motor MCU 1 Pinout”Source is Motor MCU Pinout Google Sheets

Arm Topics
Section titled “Arm Topics”Source is Teleop ESW ICD Sheet Google Sheets

Arm Services
Section titled “Arm Services”Source is Teleop ESW ICD Sheet Google Sheets

Science Topics
Section titled “Science Topics”
Science Services
Section titled “Science Services”