Open Loop
     an ME218B Project

ME218B: Open Loop

Dept. of Mechanical Eng. | Stanford University



Meaningless graphic

Software

Control System Overview

The design of the control system for our robot reflects both the division of the sensor and actuation tasks, and the gameplay strategy we implemented.  At the highest level, the robot begins by waiting for an input high on the flash circuit.  This initiates a game clock (timer module), and starts the sequence of event-driven tasks to drive the bot from its starting place to the ball dispenser, including an initial search for the dispenser beacon (beacon detection and beacon navigation modules), and line following functions (tape sensor and line following modules).  Once positioned under the beacon, the bot orients the turret in the direction of goal 3 (aiming and tape dispenser modules), and begins the ball request routine, where it drives forward and backward with a timing corresponding to the dispenser requirements.  When the game clock expires, or once the bot has exhausted the supply of balls, all driving stops and the bot retracts the tape measure.

In many of the functions and modules, it was useful to define the playing field (either A or B) to determine turning directions.  To accomplish this, we use the initial phase of the line following sequence, where the bot drives forward to the black line, to set the side.  When driving toward the dispenser beacon, the bot hits the tape at an angle, which flags one of the front tape sensors first depending on the side the bot is on.  For example, on side A, the left tape sensor hits the black tape first.  Later functions can then reference the side static variable.

state diagram

The master software document is available as a pdf.

Documentation of the pin-out used to interface with the E128 board is available as a pdf here.

Modules

The actual code for the project is available here: