-
-
Notifications
You must be signed in to change notification settings - Fork 17
Brushed Motors
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).
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.
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.
Code can be found in embedded-testbench in dev/motors.
https://github.com/umrover/embedded-testbench/tree/dev/motors
There are some pins that happened to be swapped on the actual motors MCU board.
Source is Motor MCU Pinout Google Sheets
Source is Motor MCU Pinout Google Sheets
Source is Teleop ESW ICD Sheet Google Sheets
Source is Teleop ESW ICD Sheet Google Sheets