The Resistors

Me En 495R Mechatronics Competition, Brigham Young University

Overview

This website describes the robot design and design process for "Team Resistors" in the mechatronics course competition at Brigham Young University for Summer Term 2013. Students in this course, working in teams of two or three, had just over three weeks to design, build, and test a robot to compete in the competition.

Our team's finished robot

The Team

Our team, "The Resistors," was composed of three students from the mechanical engineering (ME) and electrical engineering (EE) programs at Brigham Young University:

The team branding

The Competition

For the competition, the robot is placed in a 4' by 4' arena with 2' high walls around the perimeter. A 5" square hoop is located 19" off the floor in each corner of the arena, and the goal of the competition is for the robot to shoot colored ping-pong balls (purple, pink, and white) through the corresponding hoops. Three of the hoops have a color associated with them, which can be identified by an infrared beacon located 6" off the floor underneath the hoop that broadcasts a square wave at a pre-defined frequency corresponding to the color of the hoop. There is also an option of picking up a golden colored from the arena floor and shooting it through any hoop for additional points.

Six balls—three of each color—are loaded into the robot in random order at the beginning of each round. Once the robot is given a start signal, it must finish the round completely autonomously. The entire robot, with the possible exception of a cartridge for storing the balls, must fit within a 6" by 6" by 6" cube at the beginning of the round. The detailed rules for the competition are described in this document.

Strategy

As we only had three weeks to design and build our robot, our overall strategy centered on minimizing the complexity required to move the robot and shoot the ping pong balls. We also decided to focus only on getting the colored balls through the hoops, and did not attempt to pick up and shoot the golden ball. In order to minimize the complexity, we decided to position the robot at the center of the arena, and then rotate the firing mechanism to shoot the balls through each of the hoops. By doing this we only had to worry about moving the robot once, and the aiming mechanism could be simplified because it would always be shooting at targets that were at the same distance and height. This strategy is summarized in the following steps:

  1. Position the robot at the center of the arena
  2. Sort the ping pong balls
  3. Find the first IR beacon, aim the robot, and shoot the two appropriate colored balls
  4. Repeat for the remaining two IR beacons

The main functionalities of our robot can be broken down into the following tasks:

Our detailed strategies for each of these tasks is described below.

Positioning

The positioning stage is one of the most critical and complicated tasks the robot needed to perform. We developed two possible strategies for doing this, which are described below in order of decreasing complexity and cost, but also potentially in order of decreasing performance.

  1. Three micro-switches would be mounted on the front of the robot. Two ranged distance sensors (either ultrasonic or IR) would also be used, with one facing out the same side of the robot the switches are on, and the other facing out the opposite side. At the beginning of the round, the robot would drive forward until one of the switches hit the wall, and then to straighten out the robot it would continue driving forward until the other two switches hit the wall. The middle switch was required to ensure that we hit a flat portion of the wall and not a corner. If the robot did hit a corner, it would rotate 45° and try again. Once the robot was straight it would back up until the readings from the two sensors were equal, showing that the robot was centered in that direction. The robot would then rotate 90° and use the ranged distance sensors to center itself in the other direction. This approach could also conceivably have been adapted to use a single ranged distance center, assuming that the sensor is reasonably accurate.
  2. The second approach was very similar to the first, except that wheel odometry (using encoders or stepper motors) would be used instead of a ranged distance sensor. The robot would find a wall and straighten itself, then use wheel odometry to center itself in the arena. It would then rotate 90°, drive forward until it hit another wall, then reverse and use wheel odometry to center itself in that direction. This approach reduces some of the cost and complexity of using ranged sensors, but also introduces more ways for errors to accumulate.

After initial testing with the ultrasonic rangefinders we selected, we determined that the measurements were too noisy to be useful and decided to go with the second approach.

Aiming

Our initial strategy aiming the robot was to have the shooting mechanism mounted on a rotating turret so that the drive motors would not have to be used anymore. We were concerned that if the drive motors were used to rotate the robot, the robot would move substantially off-center in the arena and not be able to make the hoops. The turret concept was quickly eliminated due to its complexity, however, and after initial testing we found that stepper motors could be used to rotate the robot without it significantly drifting off-center.

We developed an initial course aiming strategy, as well as fine-tuning strategy we hoped to implement if we had time. After using the walls to center the robot in the arena, the robot should have been positioned facing directly at one of the walls. Our course aiming strategy was to simply use the stepper motors to rotate the robot 45° to the first hole, and then rotate in 90° increments to each of the subsequent holes. For the fine-tuning strategy, we would first use the course strategy to get close, and would then measure the amplitude of the IR beacon to determine when we facing the hole most directly.

Sorting

The ping-pong balls would be sorted/positioned using a carousel mechanism. The balls would be loaded into the carousel in random order, and while the robot was performing the initial positioning, a separate microprocessor would index the color of each ball in the carousel. Color sensing would be done using LEDs as the sensing elements. When the robot was ready to shoot, the carousel would rotate to select the appropriate colored ball, and then a servo-acutated flap would drop the ball into the firing mechanism.

Shooting

The shooting mechanism was the simplest system on our robot. It would consist of two rubber wheels spinning in opposite directions, mounted so that they propeled the ball at the appropriate angle to get the ball through the hoop. The ball would be dropped into a chute by the sorting mechanism, and this chute would feed the ball into the wheels to launch it.

High Level Design

In order to simplify development and make more efficient use of our microprocessors, we decided to divide the functionality of the robot up between two main boards, each with its own microprocessor. These boards were a navigation board, which would handle the positioning and aiming of the robot, and a shooting board, which would handle the sorting and shooting functionalities. A SPI connection was implemented to allow the microprocessors to communicate and coordinate their actions. These two boards also relied on a number of subsystems to accomplish their tasks.