Project Overview
|
In Laymen's Terms: As the ball rolls around, it blocks the laser beams. Sensors detect which lasers are blocked and sends the information to the computer.
Now that the computer knows where the ball is, it can move the rods accordingly. The computer moves the rods back and forth (to intercept the ball) and around (to kick the ball). Motors make this movement possible. The system plays foosball at the level of an average foosball player. It tries to defend its goal and score on its opponent. In Technical Terms: The project is broken into three separate units: Ball Tracking Unit Each laser bank has a corresponding receiver bank on the opposite side of the table. Each receiver bank has 8 photo-transistors that are mounted on the inside wall of the table. As the ball rolls around on the table, two or more laser beams are broken (one or two on the short side of the table, one on the long side of the table). If two lasers are broken in one axis, then the ball is assumed to be half way between the two broken lasers. The lasers were mounted closer to each other in this axis with the intention of obtaining a higher resolution in this axis. We felt a higher degree of accuracy was necessary in this direction so that it is easier to get a player directly in front of the ball.
This design produces 101 digital signals (8 bits per bank, plus a partial bank in each axis) that need to be input to the logic unit. This is too many signals to input directly to the computer. To solve this problem, we designed a bank select board. The bank select board acts as a giant multiplexer. Each bank is assigned a unique four bit address. The logic unit requests the status of each bank by specifying its address. The bank select board then routes the 8 signals of the requested bank to the logic unit. The logic unit polls all of the banks, regardless of weather laser breaks are reported or not. The entire polling process takes approximately 0.001 seconds and averages across multiple polls to eliminate jitter.
The software developed for the logic unit is responsible for polling the ball tracking unit to obtain ball position, calculating the ideal action based on a predefined game strategy, and commanding the movement response unit to execute that play. All code is written in C, with the exception of the UI, which is written in C++.
Movement Response Unit A motor is driven by digital step pulses sent from the logic unit to the motor’s drive. Two signals are needed to drive the motors; a step signal commands the motor how far to rotate, and a direction signal determines if the motor will rotate clockwise or counterclockwise.
Producing linear motion from these motors is accomplished with ball screw linear actuators. The motor that drives the actuator is mounted on the end of the actuator. The drives have been programmed such that one step pulse produces one mm of linear movement. As the linear actuator moves back and forth, so does the rod. The motor that creates the kicking motion is mounted to the platform of the linear actuator. The foosball rod is connected to the kicking motor. The kicking motor has been programmed such that one step pulse produces one degree of rod rotation. Limit switches are used to disable the motors if the system tries to move the rod beyond its physical limits. In normal game play, the limit switches should never get tripped. They are merely included as a safety precatution to protect the motors in case the software were to ever not function within specification.
Safety is also a concern of the project. These concerns are being addressed with a master kill switch, a pause button, and a safety lid for the table.
For even further details, please view our project cycle reports (http://cese.msoe.edu/foosball/cvs/doc/CycleReports/) or contact us with questions. |








