Electronics

TiVA Pin Assignment

Our TiVa had three PWM outputs to servos. We used one servo for controlling the release of recycling, one for controlling the release of trash, and another for sorting the recycling and trash into their respective bins. The motors were controlled with four outputs, two which output the PWM signal, and two which controlled the direction of each motor.

IR Detection

Our IR beacon detection circuit included an IR phototransistor connected to a transresistive stage, two gain stages, and a Schmitt trigger.

IR Emitter

We used a BJT to control the current through our IR emitting diodes. A PWM signal would pulse the base of the BJT to make the diodes emit at the appropriate frequency to open the recycling center.

Fan Power

Current through our fan was controlled by an N-channel MOSFET in low-side drive. We initially were going to vary the PWM signal to the fan depending on game state, but decided to just keep the fan fully on throughout the duration of the game.

DC Motor Control

We used two H-bridges to control our two motors. Each H-bridge required a PWM signal to control speed and an Hi/Lo signal to control direction.

Servo Motor Control

We used three servos on our bot. Two for controlling each gate that held the GARBAGE and one for controlling the sorting arm (cookie guy).

LED Gamestate Indication

Gamestate(whether the game was active and whether we were the north or south team) was indicated by 14 LEDs. We used BJTs to control three groups: one to indicate North, one to indicate South, and one to indicate the game was active.

COMPASS

Using an SSI communication protocol compatible with SPI, our robot communicated with the COMPASS, to acquire information about the game state and the frequencies of the recycling centers. The internal Tiva hardware took care of the complexity of the timing requirements of the SPI interface. We just had to configure it to the correct frequency and handle registers and interrupts correctly.

Limit Switches

Limit switches were used to help our bot localize. When driving toward a bin, the limit switch would indicate when we had reached the bin. The limit switch also functioned as collision avoidance, making our robot change directions whenever running into another robot.

RGB Sensor

An RGB sensor, communicated the values of the colors it was reading from each ball over I2C (using code provided by Ed). These values were used to decide whether the ball was recycling or trash. We only needed to make sure that it was hooked up to power and ground and that the inputs were in the right spot. We then queried it periodically to see what the most recent color measurements were. When recessed into a hole that the ball filled, the sensor worked very predictably. There were extremely few misclassifications in testing under a variety of conditions, as the calibrated values were quite robust.

Power Distribution


Two buck converters connect to the batteries. One creates a 14V source for the motor drivers, and the other creates a 5V source, which we attached to a PDB (created by Kevin).

Encoders

The encoders were Pololu 2598 magnetic 12 CPR encoders. One was mounted on each wheel and used for wheel speed control. They were powered off 5V and one line was connected to an input capture pin managed in MotorSpeedControl