Team A: Connect Four Loko

The goal is to construct a mechatronic device -- a robot -- that plays games of Connect Four autonomously, intelligently, and creatively. Our specific implementation exists as a combination of materials, subsystems, and features that not only function in unison most efficiently, but also facilitate additional device features that are as utilitarian as they impressive.

Figure #1: System Overview

The checker collection hopper system -- into which checkers are initially dumped -- is a tri-phase checker management system, for easy collection,
stacking, and indexing

The main playing arm -- used to deposit checkers into the desired game board column -- features a pulley-driven actuation system, for speed and precision.

Accordingly, these systems will be energized by a combination of embedded electronics, IR/contact/limit sensory inputs, and carefully calibrated
actuators that implement snappy, seamless gameplay.

Team Members & Responsibilities


· Jonathan Francis - Electrical & Computer Engineering | Schedule ›
Embedded, electronics, system integration, and testing lead

· Hong Jai Cho - Electrical & Computer Engineering | Schedule ›
Software engineering lead (game AI / best move computation)

· Anil Dhurjaty - Mechanical Engineering
Mechanical fabrication and assembly co-lead

· Joel Pazhayampallil - Mechanical Engineering
Mechanical fabrication and assembly co-lead



Since the goal of this project is to construct a robotic device that will autonomously play games of
Connect Four™ -- versus a human or another robot -- and win, or at least play with a reasonably high degree of intelligence, our group addressed various tasks:

(1) Efficient checker-collection and priming
The checker feeding mechanism is the subsystem that transports checkers from some initial location (i.e. a staging location, hopper, etc) to the “player head”, which holds individually primed checkers until it is required to release them into one of the seven columns of the Connect Four™ game construct. Another possibility would be to have the “player head” itself be a checker hopper, carrying all of the checkers with it, dispensing only one when it is prompted. With this second scenario, complications in the filtering phase (to allow for only one checker to be primed at a time, without getting stuck) would arise. It seems highly possible that checkers would get wedged in the hopper, such that no checkers would be dispensed when the player head is called to do so. Thus, feeding checkers from the base was found to be preferable, since dispensing only one checker on the moving platform is more complicated than just opening a door and letting the only checker fall out. Feeding the checkers into the “player head” is done by depositing the checkers into a hopper which will sort and load the checkers into the feeding mechanism. From there, The Device will be able to fetch the full stack of checkers and load them (quite conveniently) into the “player body”. At the beginning of the game, and subsequently
after each turn, one checker will be poked out of the stack and into the “player head”.


(2) Efficient movement of the 'player body/head' (the actuated player arm; the subsystem which indexes a game piece to the desired column slot)
In order to place the checker in the desired slot, the dropper (or “player head”) must be able to move
with a fair degree of accuracy (±1.5 mm for ideal, drop with no interference from column walls) to the desired slot, drop the checker and return to the home position (to load the next checker, if necessary). Our group came up with several ways by which the player head could be propelled: lead screw, rack & pinion, or clothes-line pulley mechanisms. Our group eventually decided to implement a pulley-driven actuation mechanism, to move the player head across the board; a lead screw mechanism requires more torque to actuation that could be reasonably furnished, while the rack & pinion design
is much too likely to have introduced crippling error in position control.

  (3) Gameplay artificial intelligence and move prediction
The "player" AI is constructed with a recursive algorithm that will calculate a dynamic rating of the “next game state”, as a function of the Connect Four™ checker configurations that currently exist. This rating will be assigned as varying degrees of 'relatively positive' or 'relatively negative' measures. For example, if The Device is poised to win or make significant progress in the next (few) turn(s), the result of the AI computation for that round will show a highly positive game state; conversely, if the opponent is poised to win on the next (few) turn(s), the analysis results will be highly negative. The program will then look six probable game states ahead and pick the move that would result in the highest game state.

