The Pacbot team has been busy these last few months, focusing on next year’s robot while everyone is off campus. We’ve successfully designed and assembled a custom PCB which contains an ATSAMD21E18 microcontroller, an H-bridge motor driver IC, a real time clock, as well as a magnetic encoder. All of these are connected together with the microcontroller that has been custom configured for this system design (initializing the internal pin connections and configuring the ADC inputs/PWM outputs). We’re able to directly read the orientation of the rotor of the BLDC motor, to ensure we can drive the motor with the most effective PWM signals to produce the maximum possible torque. This allows us to reduce current usage to nearly nothing when no load is on the motor, but react immediately to any disturbances such that the motor can effectively hold its position as if it constantly had maximum current usage, while still using very little standby current.
We’ve gotten the code to produce this position control, and on top of that we’ve implemented an interpolation engine (https://github.com/siteswapjuggler/RAMP) which allows us to control the acceleration and response of the motor so we can avoid wheel spinning, so we can rely on the set motor position as a basic estimator of where the robot will be. In the video above, we shown first a low speed (0.1m/s once our intended wheels are mounted, and two of the modules are built and connected), and then a high speed (2.5m/s) travelling back exactly to the start position.