top of page

Controls & Microcontroller Design

The Controls & Microcontrollers team is responsible for all the software involved in moving the boat’s motors based on a desired movement. This is split into two pieces: control algorithms and microcontroller design.


The group designs, implements, and tunes our own control algorithms to determine what signals need to be sent to the motors to follow the path outlined by AI. We use a combination of pure pursuit and PID. Pure pursuit is a path tracking algorithm which maintains a “lookahead” point on the path some set distance away from the boat. As the boat moves, the point advances along the path, so the boat is always chasing it. This results in a more natural, smooth path of movement.


Pure pursuit typically outputs the linear and angular velocity the vehicle should move at in order to head towards the lookahead point. However, we found that controlling on velocity produces rough and shaky movements due to the sensitivity of our IMU, a sensor which produces velocity readings. This year we decided to transition to using heading as the variable we monitor. The algorithm calculates the error in heading as the difference between the boat’s current heading and its heading if it were pointed directly at the lookahead point. We then apply PID control to reduce this error. PID (proportional, integrative, derivative) control is a tunable equation which takes an error as input, multiplies the error, integral of error, and derivative of error by some constants, and outputs the offset which should be applied to the PWM signals sent to move the thrusters.


The controls group aims to experiment with alternative control methods, such as LQR (linear quadratic regulator) and MPC (model predictive control) to determine which is best at moving the boat in smooth, efficient ways.


This group also writes all the code for our Arduino microcontrollers, which involves processing signals from the sensors and remote controller by designing serial communication interfaces. Given the expansion of our sensor suite this year, we added additional microcontrollers to our system, increasing its complexity and capabilities. We use two ATMega328 microcontrollers, one for receiving signals from the remote controller and writing signals to the motors, and the other for reading from the compass, temperature, and leakage sensors. We also use a MicroMod ESP32 processor for our GNSS data. A challenge for the microcontrollers group this year was troubleshooting sensor integration and ensuring the rates of our microcontrollers were matched up.

bottom of page