(4) (Utilitarian) Coolness Factors
As part of the design specification, our group was required to implement 'coolness factors' -- additional
device features that rise above the robot's base functionality and further differentiate our robot from those of other groups with the same overall project. More specifically, however, our group's intention had always been to implement coolness factor(s) that displayed our skills and creativity,
while significantly augmenting the robot's utility. We believe we have achieved this goal with the following additions:
  • Bluetooth Serial Port Protocol
    • Control Mode -- use this mode to control the robot's actions, using the Connect Four Loko Java Blackberry application
    • Communication Mode -- use this mode to communicate game moves that the robot's opponent implements
  • Interrupt-driven Events
    • Button-initiated hopper emptying cycle
    • Button-initiated reset function

Subsystem Breakdown

Hopper Mechanism

The overall goal of this subsystem is to accept Connect Four game checkers, to organize or queue them, and to index or deploy them individually. To satisfy each of these three higher-level requirements, we implemented three corresponding mechanical stages of checker manipulation, which -- together -- comprise our 'hopper mechanism'.

Figure 2: Tri-Stage Hopper System

The first hopper stage -- 'collection / sorting' -- is the checker containment chamber, constructed from a 0.06-inch thick acrylic sheet that has been wrapped into a cylinder (5 inches in diameter, 8 inches in height). At the base of the cylinder is a
size 3/8-inch lasercut acrylic disk, with five holes (aligned in a six-hole symmetry) that each fit size 1-1/4-inch PVC pipe. A geared Jameco DC drive motor is mounted below the surface of the cylinder, in the center -- its shaft is inserted through a lasercut hole and therefore extends up into the checker container. With the use of a shaft coupling attachment, a thick ziptie is affixed to the motor shaft as an 'agitator', sweeping stray checkers into one of the five PVC pipe holes after they are dumped in.

The second stage -- 'stacking / storage' -- is comprised of 5-element array of 8-foot long, size 1-1/4 inch PVC pipes; this design affords significant speed/ease (< 3 seconds, no jams) in checker stacking and storage. The base of each pipe is force fit into one of five holes in a 1/4-inch lasercut acrylic plate (in the same manner as in the lasercut acrylic disk above the array).

The third and final hopper stage -- 'checker indexing' -- consists of two 1/4-inch lasercut acrylic plates that sandwich a free-moving 1/4-inch lasercut acrylic disk. The top plate also forms the base of hopper stage #2 (above), into which the five PVC pipes are force-fitted. In this manner, any checkers that are stacked in the five columns will rest on top of the acrylic disk. This disk, which has one checker-sized slot lasercut at the edge, is actuated at the center by an HS755HB quarter-scale servo motor (which has been modified for continuous rotation) and thereby fetches a checker from a PVC pipe stack and deposits it through a checker-sized hole that has been lasercut into the bottom plate. Once out of the hopper, a ramp transports the checker into the main robotic arm that will ultimately release it into one of the seven Connect Four gameboard columns.

Actuation and Position Control

Given the purpose of this robot, the most important mechanical action (arguably) is that of placing a checker in one of seven Connect Four gameboard columns. This involves moving some aspect of the device over top of the game board, then subsequently retreating to an initial or 'home' position. Specifically, our device reatures a robotic arm -- crafted primarily out of lasercut acrylic, which moves in only one degree of freedom (laterally, over the top plane of the game board), in order to minimize the mechanical complexity.

Figure 3: Pulley-driven Actuation System 

This arm ('player body/arm') is actuated by a urethane timing belt (0.200-inch pitch, 3/8-inch width), driving and guide pulleys, and a 1.8 degree/step 30VDC@0.7A Step-Syn stepper motor and rests on top of two 1/4-inch guide rails, with linear bearings. Built into the arm is an (i) HS325HB servo motor, with a horn that guards or clears the opening of the checker fixture (for priming or releasing a checker, as necessary) and (ii) an IR photosensor (to sense the events wherein a checker is primed or released)

Embedded Electronics, Sensing, and Power Distribution

The elements of this subsystem include the embedded microcontroller (Arduino Mega 2560, built around an Atmega2560 microprocessor), the motor driver circuit (Adafruit Integrated Stepper/DC/Servo Motor Driver Shield for Arduino), bluetooth module, PC power supply (modified; 3.3/5/12/24-VDC power lines) with stacked high-voltage terminal blocks, and sensory electronics (Fairchild QRB1134 IR Photosensor, limit switches, pushbutton switches).

