by Dallas Downing.
The goal in combat robot competitions is to make a weaponized robot that can either destroy its competition or demonstrate enough control and aggression to make it a clear winner. In general, that typically means having a robot with a weapon attached, like a flipper, a spinner, or a flamethrower. Other approaches include building an external shield, like a ring or shell, and spin it around the robot’s exterior. But occasionally, you have a robot that is the weapon (no, I’m not talking about wedges). These kinds of robots spin their entire bodies instead of spinning an isolated weapon. This design is called a melty brain (sometimes called a translational drift robot) and, in theory, they hit harder than traditional spinners. Increasing the weapon’s speed or mass will increase the energy that is transferred to the opponent. At very high speeds, however, the robot cannot move close enough for the weapon to make good contact with the opponent and usually glances off the opponent’s armor. On the other hand, melty brains leverage their entire weight while spinning, which lets them have a high energy output without spinning too fast. However, controlling these robots is a hard problem, so you don’t see them often in competitions. Today we will be looking at RoboJackets’ current attempt at the design with the 12lb robot Hocki.
The idea for Hocki started with former RoboRacing electrical lead and current Hocki bot lead Varun Madabushi. He, Juan Elizondo (former RoboWrestling electrical lead), and Afshan Chandani (former Apachi Bot Lead) were attracted to the technical challenge of making a melty brain. Melty brains require more sophisticated electronics and software than most other combat robots, which makes them unique among the other robot designs. On top of that, they were interested in seeing if they could make a larger version since almost all melty brains they had seen were made for 3lb competitions. Because of this, the first step in the design process was research to see if a 12lb robot was feasible. “We needed to see what speed we needed in order to get a robot that hits reasonably hard,” said Madabushi, and they needed to find components like sensors and microcontrollers that could handle that speed. Initial design efforts were spent looking at existing 3lb designs and specifying components.
At first glance, you might think getting a robot that is constantly spinning to move in a straight line seems like a hard problem. And you would be correct. The first step in controlling such a robot well is getting a robust electrical system that can operate at the high speeds necessary. A melty brain can spin at a couple thousand RPM, meaning the components must have a short response time. The principle component, the microcontroller, needs to run in the realm of 100 MHz to make small adjustments several times within a single rotation of the robot. Sensors need to have a high enough refresh rate to pick up on any variations in the robot’s motion within a rotation. Additionally, sensors need to have a minimal amount of error with every reading. As a match goes on, sensors with drift can cause the robot to behave suboptimally and makes it harder for the driver to drive.
Hocki uses four accelerometers, two infrared (IR) sensors, one magnetometer, and a Teensy 4.1 microcontroller (which runs at 600 MHz). The accelerometers use the centripetal acceleration to calculate an angular velocity, which can be used to calculate the robot’s rotation (i.e. where it’s facing). The magnetometers measure the Earth’s magnetic field, which gets the robot’s angle relative to true north. The IR detectors are used to detect an IR beacon the team will put at the arena wall. Having multiple and different types of sensors creates a redundancy to reduce the error in Hocki’s state calculation.
Sensor type selection was only a small part of the design process. The electrical team spent a considerable amount of time reviewing different models of the sensors with different sensitivities, refresh rates, and communication bandwidth. With Hocki spinning around 3600 RPM (60 rotations per second), the accelerometers can saturate from the high centripetal acceleration, meaning they stop giving meaningful readings. Adding the magnetometer and IR detectors help mitigate that, but they come with their own challenges. Most digital magnetometers max out at 20Hz, which means a reading can only be taken every few rotations. The IR detectors require two transmitters, positioned at opposite ends of the arena, to represent a heading of 0 degrees and 180 degrees. Since an IR sensor could pick up a signal from both beacons, the team had to come up with a way to detect which signal is stronger (closer), and therefore, which beacon Hocki is “facing”.
Given this array of sensors, Hocki now has to make sense of and use the data it is receiving. First, the sensor data is passed into a Hybrid Extended Kalman Filter (essentially, a type of nonlinear state estimator). It combines and filters the data to get the acceleration, velocity, rotation, and other data about Hocki’s state. To convey the orientation to the driver, the microcontroller flashes a few LEDs on the top of Hocki, which creates a band of light in the direction Hocki is facing (an example from another robot can be seen in this video). Using a remote control, the driver gives two inputs to the robot: the spin speed and direction of motion. The microcontroller can now control the motion of Hocki by sending commands to the ESCs driving the motors, which are fed back into the Kalman filter.
Brief aside about controls: Melty brains are also known as translational drift robots because they work by varying the wheel speeds as the robot spins to cause it to drift in a certain direction. The diagrams below help demonstrate how varying the speeds affect motion. In brief, the wheel “opposite” the direction of motion needs to spin faster than the wheel “closer” to the direction of motion.
The dotted line in this example splits Hocki into regions to show the further and closer side to the direction of motion. At the start, the left wheel is in the lower region, so it needs to spin faster than the right wheel. As Hocki rotates, the left wheel slows down to match the speed of the right wheel when the wheels are parallel to the direction of motion. As the robot continues to rotate, the right wheel is now further so it speeds up faster than the left wheel. The “faster region” also changes as the driver changes the direction of motion, shown below. The differing speeds cause Hocki to move in an arc, rather than a straight line, but the arcs are small and are chained together to create the impression of moving in a straight line. Controlling the wheel speeds like this is why accurately knowing the orientation and reacting quickly is important. If Hocki is flipped by an opponent, the accelerometers detect it and the microcontroller reverses the rule so Hocki can continue spinning. Aside done.
The firmware that handles motion control was started early in the design and development process. According to BattleBots mentor Keaton Sadoski, the number and arrangement of sensors “was an early concern because it would determine the complexity of the Kalman filter, which would increase the runtime of our control loop.” The microcontroller needs to complete a loop of the control logic in a small, set amount of time for controlling the robot to be feasible. When Hocki is spinning at its full speed of 60 rotations per second, a full rotation takes 16.6 milliseconds, and the time for a control loop is on a scale of microseconds. Due to production delays from the pandemic, getting a full electrical system has been a slow process. The firmware team, without a physical system or sensors, ran simulations using MATLAB to approximate how they expected the robot to behave. This let them get an idea of which Kalman filter to use and how to optimize it. As more electronics have been acquired and assembled, the team has been testing individual components and preparing the system for a full test.
The mechanical designs of Hocki are more complex than most other combat robots due to extra constraints in the design. The first and most important constraint was space for the electronics. The inside of Hocki needs to house the batteries, motors, sensors, microcontroller, radio, and wheels. Additionally, it has the requirement of a balanced weight distribution. Any significant imbalances can make Hocki oscillate while spinning, making controlling it significantly harder. Hocki also needs the structure and armor to protect the critical electronics inside. After deciding on a powertrain that fit their space restraints, the team started with a symmetrical design. The idea allowed them to put two teeth on the outside opposite each other, with the motors balancing out their weight. This design proved to be inefficient with space and made it hard to organize the electronics and batteries. The team settled on a mirrored design with a single tooth. In order to keep the center of mass at the center of the robot, the team experimented with different cut out patterns on the top and bottom plates.
The tight quarters inside meant that maintaining the tolerance of parts was critical to making a successful robot. Significant time was spent making the design easy to assemble without losing precision. With the tight clearances inside, the team needed to avoid tolerance buildup everywhere. The hardest component to make accurately was the outer aluminum ring. To prevent it from deforming when hit, the ring is a solid piece of aluminum with an integrated tooth. The tooth itself is protected by a piece of steel plate to ensure it can cut into an opponent without degrading on impact. The team decided to outsource the machining of the ring because of the required precision and the limitations on the SCC’s machine shop due to COVID-19. The result, shown below, was “totally worth it” according to Madabushi.
Currently the team is working on fine tuning the drive system. Hocki is mostly assembled and many of the electrical components are being tested. Due to pandemic precautions, the team is not attending a competition this year, so they are taking their time making things work well. By the end of the semester, the team hopes to be doing full scale testing of Hocki at its hypothetical max rotation of 3600 RPM.