Zachary Houser
CALnect 4
Connect 4 is a board-game treasured by children from many generations. The motivation behind our project: to provide people with an interactive way to play a time-honored game against a computer in a way that is engaging and challenging. To do this, we have constructed a fully-integrated game-play system by which a human player can easily interact with a computer player. You can see some sample gameplay of our finished project in the video here.
​
To see more of the project, please visit http://connect4me102b.weebly.com/
We chose the Arduino infrastructure to program and interface with multiple mechanical components and used the Arduino Due microcontroller board. The program associated with the Arduino controls all aspects of the game, from interpreting the human players move, to moving the necessary robotics to deploy the computer's move, to deciding how the computer can best compete against the human player.
The mechanical components of the system provide both structure and signal connections between the computer and the real-world. The frame is made of 80/20 extruded aluminum and a base of poly-carbonate. A custom-manufactured printed circuit board provides the base for seven photo-interrupt sensors that detect tokens dropping into the board. The hopper that holds the tokens is designed to move along the top of the board via a quadrature encoder and motor configuration that provides accurate positioning and rapid traverse for the computer move. Tokens are dispensed from this hopper with a servo motor, and a spring provides compression for the stack of tokens.
​
The player's actions are tracked using an array of photo interrupt sensors. The sensors consist of an Infrared Light emitting diode and a photo transistor, which changes voltage from high to low when the sensor is blocked. The sensors are connected through a custom milled printed circuit board that interfaces with the Arduino's digital I/O pins.
Images of the custom circuit board and its fabrication
Images of the rack and pinion and the positioning breadboard
A rack and pinion is used to provide linear motion for the system. The pinion is driven by a DC motor mounted in the carriage while the rack is mounted to a stainless steel rail. The carriage is mounted to a Delrin slide that moves in a channel on the rail. A quadrature shaft encoder is mounted to the carriage with the drive shaft passing through it. The components for this system were purchased from Vex robotics as an off-the-shelf linear positioning system.
To enable our machine to deposit checkers, we created a custom hopper – made out of acrylic, ABS plastic, and aluminum – to hold them and dispense them. Our main feature is a spring-loaded mechanism to compress the tokens in a neat stack, which leads to consistent dispensing by a servo motor at the compressed end. In addition to the tubing that actually holds the checkers, there are four main components that make up the hopper: the plunger, cap, ramp, and attachment block.
Images of the custom-built hopper