Figure 4: Embedded and Sensory Electronics

The overall purpose of this subsystem is to provide operating intelligence to the robot, to implement the game AI and best-move computation, and to regulate the robot's mechanical behavior throughout runtime. These elements energize and control the robot in such ways as:

(i) powering the agitator driving motor (hopper, stage #1) at the beginning of every game of connect four

(ii) actuating the hopper servo motor (hopper stage #3), in order to deployed a checker from the hopper and into the 'player head' (where it then blocks the IR Photosensor, triggering the microcontroller to turn the servo off)

(iii) performing a game move -- actuating the stepper motor by the pre-computed number of steps to move 'player head/body' to the desired game column, signaling the 'player head' servo motor to release the primed checker, and actuating the stepper motor once again to
move the 'player head/body' back to the home position

(iv) Powering the 12VDC power supply fans for cooling

(v) Enabling RS-232 communication with a wired external device, for control and communication of game moves and state data

(vi) Controling the bluetooth module for implementing Bluetooth Serial Port Protocol COMM connections with a remote device, for remote control and communication of game moves and state data

Software

A plethora of software applications and libraries were written to govern the functionality and additional features of our device. Our software 'package' consists of the central embedded control software (AVR, C), dynamics / sensory / computation libraries (C++), our game artificial intelligence (C, C++), and our Bluetooth Serial Port Protocol COMM mobile application (Java, XML).

The central control application primarily governs the mid-level gameplay functionality, powered by the functional libraries, especially as it concerns communication with an external device (wired or not) to convey/receive commands and game state, staging motor control event, or catching software interrupts. Built on top of this layer -- although included in this designation -- are the Bluetooth interface subroutines. These methods are intended to extend the communication environment to accommodate the mobile Bluetooth application that runs on mobile devices, externally. Finally, the higher-level AI software involves dynamic computation of best-move possibilities, which is used to dictate the manner in which the robot will utilize the aforementioned lower-level routines in implementing its moves during runtime gameplay.

The AI uses an efficient tree-search algorithm (using alpha-beta cutoff decisions) to ensure that the process plays as quickly as possible. A unique feature about the AI is that it uses a state stack. Using the state stack, it
is unnecessary to do a back move after each of the simulated moves (for Alpha-Beta pruning). Instead, states are pushed to and popped from the stack; this makes the overall computation fast because state pops are mere memory address shifts. The AI maintains an array of the number of winnable positions, and it uses the
array to evaluate the score for the best move depending on the numbers. The score is assigned the highest number in a win case.



Figure 5: Control Circuit (click for larger image)

Figure 6: Functional Flowchart (click for larger image)


     - Design Proposal: [ pdf ]
     - Mid-semester presentation: [ pptx ]
     - Final Poster / Quad Chart: [ pptx ]
     - Final Presentation Video: [ (YouTube) ]

Team J: SmackTalk


Website link: https://sites.google.com/site/connect4smacktalk

Main Design Concept

The basic playing design of the system is straightforward. A loader subsystem will process one chip and deposit it in the playing arm, which will carry the chip to the desired column on the board on a single degree of freedom. 

Loading State




Dispensing State
























Subsystems



Loader


Exploded view
Top view of loader
































The loader is inspired by a coin sorting device, two layers with cutouts large enough for only one chip are stacked on each other. One layer is stationary, and the other is rotated on top of it. One chip can move on the top layer and is blocked from dropping by the stationary layer until the two cutouts are aligned. The chip will then drop into a third layer that will push the chip out of the hopper to the playing arm by a ramp. This ramp has a sensor that allows the processor to know when a chip has passed through the hopper and is in the playing arm. This sensing is achieved by a hinge that forms a “door” for the chip to pass through. When the door is moved up because of the chip, a thin sliver of metal triggers an OMRON IR sensor.
  

Playing Arm

Exploded view
Pinning servo
































The playing arm consists of a moving arm, and a stationary support arm. The moving arm takes the chip from the hopper, and holds it in place with a servo-driven arm. At the beginning of the turn, the servo pins the chip to prevent it from falling out, and rises before moving over the board into the neutral zone.  The rising motion is achieved by another servo, which also moves the pop-out subsystem out into position by means of a rack and pinion.

    
Base

Exploded view

View of motion system
 

































The lateral motion is accomplished by a coarse ball screw and stabilized by two drawer rails, driven by a large motor. Its position is tracked by an encoder strip and another OMRON IR sensor. A brace is bolted to the baseplate to avoid collision and possible damage to the loader. The ball screw is also on one end, preventing any binding issues. However, the screw is then very loose when the playing arm subsystem is moved to the other end of the ball screw, so another brace is attached to the coupler to hold the screw in place and to prevent the free end from wandering.


Final Build















Here is a shot of the final build of the robot. The speaker that is sitting on top of the power supply supplies the "smack talking" aspect of our robot by playing disparaging movie quotes after each turn. Below is the video of it in action.



Team

From left to right: William Young, Andres Rodriguez, and Nicholas Arthur
















William Young
BSME, MPD 2011
Responsibilities included building the hopper subsystem and assisting with the robot build.

Andres Rodriguez
BSME, MPD 2011
Responsibilities included 3D CAD modeling and building the base and arm subsystems. 

Nicholas Arthur
ECE 2011
Responsibilities included electronics, coding, and robot AI.




Team E: slowpoke


Design Concept


Our three person group built a machine which can play the game Connect- 4. We added several features to the device, including a system to read the current state of the game (which allows it to play against a human). The design focus was to built a machine which can execute moves as quickly as possible, which we achieved through robust mechanical design and careful electronics design. Our machine is capable of having a handful of loose chips dropped into its hopper, sorting the chips into a magazine, and then taking a chip, scanning the board, and dropping its chip. Each move takes from 532ms to 946ms, depending on which column the chip is dropped into. We use an artificial intelligence system developed by Keith Pomakis, running on an inexpensive Celeron- based system to compute possible moves, looking 10 moves ahead. While the human is taking its move, the computer is calculating where it will move for all 7 of the possibilities, so that as soon as the human is done moving, the machine can place a chip.

Figure 1: Overview of components

System Overview

We divided the system into three main groups: the hopper and magazine system, the gantry frame and rider, and the electronics and software.

Hopper
The hopper (Figure 2) consists of a square upper box and a lower four-sided funnel shape. The funnel ends in a slot outlet just big enough for a single chip to exit the hopper. The hopper is made of laser-cut acrylic, and is jigsaw-fit together and glued with both superglue and epoxy for durability. Around the hopper is a thicker square laser-cut acrylic support plate. The plate is supported by four solenoids, with one on each corner. As the solenoids are only capable of pulling, each solenoid is counteracted by an upward-pulling tension spring. To agitate the chips in the hopper, the solenoids pull down and release at a given frequency, causing the hopper to shake up and down. With only this agitation, there is a chance that the chips could stack horizontally perpendicular to the funnel outlet slot, blocking chips from exiting the hopper. To eliminate this failure mode, there is also a small agitator motor that hangs down into the hopper from above. This motor turns a pair of agitator sticks that will dislodge any jams of the sort mentioned above. The chips leave the bottom of the hopper and enter the inlet to the chip magazine.

Figure 2: Front view of hopper; (a) acrylic hopper, (b) support plate, (c) hopper solenoid, (d) counteracting spring, (e) agitator motor, (f) agitator sticks, (g) chip magazine inlet

Chip Magazine

The chips leave the hopper and enter the top of the ramp chip magazine (Figure 3), which is also laser-cut acrylic. The magazine holds exactly 21 chips, which is the maximum number of chips each player needs to fill the game board. At the inlet to the magazine are an IR emitter and sensor that will sense when a chip has stopped at the inlet, indicating that the magazine is full. Once the magazine is full, the chip loader solenoid is activated, dropping the first chip into the chip dropper that is attached to the rider on the gantry.


Figure 3: Front view of ramp chip magazine; (a) acrylic ramp,
(b) inlet IR sensor, (c) chip loader solenoid


Chip Dropper

The chip dropper (Figure 4) is attached to the rider on the gantry system. The rider moves the dropper over the desired column on the game board , and the dropper drops a chip into the column. It drops a chip using a solenoid (Figure 5, a), which pulls a pin (Figure 5, b) out from underneath the chip. The dropper is then returned to its home position underneath the chip loader in the magazine to receive its next chip and await a command.


Figure 4 Side view of chip loader with inactive solenoid; (a) solenoid, (b) plastic rocker,  (c) counteracting spring, (d) loader pins, (e) chip dropper

Figure 5: Side view of chip dropper just after dropping a chip;
(a) dropper solenoid, (b) dropper pin, (c) chip loader, (d) game board


Gantry Frame

The gantry consists of two main parts: the non-moving frame and the moving rider. The main function of the non-moving parts was to hold the belt in tension, and hold the rods parallel relative to each other. 

In order to accomplish this, we needed to provide accurate positioning for the linear motion rails. A mounting block for the rods was machined out of .5” thick aluminum bar stock (Figure 6.) The holes for the linear motion rods were reamed to .002” over the diameter, and set screw was drilled and tapped, to hold the rods in place. The mounting blocks also included through holes for the belt to pass, as well as tapped holes to hold an idler pulley mount on one side, and a motor mount on the other. These mounting blocks are held to the aluminum angle bracket frame.

Figure 6: A machined mounting block, with rods, idler pulley assembly, and belt mounted

Moving Rider

The moving rider assembly has to be able to hold a chip above the board, and drop it when required. It also has to ride on the linear motion rods, and hold the belt in tension. We constrained the motion by using bronze bushings, which we then press fit into an aluminum piece we machined. This piece was then screwed to a center block, which held the belt tensioning system (Figure 7). On either side of the game board, there were carbon fiber 'wings' which mounted the sensors which looked through the board, to check if a piece was in place.


Figure 7. Image of completed moving assembly, the rider plus the cantilevered chip dropper, and the carbon fiber game state sensing wings mounted.

Electronics

Figure 9 shows the physical layout of the electronics systems, and the signal routing is pictured in Figure 10. In Figure 10, the label for each of the connection points indicates the number of signal wires. Green signifies GPIO lines, orange signifies 12V or 24V signals and blue signifies RS232 connections. More complete pin-outs can be found in the schematics.



Figure 8. Electronics Overview


Figure 9. Signal Flow Chart of the System



Team's Responsibilities

Michael Dawson-Haggerty: Mechanical Design (gantry, rider)

Curtis Layton: Electronics, Software

Sara Whitby: Mechanical Design (hopper, magazine)


Video





Team G: Jörmungandr

Visit our primary website: www.jormungandr.co.cc


Overview 

Our central design principal was stability. We strived from the beginning to avoid complicated encoder and feedback schemes for our positioning, instead favoring systems that had physical limitions on their range of motion. This created a system that relied little on extensive calibration to deliver the chips with reasonable reliability. This helped with the cost constraints on the project, allowing us success using the cheaper, class-provided motors and servos without sacrificing accuracy. 

Our design also involved construction out of lightweight, and aesthetically pleasing laser-cut acrylic, and standard aluminum angle and bar stock, arranged to allow maximum mechanism visibility. We kept our machine footprint small and also kept the total system very lightweight. It can easily be moved by one person. The relative low-cost of these materials allowed us to iterate through design several times when necessary to optimize part fit and geometry. While this was a new medium for our mechanical engineers, they adapted to it quickly, and ended up rather enjoying the simplicity of the medium, which can move quickly from design through fabrication. 

The rest of this page will detail the subsystems roughly in the order the chips pass through them, from feeder through deployment into the board, followed by a look at the electronics (including software) behind it all. Diagrams accompany the description of each subsystem. These are simplified for the purpose of exposition of the basic concepts.




Chip Feeder 

Chips are dropped into the hopper at the top of the machine. When the new game command is issued, the motor running the agitator (Fig. 1) is turned on, which orients the chips properly to enter the queue (Fig. 2). The agitator is turned off once fourteen of the twenty-one chips are queued in the ramp system, and then will be periodically activated again when there is space in the queue for more. If a chip gets jammed in the agitator, a reflectance sensor detects the lack of rotation and will reverse to free the jam with a very high success rate. At the end of the ramp system there is a servo-controlled actuator (Fig. 3) that can release a single chip into the chip dropper below. The servo used for this is a standard analog servo (model Hitec HS-325) with two arms on it. The top arm is extended to prevent the remaining chips in the queue from prematurely falling into the chip dropper, while the bottom arm is withdrawn to allow the bottom chip to pass. 



Fig. 1 - Agitator Wheel
Fig. 1 - Agitator Wheel

Fig. 2 - Queue Ramp
Fig. 2 - Chip Queue

Fig. 3 - Single-Chip Release
Fig. 3 - Single Chip Release Mechanism



Chip Dropper 

Immediately upon receiving the opponents previous move, a single chip enters the chip dropper (Fig. 4), which is deployed into the neutral zone as described below. The chip dropper begins with a chip release mechanism (Fig. 4 - top right) very similar to the one on the chip feeder, but with only the one arm since there is no need to worry about multiple chips in the dropper (even if somehow more than one was released, there is no room in the mechanism for multiple chips). Once the AI determines the best move, the single chip is released by a micro servo (model Hitec HS-81) into the final ramp (Fig. 4 - bottom two-thirds) where the column selectors deliver it to the proper column. The column is selected by three acrylic assemblies attached to three servos (again, model Hitec HS-325). Each servo controls access to two of the columns, and the last column is always open as a fail-safe. The stability of the system here is ensured by loose tolerances and a physical limitation of motion in one direction. The column-selection servo is activated before the chip is released to make sure that it is in the proper position before the chip reaches it. The chip rolls down the ramps until it reaches the open column, where it falls down into the selected column. 

Fig. 4 - Chip Dropper
Fig. 4 - Chip Dropper
Fig. 5 - Chip Dropper - CAD Render
Fig. 5 - Chip Dropper - CAD Render


Neutral Zone Entry 

Our neutral zone entry is unique among the teams in the class. Instead of depending on linear actuation, such as a belt, rack and pinion, or lead screw assembly, to reach the column, we enter from behind the board with a four-bar linkage system. Our entire dropper assembly advances into the neutral zone and sits above the game board. This gives us the advantage of a very simple and precise method of positioning the dropper over the board. The alignment is guaranteed because the assembly is at its physical limit in both the extended and retracted states. As long as our baseplate is aligned properly on the studs, the probability of a miss is quite low.

Fig. 6 - Neutral Zone Entry
Fig. 6 - Neutral Zone Entry - Side view
Fig. 7 - Arm Retracted - CAD Render
Fig. 7 - Neutral Zone Entry - Arm retracted
Fig. 8 - Arm Extended - CAD Render
Fig. 8 - Neutral Zone Entry - Arm Extended
Electronics The brain of our machine is two Arduino microcontrollers. First, a Pro runs the AI. Commands come from the controlling PC via serial communication into the Pro, which chooses the next move. Once the move is chosen, the Pro sends the command via a serial connection to an Uno, which carries out the move. While the Uno is awaiting the next move command, it polls the reflectance sensors that detect the presence of chips in the queue and whether the agitator is jammed, and adjusts the agitator accordingly. There are two additional circuit boards involved in the robot: a motor driver board, and a perfboard used for interfacing the microcontrollers and the actuators and sensors. The motor driver board is the type issued by the course, constructed by the team during an early lab session. The interconnect board was constructed by Warren specifically for this project. All sensors and servos are connected to the interconnect board by custom extension cables, with Molex connectors, for modularity. The chip dropper connections all run down a common trunk line, and the other cables are run individually. The motors used for both the neutral zone entry and the agitator are standard JameCo ReliaPro DC motors with gearboxes, issued by the course running with chain drives. Last in the hardware portion of the electronics is the power supply. We used a scavenged 250W Dell ATX computer power supply (Model HP-P2507F3CP), with the extraneous wires trimmed off. We used the 12V and 5V rails, as well as the ground, and the power wire, connected through a rocker switch to ground for powering the machine on and off. Software The AI for our machine maintains the game state in memory throughout the game, updating it when it receives the opponent's move, and when it chooses its own move. From the game state, it generates every possible game state for a total of five moves ahead. Once it generates these gameboards (up to 16,807 each turn) it evaluates each one and scores them based on which is most likely to generate a win for us. It executes the next move for whichever game board ranks highest. It also specifically tries to block the situations specified in the project documentation to avoid a loss to the opponent. Some optimization is in place to prevent the machine from trying to consider moves that are invalid (due to the column already being full). The microcontroller's limited resources severely impede the depth to which we can analyze the game. Greg actually developed the AI to look much deeper (tested up to eleven layers deep), but this took too long to execute on the board for the 20 second time limit we have per turn. The Uno's software is much less complicated. It contains simple routines for manipulating all the servos and motors. Servos are controlled with the Arduino Servo library, which uses one of the internal PWM timers to control up to twelve servo objects with one pin each. Commands given are simply angles for these controls. The center/intial values and movement angles are stored in the Arduino as constants to allow simple recalibration if necessary. The motors are controlled with two digital outputs per motor connected to the motor driver board. The two pins allow the motors to be run forward, backward, or braked. The enable pins are permanently wired high to conserve usage of the limited number of output pins on the Arduino. The motor for the neutral zone entry is simply controlled by timing, with no position encoders necessary to properly operate. On every iteration through the main loop, the Uno software also polls the two reflectance sensors to control the agitator. The Uno keeps track of how many chips have been deployed, and once it is very likely that the hopper is empty, it will turn off the agitator. 




Lastly, we will briefly explain our unique communication system. Though we use the prescribed 9600 baud 8N2 encoded serial communication protocol, our exact implementation is unique. It is unique in that instead of bidirectional connections between the different boards and controlling PC, we have a one-way loop through the system. This was to both save output pins, and take advantage of the fact that there is only one buffered serial port on the Arduino boards we used. The communication arrives from the controlling PC to the Pro, which chooses a move and issues commands to the Uno. Once the Uno has carried out the move, it reports the move back to the controlling PC.
TeamOur team is comprised of four students, two of whom come from a mechanical engineering background, and two from an electrical engineering background. Below is a little information on each member, including which portion of this project they primarily focused on.

Jon Daneman

Jon Daneman is a senior mechanical engineering student. His main area of work for this project was designing and fabricating the chip feeder subsystem, and lots of other CAD work, such as generating animations for progress reports.

Anton Galkin

Anton Galkin is a graduate mechanical engineering student. His focus was design and fabrication of the chip dropper subsystem, as well as machining and assembly of many components, camerawork (both photo and video), CAD modeling and rendering.

Greg Maclean

Greg MacLean is a senior electrical & computer & biomedical engineering student. His main area of work for this project has been designing and implementing the game AI that the system uses to play Connect Four. He also did video editing for our final video. In his free time, Greg studies combat strategies to teach Jormungandr how to more effectively defeat Thor.

Warren Pryde

Warren Pryde is a senior electrical & computer engineering student. For this project, Warren's main work was in implementing the control software to run the actuators and process the sensor inputs. He also handled wiring, sensor/actuator calibration, and system integration, in addition to making the website.

VideoBelow is the video we produced for our final presentation detailing the subsystems and showing the machine in action.

Team I: Prius

Ryan M. Pocratsky / Mechanical Design, Fabrication, and Assembly
Manasi K. Patil / Electrical Circuit Design and Fabrication
Sruthi Reddy Chintakunta / Controls and Microcontroller Programming
Shrey Aggarwal / Assembly

Project Specifications
·         Overall volume should be less than 8 ft3  
·         Dumping 10 cans in 10 seconds or less
·         Compression ration greater than or equal to 3
·         Crush 10 cans in under 2 minutes

Main design concept
The overall objective of this project is to make an aluminum can recycler for standard 12 fluid ounce cans. There are three main steps that need to be implemented: input of cans through a hopper to the crusher, crushing of the cans, and output of cans to a container.  Figure 1 shows the primary components inside the system.

Figure 1: System from inside the box and below the hopper
System Overview
Our system is subdivided into three subsystems: the hopper, chute, and crusher.

Hopper:
For the input mechanism, we used a hopper made out of galvanized sheet metal, with a 2 ft. by 2 ft. mouth, as seen in Figure 2. The hopper funnels towards one corner where there is an opening large enough for one can to enter the system. Above this hole is a sheet metal cover that prevents cans from stacking on-top of each-other and jamming at the hole.  A vibrating motor is attached below the hopper to help to cans move down the hopper into the chute quickly.

Figure 2: Hopper, on the top face of the can crusher
Chute:
To ensure that only one can enters the crusher at a time, two pull-solenoids are used as gates in the chute. One is placed at the end of the chute before the crusher and the other is placed one can length above this solenoid inside the chute, as seen in Figure 3.  Solenoid Gate 1 is used to separate one can from the other cans in the chute.  Then, solenoid gate 2 is retracted long enough for the single can to fall into the crushing area.  If the first gate was not there, the retraction time required to allow only one can into the crushing area would be dependent on the number of cans in the chute.  Multiple cans in the chute apply additional force to the can behind gate 2, which cause it to fall faster than if one can was in the chute.  Implementing two solenoid gates makes the can delivery system perform more consistently, independent of the number of cans in the system.

Figure 3: Chute and solenoid gate positions
A sensor at the end of the chute indicates when a can is ready to be put into the crushing area.  Figure 4 shows the sensor and solenoid gate 2.  This sensor is used to indicate the position of the can in the system, which is used to control the state of the device.

Figure 4: Solenoid gate and light sensor at the end of the chut
Crushing:
For crushing we decided to use a pneumatic cylinder to supply the necessary pressure to crush a can because of its speed and simplicity. The can crushing area is shown in Figure 5.  The pneumatic cylinder selected has a force rating of 61 pounds at a supply pressure of 100 psi, with a maximum operating pressure rating of 250 psi. The supply pressure we used for the device is 125 psi.  Since the can will be under dynamic loading, the effective force of the cylinder will be approximately three times the rated force.  A force of 180 pounds is sufficient to crush a can. 

However, our experimental results indicate that the piston needs to actuate twice to reduce the can volume to the desired amount.  As the can is crushed, the piston is decelerating.  This causes the force applied to transition from dynamic loading to static loading.  Once crushing is initiated, a force greater than 61 pounds is required to crush the can to a third of its original volume.  Since the pneumatic cylinder actuates and retracts in less than a second, the time required to actuate twice is minimal compared to the given time requirements.
Figure 5: Crushing area showing the sensors and output hole
The cans are output through a hole in the base of the device, as shown in Figure 5.  Once the can is reduced to the desired volume, it falls through the opening.  Additionally, a safety sensor is located in the output hole to stop the system if anyone reaches into the system from the output hole.

How the System works
The flow chart of the system is shown in Figure 6.

Figure 6: General Flow Chart of the system
The flowchart above gives a basic overview of how a can thrown into the hopper will travel through the different subsystems to be crushed to a third of its original size.  While a can is being crushed, the system stops the motion of cans through the chute.

Safety Features
There are two safety features on the device, the output sensor and the shut-off switch.  As described above, the output sensor prevents the system from processing cans if an object is inserted in the output hold.  The shut-off switch kills power to the solenoids in the system.  The default of the pneumatic solenoid is closed, so the pneumatic actuator will be connected to the exhaust port.  Therefore, killing power to the solenoids will cause the piston to retract and prevent cans from traveling down the chute.

Video