Propeller Bot
A mobile robot designed to navigate a game board and push blocks against a robot opponent.
The Project:
This robot, designed as part of Stanford course ME218b, is based on a hierarchical state machine. Seven sensors give the robot data through both an event-checking framework as well as hardware interrupts. Two PIC 32 microcontrollers are the brains of the bot and communicate via an SPI protocol. The compact size and 2:1 gearbox, driven with a DC motor, allowed this bot to advance to the semi-final competition.
Skills:
embedded system design
hierarchical state machine design and implementation in C, SPI communication, interrupt-driven response, embedded timer systems, signal conditioning, circuit design, motor drive
mechanical design
drive train and gearbox design
rapid prototyping
digital fabrication
CAD
Drive Train Highlights
In order to navigate the board faster than the other robots, we designed a gearbox with a 2:1 gear ratio. In order to turn faster we positioned the wheels as close as possible to the central axis of rotation of our robot.
In order to have the most linear relationship between the control effort of our motor and our robot’s speed, we drove our motor at using a high-frequency, drive-break strategy.
Circuit Highlights
PIC-to-PIC communication
The “leader” PIC 32 sends 16-bit commands to the “follower” PIC 32 by writing the commands into the SPI buffer. The “leader” and “follower” share a clock line (SCK1) which dictates when bits are read into and out of the buffer.
The follower decodes the 16-bit messages and responds accordingly.
Signal Conditioning
Beacons at each corner of the gameboard pulse IR light at distinct frequencies. The bot can position itself on the board by sensing this light and determining its pulse frequency.
The incoming light pulses are conditioned by the circuit shown and then signal peaks are counted in an interrupt service routine (ISR). Based on the frequency of light the bot senses, it can determine its location on the gameboard.
trans-resistive amplifier, converts the current output from photo-transistor to a voltage output
a high-pass filter to filter out low-frequency noise
amplifier to make signal more pronounced and a low-pass filter to filter out high-frequency noise
comparator with hysteresis, which converts the signal into a square wave
Software Design Highlights
The performance of Propeller Bot is dictated by a hierarchical state machine. The photo to the left shows the gameplay state, the second of three levels of the hierarchy.