Robockey was a robot hockey competition that was the final project in mechatronics (MEAM 510). I spent nearly 6 weeks working with two friends from Penn Electric, Andrew Remec and Daniel Orol, to create the three robots pictured below.

Team 0 Robockey Robots

We had a month and a half to create three autonomous robots that could play hockey. The robots had to fit in a 15cm diameter 13cm tall cylinder and had to be able to score a 3in diameter IR emitting puck. For more information about the competition, see the Robockey website. We were team 0. Our robots were made out of sheets of 3mm and 6mm MDF, several parts that we machined, custom pcbs, and some off the shelf components, including motors, wheels, casters and a solenoid. All three robots were practically identical which reduced the design time and made programming easier. I spent the first week designing the PCBs, which we ordered from Advanced Assembly who sponsored our robots. I also helped with the mechanical design and manufactured the motor mounts.

Inside a Robot

Each robot had a total of 16 LTR-301 phototransistors that could detect the infrared light emitted by the puck. They were all connected to a multiplexer on the PCB that allowed the robots to constantly switch between them. A second multiplexer allowed us to switch resistors, making it possible to increase the sensitivity of the phototransistors when the puck was far away. We worked hard to keep the wiring organized and Andrew did such a good job that every phototransistor was wired correctly the first time.


Each robot had a total of three connectors, one for the battery, one for the motors and solenoid and one for the phototransistors, compared to many other robots that were a mess of wires going all over the place. The solenoid was used to kick the puck, earning us 2 points for each score, instead of 1. It was powered with a boost converter that charged two large capacitors to 30V from our 11V lithium polymer battery.

Connectors and Battery
Bottom of a Robot

We finished building the robots with a few weeks left to focus on code. I wrote a debug viewer in Java that we used extensively to make sure the robots knew where they were, where the puck was and a variety of other debug information depending on what we were testing. It communicated via USB with a micro controller that had a wireless connection with all three of our robots. It also used the JNI to execute parts of our C++ microcontroller code to make sure it was working properly, before putting it on the robots.

Debug Viewer after a lot of Testing

I also wrote libraries for all of the basic operations our robots had to perform, such as reading ADC values and controlling the motors, that directly worked with microcontroller registers. I also wrote wireless code that would allow robots to change positions on the field, such as the goalie switching to offense when it got the puck and another robot replacing it as goalie. However, this wasn't actually used during the competition. I also worked on the robot and puck localization code. The robots used an infrared camera to look at 4 overhead LEDs in a known configuration to accurately determine their positions. The puck was located by comparing the intensities of the two phototransistors most closely facing the puck and puck locations were also shared between robots to get more accurate positions.

We ended up winning the first match 7-5 and losing the following two matches 2-1 and 3-2 respectively. The competition didn't go as well as we had hoped for several reasons. Firstly, we didn't anticipate other robots being as heavy as they were. By the time we saw robots full of lead shot, it was too late to do much. The movement functions could have been smoother and an IMU or a faster update loop could have helped. A lot of time was wasted calibrating everything to work on the practice field only to find that it didn't work on the competition field, despite having code that should have gotten rid of any slight differences.